var upe=Object.defineProperty;var dpe=(e,t,r)=>t in e?upe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var G3=(e,t,r)=>(dpe(e,typeof t!="symbol"?t+"":t,r),r),q3=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var Ke=(e,t,r)=>(q3(e,t,"read from private field"),r?r.call(e):t.get(e)),ar=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},er=(e,t,r,n)=>(q3(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var fS=(e,t,r,n)=>({set _(o){er(e,t,o,r)},get _(){return Ke(e,t,n)}}),Pr=(e,t,r)=>(q3(e,t,"access private method"),r);function iq(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(n,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Er=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function su(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var aq={exports:{}},TT={},sq={exports:{}},wn={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var f2=Symbol.for("react.element"),fpe=Symbol.for("react.portal"),hpe=Symbol.for("react.fragment"),ppe=Symbol.for("react.strict_mode"),mpe=Symbol.for("react.profiler"),gpe=Symbol.for("react.provider"),vpe=Symbol.for("react.context"),ype=Symbol.for("react.forward_ref"),bpe=Symbol.for("react.suspense"),wpe=Symbol.for("react.memo"),xpe=Symbol.for("react.lazy"),NL=Symbol.iterator;function Cpe(e){return e===null||typeof e!="object"?null:(e=NL&&e[NL]||e["@@iterator"],typeof e=="function"?e:null)}var lq={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cq=Object.assign,uq={};function R1(e,t,r){this.props=e,this.context=t,this.refs=uq,this.updater=r||lq}R1.prototype.isReactComponent={};R1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};R1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dq(){}dq.prototype=R1.prototype;function b6(e,t,r){this.props=e,this.context=t,this.refs=uq,this.updater=r||lq}var w6=b6.prototype=new dq;w6.constructor=b6;cq(w6,R1.prototype);w6.isPureReactComponent=!0;var LL=Array.isArray,fq=Object.prototype.hasOwnProperty,x6={current:null},hq={key:!0,ref:!0,__self:!0,__source:!0};function pq(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)fq.call(t,n)&&!hq.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:f2,type:e,key:i,ref:a,props:o,_owner:x6.current}}function Spe(e,t){return{$$typeof:f2,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function C6(e){return typeof e=="object"&&e!==null&&e.$$typeof===f2}function _pe(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var $L=/\/+/g;function K3(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_pe(""+e.key):t.toString(36)}function F_(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case f2:case fpe:a=!0}}if(a)return a=e,o=o(a),e=n===""?"."+K3(a,0):n,LL(o)?(r="",e!=null&&(r=e.replace($L,"$&/")+"/"),F_(o,t,r,"",function(l){return l})):o!=null&&(C6(o)&&(o=Spe(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace($L,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=n===""?".":n+":",LL(e))for(var s=0;s<e.length;s++){i=e[s];var c=n+K3(i,s);a+=F_(i,t,r,c,o)}else if(c=Cpe(e),typeof c=="function")for(e=c.call(e),s=0;!(i=e.next()).done;)i=i.value,c=n+K3(i,s++),a+=F_(i,t,r,c,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function hS(e,t,r){if(e==null)return e;var n=[],o=0;return F_(e,n,"","",function(i){return t.call(r,i,o++)}),n}function kpe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _s={current:null},N_={transition:null},Epe={ReactCurrentDispatcher:_s,ReactCurrentBatchConfig:N_,ReactCurrentOwner:x6};wn.Children={map:hS,forEach:function(e,t,r){hS(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return hS(e,function(){t++}),t},toArray:function(e){return hS(e,function(t){return t})||[]},only:function(e){if(!C6(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};wn.Component=R1;wn.Fragment=hpe;wn.Profiler=mpe;wn.PureComponent=b6;wn.StrictMode=ppe;wn.Suspense=bpe;wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Epe;wn.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=cq({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=x6.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)fq.call(t,c)&&!hq.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){s=Array(c);for(var l=0;l<c;l++)s[l]=arguments[l+2];n.children=s}return{$$typeof:f2,type:e.type,key:o,ref:i,props:n,_owner:a}};wn.createContext=function(e){return e={$$typeof:vpe,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gpe,_context:e},e.Consumer=e};wn.createElement=pq;wn.createFactory=function(e){var t=pq.bind(null,e);return t.type=e,t};wn.createRef=function(){return{current:null}};wn.forwardRef=function(e){return{$$typeof:ype,render:e}};wn.isValidElement=C6;wn.lazy=function(e){return{$$typeof:xpe,_payload:{_status:-1,_result:e},_init:kpe}};wn.memo=function(e,t){return{$$typeof:wpe,type:e,compare:t===void 0?null:t}};wn.startTransition=function(e){var t=N_.transition;N_.transition={};try{e()}finally{N_.transition=t}};wn.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};wn.useCallback=function(e,t){return _s.current.useCallback(e,t)};wn.useContext=function(e){return _s.current.useContext(e)};wn.useDebugValue=function(){};wn.useDeferredValue=function(e){return _s.current.useDeferredValue(e)};wn.useEffect=function(e,t){return _s.current.useEffect(e,t)};wn.useId=function(){return _s.current.useId()};wn.useImperativeHandle=function(e,t,r){return _s.current.useImperativeHandle(e,t,r)};wn.useInsertionEffect=function(e,t){return _s.current.useInsertionEffect(e,t)};wn.useLayoutEffect=function(e,t){return _s.current.useLayoutEffect(e,t)};wn.useMemo=function(e,t){return _s.current.useMemo(e,t)};wn.useReducer=function(e,t,r){return _s.current.useReducer(e,t,r)};wn.useRef=function(e){return _s.current.useRef(e)};wn.useState=function(e){return _s.current.useState(e)};wn.useSyncExternalStore=function(e,t,r){return _s.current.useSyncExternalStore(e,t,r)};wn.useTransition=function(){return _s.current.useTransition()};wn.version="18.2.0";sq.exports=wn;var A=sq.exports;const sr=M1(A),jv=iq({__proto__:null,default:sr},[A]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Tpe=A,Ipe=Symbol.for("react.element"),Ape=Symbol.for("react.fragment"),Ppe=Object.prototype.hasOwnProperty,Mpe=Tpe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rpe={key:!0,ref:!0,__self:!0,__source:!0};function mq(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Ppe.call(t,n)&&!Rpe.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Ipe,type:e,key:i,ref:a,props:o,_owner:Mpe.current}}TT.Fragment=Ape;TT.jsx=mq;TT.jsxs=mq;aq.exports=TT;var S6=aq.exports;const zr=S6.Fragment,R=S6.jsx,xe=S6.jsxs,Ope=Object.freeze(Object.defineProperty({__proto__:null,Fragment:zr,jsx:R,jsxs:xe},Symbol.toStringTag,{value:"Module"}));var nM={},gq={exports:{}},Sl={},vq={exports:{}},yq={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(x,k){var L=x.length;x.push(k);e:for(;0<L;){var j=L-1>>>1,z=x[j];if(0<o(z,k))x[j]=k,x[L]=z,L=j;else break e}}function r(x){return x.length===0?null:x[0]}function n(x){if(x.length===0)return null;var k=x[0],L=x.pop();if(L!==k){x[0]=L;e:for(var j=0,z=x.length,Y=z>>>1;j<Y;){var K=2*(j+1)-1,Q=x[K],q=K+1,J=x[q];if(0>o(Q,L))q<z&&0>o(J,Q)?(x[j]=J,x[q]=L,j=q):(x[j]=Q,x[K]=L,j=K);else if(q<z&&0>o(J,L))x[j]=J,x[q]=L,j=q;else break e}}return k}function o(x,k){var L=x.sortIndex-k.sortIndex;return L!==0?L:x.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var c=[],l=[],u=1,f=null,d=3,h=!1,p=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(x){for(var k=r(l);k!==null;){if(k.callback===null)n(l);else if(k.startTime<=x)n(l),k.sortIndex=k.expirationTime,t(c,k);else break;k=r(l)}}function w(x){if(g=!1,b(x),!p)if(r(c)!==null)p=!0,C(E);else{var k=r(l);k!==null&&S(w,k.startTime-x)}}function E(x,k){p=!1,g&&(g=!1,v(D),D=-1),h=!0;var L=d;try{for(b(k),f=r(c);f!==null&&(!(f.expirationTime>k)||x&&!B());){var j=f.callback;if(typeof j=="function"){f.callback=null,d=f.priorityLevel;var z=j(f.expirationTime<=k);k=e.unstable_now(),typeof z=="function"?f.callback=z:f===r(c)&&n(c),b(k)}else n(c);f=r(c)}if(f!==null)var Y=!0;else{var K=r(l);K!==null&&S(w,K.startTime-k),Y=!1}return Y}finally{f=null,d=L,h=!1}}var I=!1,O=null,D=-1,N=5,U=-1;function B(){return!(e.unstable_now()-U<N)}function F(){if(O!==null){var x=e.unstable_now();U=x;var k=!0;try{k=O(!0,x)}finally{k?T():(I=!1,O=null)}}else I=!1}var T;if(typeof y=="function")T=function(){y(F)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,_=P.port2;P.port1.onmessage=F,T=function(){_.postMessage(null)}}else T=function(){m(F,0)};function C(x){O=x,I||(I=!0,T())}function S(x,k){D=m(function(){x(e.unstable_now())},k)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(x){x.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,C(E))},e.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<x?Math.floor(1e3/x):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(x){switch(d){case 1:case 2:case 3:var k=3;break;default:k=d}var L=d;d=k;try{return x()}finally{d=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(x,k){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var L=d;d=x;try{return k()}finally{d=L}},e.unstable_scheduleCallback=function(x,k,L){var j=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?j+L:j):L=j,x){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=L+z,x={id:u++,callback:k,priorityLevel:x,startTime:L,expirationTime:z,sortIndex:-1},L>j?(x.sortIndex=L,t(l,x),r(c)===null&&x===r(l)&&(g?(v(D),D=-1):g=!0,S(w,L-j))):(x.sortIndex=z,t(c,x),p||h||(p=!0,C(E))),x},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(x){var k=d;return function(){var L=d;d=k;try{return x.apply(this,arguments)}finally{d=L}}}})(yq);vq.exports=yq;var Dpe=vq.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var bq=A,wl=Dpe;function Kt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wq=new Set,Rw={};function i0(e,t){Vv(e,t),Vv(e+"Capture",t)}function Vv(e,t){for(Rw[e]=t,e=0;e<t.length;e++)wq.add(t[e])}var Jd=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oM=Object.prototype.hasOwnProperty,Fpe=/^[: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]*$/,BL={},UL={};function Npe(e){return oM.call(UL,e)?!0:oM.call(BL,e)?!1:Fpe.test(e)?UL[e]=!0:(BL[e]=!0,!1)}function Lpe(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $pe(e,t,r,n){if(t===null||typeof t>"u"||Lpe(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ks(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Aa={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Aa[e]=new ks(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Aa[t]=new ks(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Aa[e]=new ks(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Aa[e]=new ks(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Aa[e]=new ks(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Aa[e]=new ks(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Aa[e]=new ks(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Aa[e]=new ks(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Aa[e]=new ks(e,5,!1,e.toLowerCase(),null,!1,!1)});var _6=/[\-:]([a-z])/g;function k6(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_6,k6);Aa[t]=new ks(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_6,k6);Aa[t]=new ks(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_6,k6);Aa[t]=new ks(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Aa[e]=new ks(e,1,!1,e.toLowerCase(),null,!1,!1)});Aa.xlinkHref=new ks("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Aa[e]=new ks(e,1,!1,e.toLowerCase(),null,!0,!0)});function E6(e,t,r,n){var o=Aa.hasOwnProperty(t)?Aa[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($pe(t,r,o,n)&&(r=null),n||o===null?Npe(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var gf=bq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pS=Symbol.for("react.element"),Mg=Symbol.for("react.portal"),Rg=Symbol.for("react.fragment"),T6=Symbol.for("react.strict_mode"),iM=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),Cq=Symbol.for("react.context"),I6=Symbol.for("react.forward_ref"),aM=Symbol.for("react.suspense"),sM=Symbol.for("react.suspense_list"),A6=Symbol.for("react.memo"),Jf=Symbol.for("react.lazy"),Sq=Symbol.for("react.offscreen"),HL=Symbol.iterator;function Py(e){return e===null||typeof e!="object"?null:(e=HL&&e[HL]||e["@@iterator"],typeof e=="function"?e:null)}var Wo=Object.assign,Y3;function Cb(e){if(Y3===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Y3=t&&t[1]||""}return`
`+Y3+e}var X3=!1;function Q3(e,t){if(!e||X3)return"";X3=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var n=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){n=l}e.call(t.prototype)}else{try{throw Error()}catch(l){n=l}e()}}catch(l){if(l&&n&&typeof l.stack=="string"){for(var o=l.stack.split(`
`),i=n.stack.split(`
`),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(a!==1||s!==1)do if(a--,s--,0>s||o[a]!==i[s]){var c=`
`+o[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=s);break}}}finally{X3=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Cb(e):""}function Bpe(e){switch(e.tag){case 5:return Cb(e.type);case 16:return Cb("Lazy");case 13:return Cb("Suspense");case 19:return Cb("SuspenseList");case 0:case 2:case 15:return e=Q3(e.type,!1),e;case 11:return e=Q3(e.type.render,!1),e;case 1:return e=Q3(e.type,!0),e;default:return""}}function lM(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rg:return"Fragment";case Mg:return"Portal";case iM:return"Profiler";case T6:return"StrictMode";case aM:return"Suspense";case sM:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cq:return(e.displayName||"Context")+".Consumer";case xq:return(e._context.displayName||"Context")+".Provider";case I6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A6:return t=e.displayName||null,t!==null?t:lM(e.type)||"Memo";case Jf:t=e._payload,e=e._init;try{return lM(e(t))}catch{}}return null}function Upe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return lM(t);case 8:return t===T6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qh(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _q(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hpe(e){var t=_q(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mS(e){e._valueTracker||(e._valueTracker=Hpe(e))}function kq(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=_q(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function yk(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function cM(e,t){var r=t.checked;return Wo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function zL(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=qh(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Eq(e,t){t=t.checked,t!=null&&E6(e,"checked",t,!1)}function uM(e,t){Eq(e,t);var r=qh(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?dM(e,t.type,r):t.hasOwnProperty("defaultValue")&&dM(e,t.type,qh(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jL(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function dM(e,t,r){(t!=="number"||yk(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Sb=Array.isArray;function Jg(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+qh(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function fM(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Kt(91));return Wo({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function VL(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Kt(92));if(Sb(r)){if(1<r.length)throw Error(Kt(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:qh(r)}}function Tq(e,t){var r=qh(t.value),n=qh(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function WL(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Iq(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hM(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Iq(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gS,Aq=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(gS=gS||document.createElement("div"),gS.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=gS.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ow(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var zb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zpe=["Webkit","ms","Moz","O"];Object.keys(zb).forEach(function(e){zpe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zb[t]=zb[e]})});function Pq(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||zb.hasOwnProperty(e)&&zb[e]?(""+t).trim():t+"px"}function Mq(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=Pq(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var jpe=Wo({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pM(e,t){if(t){if(jpe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Kt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Kt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Kt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Kt(62))}}function mM(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gM=null;function P6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vM=null,ev=null,tv=null;function GL(e){if(e=m2(e)){if(typeof vM!="function")throw Error(Kt(280));var t=e.stateNode;t&&(t=RT(t),vM(e.stateNode,e.type,t))}}function Rq(e){ev?tv?tv.push(e):tv=[e]:ev=e}function Oq(){if(ev){var e=ev,t=tv;if(tv=ev=null,GL(e),t)for(e=0;e<t.length;e++)GL(t[e])}}function Dq(e,t){return e(t)}function Fq(){}var Z3=!1;function Nq(e,t,r){if(Z3)return e(t,r);Z3=!0;try{return Dq(e,t,r)}finally{Z3=!1,(ev!==null||tv!==null)&&(Fq(),Oq())}}function Dw(e,t){var r=e.stateNode;if(r===null)return null;var n=RT(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Kt(231,t,typeof r));return r}var yM=!1;if(Jd)try{var My={};Object.defineProperty(My,"passive",{get:function(){yM=!0}}),window.addEventListener("test",My,My),window.removeEventListener("test",My,My)}catch{yM=!1}function Vpe(e,t,r,n,o,i,a,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(r,l)}catch(u){this.onError(u)}}var jb=!1,bk=null,wk=!1,bM=null,Wpe={onError:function(e){jb=!0,bk=e}};function Gpe(e,t,r,n,o,i,a,s,c){jb=!1,bk=null,Vpe.apply(Wpe,arguments)}function qpe(e,t,r,n,o,i,a,s,c){if(Gpe.apply(this,arguments),jb){if(jb){var l=bk;jb=!1,bk=null}else throw Error(Kt(198));wk||(wk=!0,bM=l)}}function a0(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Lq(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function qL(e){if(a0(e)!==e)throw Error(Kt(188))}function Kpe(e){var t=e.alternate;if(!t){if(t=a0(e),t===null)throw Error(Kt(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return qL(o),e;if(i===n)return qL(o),t;i=i.sibling}throw Error(Kt(188))}if(r.return!==n.return)r=o,n=i;else{for(var a=!1,s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a)throw Error(Kt(189))}}if(r.alternate!==n)throw Error(Kt(190))}if(r.tag!==3)throw Error(Kt(188));return r.stateNode.current===r?e:t}function $q(e){return e=Kpe(e),e!==null?Bq(e):null}function Bq(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Bq(e);if(t!==null)return t;e=e.sibling}return null}var Uq=wl.unstable_scheduleCallback,KL=wl.unstable_cancelCallback,Ype=wl.unstable_shouldYield,Xpe=wl.unstable_requestPaint,fi=wl.unstable_now,Qpe=wl.unstable_getCurrentPriorityLevel,M6=wl.unstable_ImmediatePriority,Hq=wl.unstable_UserBlockingPriority,xk=wl.unstable_NormalPriority,Zpe=wl.unstable_LowPriority,zq=wl.unstable_IdlePriority,IT=null,Wu=null;function Jpe(e){if(Wu&&typeof Wu.onCommitFiberRoot=="function")try{Wu.onCommitFiberRoot(IT,e,void 0,(e.current.flags&128)===128)}catch{}}var Qc=Math.clz32?Math.clz32:rme,eme=Math.log,tme=Math.LN2;function rme(e){return e>>>=0,e===0?32:31-(eme(e)/tme|0)|0}var vS=64,yS=4194304;function _b(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ck(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=_b(s):(i&=a,i!==0&&(n=_b(i)))}else a=r&~o,a!==0?n=_b(a):i!==0&&(n=_b(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Qc(t),o=1<<r,n|=e[r],t&=~o;return n}function nme(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ome(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Qc(i),s=1<<a,c=o[a];c===-1?(!(s&r)||s&n)&&(o[a]=nme(s,t)):c<=t&&(e.expiredLanes|=s),i&=~s}}function wM(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jq(){var e=vS;return vS<<=1,!(vS&4194240)&&(vS=64),e}function J3(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function h2(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qc(t),e[t]=r}function ime(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Qc(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function R6(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Qc(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var no=0;function Vq(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Wq,O6,Gq,qq,Kq,xM=!1,bS=[],Mh=null,Rh=null,Oh=null,Fw=new Map,Nw=new Map,rh=[],ame="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function YL(e,t){switch(e){case"focusin":case"focusout":Mh=null;break;case"dragenter":case"dragleave":Rh=null;break;case"mouseover":case"mouseout":Oh=null;break;case"pointerover":case"pointerout":Fw.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nw.delete(t.pointerId)}}function Ry(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=m2(t),t!==null&&O6(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function sme(e,t,r,n,o){switch(t){case"focusin":return Mh=Ry(Mh,e,t,r,n,o),!0;case"dragenter":return Rh=Ry(Rh,e,t,r,n,o),!0;case"mouseover":return Oh=Ry(Oh,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return Fw.set(i,Ry(Fw.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,Nw.set(i,Ry(Nw.get(i)||null,e,t,r,n,o)),!0}return!1}function Yq(e){var t=Wp(e.target);if(t!==null){var r=a0(t);if(r!==null){if(t=r.tag,t===13){if(t=Lq(r),t!==null){e.blockedOn=t,Kq(e.priority,function(){Gq(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function L_(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=CM(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);gM=n,r.target.dispatchEvent(n),gM=null}else return t=m2(r),t!==null&&O6(t),e.blockedOn=r,!1;t.shift()}return!0}function XL(e,t,r){L_(e)&&r.delete(t)}function lme(){xM=!1,Mh!==null&&L_(Mh)&&(Mh=null),Rh!==null&&L_(Rh)&&(Rh=null),Oh!==null&&L_(Oh)&&(Oh=null),Fw.forEach(XL),Nw.forEach(XL)}function Oy(e,t){e.blockedOn===t&&(e.blockedOn=null,xM||(xM=!0,wl.unstable_scheduleCallback(wl.unstable_NormalPriority,lme)))}function Lw(e){function t(o){return Oy(o,e)}if(0<bS.length){Oy(bS[0],e);for(var r=1;r<bS.length;r++){var n=bS[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Mh!==null&&Oy(Mh,e),Rh!==null&&Oy(Rh,e),Oh!==null&&Oy(Oh,e),Fw.forEach(t),Nw.forEach(t),r=0;r<rh.length;r++)n=rh[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<rh.length&&(r=rh[0],r.blockedOn===null);)Yq(r),r.blockedOn===null&&rh.shift()}var rv=gf.ReactCurrentBatchConfig,Sk=!0;function cme(e,t,r,n){var o=no,i=rv.transition;rv.transition=null;try{no=1,D6(e,t,r,n)}finally{no=o,rv.transition=i}}function ume(e,t,r,n){var o=no,i=rv.transition;rv.transition=null;try{no=4,D6(e,t,r,n)}finally{no=o,rv.transition=i}}function D6(e,t,r,n){if(Sk){var o=CM(e,t,r,n);if(o===null)cA(e,t,n,_k,r),YL(e,n);else if(sme(o,e,t,r,n))n.stopPropagation();else if(YL(e,n),t&4&&-1<ame.indexOf(e)){for(;o!==null;){var i=m2(o);if(i!==null&&Wq(i),i=CM(e,t,r,n),i===null&&cA(e,t,n,_k,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else cA(e,t,n,null,r)}}var _k=null;function CM(e,t,r,n){if(_k=null,e=P6(n),e=Wp(e),e!==null)if(t=a0(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Lq(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return _k=e,null}function Xq(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qpe()){case M6:return 1;case Hq:return 4;case xk:case Zpe:return 16;case zq:return 536870912;default:return 16}default:return 16}}var vh=null,F6=null,$_=null;function Qq(){if($_)return $_;var e,t=F6,r=t.length,n,o="value"in vh?vh.value:vh.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===o[i-n];n++);return $_=o.slice(e,1<n?1-n:void 0)}function B_(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wS(){return!0}function QL(){return!1}function _l(e){function t(r,n,o,i,a){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?wS:QL,this.isPropagationStopped=QL,this}return Wo(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=wS)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wS)},persist:function(){},isPersistent:wS}),t}var O1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},N6=_l(O1),p2=Wo({},O1,{view:0,detail:0}),dme=_l(p2),eA,tA,Dy,AT=Wo({},p2,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:L6,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Dy&&(Dy&&e.type==="mousemove"?(eA=e.screenX-Dy.screenX,tA=e.screenY-Dy.screenY):tA=eA=0,Dy=e),eA)},movementY:function(e){return"movementY"in e?e.movementY:tA}}),ZL=_l(AT),fme=Wo({},AT,{dataTransfer:0}),hme=_l(fme),pme=Wo({},p2,{relatedTarget:0}),rA=_l(pme),mme=Wo({},O1,{animationName:0,elapsedTime:0,pseudoElement:0}),gme=_l(mme),vme=Wo({},O1,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yme=_l(vme),bme=Wo({},O1,{data:0}),JL=_l(bme),wme={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xme={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"},Cme={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sme(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Cme[e])?!!t[e]:!1}function L6(){return Sme}var _me=Wo({},p2,{key:function(e){if(e.key){var t=wme[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=B_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xme[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:L6,charCode:function(e){return e.type==="keypress"?B_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?B_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kme=_l(_me),Eme=Wo({},AT,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),e$=_l(Eme),Tme=Wo({},p2,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:L6}),Ime=_l(Tme),Ame=Wo({},O1,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pme=_l(Ame),Mme=Wo({},AT,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rme=_l(Mme),Ome=[9,13,27,32],$6=Jd&&"CompositionEvent"in window,Vb=null;Jd&&"documentMode"in document&&(Vb=document.documentMode);var Dme=Jd&&"TextEvent"in window&&!Vb,Zq=Jd&&(!$6||Vb&&8<Vb&&11>=Vb),t$=String.fromCharCode(32),r$=!1;function Jq(e,t){switch(e){case"keyup":return Ome.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eK(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Og=!1;function Fme(e,t){switch(e){case"compositionend":return eK(t);case"keypress":return t.which!==32?null:(r$=!0,t$);case"textInput":return e=t.data,e===t$&&r$?null:e;default:return null}}function Nme(e,t){if(Og)return e==="compositionend"||!$6&&Jq(e,t)?(e=Qq(),$_=F6=vh=null,Og=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zq&&t.locale!=="ko"?null:t.data;default:return null}}var Lme={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 n$(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Lme[e.type]:t==="textarea"}function tK(e,t,r,n){Rq(n),t=kk(t,"onChange"),0<t.length&&(r=new N6("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Wb=null,$w=null;function $me(e){fK(e,0)}function PT(e){var t=Ng(e);if(kq(t))return e}function Bme(e,t){if(e==="change")return t}var rK=!1;if(Jd){var nA;if(Jd){var oA="oninput"in document;if(!oA){var o$=document.createElement("div");o$.setAttribute("oninput","return;"),oA=typeof o$.oninput=="function"}nA=oA}else nA=!1;rK=nA&&(!document.documentMode||9<document.documentMode)}function i$(){Wb&&(Wb.detachEvent("onpropertychange",nK),$w=Wb=null)}function nK(e){if(e.propertyName==="value"&&PT($w)){var t=[];tK(t,$w,e,P6(e)),Nq($me,t)}}function Ume(e,t,r){e==="focusin"?(i$(),Wb=t,$w=r,Wb.attachEvent("onpropertychange",nK)):e==="focusout"&&i$()}function Hme(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return PT($w)}function zme(e,t){if(e==="click")return PT(t)}function jme(e,t){if(e==="input"||e==="change")return PT(t)}function Vme(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iu=typeof Object.is=="function"?Object.is:Vme;function Bw(e,t){if(iu(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!oM.call(t,o)||!iu(e[o],t[o]))return!1}return!0}function a$(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function s$(e,t){var r=a$(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=a$(r)}}function oK(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oK(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function iK(){for(var e=window,t=yk();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=yk(e.document)}return t}function B6(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Wme(e){var t=iK(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&oK(r.ownerDocument.documentElement,r)){if(n!==null&&B6(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=s$(r,i);var a=s$(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Gme=Jd&&"documentMode"in document&&11>=document.documentMode,Dg=null,SM=null,Gb=null,_M=!1;function l$(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;_M||Dg==null||Dg!==yk(n)||(n=Dg,"selectionStart"in n&&B6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Gb&&Bw(Gb,n)||(Gb=n,n=kk(SM,"onSelect"),0<n.length&&(t=new N6("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Dg)))}function xS(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Fg={animationend:xS("Animation","AnimationEnd"),animationiteration:xS("Animation","AnimationIteration"),animationstart:xS("Animation","AnimationStart"),transitionend:xS("Transition","TransitionEnd")},iA={},aK={};Jd&&(aK=document.createElement("div").style,"AnimationEvent"in window||(delete Fg.animationend.animation,delete Fg.animationiteration.animation,delete Fg.animationstart.animation),"TransitionEvent"in window||delete Fg.transitionend.transition);function MT(e){if(iA[e])return iA[e];if(!Fg[e])return e;var t=Fg[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in aK)return iA[e]=t[r];return e}var sK=MT("animationend"),lK=MT("animationiteration"),cK=MT("animationstart"),uK=MT("transitionend"),dK=new Map,c$="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function rp(e,t){dK.set(e,t),i0(t,[e])}for(var aA=0;aA<c$.length;aA++){var sA=c$[aA],qme=sA.toLowerCase(),Kme=sA[0].toUpperCase()+sA.slice(1);rp(qme,"on"+Kme)}rp(sK,"onAnimationEnd");rp(lK,"onAnimationIteration");rp(cK,"onAnimationStart");rp("dblclick","onDoubleClick");rp("focusin","onFocus");rp("focusout","onBlur");rp(uK,"onTransitionEnd");Vv("onMouseEnter",["mouseout","mouseover"]);Vv("onMouseLeave",["mouseout","mouseover"]);Vv("onPointerEnter",["pointerout","pointerover"]);Vv("onPointerLeave",["pointerout","pointerover"]);i0("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));i0("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));i0("onBeforeInput",["compositionend","keypress","textInput","paste"]);i0("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));i0("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));i0("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kb="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(" "),Yme=new Set("cancel close invalid load scroll toggle".split(" ").concat(kb));function u$(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,qpe(n,t,void 0,e),e.currentTarget=null}function fK(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==i&&o.isPropagationStopped())break e;u$(o,s,l),i=c}else for(a=0;a<n.length;a++){if(s=n[a],c=s.instance,l=s.currentTarget,s=s.listener,c!==i&&o.isPropagationStopped())break e;u$(o,s,l),i=c}}}if(wk)throw e=bM,wk=!1,bM=null,e}function Eo(e,t){var r=t[AM];r===void 0&&(r=t[AM]=new Set);var n=e+"__bubble";r.has(n)||(hK(t,e,2,!1),r.add(n))}function lA(e,t,r){var n=0;t&&(n|=4),hK(r,e,n,t)}var CS="_reactListening"+Math.random().toString(36).slice(2);function Uw(e){if(!e[CS]){e[CS]=!0,wq.forEach(function(r){r!=="selectionchange"&&(Yme.has(r)||lA(r,!1,e),lA(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[CS]||(t[CS]=!0,lA("selectionchange",!1,t))}}function hK(e,t,r,n){switch(Xq(t)){case 1:var o=cme;break;case 4:o=ume;break;default:o=D6}r=o.bind(null,t,r,e),o=void 0,!yM||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function cA(e,t,r,n,o){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;a=a.return}for(;s!==null;){if(a=Wp(s),a===null)return;if(c=a.tag,c===5||c===6){n=i=a;continue e}s=s.parentNode}}n=n.return}Nq(function(){var l=i,u=P6(r),f=[];e:{var d=dK.get(e);if(d!==void 0){var h=N6,p=e;switch(e){case"keypress":if(B_(r)===0)break e;case"keydown":case"keyup":h=kme;break;case"focusin":p="focus",h=rA;break;case"focusout":p="blur",h=rA;break;case"beforeblur":case"afterblur":h=rA;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ZL;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=hme;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Ime;break;case sK:case lK:case cK:h=gme;break;case uK:h=Pme;break;case"scroll":h=dme;break;case"wheel":h=Rme;break;case"copy":case"cut":case"paste":h=yme;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=e$}var g=(t&4)!==0,m=!g&&e==="scroll",v=g?d!==null?d+"Capture":null:d;g=[];for(var y=l,b;y!==null;){b=y;var w=b.stateNode;if(b.tag===5&&w!==null&&(b=w,v!==null&&(w=Dw(y,v),w!=null&&g.push(Hw(y,w,b)))),m)break;y=y.return}0<g.length&&(d=new h(d,p,null,r,u),f.push({event:d,listeners:g}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&r!==gM&&(p=r.relatedTarget||r.fromElement)&&(Wp(p)||p[ef]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=r.relatedTarget||r.toElement,h=l,p=p?Wp(p):null,p!==null&&(m=a0(p),p!==m||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=l),h!==p)){if(g=ZL,w="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=e$,w="onPointerLeave",v="onPointerEnter",y="pointer"),m=h==null?d:Ng(h),b=p==null?d:Ng(p),d=new g(w,y+"leave",h,r,u),d.target=m,d.relatedTarget=b,w=null,Wp(u)===l&&(g=new g(v,y+"enter",p,r,u),g.target=b,g.relatedTarget=m,w=g),m=w,h&&p)t:{for(g=h,v=p,y=0,b=g;b;b=K0(b))y++;for(b=0,w=v;w;w=K0(w))b++;for(;0<y-b;)g=K0(g),y--;for(;0<b-y;)v=K0(v),b--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=K0(g),v=K0(v)}g=null}else g=null;h!==null&&d$(f,d,h,g,!1),p!==null&&m!==null&&d$(f,m,p,g,!0)}}e:{if(d=l?Ng(l):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var E=Bme;else if(n$(d))if(rK)E=jme;else{E=Hme;var I=Ume}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(E=zme);if(E&&(E=E(e,l))){tK(f,E,r,u);break e}I&&I(e,d,l),e==="focusout"&&(I=d._wrapperState)&&I.controlled&&d.type==="number"&&dM(d,"number",d.value)}switch(I=l?Ng(l):window,e){case"focusin":(n$(I)||I.contentEditable==="true")&&(Dg=I,SM=l,Gb=null);break;case"focusout":Gb=SM=Dg=null;break;case"mousedown":_M=!0;break;case"contextmenu":case"mouseup":case"dragend":_M=!1,l$(f,r,u);break;case"selectionchange":if(Gme)break;case"keydown":case"keyup":l$(f,r,u)}var O;if($6)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else Og?Jq(e,r)&&(D="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(D="onCompositionStart");D&&(Zq&&r.locale!=="ko"&&(Og||D!=="onCompositionStart"?D==="onCompositionEnd"&&Og&&(O=Qq()):(vh=u,F6="value"in vh?vh.value:vh.textContent,Og=!0)),I=kk(l,D),0<I.length&&(D=new JL(D,e,null,r,u),f.push({event:D,listeners:I}),O?D.data=O:(O=eK(r),O!==null&&(D.data=O)))),(O=Dme?Fme(e,r):Nme(e,r))&&(l=kk(l,"onBeforeInput"),0<l.length&&(u=new JL("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:l}),u.data=O))}fK(f,t)})}function Hw(e,t,r){return{instance:e,listener:t,currentTarget:r}}function kk(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Dw(e,r),i!=null&&n.unshift(Hw(e,i,o)),i=Dw(e,t),i!=null&&n.push(Hw(e,i,o))),e=e.return}return n}function K0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function d$(e,t,r,n,o){for(var i=t._reactName,a=[];r!==null&&r!==n;){var s=r,c=s.alternate,l=s.stateNode;if(c!==null&&c===n)break;s.tag===5&&l!==null&&(s=l,o?(c=Dw(r,i),c!=null&&a.unshift(Hw(r,c,s))):o||(c=Dw(r,i),c!=null&&a.push(Hw(r,c,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Xme=/\r\n?/g,Qme=/\u0000|\uFFFD/g;function f$(e){return(typeof e=="string"?e:""+e).replace(Xme,`
`).replace(Qme,"")}function SS(e,t,r){if(t=f$(t),f$(e)!==t&&r)throw Error(Kt(425))}function Ek(){}var kM=null,EM=null;function TM(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var IM=typeof setTimeout=="function"?setTimeout:void 0,Zme=typeof clearTimeout=="function"?clearTimeout:void 0,h$=typeof Promise=="function"?Promise:void 0,Jme=typeof queueMicrotask=="function"?queueMicrotask:typeof h$<"u"?function(e){return h$.resolve(null).then(e).catch(e0e)}:IM;function e0e(e){setTimeout(function(){throw e})}function uA(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),Lw(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);Lw(t)}function Dh(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function p$(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var D1=Math.random().toString(36).slice(2),Du="__reactFiber$"+D1,zw="__reactProps$"+D1,ef="__reactContainer$"+D1,AM="__reactEvents$"+D1,t0e="__reactListeners$"+D1,r0e="__reactHandles$"+D1;function Wp(e){var t=e[Du];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ef]||r[Du]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=p$(e);e!==null;){if(r=e[Du])return r;e=p$(e)}return t}e=r,r=e.parentNode}return null}function m2(e){return e=e[Du]||e[ef],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ng(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Kt(33))}function RT(e){return e[zw]||null}var PM=[],Lg=-1;function np(e){return{current:e}}function Io(e){0>Lg||(e.current=PM[Lg],PM[Lg]=null,Lg--)}function Co(e,t){Lg++,PM[Lg]=e.current,e.current=t}var Kh={},Ya=np(Kh),Us=np(!1),Pm=Kh;function Wv(e,t){var r=e.type.contextTypes;if(!r)return Kh;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Hs(e){return e=e.childContextTypes,e!=null}function Tk(){Io(Us),Io(Ya)}function m$(e,t,r){if(Ya.current!==Kh)throw Error(Kt(168));Co(Ya,t),Co(Us,r)}function pK(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(Kt(108,Upe(e)||"Unknown",o));return Wo({},r,n)}function Ik(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kh,Pm=Ya.current,Co(Ya,e),Co(Us,Us.current),!0}function g$(e,t,r){var n=e.stateNode;if(!n)throw Error(Kt(169));r?(e=pK(e,t,Pm),n.__reactInternalMemoizedMergedChildContext=e,Io(Us),Io(Ya),Co(Ya,e)):Io(Us),Co(Us,r)}var Dd=null,OT=!1,dA=!1;function mK(e){Dd===null?Dd=[e]:Dd.push(e)}function n0e(e){OT=!0,mK(e)}function op(){if(!dA&&Dd!==null){dA=!0;var e=0,t=no;try{var r=Dd;for(no=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Dd=null,OT=!1}catch(o){throw Dd!==null&&(Dd=Dd.slice(e+1)),Uq(M6,op),o}finally{no=t,dA=!1}}return null}var $g=[],Bg=0,Ak=null,Pk=0,Zl=[],Jl=0,Mm=null,zd=1,jd="";function Mp(e,t){$g[Bg++]=Pk,$g[Bg++]=Ak,Ak=e,Pk=t}function gK(e,t,r){Zl[Jl++]=zd,Zl[Jl++]=jd,Zl[Jl++]=Mm,Mm=e;var n=zd;e=jd;var o=32-Qc(n)-1;n&=~(1<<o),r+=1;var i=32-Qc(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,zd=1<<32-Qc(t)+o|r<<o|n,jd=i+e}else zd=1<<i|r<<o|n,jd=e}function U6(e){e.return!==null&&(Mp(e,1),gK(e,1,0))}function H6(e){for(;e===Ak;)Ak=$g[--Bg],$g[Bg]=null,Pk=$g[--Bg],$g[Bg]=null;for(;e===Mm;)Mm=Zl[--Jl],Zl[Jl]=null,jd=Zl[--Jl],Zl[Jl]=null,zd=Zl[--Jl],Zl[Jl]=null}var yl=null,ml=null,Fo=!1,zc=null;function vK(e,t){var r=nc(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function v$(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yl=e,ml=Dh(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yl=e,ml=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Mm!==null?{id:zd,overflow:jd}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=nc(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,yl=e,ml=null,!0):!1;default:return!1}}function MM(e){return(e.mode&1)!==0&&(e.flags&128)===0}function RM(e){if(Fo){var t=ml;if(t){var r=t;if(!v$(e,t)){if(MM(e))throw Error(Kt(418));t=Dh(r.nextSibling);var n=yl;t&&v$(e,t)?vK(n,r):(e.flags=e.flags&-4097|2,Fo=!1,yl=e)}}else{if(MM(e))throw Error(Kt(418));e.flags=e.flags&-4097|2,Fo=!1,yl=e}}}function y$(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yl=e}function _S(e){if(e!==yl)return!1;if(!Fo)return y$(e),Fo=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!TM(e.type,e.memoizedProps)),t&&(t=ml)){if(MM(e))throw yK(),Error(Kt(418));for(;t;)vK(e,t),t=Dh(t.nextSibling)}if(y$(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Kt(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ml=Dh(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ml=null}}else ml=yl?Dh(e.stateNode.nextSibling):null;return!0}function yK(){for(var e=ml;e;)e=Dh(e.nextSibling)}function Gv(){ml=yl=null,Fo=!1}function z6(e){zc===null?zc=[e]:zc.push(e)}var o0e=gf.ReactCurrentBatchConfig;function Dc(e,t){if(e&&e.defaultProps){t=Wo({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var Mk=np(null),Rk=null,Ug=null,j6=null;function V6(){j6=Ug=Rk=null}function W6(e){var t=Mk.current;Io(Mk),e._currentValue=t}function OM(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function nv(e,t){Rk=e,j6=Ug=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&($s=!0),e.firstContext=null)}function uc(e){var t=e._currentValue;if(j6!==e)if(e={context:e,memoizedValue:t,next:null},Ug===null){if(Rk===null)throw Error(Kt(308));Ug=e,Rk.dependencies={lanes:0,firstContext:e}}else Ug=Ug.next=e;return t}var Gp=null;function G6(e){Gp===null?Gp=[e]:Gp.push(e)}function bK(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,G6(t)):(r.next=o.next,o.next=r),t.interleaved=r,tf(e,n)}function tf(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var eh=!1;function q6(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wK(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Kd(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fh(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Mn&2){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,tf(e,r)}return o=n.interleaved,o===null?(t.next=t,G6(n)):(t.next=o.next,o.next=t),n.interleaved=t,tf(e,r)}function U_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,R6(e,r)}}function b$(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ok(e,t,r,n){var o=e.updateQueue;eh=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var c=s,l=c.next;c.next=null,a===null?i=l:a.next=l,a=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(i!==null){var f=o.baseState;a=0,u=l=c=null,s=i;do{var d=s.lane,h=s.eventTime;if((n&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(d=t,h=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,d=typeof p=="function"?p.call(h,f,d):p,d==null)break e;f=Wo({},f,d);break e;case 2:eh=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=h,c=f):u=u.next=h,a|=d;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;d=s,s=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(1);if(u===null&&(c=f),o.baseState=c,o.firstBaseUpdate=l,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Om|=a,e.lanes=a,e.memoizedState=f}}function w$(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(Kt(191,o));o.call(n)}}}var xK=new bq.Component().refs;function DM(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Wo({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var DT={isMounted:function(e){return(e=e._reactInternals)?a0(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=vs(),o=Lh(e),i=Kd(n,o);i.payload=t,r!=null&&(i.callback=r),t=Fh(e,i,o),t!==null&&(Zc(t,e,o,n),U_(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=vs(),o=Lh(e),i=Kd(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Fh(e,i,o),t!==null&&(Zc(t,e,o,n),U_(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=vs(),n=Lh(e),o=Kd(r,n);o.tag=2,t!=null&&(o.callback=t),t=Fh(e,o,n),t!==null&&(Zc(t,e,n,r),U_(t,e,n))}};function x$(e,t,r,n,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!Bw(r,n)||!Bw(o,i):!0}function CK(e,t,r){var n=!1,o=Kh,i=t.contextType;return typeof i=="object"&&i!==null?i=uc(i):(o=Hs(t)?Pm:Ya.current,n=t.contextTypes,i=(n=n!=null)?Wv(e,o):Kh),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=DT,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function C$(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&DT.enqueueReplaceState(t,t.state,null)}function FM(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs=xK,q6(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=uc(i):(i=Hs(t)?Pm:Ya.current,o.context=Wv(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(DM(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&DT.enqueueReplaceState(o,o.state,null),Ok(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Fy(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Kt(309));var n=r.stateNode}if(!n)throw Error(Kt(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;s===xK&&(s=o.refs={}),a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(Kt(284));if(!r._owner)throw Error(Kt(290,e))}return e}function kS(e,t){throw e=Object.prototype.toString.call(t),Error(Kt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function S$(e){var t=e._init;return t(e._payload)}function SK(e){function t(v,y){if(e){var b=v.deletions;b===null?(v.deletions=[y],v.flags|=16):b.push(y)}}function r(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function n(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function o(v,y){return v=$h(v,y),v.index=0,v.sibling=null,v}function i(v,y,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<y?(v.flags|=2,y):b):(v.flags|=2,y)):(v.flags|=1048576,y)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,b,w){return y===null||y.tag!==6?(y=yA(b,v.mode,w),y.return=v,y):(y=o(y,b),y.return=v,y)}function c(v,y,b,w){var E=b.type;return E===Rg?u(v,y,b.props.children,w,b.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Jf&&S$(E)===y.type)?(w=o(y,b.props),w.ref=Fy(v,y,b),w.return=v,w):(w=G_(b.type,b.key,b.props,null,v.mode,w),w.ref=Fy(v,y,b),w.return=v,w)}function l(v,y,b,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=bA(b,v.mode,w),y.return=v,y):(y=o(y,b.children||[]),y.return=v,y)}function u(v,y,b,w,E){return y===null||y.tag!==7?(y=gm(b,v.mode,w,E),y.return=v,y):(y=o(y,b),y.return=v,y)}function f(v,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=yA(""+y,v.mode,b),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case pS:return b=G_(y.type,y.key,y.props,null,v.mode,b),b.ref=Fy(v,null,y),b.return=v,b;case Mg:return y=bA(y,v.mode,b),y.return=v,y;case Jf:var w=y._init;return f(v,w(y._payload),b)}if(Sb(y)||Py(y))return y=gm(y,v.mode,b,null),y.return=v,y;kS(v,y)}return null}function d(v,y,b,w){var E=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return E!==null?null:s(v,y,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case pS:return b.key===E?c(v,y,b,w):null;case Mg:return b.key===E?l(v,y,b,w):null;case Jf:return E=b._init,d(v,y,E(b._payload),w)}if(Sb(b)||Py(b))return E!==null?null:u(v,y,b,w,null);kS(v,b)}return null}function h(v,y,b,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(b)||null,s(y,v,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case pS:return v=v.get(w.key===null?b:w.key)||null,c(y,v,w,E);case Mg:return v=v.get(w.key===null?b:w.key)||null,l(y,v,w,E);case Jf:var I=w._init;return h(v,y,b,I(w._payload),E)}if(Sb(w)||Py(w))return v=v.get(b)||null,u(y,v,w,E,null);kS(y,w)}return null}function p(v,y,b,w){for(var E=null,I=null,O=y,D=y=0,N=null;O!==null&&D<b.length;D++){O.index>D?(N=O,O=null):N=O.sibling;var U=d(v,O,b[D],w);if(U===null){O===null&&(O=N);break}e&&O&&U.alternate===null&&t(v,O),y=i(U,y,D),I===null?E=U:I.sibling=U,I=U,O=N}if(D===b.length)return r(v,O),Fo&&Mp(v,D),E;if(O===null){for(;D<b.length;D++)O=f(v,b[D],w),O!==null&&(y=i(O,y,D),I===null?E=O:I.sibling=O,I=O);return Fo&&Mp(v,D),E}for(O=n(v,O);D<b.length;D++)N=h(O,v,D,b[D],w),N!==null&&(e&&N.alternate!==null&&O.delete(N.key===null?D:N.key),y=i(N,y,D),I===null?E=N:I.sibling=N,I=N);return e&&O.forEach(function(B){return t(v,B)}),Fo&&Mp(v,D),E}function g(v,y,b,w){var E=Py(b);if(typeof E!="function")throw Error(Kt(150));if(b=E.call(b),b==null)throw Error(Kt(151));for(var I=E=null,O=y,D=y=0,N=null,U=b.next();O!==null&&!U.done;D++,U=b.next()){O.index>D?(N=O,O=null):N=O.sibling;var B=d(v,O,U.value,w);if(B===null){O===null&&(O=N);break}e&&O&&B.alternate===null&&t(v,O),y=i(B,y,D),I===null?E=B:I.sibling=B,I=B,O=N}if(U.done)return r(v,O),Fo&&Mp(v,D),E;if(O===null){for(;!U.done;D++,U=b.next())U=f(v,U.value,w),U!==null&&(y=i(U,y,D),I===null?E=U:I.sibling=U,I=U);return Fo&&Mp(v,D),E}for(O=n(v,O);!U.done;D++,U=b.next())U=h(O,v,D,U.value,w),U!==null&&(e&&U.alternate!==null&&O.delete(U.key===null?D:U.key),y=i(U,y,D),I===null?E=U:I.sibling=U,I=U);return e&&O.forEach(function(F){return t(v,F)}),Fo&&Mp(v,D),E}function m(v,y,b,w){if(typeof b=="object"&&b!==null&&b.type===Rg&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case pS:e:{for(var E=b.key,I=y;I!==null;){if(I.key===E){if(E=b.type,E===Rg){if(I.tag===7){r(v,I.sibling),y=o(I,b.props.children),y.return=v,v=y;break e}}else if(I.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Jf&&S$(E)===I.type){r(v,I.sibling),y=o(I,b.props),y.ref=Fy(v,I,b),y.return=v,v=y;break e}r(v,I);break}else t(v,I);I=I.sibling}b.type===Rg?(y=gm(b.props.children,v.mode,w,b.key),y.return=v,v=y):(w=G_(b.type,b.key,b.props,null,v.mode,w),w.ref=Fy(v,y,b),w.return=v,v=w)}return a(v);case Mg:e:{for(I=b.key;y!==null;){if(y.key===I)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(v,y.sibling),y=o(y,b.children||[]),y.return=v,v=y;break e}else{r(v,y);break}else t(v,y);y=y.sibling}y=bA(b,v.mode,w),y.return=v,v=y}return a(v);case Jf:return I=b._init,m(v,y,I(b._payload),w)}if(Sb(b))return p(v,y,b,w);if(Py(b))return g(v,y,b,w);kS(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(r(v,y.sibling),y=o(y,b),y.return=v,v=y):(r(v,y),y=yA(b,v.mode,w),y.return=v,v=y),a(v)):r(v,y)}return m}var qv=SK(!0),_K=SK(!1),g2={},Gu=np(g2),jw=np(g2),Vw=np(g2);function qp(e){if(e===g2)throw Error(Kt(174));return e}function K6(e,t){switch(Co(Vw,t),Co(jw,e),Co(Gu,g2),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hM(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hM(t,e)}Io(Gu),Co(Gu,t)}function Kv(){Io(Gu),Io(jw),Io(Vw)}function kK(e){qp(Vw.current);var t=qp(Gu.current),r=hM(t,e.type);t!==r&&(Co(jw,e),Co(Gu,r))}function Y6(e){jw.current===e&&(Io(Gu),Io(jw))}var Uo=np(0);function Dk(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fA=[];function X6(){for(var e=0;e<fA.length;e++)fA[e]._workInProgressVersionPrimary=null;fA.length=0}var H_=gf.ReactCurrentDispatcher,hA=gf.ReactCurrentBatchConfig,Rm=0,jo=null,Hi=null,ra=null,Fk=!1,qb=!1,Ww=0,i0e=0;function Fa(){throw Error(Kt(321))}function Q6(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!iu(e[r],t[r]))return!1;return!0}function Z6(e,t,r,n,o,i){if(Rm=i,jo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H_.current=e===null||e.memoizedState===null?c0e:u0e,e=r(n,o),qb){i=0;do{if(qb=!1,Ww=0,25<=i)throw Error(Kt(301));i+=1,ra=Hi=null,t.updateQueue=null,H_.current=d0e,e=r(n,o)}while(qb)}if(H_.current=Nk,t=Hi!==null&&Hi.next!==null,Rm=0,ra=Hi=jo=null,Fk=!1,t)throw Error(Kt(300));return e}function J6(){var e=Ww!==0;return Ww=0,e}function Cu(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ra===null?jo.memoizedState=ra=e:ra=ra.next=e,ra}function dc(){if(Hi===null){var e=jo.alternate;e=e!==null?e.memoizedState:null}else e=Hi.next;var t=ra===null?jo.memoizedState:ra.next;if(t!==null)ra=t,Hi=e;else{if(e===null)throw Error(Kt(310));Hi=e,e={memoizedState:Hi.memoizedState,baseState:Hi.baseState,baseQueue:Hi.baseQueue,queue:Hi.queue,next:null},ra===null?jo.memoizedState=ra=e:ra=ra.next=e}return ra}function Gw(e,t){return typeof t=="function"?t(e):t}function pA(e){var t=dc(),r=t.queue;if(r===null)throw Error(Kt(311));r.lastRenderedReducer=e;var n=Hi,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var s=a=null,c=null,l=i;do{var u=l.lane;if((Rm&u)===u)c!==null&&(c=c.next={lane:0,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),n=l.hasEagerState?l.eagerState:e(n,l.action);else{var f={lane:u,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null};c===null?(s=c=f,a=n):c=c.next=f,jo.lanes|=u,Om|=u}l=l.next}while(l!==null&&l!==i);c===null?a=n:c.next=s,iu(n,t.memoizedState)||($s=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,jo.lanes|=i,Om|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function mA(e){var t=dc(),r=t.queue;if(r===null)throw Error(Kt(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);iu(i,t.memoizedState)||($s=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function EK(){}function TK(e,t){var r=jo,n=dc(),o=t(),i=!iu(n.memoizedState,o);if(i&&(n.memoizedState=o,$s=!0),n=n.queue,eO(PK.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||ra!==null&&ra.memoizedState.tag&1){if(r.flags|=2048,qw(9,AK.bind(null,r,n,o,t),void 0,null),aa===null)throw Error(Kt(349));Rm&30||IK(r,t,o)}return o}function IK(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=jo.updateQueue,t===null?(t={lastEffect:null,stores:null},jo.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function AK(e,t,r,n){t.value=r,t.getSnapshot=n,MK(t)&&RK(e)}function PK(e,t,r){return r(function(){MK(t)&&RK(e)})}function MK(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!iu(e,r)}catch{return!0}}function RK(e){var t=tf(e,1);t!==null&&Zc(t,e,1,-1)}function _$(e){var t=Cu();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gw,lastRenderedState:e},t.queue=e,e=e.dispatch=l0e.bind(null,jo,e),[t.memoizedState,e]}function qw(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=jo.updateQueue,t===null?(t={lastEffect:null,stores:null},jo.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function OK(){return dc().memoizedState}function z_(e,t,r,n){var o=Cu();jo.flags|=e,o.memoizedState=qw(1|t,r,void 0,n===void 0?null:n)}function FT(e,t,r,n){var o=dc();n=n===void 0?null:n;var i=void 0;if(Hi!==null){var a=Hi.memoizedState;if(i=a.destroy,n!==null&&Q6(n,a.deps)){o.memoizedState=qw(t,r,i,n);return}}jo.flags|=e,o.memoizedState=qw(1|t,r,i,n)}function k$(e,t){return z_(8390656,8,e,t)}function eO(e,t){return FT(2048,8,e,t)}function DK(e,t){return FT(4,2,e,t)}function FK(e,t){return FT(4,4,e,t)}function NK(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function LK(e,t,r){return r=r!=null?r.concat([e]):null,FT(4,4,NK.bind(null,t,e),r)}function tO(){}function $K(e,t){var r=dc();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Q6(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function BK(e,t){var r=dc();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Q6(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function UK(e,t,r){return Rm&21?(iu(r,t)||(r=jq(),jo.lanes|=r,Om|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,$s=!0),e.memoizedState=r)}function a0e(e,t){var r=no;no=r!==0&&4>r?r:4,e(!0);var n=hA.transition;hA.transition={};try{e(!1),t()}finally{no=r,hA.transition=n}}function HK(){return dc().memoizedState}function s0e(e,t,r){var n=Lh(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},zK(e))jK(t,r);else if(r=bK(e,t,r,n),r!==null){var o=vs();Zc(r,e,n,o),VK(r,t,n)}}function l0e(e,t,r){var n=Lh(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(zK(e))jK(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,iu(s,a)){var c=t.interleaved;c===null?(o.next=o,G6(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}r=bK(e,t,o,n),r!==null&&(o=vs(),Zc(r,e,n,o),VK(r,t,n))}}function zK(e){var t=e.alternate;return e===jo||t!==null&&t===jo}function jK(e,t){qb=Fk=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function VK(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,R6(e,r)}}var Nk={readContext:uc,useCallback:Fa,useContext:Fa,useEffect:Fa,useImperativeHandle:Fa,useInsertionEffect:Fa,useLayoutEffect:Fa,useMemo:Fa,useReducer:Fa,useRef:Fa,useState:Fa,useDebugValue:Fa,useDeferredValue:Fa,useTransition:Fa,useMutableSource:Fa,useSyncExternalStore:Fa,useId:Fa,unstable_isNewReconciler:!1},c0e={readContext:uc,useCallback:function(e,t){return Cu().memoizedState=[e,t===void 0?null:t],e},useContext:uc,useEffect:k$,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,z_(4194308,4,NK.bind(null,t,e),r)},useLayoutEffect:function(e,t){return z_(4194308,4,e,t)},useInsertionEffect:function(e,t){return z_(4,2,e,t)},useMemo:function(e,t){var r=Cu();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Cu();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=s0e.bind(null,jo,e),[n.memoizedState,e]},useRef:function(e){var t=Cu();return e={current:e},t.memoizedState=e},useState:_$,useDebugValue:tO,useDeferredValue:function(e){return Cu().memoizedState=e},useTransition:function(){var e=_$(!1),t=e[0];return e=a0e.bind(null,e[1]),Cu().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=jo,o=Cu();if(Fo){if(r===void 0)throw Error(Kt(407));r=r()}else{if(r=t(),aa===null)throw Error(Kt(349));Rm&30||IK(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,k$(PK.bind(null,n,i,e),[e]),n.flags|=2048,qw(9,AK.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Cu(),t=aa.identifierPrefix;if(Fo){var r=jd,n=zd;r=(n&~(1<<32-Qc(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ww++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=i0e++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},u0e={readContext:uc,useCallback:$K,useContext:uc,useEffect:eO,useImperativeHandle:LK,useInsertionEffect:DK,useLayoutEffect:FK,useMemo:BK,useReducer:pA,useRef:OK,useState:function(){return pA(Gw)},useDebugValue:tO,useDeferredValue:function(e){var t=dc();return UK(t,Hi.memoizedState,e)},useTransition:function(){var e=pA(Gw)[0],t=dc().memoizedState;return[e,t]},useMutableSource:EK,useSyncExternalStore:TK,useId:HK,unstable_isNewReconciler:!1},d0e={readContext:uc,useCallback:$K,useContext:uc,useEffect:eO,useImperativeHandle:LK,useInsertionEffect:DK,useLayoutEffect:FK,useMemo:BK,useReducer:mA,useRef:OK,useState:function(){return mA(Gw)},useDebugValue:tO,useDeferredValue:function(e){var t=dc();return Hi===null?t.memoizedState=e:UK(t,Hi.memoizedState,e)},useTransition:function(){var e=mA(Gw)[0],t=dc().memoizedState;return[e,t]},useMutableSource:EK,useSyncExternalStore:TK,useId:HK,unstable_isNewReconciler:!1};function Yv(e,t){try{var r="",n=t;do r+=Bpe(n),n=n.return;while(n);var o=r}catch(i){o=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function gA(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function NM(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var f0e=typeof WeakMap=="function"?WeakMap:Map;function WK(e,t,r){r=Kd(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){$k||($k=!0,GM=n),NM(e,t)},r}function GK(e,t,r){r=Kd(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){NM(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){NM(e,t),typeof n!="function"&&(Nh===null?Nh=new Set([this]):Nh.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function E$(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new f0e;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=E0e.bind(null,e,t,r),t.then(e,e))}function T$(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function I$(e,t,r,n,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Kd(-1,1),t.tag=2,Fh(r,t,1))),r.lanes|=1),e)}var h0e=gf.ReactCurrentOwner,$s=!1;function cs(e,t,r,n){t.child=e===null?_K(t,null,r,n):qv(t,e.child,r,n)}function A$(e,t,r,n,o){r=r.render;var i=t.ref;return nv(t,o),n=Z6(e,t,r,n,i,o),r=J6(),e!==null&&!$s?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rf(e,t,o)):(Fo&&r&&U6(t),t.flags|=1,cs(e,t,n,o),t.child)}function P$(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!cO(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,qK(e,t,i,n,o)):(e=G_(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:Bw,r(a,n)&&e.ref===t.ref)return rf(e,t,o)}return t.flags|=1,e=$h(i,n),e.ref=t.ref,e.return=t,t.child=e}function qK(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(Bw(i,n)&&e.ref===t.ref)if($s=!1,t.pendingProps=n=i,(e.lanes&o)!==0)e.flags&131072&&($s=!0);else return t.lanes=e.lanes,rf(e,t,o)}return LM(e,t,r,n,o)}function KK(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Co(zg,sl),sl|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Co(zg,sl),sl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Co(zg,sl),sl|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Co(zg,sl),sl|=n;return cs(e,t,o,r),t.child}function YK(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function LM(e,t,r,n,o){var i=Hs(r)?Pm:Ya.current;return i=Wv(t,i),nv(t,o),r=Z6(e,t,r,n,i,o),n=J6(),e!==null&&!$s?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rf(e,t,o)):(Fo&&n&&U6(t),t.flags|=1,cs(e,t,r,o),t.child)}function M$(e,t,r,n,o){if(Hs(r)){var i=!0;Ik(t)}else i=!1;if(nv(t,o),t.stateNode===null)j_(e,t),CK(t,r,n),FM(t,r,n,o),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,l=r.contextType;typeof l=="object"&&l!==null?l=uc(l):(l=Hs(r)?Pm:Ya.current,l=Wv(t,l));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||c!==l)&&C$(t,a,n,l),eh=!1;var d=t.memoizedState;a.state=d,Ok(t,n,a,o),c=t.memoizedState,s!==n||d!==c||Us.current||eh?(typeof u=="function"&&(DM(t,r,u,n),c=t.memoizedState),(s=eh||x$(t,r,s,n,d,c,l))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),a.props=n,a.state=c,a.context=l,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,wK(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Dc(t.type,s),a.props=l,f=t.pendingProps,d=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=uc(c):(c=Hs(r)?Pm:Ya.current,c=Wv(t,c));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||d!==c)&&C$(t,a,n,c),eh=!1,d=t.memoizedState,a.state=d,Ok(t,n,a,o);var p=t.memoizedState;s!==f||d!==p||Us.current||eh?(typeof h=="function"&&(DM(t,r,h,n),p=t.memoizedState),(l=eh||x$(t,r,l,n,d,p,c)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=c,n=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return $M(e,t,r,n,i,o)}function $M(e,t,r,n,o,i){YK(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return o&&g$(t,r,!1),rf(e,t,i);n=t.stateNode,h0e.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=qv(t,e.child,null,i),t.child=qv(t,null,s,i)):cs(e,t,s,i),t.memoizedState=n.state,o&&g$(t,r,!0),t.child}function XK(e){var t=e.stateNode;t.pendingContext?m$(e,t.pendingContext,t.pendingContext!==t.context):t.context&&m$(e,t.context,!1),K6(e,t.containerInfo)}function R$(e,t,r,n,o){return Gv(),z6(o),t.flags|=256,cs(e,t,r,n),t.child}var BM={dehydrated:null,treeContext:null,retryLane:0};function UM(e){return{baseLanes:e,cachePool:null,transitions:null}}function QK(e,t,r){var n=t.pendingProps,o=Uo.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Co(Uo,o&1),e===null)return RM(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=$T(a,n,0,null),e=gm(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=UM(r),t.memoizedState=BM,e):rO(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return p0e(e,t,a,n,s,o,r);if(i){i=n.fallback,a=t.mode,o=e.child,s=o.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=$h(o,c),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=$h(s,i):(i=gm(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?UM(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=BM,n}return i=e.child,e=i.sibling,n=$h(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function rO(e,t){return t=$T({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ES(e,t,r,n){return n!==null&&z6(n),qv(t,e.child,null,r),e=rO(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function p0e(e,t,r,n,o,i,a){if(r)return t.flags&256?(t.flags&=-257,n=gA(Error(Kt(422))),ES(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=$T({mode:"visible",children:n.children},o,0,null),i=gm(i,o,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&qv(t,e.child,null,a),t.child.memoizedState=UM(a),t.memoizedState=BM,i);if(!(t.mode&1))return ES(e,t,a,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(Kt(419)),n=gA(i,n,void 0),ES(e,t,a,n)}if(s=(a&e.childLanes)!==0,$s||s){if(n=aa,n!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(n.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,tf(e,o),Zc(n,e,o,-1))}return lO(),n=gA(Error(Kt(421))),ES(e,t,a,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=T0e.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,ml=Dh(o.nextSibling),yl=t,Fo=!0,zc=null,e!==null&&(Zl[Jl++]=zd,Zl[Jl++]=jd,Zl[Jl++]=Mm,zd=e.id,jd=e.overflow,Mm=t),t=rO(t,n.children),t.flags|=4096,t)}function O$(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),OM(e.return,t,r)}function vA(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function ZK(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(cs(e,t,n.children,r),n=Uo.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&O$(e,r,t);else if(e.tag===19)O$(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Co(Uo,n),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&Dk(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),vA(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Dk(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}vA(t,!0,r,null,i);break;case"together":vA(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function j_(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rf(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Om|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Kt(153));if(t.child!==null){for(e=t.child,r=$h(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=$h(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function m0e(e,t,r){switch(t.tag){case 3:XK(t),Gv();break;case 5:kK(t);break;case 1:Hs(t.type)&&Ik(t);break;case 4:K6(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Co(Mk,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Co(Uo,Uo.current&1),t.flags|=128,null):r&t.child.childLanes?QK(e,t,r):(Co(Uo,Uo.current&1),e=rf(e,t,r),e!==null?e.sibling:null);Co(Uo,Uo.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return ZK(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Co(Uo,Uo.current),n)break;return null;case 22:case 23:return t.lanes=0,KK(e,t,r)}return rf(e,t,r)}var JK,HM,eY,tY;JK=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};HM=function(){};eY=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,qp(Gu.current);var i=null;switch(r){case"input":o=cM(e,o),n=cM(e,n),i=[];break;case"select":o=Wo({},o,{value:void 0}),n=Wo({},n,{value:void 0}),i=[];break;case"textarea":o=fM(e,o),n=fM(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Ek)}pM(r,n);var a;r=null;for(l in o)if(!n.hasOwnProperty(l)&&o.hasOwnProperty(l)&&o[l]!=null)if(l==="style"){var s=o[l];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(Rw.hasOwnProperty(l)?i||(i=[]):(i=i||[]).push(l,null));for(l in n){var c=n[l];if(s=o!=null?o[l]:void 0,n.hasOwnProperty(l)&&c!==s&&(c!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(i||(i=[]),i.push(l,r)),r=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(i=i||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(Rw.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&Eo("scroll",e),i||s===c||(i=[])):(i=i||[]).push(l,c))}r&&(i=i||[]).push("style",r);var l=i;(t.updateQueue=l)&&(t.flags|=4)}};tY=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ny(e,t){if(!Fo)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Na(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function g0e(e,t,r){var n=t.pendingProps;switch(H6(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Na(t),null;case 1:return Hs(t.type)&&Tk(),Na(t),null;case 3:return n=t.stateNode,Kv(),Io(Us),Io(Ya),X6(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(_S(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zc!==null&&(YM(zc),zc=null))),HM(e,t),Na(t),null;case 5:Y6(t);var o=qp(Vw.current);if(r=t.type,e!==null&&t.stateNode!=null)eY(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Kt(166));return Na(t),null}if(e=qp(Gu.current),_S(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Du]=t,n[zw]=i,e=(t.mode&1)!==0,r){case"dialog":Eo("cancel",n),Eo("close",n);break;case"iframe":case"object":case"embed":Eo("load",n);break;case"video":case"audio":for(o=0;o<kb.length;o++)Eo(kb[o],n);break;case"source":Eo("error",n);break;case"img":case"image":case"link":Eo("error",n),Eo("load",n);break;case"details":Eo("toggle",n);break;case"input":zL(n,i),Eo("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Eo("invalid",n);break;case"textarea":VL(n,i),Eo("invalid",n)}pM(r,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&SS(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&SS(n.textContent,s,e),o=["children",""+s]):Rw.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Eo("scroll",n)}switch(r){case"input":mS(n),jL(n,i,!0);break;case"textarea":mS(n),WL(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Ek)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Iq(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Du]=t,e[zw]=n,JK(e,t,!1,!1),t.stateNode=e;e:{switch(a=mM(r,n),r){case"dialog":Eo("cancel",e),Eo("close",e),o=n;break;case"iframe":case"object":case"embed":Eo("load",e),o=n;break;case"video":case"audio":for(o=0;o<kb.length;o++)Eo(kb[o],e);o=n;break;case"source":Eo("error",e),o=n;break;case"img":case"image":case"link":Eo("error",e),Eo("load",e),o=n;break;case"details":Eo("toggle",e),o=n;break;case"input":zL(e,n),o=cM(e,n),Eo("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=Wo({},n,{value:void 0}),Eo("invalid",e);break;case"textarea":VL(e,n),o=fM(e,n),Eo("invalid",e);break;default:o=n}pM(r,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var c=s[i];i==="style"?Mq(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Aq(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Ow(e,c):typeof c=="number"&&Ow(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Rw.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Eo("scroll",e):c!=null&&E6(e,i,c,a))}switch(r){case"input":mS(e),jL(e,n,!1);break;case"textarea":mS(e),WL(e);break;case"option":n.value!=null&&e.setAttribute("value",""+qh(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Jg(e,!!n.multiple,i,!1):n.defaultValue!=null&&Jg(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ek)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Na(t),null;case 6:if(e&&t.stateNode!=null)tY(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Kt(166));if(r=qp(Vw.current),qp(Gu.current),_S(t)){if(n=t.stateNode,r=t.memoizedProps,n[Du]=t,(i=n.nodeValue!==r)&&(e=yl,e!==null))switch(e.tag){case 3:SS(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&SS(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Du]=t,t.stateNode=n}return Na(t),null;case 13:if(Io(Uo),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Fo&&ml!==null&&t.mode&1&&!(t.flags&128))yK(),Gv(),t.flags|=98560,i=!1;else if(i=_S(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(Kt(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Kt(317));i[Du]=t}else Gv(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Na(t),i=!1}else zc!==null&&(YM(zc),zc=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Uo.current&1?zi===0&&(zi=3):lO())),t.updateQueue!==null&&(t.flags|=4),Na(t),null);case 4:return Kv(),HM(e,t),e===null&&Uw(t.stateNode.containerInfo),Na(t),null;case 10:return W6(t.type._context),Na(t),null;case 17:return Hs(t.type)&&Tk(),Na(t),null;case 19:if(Io(Uo),i=t.memoizedState,i===null)return Na(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)Ny(i,!1);else{if(zi!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Dk(e),a!==null){for(t.flags|=128,Ny(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Co(Uo,Uo.current&1|2),t.child}e=e.sibling}i.tail!==null&&fi()>Xv&&(t.flags|=128,n=!0,Ny(i,!1),t.lanes=4194304)}else{if(!n)if(e=Dk(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ny(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Fo)return Na(t),null}else 2*fi()-i.renderingStartTime>Xv&&r!==1073741824&&(t.flags|=128,n=!0,Ny(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=fi(),t.sibling=null,r=Uo.current,Co(Uo,n?r&1|2:r&1),t):(Na(t),null);case 22:case 23:return sO(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?sl&1073741824&&(Na(t),t.subtreeFlags&6&&(t.flags|=8192)):Na(t),null;case 24:return null;case 25:return null}throw Error(Kt(156,t.tag))}function v0e(e,t){switch(H6(t),t.tag){case 1:return Hs(t.type)&&Tk(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kv(),Io(Us),Io(Ya),X6(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Y6(t),null;case 13:if(Io(Uo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Kt(340));Gv()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Io(Uo),null;case 4:return Kv(),null;case 10:return W6(t.type._context),null;case 22:case 23:return sO(),null;case 24:return null;default:return null}}var TS=!1,za=!1,y0e=typeof WeakSet=="function"?WeakSet:Set,gr=null;function Hg(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qo(e,t,n)}else r.current=null}function zM(e,t,r){try{r()}catch(n){Qo(e,t,n)}}var D$=!1;function b0e(e,t){if(kM=Sk,e=iK(),B6(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,c=-1,l=0,u=0,f=e,d=null;t:for(;;){for(var h;f!==r||o!==0&&f.nodeType!==3||(s=a+o),f!==i||n!==0&&f.nodeType!==3||(c=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===r&&++l===o&&(s=a),d===i&&++u===n&&(c=a),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(EM={focusedElem:e,selectionRange:r},Sk=!1,gr=t;gr!==null;)if(t=gr,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,gr=e;else for(;gr!==null;){t=gr;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,m=p.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Dc(t.type,g),m);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Kt(163))}}catch(w){Qo(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,gr=e;break}gr=t.return}return p=D$,D$=!1,p}function Kb(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&zM(t,r,i)}o=o.next}while(o!==n)}}function NT(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function jM(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function rY(e){var t=e.alternate;t!==null&&(e.alternate=null,rY(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Du],delete t[zw],delete t[AM],delete t[t0e],delete t[r0e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nY(e){return e.tag===5||e.tag===3||e.tag===4}function F$(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nY(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function VM(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Ek));else if(n!==4&&(e=e.child,e!==null))for(VM(e,t,r),e=e.sibling;e!==null;)VM(e,t,r),e=e.sibling}function WM(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(WM(e,t,r),e=e.sibling;e!==null;)WM(e,t,r),e=e.sibling}var wa=null,$c=!1;function Hf(e,t,r){for(r=r.child;r!==null;)oY(e,t,r),r=r.sibling}function oY(e,t,r){if(Wu&&typeof Wu.onCommitFiberUnmount=="function")try{Wu.onCommitFiberUnmount(IT,r)}catch{}switch(r.tag){case 5:za||Hg(r,t);case 6:var n=wa,o=$c;wa=null,Hf(e,t,r),wa=n,$c=o,wa!==null&&($c?(e=wa,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):wa.removeChild(r.stateNode));break;case 18:wa!==null&&($c?(e=wa,r=r.stateNode,e.nodeType===8?uA(e.parentNode,r):e.nodeType===1&&uA(e,r),Lw(e)):uA(wa,r.stateNode));break;case 4:n=wa,o=$c,wa=r.stateNode.containerInfo,$c=!0,Hf(e,t,r),wa=n,$c=o;break;case 0:case 11:case 14:case 15:if(!za&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&zM(r,t,a),o=o.next}while(o!==n)}Hf(e,t,r);break;case 1:if(!za&&(Hg(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Qo(r,t,s)}Hf(e,t,r);break;case 21:Hf(e,t,r);break;case 22:r.mode&1?(za=(n=za)||r.memoizedState!==null,Hf(e,t,r),za=n):Hf(e,t,r);break;default:Hf(e,t,r)}}function N$(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new y0e),t.forEach(function(n){var o=I0e.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Ac(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:wa=s.stateNode,$c=!1;break e;case 3:wa=s.stateNode.containerInfo,$c=!0;break e;case 4:wa=s.stateNode.containerInfo,$c=!0;break e}s=s.return}if(wa===null)throw Error(Kt(160));oY(i,a,o),wa=null,$c=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(l){Qo(o,t,l)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)iY(t,e),t=t.sibling}function iY(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ac(t,e),yu(e),n&4){try{Kb(3,e,e.return),NT(3,e)}catch(g){Qo(e,e.return,g)}try{Kb(5,e,e.return)}catch(g){Qo(e,e.return,g)}}break;case 1:Ac(t,e),yu(e),n&512&&r!==null&&Hg(r,r.return);break;case 5:if(Ac(t,e),yu(e),n&512&&r!==null&&Hg(r,r.return),e.flags&32){var o=e.stateNode;try{Ow(o,"")}catch(g){Qo(e,e.return,g)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,s=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&Eq(o,i),mM(s,a);var l=mM(s,i);for(a=0;a<c.length;a+=2){var u=c[a],f=c[a+1];u==="style"?Mq(o,f):u==="dangerouslySetInnerHTML"?Aq(o,f):u==="children"?Ow(o,f):E6(o,u,f,l)}switch(s){case"input":uM(o,i);break;case"textarea":Tq(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Jg(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?Jg(o,!!i.multiple,i.defaultValue,!0):Jg(o,!!i.multiple,i.multiple?[]:"",!1))}o[zw]=i}catch(g){Qo(e,e.return,g)}}break;case 6:if(Ac(t,e),yu(e),n&4){if(e.stateNode===null)throw Error(Kt(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){Qo(e,e.return,g)}}break;case 3:if(Ac(t,e),yu(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Lw(t.containerInfo)}catch(g){Qo(e,e.return,g)}break;case 4:Ac(t,e),yu(e);break;case 13:Ac(t,e),yu(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(iO=fi())),n&4&&N$(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(za=(l=za)||u,Ac(t,e),za=l):Ac(t,e),yu(e),n&8192){if(l=e.memoizedState!==null,(e.stateNode.isHidden=l)&&!u&&e.mode&1)for(gr=e,u=e.child;u!==null;){for(f=gr=u;gr!==null;){switch(d=gr,h=d.child,d.tag){case 0:case 11:case 14:case 15:Kb(4,d,d.return);break;case 1:Hg(d,d.return);var p=d.stateNode;if(typeof p.componentWillUnmount=="function"){n=d,r=d.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){Qo(n,r,g)}}break;case 5:Hg(d,d.return);break;case 22:if(d.memoizedState!==null){$$(f);continue}}h!==null?(h.return=d,gr=h):$$(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{o=f.stateNode,l?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=f.stateNode,c=f.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=Pq("display",a))}catch(g){Qo(e,e.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=l?"":f.memoizedProps}catch(g){Qo(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ac(t,e),yu(e),n&4&&N$(e);break;case 21:break;default:Ac(t,e),yu(e)}}function yu(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(nY(r)){var n=r;break e}r=r.return}throw Error(Kt(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(Ow(o,""),n.flags&=-33);var i=F$(e);WM(e,i,o);break;case 3:case 4:var a=n.stateNode.containerInfo,s=F$(e);VM(e,s,a);break;default:throw Error(Kt(161))}}catch(c){Qo(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function w0e(e,t,r){gr=e,aY(e)}function aY(e,t,r){for(var n=(e.mode&1)!==0;gr!==null;){var o=gr,i=o.child;if(o.tag===22&&n){var a=o.memoizedState!==null||TS;if(!a){var s=o.alternate,c=s!==null&&s.memoizedState!==null||za;s=TS;var l=za;if(TS=a,(za=c)&&!l)for(gr=o;gr!==null;)a=gr,c=a.child,a.tag===22&&a.memoizedState!==null?B$(o):c!==null?(c.return=a,gr=c):B$(o);for(;i!==null;)gr=i,aY(i),i=i.sibling;gr=o,TS=s,za=l}L$(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,gr=i):L$(e)}}function L$(e){for(;gr!==null;){var t=gr;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:za||NT(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!za)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Dc(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&w$(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}w$(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var l=t.alternate;if(l!==null){var u=l.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Lw(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Kt(163))}za||t.flags&512&&jM(t)}catch(d){Qo(t,t.return,d)}}if(t===e){gr=null;break}if(r=t.sibling,r!==null){r.return=t.return,gr=r;break}gr=t.return}}function $$(e){for(;gr!==null;){var t=gr;if(t===e){gr=null;break}var r=t.sibling;if(r!==null){r.return=t.return,gr=r;break}gr=t.return}}function B$(e){for(;gr!==null;){var t=gr;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{NT(4,t)}catch(c){Qo(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(c){Qo(t,o,c)}}var i=t.return;try{jM(t)}catch(c){Qo(t,i,c)}break;case 5:var a=t.return;try{jM(t)}catch(c){Qo(t,a,c)}}}catch(c){Qo(t,t.return,c)}if(t===e){gr=null;break}var s=t.sibling;if(s!==null){s.return=t.return,gr=s;break}gr=t.return}}var x0e=Math.ceil,Lk=gf.ReactCurrentDispatcher,nO=gf.ReactCurrentOwner,sc=gf.ReactCurrentBatchConfig,Mn=0,aa=null,Ai=null,Ea=0,sl=0,zg=np(0),zi=0,Kw=null,Om=0,LT=0,oO=0,Yb=null,Ls=null,iO=0,Xv=1/0,Pd=null,$k=!1,GM=null,Nh=null,IS=!1,yh=null,Bk=0,Xb=0,qM=null,V_=-1,W_=0;function vs(){return Mn&6?fi():V_!==-1?V_:V_=fi()}function Lh(e){return e.mode&1?Mn&2&&Ea!==0?Ea&-Ea:o0e.transition!==null?(W_===0&&(W_=jq()),W_):(e=no,e!==0||(e=window.event,e=e===void 0?16:Xq(e.type)),e):1}function Zc(e,t,r,n){if(50<Xb)throw Xb=0,qM=null,Error(Kt(185));h2(e,r,n),(!(Mn&2)||e!==aa)&&(e===aa&&(!(Mn&2)&&(LT|=r),zi===4&&nh(e,Ea)),zs(e,n),r===1&&Mn===0&&!(t.mode&1)&&(Xv=fi()+500,OT&&op()))}function zs(e,t){var r=e.callbackNode;ome(e,t);var n=Ck(e,e===aa?Ea:0);if(n===0)r!==null&&KL(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&KL(r),t===1)e.tag===0?n0e(U$.bind(null,e)):mK(U$.bind(null,e)),Jme(function(){!(Mn&6)&&op()}),r=null;else{switch(Vq(n)){case 1:r=M6;break;case 4:r=Hq;break;case 16:r=xk;break;case 536870912:r=zq;break;default:r=xk}r=pY(r,sY.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function sY(e,t){if(V_=-1,W_=0,Mn&6)throw Error(Kt(327));var r=e.callbackNode;if(ov()&&e.callbackNode!==r)return null;var n=Ck(e,e===aa?Ea:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Uk(e,n);else{t=n;var o=Mn;Mn|=2;var i=cY();(aa!==e||Ea!==t)&&(Pd=null,Xv=fi()+500,mm(e,t));do try{_0e();break}catch(s){lY(e,s)}while(1);V6(),Lk.current=i,Mn=o,Ai!==null?t=0:(aa=null,Ea=0,t=zi)}if(t!==0){if(t===2&&(o=wM(e),o!==0&&(n=o,t=KM(e,o))),t===1)throw r=Kw,mm(e,0),nh(e,n),zs(e,fi()),r;if(t===6)nh(e,n);else{if(o=e.current.alternate,!(n&30)&&!C0e(o)&&(t=Uk(e,n),t===2&&(i=wM(e),i!==0&&(n=i,t=KM(e,i))),t===1))throw r=Kw,mm(e,0),nh(e,n),zs(e,fi()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(Kt(345));case 2:Rp(e,Ls,Pd);break;case 3:if(nh(e,n),(n&130023424)===n&&(t=iO+500-fi(),10<t)){if(Ck(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){vs(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=IM(Rp.bind(null,e,Ls,Pd),t);break}Rp(e,Ls,Pd);break;case 4:if(nh(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var a=31-Qc(n);i=1<<a,a=t[a],a>o&&(o=a),n&=~i}if(n=o,n=fi()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*x0e(n/1960))-n,10<n){e.timeoutHandle=IM(Rp.bind(null,e,Ls,Pd),n);break}Rp(e,Ls,Pd);break;case 5:Rp(e,Ls,Pd);break;default:throw Error(Kt(329))}}}return zs(e,fi()),e.callbackNode===r?sY.bind(null,e):null}function KM(e,t){var r=Yb;return e.current.memoizedState.isDehydrated&&(mm(e,t).flags|=256),e=Uk(e,t),e!==2&&(t=Ls,Ls=r,t!==null&&YM(t)),e}function YM(e){Ls===null?Ls=e:Ls.push.apply(Ls,e)}function C0e(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!iu(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nh(e,t){for(t&=~oO,t&=~LT,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Qc(t),n=1<<r;e[r]=-1,t&=~n}}function U$(e){if(Mn&6)throw Error(Kt(327));ov();var t=Ck(e,0);if(!(t&1))return zs(e,fi()),null;var r=Uk(e,t);if(e.tag!==0&&r===2){var n=wM(e);n!==0&&(t=n,r=KM(e,n))}if(r===1)throw r=Kw,mm(e,0),nh(e,t),zs(e,fi()),r;if(r===6)throw Error(Kt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rp(e,Ls,Pd),zs(e,fi()),null}function aO(e,t){var r=Mn;Mn|=1;try{return e(t)}finally{Mn=r,Mn===0&&(Xv=fi()+500,OT&&op())}}function Dm(e){yh!==null&&yh.tag===0&&!(Mn&6)&&ov();var t=Mn;Mn|=1;var r=sc.transition,n=no;try{if(sc.transition=null,no=1,e)return e()}finally{no=n,sc.transition=r,Mn=t,!(Mn&6)&&op()}}function sO(){sl=zg.current,Io(zg)}function mm(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Zme(r)),Ai!==null)for(r=Ai.return;r!==null;){var n=r;switch(H6(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Tk();break;case 3:Kv(),Io(Us),Io(Ya),X6();break;case 5:Y6(n);break;case 4:Kv();break;case 13:Io(Uo);break;case 19:Io(Uo);break;case 10:W6(n.type._context);break;case 22:case 23:sO()}r=r.return}if(aa=e,Ai=e=$h(e.current,null),Ea=sl=t,zi=0,Kw=null,oO=LT=Om=0,Ls=Yb=null,Gp!==null){for(t=0;t<Gp.length;t++)if(r=Gp[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=o,n.next=a}r.pending=n}Gp=null}return e}function lY(e,t){do{var r=Ai;try{if(V6(),H_.current=Nk,Fk){for(var n=jo.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}Fk=!1}if(Rm=0,ra=Hi=jo=null,qb=!1,Ww=0,nO.current=null,r===null||r.return===null){zi=1,Kw=t,Ai=null;break}e:{var i=e,a=r.return,s=r,c=t;if(t=Ea,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,u=s,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=T$(a);if(h!==null){h.flags&=-257,I$(h,a,s,i,t),h.mode&1&&E$(i,l,t),t=h,c=l;var p=t.updateQueue;if(p===null){var g=new Set;g.add(c),t.updateQueue=g}else p.add(c);break e}else{if(!(t&1)){E$(i,l,t),lO();break e}c=Error(Kt(426))}}else if(Fo&&s.mode&1){var m=T$(a);if(m!==null){!(m.flags&65536)&&(m.flags|=256),I$(m,a,s,i,t),z6(Yv(c,s));break e}}i=c=Yv(c,s),zi!==4&&(zi=2),Yb===null?Yb=[i]:Yb.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=WK(i,c,t);b$(i,v);break e;case 1:s=c;var y=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Nh===null||!Nh.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=GK(i,s,t);b$(i,w);break e}}i=i.return}while(i!==null)}dY(r)}catch(E){t=E,Ai===r&&r!==null&&(Ai=r=r.return);continue}break}while(1)}function cY(){var e=Lk.current;return Lk.current=Nk,e===null?Nk:e}function lO(){(zi===0||zi===3||zi===2)&&(zi=4),aa===null||!(Om&268435455)&&!(LT&268435455)||nh(aa,Ea)}function Uk(e,t){var r=Mn;Mn|=2;var n=cY();(aa!==e||Ea!==t)&&(Pd=null,mm(e,t));do try{S0e();break}catch(o){lY(e,o)}while(1);if(V6(),Mn=r,Lk.current=n,Ai!==null)throw Error(Kt(261));return aa=null,Ea=0,zi}function S0e(){for(;Ai!==null;)uY(Ai)}function _0e(){for(;Ai!==null&&!Ype();)uY(Ai)}function uY(e){var t=hY(e.alternate,e,sl);e.memoizedProps=e.pendingProps,t===null?dY(e):Ai=t,nO.current=null}function dY(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=v0e(r,t),r!==null){r.flags&=32767,Ai=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{zi=6,Ai=null;return}}else if(r=g0e(r,t,sl),r!==null){Ai=r;return}if(t=t.sibling,t!==null){Ai=t;return}Ai=t=e}while(t!==null);zi===0&&(zi=5)}function Rp(e,t,r){var n=no,o=sc.transition;try{sc.transition=null,no=1,k0e(e,t,r,n)}finally{sc.transition=o,no=n}return null}function k0e(e,t,r,n){do ov();while(yh!==null);if(Mn&6)throw Error(Kt(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Kt(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(ime(e,i),e===aa&&(Ai=aa=null,Ea=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||IS||(IS=!0,pY(xk,function(){return ov(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=sc.transition,sc.transition=null;var a=no;no=1;var s=Mn;Mn|=4,nO.current=null,b0e(e,r),iY(r,e),Wme(EM),Sk=!!kM,EM=kM=null,e.current=r,w0e(r),Xpe(),Mn=s,no=a,sc.transition=i}else e.current=r;if(IS&&(IS=!1,yh=e,Bk=o),i=e.pendingLanes,i===0&&(Nh=null),Jpe(r.stateNode),zs(e,fi()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if($k)throw $k=!1,e=GM,GM=null,e;return Bk&1&&e.tag!==0&&ov(),i=e.pendingLanes,i&1?e===qM?Xb++:(Xb=0,qM=e):Xb=0,op(),null}function ov(){if(yh!==null){var e=Vq(Bk),t=sc.transition,r=no;try{if(sc.transition=null,no=16>e?16:e,yh===null)var n=!1;else{if(e=yh,yh=null,Bk=0,Mn&6)throw Error(Kt(331));var o=Mn;for(Mn|=4,gr=e.current;gr!==null;){var i=gr,a=i.child;if(gr.flags&16){var s=i.deletions;if(s!==null){for(var c=0;c<s.length;c++){var l=s[c];for(gr=l;gr!==null;){var u=gr;switch(u.tag){case 0:case 11:case 15:Kb(8,u,i)}var f=u.child;if(f!==null)f.return=u,gr=f;else for(;gr!==null;){u=gr;var d=u.sibling,h=u.return;if(rY(u),u===l){gr=null;break}if(d!==null){d.return=h,gr=d;break}gr=h}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var m=g.sibling;g.sibling=null,g=m}while(g!==null)}}gr=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,gr=a;else e:for(;gr!==null;){if(i=gr,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Kb(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,gr=v;break e}gr=i.return}}var y=e.current;for(gr=y;gr!==null;){a=gr;var b=a.child;if(a.subtreeFlags&2064&&b!==null)b.return=a,gr=b;else e:for(a=y;gr!==null;){if(s=gr,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:NT(9,s)}}catch(E){Qo(s,s.return,E)}if(s===a){gr=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,gr=w;break e}gr=s.return}}if(Mn=o,op(),Wu&&typeof Wu.onPostCommitFiberRoot=="function")try{Wu.onPostCommitFiberRoot(IT,e)}catch{}n=!0}return n}finally{no=r,sc.transition=t}}return!1}function H$(e,t,r){t=Yv(r,t),t=WK(e,t,1),e=Fh(e,t,1),t=vs(),e!==null&&(h2(e,1,t),zs(e,t))}function Qo(e,t,r){if(e.tag===3)H$(e,e,r);else for(;t!==null;){if(t.tag===3){H$(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Nh===null||!Nh.has(n))){e=Yv(r,e),e=GK(t,e,1),t=Fh(t,e,1),e=vs(),t!==null&&(h2(t,1,e),zs(t,e));break}}t=t.return}}function E0e(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=vs(),e.pingedLanes|=e.suspendedLanes&r,aa===e&&(Ea&r)===r&&(zi===4||zi===3&&(Ea&130023424)===Ea&&500>fi()-iO?mm(e,0):oO|=r),zs(e,t)}function fY(e,t){t===0&&(e.mode&1?(t=yS,yS<<=1,!(yS&130023424)&&(yS=4194304)):t=1);var r=vs();e=tf(e,t),e!==null&&(h2(e,t,r),zs(e,r))}function T0e(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),fY(e,r)}function I0e(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Kt(314))}n!==null&&n.delete(t),fY(e,r)}var hY;hY=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Us.current)$s=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return $s=!1,m0e(e,t,r);$s=!!(e.flags&131072)}else $s=!1,Fo&&t.flags&1048576&&gK(t,Pk,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;j_(e,t),e=t.pendingProps;var o=Wv(t,Ya.current);nv(t,r),o=Z6(null,t,n,e,o,r);var i=J6();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Hs(n)?(i=!0,Ik(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,q6(t),o.updater=DT,t.stateNode=o,o._reactInternals=t,FM(t,n,e,r),t=$M(null,t,n,!0,i,r)):(t.tag=0,Fo&&i&&U6(t),cs(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(j_(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=P0e(n),e=Dc(n,e),o){case 0:t=LM(null,t,n,e,r);break e;case 1:t=M$(null,t,n,e,r);break e;case 11:t=A$(null,t,n,e,r);break e;case 14:t=P$(null,t,n,Dc(n.type,e),r);break e}throw Error(Kt(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dc(n,o),LM(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dc(n,o),M$(e,t,n,o,r);case 3:e:{if(XK(t),e===null)throw Error(Kt(387));n=t.pendingProps,i=t.memoizedState,o=i.element,wK(e,t),Ok(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Yv(Error(Kt(423)),t),t=R$(e,t,n,r,o);break e}else if(n!==o){o=Yv(Error(Kt(424)),t),t=R$(e,t,n,r,o);break e}else for(ml=Dh(t.stateNode.containerInfo.firstChild),yl=t,Fo=!0,zc=null,r=_K(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Gv(),n===o){t=rf(e,t,r);break e}cs(e,t,n,r)}t=t.child}return t;case 5:return kK(t),e===null&&RM(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,TM(n,o)?a=null:i!==null&&TM(n,i)&&(t.flags|=32),YK(e,t),cs(e,t,a,r),t.child;case 6:return e===null&&RM(t),null;case 13:return QK(e,t,r);case 4:return K6(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=qv(t,null,n,r):cs(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dc(n,o),A$(e,t,n,o,r);case 7:return cs(e,t,t.pendingProps,r),t.child;case 8:return cs(e,t,t.pendingProps.children,r),t.child;case 12:return cs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Co(Mk,n._currentValue),n._currentValue=a,i!==null)if(iu(i.value,a)){if(i.children===o.children&&!Us.current){t=rf(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(i.tag===1){c=Kd(-1,r&-r),c.tag=2;var l=i.updateQueue;if(l!==null){l=l.shared;var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),OM(i.return,r,t),s.lanes|=r;break}c=c.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(Kt(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),OM(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}cs(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,nv(t,r),o=uc(o),n=n(o),t.flags|=1,cs(e,t,n,r),t.child;case 14:return n=t.type,o=Dc(n,t.pendingProps),o=Dc(n.type,o),P$(e,t,n,o,r);case 15:return qK(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Dc(n,o),j_(e,t),t.tag=1,Hs(n)?(e=!0,Ik(t)):e=!1,nv(t,r),CK(t,n,o),FM(t,n,o,r),$M(null,t,n,!0,e,r);case 19:return ZK(e,t,r);case 22:return KK(e,t,r)}throw Error(Kt(156,t.tag))};function pY(e,t){return Uq(e,t)}function A0e(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nc(e,t,r,n){return new A0e(e,t,r,n)}function cO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function P0e(e){if(typeof e=="function")return cO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===I6)return 11;if(e===A6)return 14}return 2}function $h(e,t){var r=e.alternate;return r===null?(r=nc(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function G_(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")cO(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Rg:return gm(r.children,o,i,t);case T6:a=8,o|=8;break;case iM:return e=nc(12,r,t,o|2),e.elementType=iM,e.lanes=i,e;case aM:return e=nc(13,r,t,o),e.elementType=aM,e.lanes=i,e;case sM:return e=nc(19,r,t,o),e.elementType=sM,e.lanes=i,e;case Sq:return $T(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xq:a=10;break e;case Cq:a=9;break e;case I6:a=11;break e;case A6:a=14;break e;case Jf:a=16,n=null;break e}throw Error(Kt(130,e==null?e:typeof e,""))}return t=nc(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function gm(e,t,r,n){return e=nc(7,e,n,t),e.lanes=r,e}function $T(e,t,r,n){return e=nc(22,e,n,t),e.elementType=Sq,e.lanes=r,e.stateNode={isHidden:!1},e}function yA(e,t,r){return e=nc(6,e,null,t),e.lanes=r,e}function bA(e,t,r){return t=nc(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function M0e(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=J3(0),this.expirationTimes=J3(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=J3(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function uO(e,t,r,n,o,i,a,s,c){return e=new M0e(e,t,r,s,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=nc(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},q6(i),e}function R0e(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Mg,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function mY(e){if(!e)return Kh;e=e._reactInternals;e:{if(a0(e)!==e||e.tag!==1)throw Error(Kt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Hs(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Kt(171))}if(e.tag===1){var r=e.type;if(Hs(r))return pK(e,r,t)}return t}function gY(e,t,r,n,o,i,a,s,c){return e=uO(r,n,!0,e,o,i,a,s,c),e.context=mY(null),r=e.current,n=vs(),o=Lh(r),i=Kd(n,o),i.callback=t??null,Fh(r,i,o),e.current.lanes=o,h2(e,o,n),zs(e,n),e}function BT(e,t,r,n){var o=t.current,i=vs(),a=Lh(o);return r=mY(r),t.context===null?t.context=r:t.pendingContext=r,t=Kd(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Fh(o,t,a),e!==null&&(Zc(e,o,a,i),U_(e,o,a)),a}function Hk(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function z$(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function dO(e,t){z$(e,t),(e=e.alternate)&&z$(e,t)}function O0e(){return null}var vY=typeof reportError=="function"?reportError:function(e){console.error(e)};function fO(e){this._internalRoot=e}UT.prototype.render=fO.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Kt(409));BT(e,t,null,null)};UT.prototype.unmount=fO.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dm(function(){BT(null,e,null,null)}),t[ef]=null}};function UT(e){this._internalRoot=e}UT.prototype.unstable_scheduleHydration=function(e){if(e){var t=qq();e={blockedOn:null,target:e,priority:t};for(var r=0;r<rh.length&&t!==0&&t<rh[r].priority;r++);rh.splice(r,0,e),r===0&&Yq(e)}};function hO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function HT(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function j$(){}function D0e(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var l=Hk(a);i.call(l)}}var a=gY(t,n,e,0,null,!1,!1,"",j$);return e._reactRootContainer=a,e[ef]=a.current,Uw(e.nodeType===8?e.parentNode:e),Dm(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var l=Hk(c);s.call(l)}}var c=uO(e,0,!1,null,null,!1,!1,"",j$);return e._reactRootContainer=c,e[ef]=c.current,Uw(e.nodeType===8?e.parentNode:e),Dm(function(){BT(t,c,r,n)}),c}function zT(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var c=Hk(a);s.call(c)}}BT(t,a,e,o)}else a=D0e(r,t,e,o,n);return Hk(a)}Wq=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=_b(t.pendingLanes);r!==0&&(R6(t,r|1),zs(t,fi()),!(Mn&6)&&(Xv=fi()+500,op()))}break;case 13:Dm(function(){var n=tf(e,1);if(n!==null){var o=vs();Zc(n,e,1,o)}}),dO(e,1)}};O6=function(e){if(e.tag===13){var t=tf(e,134217728);if(t!==null){var r=vs();Zc(t,e,134217728,r)}dO(e,134217728)}};Gq=function(e){if(e.tag===13){var t=Lh(e),r=tf(e,t);if(r!==null){var n=vs();Zc(r,e,t,n)}dO(e,t)}};qq=function(){return no};Kq=function(e,t){var r=no;try{return no=e,t()}finally{no=r}};vM=function(e,t,r){switch(t){case"input":if(uM(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=RT(n);if(!o)throw Error(Kt(90));kq(n),uM(n,o)}}}break;case"textarea":Tq(e,r);break;case"select":t=r.value,t!=null&&Jg(e,!!r.multiple,t,!1)}};Dq=aO;Fq=Dm;var F0e={usingClientEntryPoint:!1,Events:[m2,Ng,RT,Rq,Oq,aO]},Ly={findFiberByHostInstance:Wp,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},N0e={bundleType:Ly.bundleType,version:Ly.version,rendererPackageName:Ly.rendererPackageName,rendererConfig:Ly.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gf.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$q(e),e===null?null:e.stateNode},findFiberByHostInstance:Ly.findFiberByHostInstance||O0e,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var AS=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!AS.isDisabled&&AS.supportsFiber)try{IT=AS.inject(N0e),Wu=AS}catch{}}Sl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=F0e;Sl.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hO(t))throw Error(Kt(200));return R0e(e,t,null,r)};Sl.createRoot=function(e,t){if(!hO(e))throw Error(Kt(299));var r=!1,n="",o=vY;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=uO(e,1,!1,null,null,r,!1,n,o),e[ef]=t.current,Uw(e.nodeType===8?e.parentNode:e),new fO(t)};Sl.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Kt(188)):(e=Object.keys(e).join(","),Error(Kt(268,e)));return e=$q(t),e=e===null?null:e.stateNode,e};Sl.flushSync=function(e){return Dm(e)};Sl.hydrate=function(e,t,r){if(!HT(t))throw Error(Kt(200));return zT(null,e,t,!0,r)};Sl.hydrateRoot=function(e,t,r){if(!hO(e))throw Error(Kt(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",a=vY;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=gY(t,null,e,1,r??null,o,!1,i,a),e[ef]=t.current,Uw(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new UT(t)};Sl.render=function(e,t,r){if(!HT(t))throw Error(Kt(200));return zT(null,e,t,!1,r)};Sl.unmountComponentAtNode=function(e){if(!HT(e))throw Error(Kt(40));return e._reactRootContainer?(Dm(function(){zT(null,null,e,!1,function(){e._reactRootContainer=null,e[ef]=null})}),!0):!1};Sl.unstable_batchedUpdates=aO;Sl.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!HT(r))throw Error(Kt(200));if(e==null||e._reactInternals===void 0)throw Error(Kt(38));return zT(e,t,r,!1,n)};Sl.version="18.2.0-next-9e3b772b8-20220608";function yY(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yY)}catch(e){console.error(e)}}yY(),gq.exports=Sl;var ip=gq.exports;const Eb=M1(ip),L0e=iq({__proto__:null,default:Eb},[ip]);var V$=ip;nM.createRoot=V$.createRoot,nM.hydrateRoot=V$.hydrateRoot;const bY=[];let Kp=0;for(;Kp<64;)bY[Kp]=0|Math.sin(++Kp%Math.PI)*4294967296;function $0e(e){const t=[];let r,n,o,i=unescape(encodeURI(e))+"",a=i.length;const s=[r=1732584193,n=4023233417,~r,~n];for(e=--a/4+2|15,t[--e]=a*8;~a;)t[a>>2]|=i.charCodeAt(a)<<8*a--;for(Kp=i=0;Kp<e;Kp+=16){for(a=s;i<64;a=[o=a[3],r+((o=a[0]+[r&n|~r&o,o&r|~o&n,r^n^o,n^(r|~o)][a=i>>4]+bY[i]+~~t[Kp|[i,5*i+1,3*i+5,7*i][a]&15])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+i++%4])|o>>>-a),r,n])r=a[1]|0,n=a[2];for(i=4;i;)s[--i]+=a[i]}for(e="";i<32;)e+=(s[i>>3]>>(1^i++)*4&15).toString(16);return e}const PS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",wY=e=>{let t="",r,n,o,i,a,s,c,l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)i=PS.indexOf(e.charAt(l++)),a=PS.indexOf(e.charAt(l++)),s=PS.indexOf(e.charAt(l++)),c=PS.indexOf(e.charAt(l++)),r=i<<2|a>>4,n=(a&15)<<4|s>>2,o=(s&3)<<6|c,t=t+String.fromCharCode(r),s!=64&&(t=t+String.fromCharCode(n)),c!=64&&(t=t+String.fromCharCode(o));return t},B0e=["pro","premium"],U0e=["perpetual","annual","subscription"];function v2(e){console.error(["*************************************************************","",...e,"","*************************************************************"].join(`
`))}function H0e(){v2(["MUI: Invalid license key.","","Your MUI X license key format isn't valid. It could be because the license key is missing a character or has a typo.","","To solve the issue, you need to double check that `setLicenseKey()` is called with the right argument","Please check the license key installation https://mui.com/r/x-license-key-installation."])}function z0e(){v2(["MUI: License key plan mismatch.","","Your use of MUI X is not compatible with the plan of your license key. The feature you are trying to use is not included in the plan of your license key. This happens if you try to use `DataGridPremium` with a license key for the Pro plan.","","To solve the issue, you can upgrade your plan from Pro to Premium at https://mui.com/r/x-get-license?scope=premium.","Of if you didn't intend to use Premium features, you can replace the import of `@mui/x-data-grid-premium` with `@mui/x-data-grid-pro`."])}function j0e({plan:e,packageName:t}){v2(["MUI: Missing license key.","",`The license key is missing. You might not be allowed to use \`${t}\` which is part of MUI X ${e}.`,"","To solve the issue, you can check the free trial conditions: https://mui.com/r/x-license-trial.","If you are eligible no actions are required. If you are not eligible to the free trial, you need to purchase a license https://mui.com/r/x-get-license or stop using the software immediately."])}function V0e({packageName:e}){v2(["MUI: Expired package version.","",`You have installed a version of \`${e}\` that is outside of the maintenance plan of your license key. By default, commercial licenses provide access to new versions released during the first year after the purchase.`,"","To solve the issue, you can renew your license https://mui.com/r/x-get-license or install an older version of the npm package that is compatible with your license key."])}function W0e({plan:e,licenseKey:t,expiryTimestamp:r}){v2(["MUI: Expired license key.","",`Your annual license key to use MUI X ${e}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${t}`,""])}function G0e({plan:e,licenseKey:t,expiryTimestamp:r}){throw new Error(["MUI: Expired license key.","",`Your annual license key to use MUI X ${e}'s on non-production environments is expired. If you are seeing this development console message, you might be close to breach the license terms by making direct or indirect changes to the frontend of an app that render a MUI X ${e} component (more details in https://mui.com/r/x-license-annual).`,"","To solve the problem you can either:","","- Renew your license https://mui.com/r/x-get-license and use the new key",`- Stop making changes to code depending directly or indirectly on MUI X ${e}'s APIs`,"","Note that your license is perpetual in production environments with any version released before your license term ends.","",`- License key expiry timestamp: ${new Date(r)}`,`- Installed license key: ${t}`,""].join(`
`))}function wA(e,t){return()=>null}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W.apply(this,arguments)}const q0e=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"}));function $d(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xY(e){if(!$d(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=xY(e[r])}),t}function ys(e,t,r={clone:!0}){const n=r.clone?W({},e):e;return $d(e)&&$d(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&($d(t[o])&&o in e&&$d(e[o])?n[o]=ys(e[o],t[o],r):r.clone?n[o]=$d(t[o])?xY(t[o]):t[o]:n[o]=t[o])}),n}const K0e=Object.freeze(Object.defineProperty({__proto__:null,default:ys,isPlainObject:$d},Symbol.toStringTag,{value:"Module"}));var CY={exports:{}},Y0e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",X0e=Y0e,Q0e=X0e;function SY(){}function _Y(){}_Y.resetWarningCache=SY;var Z0e=function(){function e(n,o,i,a,s,c){if(c!==Q0e){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:_Y,resetWarningCache:SY};return r.PropTypes=r,r};CY.exports=Z0e();var kY=CY.exports;const ue=M1(kY);function nf(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const J0e=Object.freeze(Object.defineProperty({__proto__:null,default:nf},Symbol.toStringTag,{value:"Module"}));var EY={exports:{}},io={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var pO=Symbol.for("react.element"),mO=Symbol.for("react.portal"),jT=Symbol.for("react.fragment"),VT=Symbol.for("react.strict_mode"),WT=Symbol.for("react.profiler"),GT=Symbol.for("react.provider"),qT=Symbol.for("react.context"),ege=Symbol.for("react.server_context"),KT=Symbol.for("react.forward_ref"),YT=Symbol.for("react.suspense"),XT=Symbol.for("react.suspense_list"),QT=Symbol.for("react.memo"),ZT=Symbol.for("react.lazy"),tge=Symbol.for("react.offscreen"),TY;TY=Symbol.for("react.module.reference");function yc(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pO:switch(e=e.type,e){case jT:case WT:case VT:case YT:case XT:return e;default:switch(e=e&&e.$$typeof,e){case ege:case qT:case KT:case ZT:case QT:case GT:return e;default:return t}}case mO:return t}}}io.ContextConsumer=qT;io.ContextProvider=GT;io.Element=pO;io.ForwardRef=KT;io.Fragment=jT;io.Lazy=ZT;io.Memo=QT;io.Portal=mO;io.Profiler=WT;io.StrictMode=VT;io.Suspense=YT;io.SuspenseList=XT;io.isAsyncMode=function(){return!1};io.isConcurrentMode=function(){return!1};io.isContextConsumer=function(e){return yc(e)===qT};io.isContextProvider=function(e){return yc(e)===GT};io.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pO};io.isForwardRef=function(e){return yc(e)===KT};io.isFragment=function(e){return yc(e)===jT};io.isLazy=function(e){return yc(e)===ZT};io.isMemo=function(e){return yc(e)===QT};io.isPortal=function(e){return yc(e)===mO};io.isProfiler=function(e){return yc(e)===WT};io.isStrictMode=function(e){return yc(e)===VT};io.isSuspense=function(e){return yc(e)===YT};io.isSuspenseList=function(e){return yc(e)===XT};io.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jT||e===WT||e===VT||e===YT||e===XT||e===tge||typeof e=="object"&&e!==null&&(e.$$typeof===ZT||e.$$typeof===QT||e.$$typeof===GT||e.$$typeof===qT||e.$$typeof===KT||e.$$typeof===TY||e.getModuleId!==void 0)};io.typeOf=yc;EY.exports=io;var W$=EY.exports;const rge=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function IY(e){const t=`${e}`.match(rge);return t&&t[1]||""}function AY(e,t=""){return e.displayName||e.name||IY(e)||t}function G$(e,t,r){const n=AY(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function nge(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return AY(e,"Component");if(typeof e=="object")switch(e.$$typeof){case W$.ForwardRef:return G$(e,e.render,"ForwardRef");case W$.Memo:return G$(e,e.type,"memo");default:return}}}const oge=Object.freeze(Object.defineProperty({__proto__:null,default:nge,getFunctionName:IY},Symbol.toStringTag,{value:"Module"})),XM=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),ige=ue.oneOfType([ue.func,ue.object]),JT=ige;function ut(e){if(typeof e!="string")throw new Error(nf(7));return e.charAt(0).toUpperCase()+e.slice(1)}const age=Object.freeze(Object.defineProperty({__proto__:null,default:ut},Symbol.toStringTag,{value:"Module"}));function QM(...e){return e.reduce((t,r)=>r==null?t:function(...o){t.apply(this,o),r.apply(this,o)},()=>{})}function ap(e,t=166){let r;function n(...o){const i=()=>{e.apply(this,o)};clearTimeout(r),r=setTimeout(i,t)}return n.clear=()=>{clearTimeout(r)},n}function sge(e,t){return()=>null}function iv(e,t){var r,n;return A.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(n=e.type)==null||(n=n._payload)==null||(n=n.value)==null?void 0:n.muiName)!==-1}function In(e){return e&&e.ownerDocument||document}function Gs(e){return In(e).defaultView||window}function lge(e,t){return()=>null}function Yw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const cge=typeof window<"u"?A.useLayoutEffect:A.useEffect,en=cge;let q$=0;function uge(e){const[t,r]=A.useState(e),n=e||t;return A.useEffect(()=>{t==null&&(q$+=1,r(`mui-${q$}`))},[t]),n}const K$=jv["useId".toString()];function dn(e){if(K$!==void 0){const t=K$();return e??t}return uge(e)}function dge(e,t,r,n,o){return null}function sa({controlled:e,default:t,name:r,state:n="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i,c=A.useCallback(l=>{o||a(l)},[]);return[s,c]}function Mt(e){const t=A.useRef(e);return en(()=>{t.current=e}),A.useRef((...r)=>(0,t.current)(...r)).current}function Ur(...e){return A.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{Yw(r,t)})},e)}const Y$={};function fge(e,t){const r=A.useRef(Y$);return r.current===Y$&&(r.current=e(t)),r}const hge=[];function pge(e){A.useEffect(e,hge)}let gO=class PY{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new PY}start(t,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,r()},t)}};function jg(){const e=fge(gO.create).current;return pge(e.disposeEffect),e}let eI=!0,ZM=!1;const mge=new gO,gge={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function vge(e){const{type:t,tagName:r}=e;return!!(r==="INPUT"&&gge[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function yge(e){e.metaKey||e.altKey||e.ctrlKey||(eI=!0)}function xA(){eI=!1}function bge(){this.visibilityState==="hidden"&&ZM&&(eI=!0)}function wge(e){e.addEventListener("keydown",yge,!0),e.addEventListener("mousedown",xA,!0),e.addEventListener("pointerdown",xA,!0),e.addEventListener("touchstart",xA,!0),e.addEventListener("visibilitychange",bge,!0)}function xge(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return eI||vge(t)}function y2(){const e=A.useCallback(o=>{o!=null&&wge(o.ownerDocument)},[]),t=A.useRef(!1);function r(){return t.current?(ZM=!0,mge.start(100,()=>{ZM=!1}),t.current=!1,!0):!1}function n(o){return xge(o)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:n,onBlur:r,ref:e}}function MY(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Y0;function RY(){if(Y0)return Y0;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Y0="reverse",e.scrollLeft>0?Y0="default":(e.scrollLeft=1,e.scrollLeft===0&&(Y0="negative")),document.body.removeChild(e),Y0}function Cge(e,t){const r=e.scrollLeft;if(t!=="rtl")return r;switch(RY()){case"negative":return e.scrollWidth-e.clientWidth+r;case"reverse":return e.scrollWidth-e.clientWidth-r;default:return r}}const Sge=e=>{const t=A.useRef({});return A.useEffect(()=>{t.current=e}),t.current},vO=Sge;function _ge(e){return A.Children.toArray(e).filter(t=>A.isValidElement(t))}const kge={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Ege=kge;function yO(e,t){const r=W({},t);return Object.keys(e).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=W({},e[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const o=e[n]||{},i=t[n];r[n]={},!i||!Object.keys(i)?r[n]=o:!o||!Object.keys(o)?r[n]=i:(r[n]=W({},i),Object.keys(o).forEach(a=>{r[n][a]=yO(o[a],i[a])}))}else r[n]===void 0&&(r[n]=e[n])}),r}function pt(e,t,r=void 0){const n={};return Object.keys(e).forEach(o=>{n[o]=e[o].reduce((i,a)=>{if(a){const s=t(a);s!==""&&i.push(s),r&&r[a]&&i.push(r[a])}return i},[]).join(" ")}),n}const X$=e=>e,Tge=()=>{let e=X$;return{configure(t){e=t},generate(t){return e(t)},reset(){e=X$}}},Ige=Tge(),tI=Ige,OY={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Gt(e,t,r="Mui"){const n=OY[t];return n?`${r}-${n}`:`${tI.generate(e)}-${t}`}function Vt(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=Gt(e,o,r)}),n}function Bp(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}const Age=Object.freeze(Object.defineProperty({__proto__:null,default:Bp},Symbol.toStringTag,{value:"Module"}));XM.__MUI_LICENSE_INFO__=XM.__MUI_LICENSE_INFO__||{key:void 0};class Xw{static getLicenseInfo(){return XM.__MUI_LICENSE_INFO__}static getLicenseKey(){return Xw.getLicenseInfo().key}static setLicenseKey(t){const r=Xw.getLicenseInfo();r.key=t}}let Bo=function(e){return e.NotFound="NotFound",e.Invalid="Invalid",e.ExpiredAnnual="ExpiredAnnual",e.ExpiredAnnualGrace="ExpiredAnnualGrace",e.ExpiredVersion="ExpiredVersion",e.Valid="Valid",e.OutOfScope="OutOfScope",e}({});const Pge=/^.*EXPIRY=([0-9]+),.*$/,Mge=e=>{let t;try{t=parseInt(e.match(Pge)[1],10),(!t||Number.isNaN(t))&&(t=null)}catch{t=null}return{scope:"pro",licensingModel:"perpetual",expiryTimestamp:t}},Rge=e=>{const t={scope:null,licensingModel:null,expiryTimestamp:null};return e.split(",").map(r=>r.split("=")).filter(r=>r.length===2).forEach(([r,n])=>{if(r==="S"&&(t.scope=n),r==="LM"&&(t.licensingModel=n),r==="E"){const o=parseInt(n,10);o&&!Number.isNaN(o)&&(t.expiryTimestamp=o)}}),t},Oge=e=>{const t=wY(e);return t.includes("KEYVERSION=1")?Mge(t):t.includes("KV=2")?Rge(t):null};function Dge({releaseInfo:e,licenseKey:t,acceptedScopes:r}){if(!e)throw new Error("MUI: The release information is missing. Not able to validate license.");if(!t)return{status:Bo.NotFound};const n=t.substr(0,32),o=t.substr(32);if(n!==$0e(o))return{status:Bo.Invalid};const i=Oge(o);if(i==null)return console.error("Error checking license. Key version not found!"),{status:Bo.Invalid};if(i.licensingModel==null||!U0e.includes(i.licensingModel))return console.error("Error checking license. Licensing model not found or invalid!"),{status:Bo.Invalid};if(i.expiryTimestamp==null)return console.error("Error checking license. Expiry timestamp not found or invalid!"),{status:Bo.Invalid};i.licensingModel;{const a=parseInt(wY(e),10);if(Number.isNaN(a))throw new Error("MUI: The release information is invalid. Not able to validate license.");if(i.expiryTimestamp<a)return{status:Bo.ExpiredVersion}}return i.scope==null||!B0e.includes(i.scope)?(console.error("Error checking license. scope not found or invalid!"),{status:Bo.Invalid}):r.includes(i.scope)?{status:Bo.Valid}:{status:Bo.OutOfScope}}const Fge=A.createContext({key:void 0}),MS={};function b2(e,t){const{key:r}=A.useContext(Fge);return A.useMemo(()=>{const n=r??Xw.getLicenseKey();if(MS[e]&&MS[e].key===n)return MS[e].licenseVerifier;const o=e.includes("premium")?["premium"]:["pro","premium"],i=e.includes("premium")?"Premium":"Pro",a=Dge({releaseInfo:t,licenseKey:n,acceptedScopes:o});MS[e]={key:n,licenseVerifier:a};const s=`@mui/${e}`;return a.status===Bo.Valid||(a.status===Bo.Invalid?H0e():a.status===Bo.OutOfScope?z0e():a.status===Bo.NotFound?j0e({plan:i,packageName:s}):a.status===Bo.ExpiredAnnualGrace?W0e(W({plan:i},a.meta)):a.status===Bo.ExpiredAnnual?G0e(W({plan:i},a.meta)):a.status===Bo.ExpiredVersion&&V0e({packageName:s})),a},[e,t,r])}function Nge(e){switch(e){case Bo.ExpiredAnnualGrace:case Bo.ExpiredAnnual:return"MUI X Expired license key";case Bo.ExpiredVersion:return"MUI X Expired package version";case Bo.Invalid:return"MUI X Invalid license key";case Bo.OutOfScope:return"MUI X License key plan mismatch";case Bo.NotFound:return"MUI X Missing license key";default:throw new Error("MUI: Unhandled MUI X license status.")}}function DY(e){const{packageName:t,releaseInfo:r}=e,n=b2(t,r);return n.status===Bo.Valid?null:R("div",{style:{position:"absolute",pointerEvents:"none",color:"#8282829e",zIndex:1e5,width:"100%",textAlign:"center",bottom:"50%",right:0,letterSpacing:5,fontSize:24},children:Nge(n.status)})}/*! *****************************************************************************
Copyright (C) Microsoft. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Q$;(function(e){(function(t){var r=typeof Er=="object"?Er:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),n=o(e);typeof r.Reflect>"u"?r.Reflect=e:n=o(r.Reflect,n),t(n);function o(i,a){return function(s,c){typeof i[s]!="function"&&Object.defineProperty(i,s,{configurable:!0,writable:!0,value:c}),a&&a(s,c)}}})(function(t){var r=Object.prototype.hasOwnProperty,n=typeof Symbol=="function",o=n&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",i=n&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",a=typeof Object.create=="function",s={__proto__:[]}instanceof Array,c=!a&&!s,l={create:a?function(){return we(Object.create(null))}:s?function(){return we({__proto__:null})}:function(){return we({})},has:c?function(ie,ge){return r.call(ie,ge)}:function(ie,ge){return ge in ie},get:c?function(ie,ge){return r.call(ie,ge)?ie[ge]:void 0}:function(ie,ge){return ie[ge]}},u=Object.getPrototypeOf(Function),f=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",d=!f&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:le(),h=!f&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:de(),p=!f&&typeof WeakMap=="function"?WeakMap:ve(),g=new p;function m(ie,ge,Pe,Fe){if(j(Pe)){if(!X(ie))throw new TypeError;if(!ee(ge))throw new TypeError;return U(ie,ge)}else{if(!X(ie))throw new TypeError;if(!K(ge))throw new TypeError;if(!K(Fe)&&!j(Fe)&&!z(Fe))throw new TypeError;return z(Fe)&&(Fe=void 0),Pe=V(Pe),B(ie,ge,Pe,Fe)}}t("decorate",m);function v(ie,ge){function Pe(Fe,Ie){if(!K(Fe))throw new TypeError;if(!j(Ie)&&!re(Ie))throw new TypeError;S(ie,ge,Fe,Ie)}return Pe}t("metadata",v);function y(ie,ge,Pe,Fe){if(!K(Pe))throw new TypeError;return j(Fe)||(Fe=V(Fe)),S(ie,ge,Pe,Fe)}t("defineMetadata",y);function b(ie,ge,Pe){if(!K(ge))throw new TypeError;return j(Pe)||(Pe=V(Pe)),T(ie,ge,Pe)}t("hasMetadata",b);function w(ie,ge,Pe){if(!K(ge))throw new TypeError;return j(Pe)||(Pe=V(Pe)),P(ie,ge,Pe)}t("hasOwnMetadata",w);function E(ie,ge,Pe){if(!K(ge))throw new TypeError;return j(Pe)||(Pe=V(Pe)),_(ie,ge,Pe)}t("getMetadata",E);function I(ie,ge,Pe){if(!K(ge))throw new TypeError;return j(Pe)||(Pe=V(Pe)),C(ie,ge,Pe)}t("getOwnMetadata",I);function O(ie,ge){if(!K(ie))throw new TypeError;return j(ge)||(ge=V(ge)),x(ie,ge)}t("getMetadataKeys",O);function D(ie,ge){if(!K(ie))throw new TypeError;return j(ge)||(ge=V(ge)),k(ie,ge)}t("getOwnMetadataKeys",D);function N(ie,ge,Pe){if(!K(ge))throw new TypeError;j(Pe)||(Pe=V(Pe));var Fe=F(ge,Pe,!1);if(j(Fe)||!Fe.delete(ie))return!1;if(Fe.size>0)return!0;var Ie=g.get(ge);return Ie.delete(Pe),Ie.size>0||g.delete(ge),!0}t("deleteMetadata",N);function U(ie,ge){for(var Pe=ie.length-1;Pe>=0;--Pe){var Fe=ie[Pe],Ie=Fe(ge);if(!j(Ie)&&!z(Ie)){if(!ee(Ie))throw new TypeError;ge=Ie}}return ge}function B(ie,ge,Pe,Fe){for(var Ie=ie.length-1;Ie>=0;--Ie){var Oe=ie[Ie],$e=Oe(ge,Pe,Fe);if(!j($e)&&!z($e)){if(!K($e))throw new TypeError;Fe=$e}}return Fe}function F(ie,ge,Pe){var Fe=g.get(ie);if(j(Fe)){if(!Pe)return;Fe=new d,g.set(ie,Fe)}var Ie=Fe.get(ge);if(j(Ie)){if(!Pe)return;Ie=new d,Fe.set(ge,Ie)}return Ie}function T(ie,ge,Pe){var Fe=P(ie,ge,Pe);if(Fe)return!0;var Ie=oe(ge);return z(Ie)?!1:T(ie,Ie,Pe)}function P(ie,ge,Pe){var Fe=F(ge,Pe,!1);return j(Fe)?!1:J(Fe.has(ie))}function _(ie,ge,Pe){var Fe=P(ie,ge,Pe);if(Fe)return C(ie,ge,Pe);var Ie=oe(ge);if(!z(Ie))return _(ie,Ie,Pe)}function C(ie,ge,Pe){var Fe=F(ge,Pe,!1);if(!j(Fe))return Fe.get(ie)}function S(ie,ge,Pe,Fe){var Ie=F(Pe,Fe,!0);Ie.set(ie,ge)}function x(ie,ge){var Pe=k(ie,ge),Fe=oe(ie);if(Fe===null)return Pe;var Ie=x(Fe,ge);if(Ie.length<=0)return Pe;if(Pe.length<=0)return Ie;for(var Oe=new h,$e=[],et=0,Ze=Pe;et<Ze.length;et++){var Ne=Ze[et],Qe=Oe.has(Ne);Qe||(Oe.add(Ne),$e.push(Ne))}for(var Xe=0,rt=Ie;Xe<rt.length;Xe++){var Ne=rt[Xe],Qe=Oe.has(Ne);Qe||(Oe.add(Ne),$e.push(Ne))}return $e}function k(ie,ge){var Pe=[],Fe=F(ie,ge,!1);if(j(Fe))return Pe;for(var Ie=Fe.keys(),Oe=pe(Ie),$e=0;;){var et=ne(Oe);if(!et)return Pe.length=$e,Pe;var Ze=ce(et);try{Pe[$e]=Ze}catch(Ne){try{he(Oe)}finally{throw Ne}}$e++}}function L(ie){if(ie===null)return 1;switch(typeof ie){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return ie===null?1:6;default:return 6}}function j(ie){return ie===void 0}function z(ie){return ie===null}function Y(ie){return typeof ie=="symbol"}function K(ie){return typeof ie=="object"?ie!==null:typeof ie=="function"}function Q(ie,ge){switch(L(ie)){case 0:return ie;case 1:return ie;case 2:return ie;case 3:return ie;case 4:return ie;case 5:return ie}var Pe=ge===3?"string":ge===5?"number":"default",Fe=se(ie,o);if(Fe!==void 0){var Ie=Fe.call(ie,Pe);if(K(Ie))throw new TypeError;return Ie}return q(ie,Pe==="default"?"number":Pe)}function q(ie,ge){if(ge==="string"){var Pe=ie.toString;if(te(Pe)){var Fe=Pe.call(ie);if(!K(Fe))return Fe}var Ie=ie.valueOf;if(te(Ie)){var Fe=Ie.call(ie);if(!K(Fe))return Fe}}else{var Ie=ie.valueOf;if(te(Ie)){var Fe=Ie.call(ie);if(!K(Fe))return Fe}var Oe=ie.toString;if(te(Oe)){var Fe=Oe.call(ie);if(!K(Fe))return Fe}}throw new TypeError}function J(ie){return!!ie}function G(ie){return""+ie}function V(ie){var ge=Q(ie,3);return Y(ge)?ge:G(ge)}function X(ie){return Array.isArray?Array.isArray(ie):ie instanceof Object?ie instanceof Array:Object.prototype.toString.call(ie)==="[object Array]"}function te(ie){return typeof ie=="function"}function ee(ie){return typeof ie=="function"}function re(ie){switch(L(ie)){case 3:return!0;case 4:return!0;default:return!1}}function se(ie,ge){var Pe=ie[ge];if(Pe!=null){if(!te(Pe))throw new TypeError;return Pe}}function pe(ie){var ge=se(ie,i);if(!te(ge))throw new TypeError;var Pe=ge.call(ie);if(!K(Pe))throw new TypeError;return Pe}function ce(ie){return ie.value}function ne(ie){var ge=ie.next();return ge.done?!1:ge}function he(ie){var ge=ie.return;ge&&ge.call(ie)}function oe(ie){var ge=Object.getPrototypeOf(ie);if(typeof ie!="function"||ie===u||ge!==u)return ge;var Pe=ie.prototype,Fe=Pe&&Object.getPrototypeOf(Pe);if(Fe==null||Fe===Object.prototype)return ge;var Ie=Fe.constructor;return typeof Ie!="function"||Ie===ie?ge:Ie}function le(){var ie={},ge=[],Pe=function(){function $e(et,Ze,Ne){this._index=0,this._keys=et,this._values=Ze,this._selector=Ne}return $e.prototype["@@iterator"]=function(){return this},$e.prototype[i]=function(){return this},$e.prototype.next=function(){var et=this._index;if(et>=0&&et<this._keys.length){var Ze=this._selector(this._keys[et],this._values[et]);return et+1>=this._keys.length?(this._index=-1,this._keys=ge,this._values=ge):this._index++,{value:Ze,done:!1}}return{value:void 0,done:!0}},$e.prototype.throw=function(et){throw this._index>=0&&(this._index=-1,this._keys=ge,this._values=ge),et},$e.prototype.return=function(et){return this._index>=0&&(this._index=-1,this._keys=ge,this._values=ge),{value:et,done:!0}},$e}();return function(){function $e(){this._keys=[],this._values=[],this._cacheKey=ie,this._cacheIndex=-2}return Object.defineProperty($e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),$e.prototype.has=function(et){return this._find(et,!1)>=0},$e.prototype.get=function(et){var Ze=this._find(et,!1);return Ze>=0?this._values[Ze]:void 0},$e.prototype.set=function(et,Ze){var Ne=this._find(et,!0);return this._values[Ne]=Ze,this},$e.prototype.delete=function(et){var Ze=this._find(et,!1);if(Ze>=0){for(var Ne=this._keys.length,Qe=Ze+1;Qe<Ne;Qe++)this._keys[Qe-1]=this._keys[Qe],this._values[Qe-1]=this._values[Qe];return this._keys.length--,this._values.length--,et===this._cacheKey&&(this._cacheKey=ie,this._cacheIndex=-2),!0}return!1},$e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=ie,this._cacheIndex=-2},$e.prototype.keys=function(){return new Pe(this._keys,this._values,Fe)},$e.prototype.values=function(){return new Pe(this._keys,this._values,Ie)},$e.prototype.entries=function(){return new Pe(this._keys,this._values,Oe)},$e.prototype["@@iterator"]=function(){return this.entries()},$e.prototype[i]=function(){return this.entries()},$e.prototype._find=function(et,Ze){return this._cacheKey!==et&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=et)),this._cacheIndex<0&&Ze&&(this._cacheIndex=this._keys.length,this._keys.push(et),this._values.push(void 0)),this._cacheIndex},$e}();function Fe($e,et){return $e}function Ie($e,et){return et}function Oe($e,et){return[$e,et]}}function de(){return function(){function ie(){this._map=new d}return Object.defineProperty(ie.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),ie.prototype.has=function(ge){return this._map.has(ge)},ie.prototype.add=function(ge){return this._map.set(ge,ge),this},ie.prototype.delete=function(ge){return this._map.delete(ge)},ie.prototype.clear=function(){this._map.clear()},ie.prototype.keys=function(){return this._map.keys()},ie.prototype.values=function(){return this._map.values()},ie.prototype.entries=function(){return this._map.entries()},ie.prototype["@@iterator"]=function(){return this.keys()},ie.prototype[i]=function(){return this.keys()},ie}()}function ve(){var ie=16,ge=l.create(),Pe=Fe();return function(){function Ze(){this._key=Fe()}return Ze.prototype.has=function(Ne){var Qe=Ie(Ne,!1);return Qe!==void 0?l.has(Qe,this._key):!1},Ze.prototype.get=function(Ne){var Qe=Ie(Ne,!1);return Qe!==void 0?l.get(Qe,this._key):void 0},Ze.prototype.set=function(Ne,Qe){var Xe=Ie(Ne,!0);return Xe[this._key]=Qe,this},Ze.prototype.delete=function(Ne){var Qe=Ie(Ne,!1);return Qe!==void 0?delete Qe[this._key]:!1},Ze.prototype.clear=function(){this._key=Fe()},Ze}();function Fe(){var Ze;do Ze="@@WeakMap@@"+et();while(l.has(ge,Ze));return ge[Ze]=!0,Ze}function Ie(Ze,Ne){if(!r.call(Ze,Pe)){if(!Ne)return;Object.defineProperty(Ze,Pe,{value:l.create()})}return Ze[Pe]}function Oe(Ze,Ne){for(var Qe=0;Qe<Ne;++Qe)Ze[Qe]=Math.random()*255|0;return Ze}function $e(Ze){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(Ze)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(Ze)):Oe(new Uint8Array(Ze),Ze):Oe(new Array(Ze),Ze)}function et(){var Ze=$e(ie);Ze[6]=Ze[6]&79|64,Ze[8]=Ze[8]&191|128;for(var Ne="",Qe=0;Qe<ie;++Qe){var Xe=Ze[Qe];(Qe===4||Qe===6||Qe===8)&&(Ne+="-"),Xe<16&&(Ne+="0"),Ne+=Xe.toString(16).toLowerCase()}return Ne}}function we(ie){return ie.__=void 0,delete ie.__,ie}})})(Q$||(Q$={}));function On(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function rr(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function tr(e){rr(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||of(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function JM(e,t){rr(2,arguments);var r=tr(e),n=On(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function rI(e,t){rr(2,arguments);var r=tr(e).getTime(),n=On(t);return new Date(r+n)}function Lge(e,t){rr(2,arguments);var r=On(t);return rI(e,r*1e3)}var $ge=6e4;function Bge(e,t){rr(2,arguments);var r=On(t);return rI(e,r*$ge)}var Uge=36e5;function Hge(e,t){rr(2,arguments);var r=On(t);return rI(e,r*Uge)}function zge(e,t){rr(2,arguments);var r=On(t),n=r*7;return JM(e,n)}function q_(e,t){rr(2,arguments);var r=tr(e),n=On(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var o=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Z$(e,t){rr(2,arguments);var r=On(t);return q_(e,r*12)}function jge(e,t){rr(2,arguments);var r=tr(e),n=tr(t);return r.getFullYear()-n.getFullYear()}function Qb(e,t){rr(2,arguments);var r=tr(e),n=tr(t),o=r.getTime()-n.getTime();return o<0?-1:o>0?1:o}function Vge(e,t){rr(2,arguments);var r=tr(e),n=tr(t),o=Qb(r,n),i=Math.abs(jge(r,n));r.setFullYear(1584),n.setFullYear(1584);var a=Qb(r,n)===-o,s=o*(i-Number(a));return s===0?0:s}function Wge(e,t){rr(2,arguments);var r=tr(e),n=tr(t),o=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return o*12+i}function eR(e){rr(1,arguments);var t=tr(e);return t.setHours(23,59,59,999),t}function Qw(e){rr(1,arguments);var t=tr(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Gge(e){rr(1,arguments);var t=tr(e);return eR(t).getTime()===Qw(t).getTime()}function FY(e,t){rr(2,arguments);var r=tr(e),n=tr(t),o=Qb(r,n),i=Math.abs(Wge(r,n)),a;if(i<1)a=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-o*i);var s=Qb(r,n)===-o;Gge(tr(e))&&i===1&&Qb(e,n)===1&&(s=!1),a=o*(i-Number(s))}return a===0?0:a}var J$={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},qge="trunc";function w2(e){return e?J$[e]:J$[qge]}function Kge(e,t,r){rr(2,arguments);var n=FY(e,t)/3;return w2(r==null?void 0:r.roundingMethod)(n)}function zk(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function af(e){rr(1,arguments);var t=tr(e);return t.setHours(0,0,0,0),t}var Yge=864e5;function Xge(e,t){rr(2,arguments);var r=af(e),n=af(t),o=r.getTime()-zk(r),i=n.getTime()-zk(n);return Math.round((o-i)/Yge)}function eB(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function jk(e,t){rr(2,arguments);var r=tr(e),n=tr(t),o=eB(r,n),i=Math.abs(Xge(r,n));r.setDate(r.getDate()-o*i);var a=+(eB(r,n)===-o),s=o*(i-a);return s===0?0:s}function Qge(e,t,r){rr(2,arguments);var n=jk(e,t)/7;return w2(r==null?void 0:r.roundingMethod)(n)}var nI=6e4,oI=36e5,Zge=1e3;function iI(e,t){return rr(2,arguments),tr(e).getTime()-tr(t).getTime()}function Jge(e,t,r){rr(2,arguments);var n=iI(e,t)/oI;return w2(r==null?void 0:r.roundingMethod)(n)}function eve(e,t,r){rr(2,arguments);var n=iI(e,t)/nI;return w2(r==null?void 0:r.roundingMethod)(n)}function tve(e,t,r){rr(2,arguments);var n=iI(e,t)/1e3;return w2(r==null?void 0:r.roundingMethod)(n)}function rve(e,t){var r;rr(1,arguments);var n=e||{},o=tr(n.start),i=tr(n.end),a=i.getTime();if(!(o.getTime()<=a))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((r=t==null?void 0:t.step)!==null&&r!==void 0?r:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=a;)s.push(tr(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}var nve={};function sd(){return nve}function CA(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=sd(),f=On((r=(n=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=tr(e),h=d.getDay(),p=(h<f?-7:0)+6-(h-f);return d.setDate(d.getDate()+p),d.setHours(23,59,59,999),d}function SA(e){rr(1,arguments);var t=tr(e),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}function ove(e){return rr(1,arguments),e instanceof Date||of(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Bu(e){if(rr(1,arguments),!ove(e)&&typeof e!="number")return!1;var t=tr(e);return!isNaN(Number(t))}function NY(e,t){rr(2,arguments);var r=On(t);return rI(e,-r)}var ive=864e5;function ave(e){rr(1,arguments);var t=tr(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),o=r-n;return Math.floor(o/ive)+1}function Qv(e){rr(1,arguments);var t=1,r=tr(e),n=r.getUTCDay(),o=(n<t?7:0)+n-t;return r.setUTCDate(r.getUTCDate()-o),r.setUTCHours(0,0,0,0),r}function LY(e){rr(1,arguments);var t=tr(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var o=Qv(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var a=Qv(i);return t.getTime()>=o.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function sve(e){rr(1,arguments);var t=LY(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Qv(r);return n}var lve=6048e5;function $Y(e){rr(1,arguments);var t=tr(e),r=Qv(t).getTime()-sve(t).getTime();return Math.round(r/lve)+1}function Fm(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=sd(),f=On((r=(n=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=tr(e),h=d.getUTCDay(),p=(h<f?7:0)+h-f;return d.setUTCDate(d.getUTCDate()-p),d.setUTCHours(0,0,0,0),d}function bO(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=tr(e),f=u.getUTCFullYear(),d=sd(),h=On((r=(n=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:d.firstWeekContainsDate)!==null&&n!==void 0?n:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(f+1,0,h),p.setUTCHours(0,0,0,0);var g=Fm(p,t),m=new Date(0);m.setUTCFullYear(f,0,h),m.setUTCHours(0,0,0,0);var v=Fm(m,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=v.getTime()?f:f-1}function cve(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=sd(),f=On((r=(n=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=bO(e,t),h=new Date(0);h.setUTCFullYear(d,0,f),h.setUTCHours(0,0,0,0);var p=Fm(h,t);return p}var uve=6048e5;function BY(e,t){rr(1,arguments);var r=tr(e),n=Fm(r,t).getTime()-cve(r,t).getTime();return Math.round(n/uve)+1}function yn(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}var dve={y:function(t,r){var n=t.getUTCFullYear(),o=n>0?n:1-n;return yn(r==="yy"?o%100:o,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):yn(n+1,2)},d:function(t,r){return yn(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return yn(t.getUTCHours()%12||12,r.length)},H:function(t,r){return yn(t.getUTCHours(),r.length)},m:function(t,r){return yn(t.getUTCMinutes(),r.length)},s:function(t,r){return yn(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,o=t.getUTCMilliseconds(),i=Math.floor(o*Math.pow(10,n-3));return yn(i,r.length)}};const zf=dve;var X0={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},fve={G:function(t,r,n){var o=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});case"GGGG":default:return n.era(o,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var o=t.getUTCFullYear(),i=o>0?o:1-o;return n.ordinalNumber(i,{unit:"year"})}return zf.y(t,r)},Y:function(t,r,n,o){var i=bO(t,o),a=i>0?i:1-i;if(r==="YY"){var s=a%100;return yn(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):yn(a,r.length)},R:function(t,r){var n=LY(t);return yn(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return yn(n,r.length)},Q:function(t,r,n){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(o);case"QQ":return yn(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,r,n){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(o);case"qq":return yn(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,r,n){var o=t.getUTCMonth();switch(r){case"M":case"MM":return zf.M(t,r);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(t,r,n){var o=t.getUTCMonth();switch(r){case"L":return String(o+1);case"LL":return yn(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(t,r,n,o){var i=BY(t,o);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):yn(i,r.length)},I:function(t,r,n){var o=$Y(t);return r==="Io"?n.ordinalNumber(o,{unit:"week"}):yn(o,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):zf.d(t,r)},D:function(t,r,n){var o=ave(t);return r==="Do"?n.ordinalNumber(o,{unit:"dayOfYear"}):yn(o,r.length)},E:function(t,r,n){var o=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});case"EEEE":default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(t,r,n,o){var i=t.getUTCDay(),a=(i-o.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return yn(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,o){var i=t.getUTCDay(),a=(i-o.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return yn(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var o=t.getUTCDay(),i=o===0?7:o;switch(r){case"i":return String(i);case"ii":return yn(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});case"iiii":default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(t,r,n){var o=t.getUTCHours(),i=o/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var o=t.getUTCHours(),i;switch(o===12?i=X0.noon:o===0?i=X0.midnight:i=o/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var o=t.getUTCHours(),i;switch(o>=17?i=X0.evening:o>=12?i=X0.afternoon:o>=4?i=X0.morning:i=X0.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var o=t.getUTCHours()%12;return o===0&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return zf.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):zf.H(t,r)},K:function(t,r,n){var o=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(o,{unit:"hour"}):yn(o,r.length)},k:function(t,r,n){var o=t.getUTCHours();return o===0&&(o=24),r==="ko"?n.ordinalNumber(o,{unit:"hour"}):yn(o,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):zf.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):zf.s(t,r)},S:function(t,r){return zf.S(t,r)},X:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return rB(a);case"XXXX":case"XX":return Op(a);case"XXXXX":case"XXX":default:return Op(a,":")}},x:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();switch(r){case"x":return rB(a);case"xxxx":case"xx":return Op(a);case"xxxxx":case"xxx":default:return Op(a,":")}},O:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+tB(a,":");case"OOOO":default:return"GMT"+Op(a,":")}},z:function(t,r,n,o){var i=o._originalDate||t,a=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+tB(a,":");case"zzzz":default:return"GMT"+Op(a,":")}},t:function(t,r,n,o){var i=o._originalDate||t,a=Math.floor(i.getTime()/1e3);return yn(a,r.length)},T:function(t,r,n,o){var i=o._originalDate||t,a=i.getTime();return yn(a,r.length)}};function tB(e,t){var r=e>0?"-":"+",n=Math.abs(e),o=Math.floor(n/60),i=n%60;if(i===0)return r+String(o);var a=t||"";return r+String(o)+a+yn(i,2)}function rB(e,t){if(e%60===0){var r=e>0?"-":"+";return r+yn(Math.abs(e)/60,2)}return Op(e,t)}function Op(e,t){var r=t||"",n=e>0?"-":"+",o=Math.abs(e),i=yn(Math.floor(o/60),2),a=yn(o%60,2);return n+i+r+a}const hve=fve;var nB=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},UY=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},pve=function(t,r){var n=t.match(/(P+)(p+)?/)||[],o=n[1],i=n[2];if(!i)return nB(t,r);var a;switch(o){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",nB(o,r)).replace("{{time}}",UY(i,r))},mve={p:UY,P:pve};const tR=mve;var gve=["D","DD"],vve=["YY","YYYY"];function HY(e){return gve.indexOf(e)!==-1}function zY(e){return vve.indexOf(e)!==-1}function Vk(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var yve={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bve=function(t,r,n){var o,i=yve[t];return typeof i=="string"?o=i:r===1?o=i.one:o=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};const wve=bve;function _A(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var xve={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Cve={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Sve={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_ve={date:_A({formats:xve,defaultWidth:"full"}),time:_A({formats:Cve,defaultWidth:"full"}),dateTime:_A({formats:Sve,defaultWidth:"full"})};const kve=_ve;var Eve={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tve=function(t,r,n,o){return Eve[t]};const Ive=Tve;function $y(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{var s=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;o=e.values[c]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return o[l]}}var Ave={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Pve={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Mve={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Rve={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ove={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Dve={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Fve=function(t,r){var n=Number(t),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Nve={ordinalNumber:Fve,era:$y({values:Ave,defaultWidth:"wide"}),quarter:$y({values:Pve,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:$y({values:Mve,defaultWidth:"wide"}),day:$y({values:Rve,defaultWidth:"wide"}),dayPeriod:$y({values:Ove,defaultWidth:"wide",formattingValues:Dve,defaultFormattingWidth:"wide"})};const Lve=Nve;function By(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?Bve(s,function(f){return f.test(a)}):$ve(s,function(f){return f.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=r.valueCallback?r.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function $ve(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function Bve(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r}function Uve(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var o=n[0],i=t.match(e.parsePattern);if(!i)return null;var a=e.valueCallback?e.valueCallback(i[0]):i[0];a=r.valueCallback?r.valueCallback(a):a;var s=t.slice(o.length);return{value:a,rest:s}}}var Hve=/^(\d+)(th|st|nd|rd)?/i,zve=/\d+/i,jve={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Vve={any:[/^b/i,/^(a|c)/i]},Wve={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gve={any:[/1/i,/2/i,/3/i,/4/i]},qve={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kve={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Xve={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qve={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Zve={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Jve={ordinalNumber:Uve({matchPattern:Hve,parsePattern:zve,valueCallback:function(t){return parseInt(t,10)}}),era:By({matchPatterns:jve,defaultMatchWidth:"wide",parsePatterns:Vve,defaultParseWidth:"any"}),quarter:By({matchPatterns:Wve,defaultMatchWidth:"wide",parsePatterns:Gve,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:By({matchPatterns:qve,defaultMatchWidth:"wide",parsePatterns:Kve,defaultParseWidth:"any"}),day:By({matchPatterns:Yve,defaultMatchWidth:"wide",parsePatterns:Xve,defaultParseWidth:"any"}),dayPeriod:By({matchPatterns:Qve,defaultMatchWidth:"any",parsePatterns:Zve,defaultParseWidth:"any"})};const e1e=Jve;var t1e={code:"en-US",formatDistance:wve,formatLong:kve,formatRelative:Ive,localize:Lve,match:e1e,options:{weekStartsOn:0,firstWeekContainsDate:1}};const wO=t1e;var r1e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,n1e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,o1e=/^'([^]*?)'?$/,i1e=/''/g,a1e=/[a-zA-Z]/;function Vo(e,t,r){var n,o,i,a,s,c,l,u,f,d,h,p,g,m,v,y,b,w;rr(2,arguments);var E=String(t),I=sd(),O=(n=(o=r==null?void 0:r.locale)!==null&&o!==void 0?o:I.locale)!==null&&n!==void 0?n:wO,D=On((i=(a=(s=(c=r==null?void 0:r.firstWeekContainsDate)!==null&&c!==void 0?c:r==null||(l=r.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&s!==void 0?s:I.firstWeekContainsDate)!==null&&a!==void 0?a:(f=I.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=On((h=(p=(g=(m=r==null?void 0:r.weekStartsOn)!==null&&m!==void 0?m:r==null||(v=r.locale)===null||v===void 0||(y=v.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&g!==void 0?g:I.weekStartsOn)!==null&&p!==void 0?p:(b=I.locale)===null||b===void 0||(w=b.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&h!==void 0?h:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var U=tr(e);if(!Bu(U))throw new RangeError("Invalid time value");var B=zk(U),F=NY(U,B),T={firstWeekContainsDate:D,weekStartsOn:N,locale:O,_originalDate:U},P=E.match(n1e).map(function(_){var C=_[0];if(C==="p"||C==="P"){var S=tR[C];return S(_,O.formatLong)}return _}).join("").match(r1e).map(function(_){if(_==="''")return"'";var C=_[0];if(C==="'")return s1e(_);var S=hve[C];if(S)return!(r!=null&&r.useAdditionalWeekYearTokens)&&zY(_)&&Vk(_,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&HY(_)&&Vk(_,t,String(e)),S(F,_,O.localize,T);if(C.match(a1e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return _}).join("");return P}function s1e(e){var t=e.match(o1e);return t?t[1].replace(i1e,"'"):e}function l1e(e){rr(1,arguments);var t=tr(e),r=t.getDate();return r}function jY(e){rr(1,arguments);var t=tr(e),r=t.getFullYear(),n=t.getMonth(),o=new Date(0);return o.setFullYear(r,n+1,0),o.setHours(0,0,0,0),o.getDate()}function c1e(e){rr(1,arguments);var t=tr(e),r=t.getHours();return r}function u1e(e){rr(1,arguments);var t=tr(e),r=t.getMinutes();return r}function d1e(e){rr(1,arguments);var t=tr(e),r=t.getMonth();return r}function f1e(e){rr(1,arguments);var t=tr(e),r=t.getSeconds();return r}function h1e(e){rr(1,arguments);var t=tr(e),r=t.getMilliseconds();return r}function vm(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=sd(),f=On((r=(n=(o=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&o!==void 0?o:u.weekStartsOn)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=tr(e),h=d.getDay(),p=(h<f?7:0)+h-f;return d.setDate(d.getDate()-p),d.setHours(0,0,0,0),d}function p1e(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=tr(e),f=u.getFullYear(),d=sd(),h=On((r=(n=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:d.firstWeekContainsDate)!==null&&n!==void 0?n:(c=d.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setFullYear(f+1,0,h),p.setHours(0,0,0,0);var g=vm(p,t),m=new Date(0);m.setFullYear(f,0,h),m.setHours(0,0,0,0);var v=vm(m,t);return u.getTime()>=g.getTime()?f+1:u.getTime()>=v.getTime()?f:f-1}function m1e(e,t){var r,n,o,i,a,s,c,l;rr(1,arguments);var u=sd(),f=On((r=(n=(o=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&o!==void 0?o:u.firstWeekContainsDate)!==null&&n!==void 0?n:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=p1e(e,t),h=new Date(0);h.setFullYear(d,0,f),h.setHours(0,0,0,0);var p=vm(h,t);return p}var g1e=6048e5;function v1e(e,t){rr(1,arguments);var r=tr(e),n=vm(r,t).getTime()-m1e(r,t).getTime();return Math.round(n/g1e)+1}function y1e(e){return rr(1,arguments),tr(e).getFullYear()}function ym(e,t){rr(2,arguments);var r=tr(e),n=tr(t);return r.getTime()>n.getTime()}function wg(e,t){rr(2,arguments);var r=tr(e),n=tr(t);return r.getTime()<n.getTime()}function xO(e,t){rr(2,arguments);var r=tr(e),n=tr(t);return r.getTime()===n.getTime()}function b1e(e,t){rr(2,arguments);var r=af(e),n=af(t);return r.getTime()===n.getTime()}function w1e(e,t){rr(2,arguments);var r=tr(e),n=tr(t);return r.getFullYear()===n.getFullYear()}function x1e(e,t){rr(2,arguments);var r=tr(e),n=tr(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function oB(e){rr(1,arguments);var t=tr(e);return t.setMinutes(0,0,0),t}function C1e(e,t){rr(2,arguments);var r=oB(e),n=oB(t);return r.getTime()===n.getTime()}function iB(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function S1e(e,t){if(e){if(typeof e=="string")return iB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return iB(e,t)}}function aB(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=S1e(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,s;return{s:function(){r=r.call(e)},n:function(){var l=r.next();return i=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function _1e(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function hr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wk(e,t){return Wk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Wk(e,t)}function Fn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wk(e,t)}function Gk(e){return Gk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gk(e)}function VY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VY=function(){return!!e})()}function k1e(e,t){if(t&&(of(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hr(e)}function Nn(e){var t=VY();return function(){var n=Gk(e),o;if(t){var i=Gk(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return k1e(this,o)}}function _n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E1e(e,t){if(of(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(of(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nm(e){var t=E1e(e,"string");return of(t)=="symbol"?t:t+""}function sB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Nm(n.key),n)}}function kn(e,t,r){return t&&sB(e.prototype,t),r&&sB(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cr(e,t,r){return t=Nm(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var T1e=10,WY=function(){function e(){_n(this,e),cr(this,"priority",void 0),cr(this,"subPriority",0)}return kn(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),I1e=function(e){Fn(r,e);var t=Nn(r);function r(n,o,i,a,s){var c;return _n(this,r),c=t.call(this),c.value=n,c.validateValue=o,c.setValue=i,c.priority=a,s&&(c.subPriority=s),c}return kn(r,[{key:"validate",value:function(o,i){return this.validateValue(o,this.value,i)}},{key:"set",value:function(o,i,a){return this.setValue(o,i,this.value,a)}}]),r}(WY),A1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",T1e),cr(hr(n),"subPriority",-1),n}return kn(r,[{key:"set",value:function(o,i){if(i.timestampIsSet)return o;var a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}}]),r}(WY),Kn=function(){function e(){_n(this,e),cr(this,"incompatibleTokens",void 0),cr(this,"priority",void 0),cr(this,"subPriority",void 0)}return kn(e,[{key:"run",value:function(r,n,o,i){var a=this.parse(r,n,o,i);return a?{setter:new I1e(a.value,this.validate,this.set,this.priority,this.subPriority),rest:a.rest}:null}},{key:"validate",value:function(r,n,o){return!0}}]),e}(),P1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",140),cr(hr(n),"incompatibleTokens",["R","u","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"})||a.era(o,{width:"narrow"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})||a.era(o,{width:"abbreviated"})||a.era(o,{width:"narrow"})}}},{key:"set",value:function(o,i,a){return i.era=a,o.setUTCFullYear(a,0,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),hi={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fu={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function pi(e,t){return e&&{value:t(e.value),rest:e.rest}}function zo(e,t){var r=t.match(e);return r?{value:parseInt(r[0],10),rest:t.slice(r[0].length)}:null}function Nu(e,t){var r=t.match(e);if(!r)return null;if(r[0]==="Z")return{value:0,rest:t.slice(1)};var n=r[1]==="+"?1:-1,o=r[2]?parseInt(r[2],10):0,i=r[3]?parseInt(r[3],10):0,a=r[5]?parseInt(r[5],10):0;return{value:n*(o*oI+i*nI+a*Zge),rest:t.slice(r[0].length)}}function GY(e){return zo(hi.anyDigitsSigned,e)}function ni(e,t){switch(e){case 1:return zo(hi.singleDigit,t);case 2:return zo(hi.twoDigits,t);case 3:return zo(hi.threeDigits,t);case 4:return zo(hi.fourDigits,t);default:return zo(new RegExp("^\\d{1,"+e+"}"),t)}}function qk(e,t){switch(e){case 1:return zo(hi.singleDigitSigned,t);case 2:return zo(hi.twoDigitsSigned,t);case 3:return zo(hi.threeDigitsSigned,t);case 4:return zo(hi.fourDigitsSigned,t);default:return zo(new RegExp("^-?\\d{1,"+e+"}"),t)}}function CO(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function qY(e,t){var r=t>0,n=r?t:1-t,o;if(n<=50)o=e||100;else{var i=n+50,a=Math.floor(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return r?o:1-o}function KY(e){return e%400===0||e%4===0&&e%100!==0}var M1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",130),cr(hr(n),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){var s=function(l){return{year:l,isTwoDigitYear:i==="yy"}};switch(i){case"y":return pi(ni(4,o),s);case"yo":return pi(a.ordinalNumber(o,{unit:"year"}),s);default:return pi(ni(i.length,o),s)}}},{key:"validate",value:function(o,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(o,i,a){var s=o.getUTCFullYear();if(a.isTwoDigitYear){var c=qY(a.year,s);return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}var l=!("era"in i)||i.era===1?a.year:1-a.year;return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),R1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",130),cr(hr(n),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){var s=function(l){return{year:l,isTwoDigitYear:i==="YY"}};switch(i){case"Y":return pi(ni(4,o),s);case"Yo":return pi(a.ordinalNumber(o,{unit:"year"}),s);default:return pi(ni(i.length,o),s)}}},{key:"validate",value:function(o,i){return i.isTwoDigitYear||i.year>0}},{key:"set",value:function(o,i,a,s){var c=bO(o,s);if(a.isTwoDigitYear){var l=qY(a.year,c);return o.setUTCFullYear(l,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Fm(o,s)}var u=!("era"in i)||i.era===1?a.year:1-a.year;return o.setUTCFullYear(u,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Fm(o,s)}}]),r}(Kn),O1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",130),cr(hr(n),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i){return qk(i==="R"?4:i.length,o)}},{key:"set",value:function(o,i,a){var s=new Date(0);return s.setUTCFullYear(a,0,4),s.setUTCHours(0,0,0,0),Qv(s)}}]),r}(Kn),D1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",130),cr(hr(n),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i){return qk(i==="u"?4:i.length,o)}},{key:"set",value:function(o,i,a){return o.setUTCFullYear(a,0,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),F1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",120),cr(hr(n),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"Q":case"QQ":return ni(i.length,o);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"})||a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})||a.quarter(o,{width:"abbreviated",context:"formatting"})||a.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,i){return i>=1&&i<=4}},{key:"set",value:function(o,i,a){return o.setUTCMonth((a-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),N1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",120),cr(hr(n),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"q":case"qq":return ni(i.length,o);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"})||a.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})||a.quarter(o,{width:"abbreviated",context:"standalone"})||a.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,i){return i>=1&&i<=4}},{key:"set",value:function(o,i,a){return o.setUTCMonth((a-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),L1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),cr(hr(n),"priority",110),n}return kn(r,[{key:"parse",value:function(o,i,a){var s=function(l){return l-1};switch(i){case"M":return pi(zo(hi.month,o),s);case"MM":return pi(ni(2,o),s);case"Mo":return pi(a.ordinalNumber(o,{unit:"month"}),s);case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"})||a.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})||a.month(o,{width:"abbreviated",context:"formatting"})||a.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,i){return i>=0&&i<=11}},{key:"set",value:function(o,i,a){return o.setUTCMonth(a,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),$1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",110),cr(hr(n),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){var s=function(l){return l-1};switch(i){case"L":return pi(zo(hi.month,o),s);case"LL":return pi(ni(2,o),s);case"Lo":return pi(a.ordinalNumber(o,{unit:"month"}),s);case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"})||a.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})||a.month(o,{width:"abbreviated",context:"standalone"})||a.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,i){return i>=0&&i<=11}},{key:"set",value:function(o,i,a){return o.setUTCMonth(a,1),o.setUTCHours(0,0,0,0),o}}]),r}(Kn);function B1e(e,t,r){rr(2,arguments);var n=tr(e),o=On(t),i=BY(n,r)-o;return n.setUTCDate(n.getUTCDate()-i*7),n}var U1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",100),cr(hr(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"w":return zo(hi.week,o);case"wo":return a.ordinalNumber(o,{unit:"week"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=1&&i<=53}},{key:"set",value:function(o,i,a,s){return Fm(B1e(o,a,s),s)}}]),r}(Kn);function H1e(e,t){rr(2,arguments);var r=tr(e),n=On(t),o=$Y(r)-n;return r.setUTCDate(r.getUTCDate()-o*7),r}var z1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",100),cr(hr(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"I":return zo(hi.week,o);case"Io":return a.ordinalNumber(o,{unit:"week"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=1&&i<=53}},{key:"set",value:function(o,i,a){return Qv(H1e(o,a))}}]),r}(Kn),j1e=[31,28,31,30,31,30,31,31,30,31,30,31],V1e=[31,29,31,30,31,30,31,31,30,31,30,31],W1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",90),cr(hr(n),"subPriority",1),cr(hr(n),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"d":return zo(hi.date,o);case"do":return a.ordinalNumber(o,{unit:"date"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){var a=o.getUTCFullYear(),s=KY(a),c=o.getUTCMonth();return s?i>=1&&i<=V1e[c]:i>=1&&i<=j1e[c]}},{key:"set",value:function(o,i,a){return o.setUTCDate(a),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),G1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",90),cr(hr(n),"subpriority",1),cr(hr(n),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"D":case"DD":return zo(hi.dayOfYear,o);case"Do":return a.ordinalNumber(o,{unit:"date"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){var a=o.getUTCFullYear(),s=KY(a);return s?i>=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(o,i,a){return o.setUTCMonth(0,a),o.setUTCHours(0,0,0,0),o}}]),r}(Kn);function SO(e,t,r){var n,o,i,a,s,c,l,u;rr(2,arguments);var f=sd(),d=On((n=(o=(i=(a=r==null?void 0:r.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&o!==void 0?o:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=tr(e),p=On(t),g=h.getUTCDay(),m=p%7,v=(m+7)%7,y=(v<d?7:0)+p-g;return h.setUTCDate(h.getUTCDate()+y),h}var q1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",90),cr(hr(n),"incompatibleTokens",["D","i","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})||a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,i){return i>=0&&i<=6}},{key:"set",value:function(o,i,a,s){return o=SO(o,a,s),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),K1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",90),cr(hr(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a,s){var c=function(u){var f=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+f};switch(i){case"e":case"ee":return pi(ni(i.length,o),c);case"eo":return pi(a.ordinalNumber(o,{unit:"day"}),c);case"eee":return a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"eeeee":return a.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return a.day(o,{width:"wide",context:"formatting"})||a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,i){return i>=0&&i<=6}},{key:"set",value:function(o,i,a,s){return o=SO(o,a,s),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),Y1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",90),cr(hr(n),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a,s){var c=function(u){var f=Math.floor((u-1)/7)*7;return(u+s.weekStartsOn+6)%7+f};switch(i){case"c":case"cc":return pi(ni(i.length,o),c);case"co":return pi(a.ordinalNumber(o,{unit:"day"}),c);case"ccc":return a.day(o,{width:"abbreviated",context:"standalone"})||a.day(o,{width:"short",context:"standalone"})||a.day(o,{width:"narrow",context:"standalone"});case"ccccc":return a.day(o,{width:"narrow",context:"standalone"});case"cccccc":return a.day(o,{width:"short",context:"standalone"})||a.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return a.day(o,{width:"wide",context:"standalone"})||a.day(o,{width:"abbreviated",context:"standalone"})||a.day(o,{width:"short",context:"standalone"})||a.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,i){return i>=0&&i<=6}},{key:"set",value:function(o,i,a,s){return o=SO(o,a,s),o.setUTCHours(0,0,0,0),o}}]),r}(Kn);function X1e(e,t){rr(2,arguments);var r=On(t);r%7===0&&(r=r-7);var n=1,o=tr(e),i=o.getUTCDay(),a=r%7,s=(a+7)%7,c=(s<n?7:0)+r-i;return o.setUTCDate(o.getUTCDate()+c),o}var Q1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",90),cr(hr(n),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){var s=function(l){return l===0?7:l};switch(i){case"i":case"ii":return ni(i.length,o);case"io":return a.ordinalNumber(o,{unit:"day"});case"iii":return pi(a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return pi(a.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return pi(a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return pi(a.day(o,{width:"wide",context:"formatting"})||a.day(o,{width:"abbreviated",context:"formatting"})||a.day(o,{width:"short",context:"formatting"})||a.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,i){return i>=1&&i<=7}},{key:"set",value:function(o,i,a){return o=X1e(o,a),o.setUTCHours(0,0,0,0),o}}]),r}(Kn),Z1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",80),cr(hr(n),"incompatibleTokens",["b","B","H","k","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"a":case"aa":case"aaa":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})||a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,i,a){return o.setUTCHours(CO(a),0,0,0),o}}]),r}(Kn),J1e=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",80),cr(hr(n),"incompatibleTokens",["a","B","H","k","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"b":case"bb":case"bbb":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})||a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,i,a){return o.setUTCHours(CO(a),0,0,0),o}}]),r}(Kn),eye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",80),cr(hr(n),"incompatibleTokens",["a","b","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"B":case"BB":case"BBB":return a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return a.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(o,{width:"wide",context:"formatting"})||a.dayPeriod(o,{width:"abbreviated",context:"formatting"})||a.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,i,a){return o.setUTCHours(CO(a),0,0,0),o}}]),r}(Kn),tye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",70),cr(hr(n),"incompatibleTokens",["H","K","k","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"h":return zo(hi.hour12h,o);case"ho":return a.ordinalNumber(o,{unit:"hour"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=1&&i<=12}},{key:"set",value:function(o,i,a){var s=o.getUTCHours()>=12;return s&&a<12?o.setUTCHours(a+12,0,0,0):!s&&a===12?o.setUTCHours(0,0,0,0):o.setUTCHours(a,0,0,0),o}}]),r}(Kn),rye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",70),cr(hr(n),"incompatibleTokens",["a","b","h","K","k","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"H":return zo(hi.hour23h,o);case"Ho":return a.ordinalNumber(o,{unit:"hour"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=0&&i<=23}},{key:"set",value:function(o,i,a){return o.setUTCHours(a,0,0,0),o}}]),r}(Kn),nye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",70),cr(hr(n),"incompatibleTokens",["h","H","k","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"K":return zo(hi.hour11h,o);case"Ko":return a.ordinalNumber(o,{unit:"hour"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=0&&i<=11}},{key:"set",value:function(o,i,a){var s=o.getUTCHours()>=12;return s&&a<12?o.setUTCHours(a+12,0,0,0):o.setUTCHours(a,0,0,0),o}}]),r}(Kn),oye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",70),cr(hr(n),"incompatibleTokens",["a","b","h","H","K","t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"k":return zo(hi.hour24h,o);case"ko":return a.ordinalNumber(o,{unit:"hour"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=1&&i<=24}},{key:"set",value:function(o,i,a){var s=a<=24?a%24:a;return o.setUTCHours(s,0,0,0),o}}]),r}(Kn),iye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",60),cr(hr(n),"incompatibleTokens",["t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"m":return zo(hi.minute,o);case"mo":return a.ordinalNumber(o,{unit:"minute"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=0&&i<=59}},{key:"set",value:function(o,i,a){return o.setUTCMinutes(a,0,0),o}}]),r}(Kn),aye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",50),cr(hr(n),"incompatibleTokens",["t","T"]),n}return kn(r,[{key:"parse",value:function(o,i,a){switch(i){case"s":return zo(hi.second,o);case"so":return a.ordinalNumber(o,{unit:"second"});default:return ni(i.length,o)}}},{key:"validate",value:function(o,i){return i>=0&&i<=59}},{key:"set",value:function(o,i,a){return o.setUTCSeconds(a,0),o}}]),r}(Kn),sye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",30),cr(hr(n),"incompatibleTokens",["t","T"]),n}return kn(r,[{key:"parse",value:function(o,i){var a=function(c){return Math.floor(c*Math.pow(10,-i.length+3))};return pi(ni(i.length,o),a)}},{key:"set",value:function(o,i,a){return o.setUTCMilliseconds(a),o}}]),r}(Kn),lye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",10),cr(hr(n),"incompatibleTokens",["t","T","x"]),n}return kn(r,[{key:"parse",value:function(o,i){switch(i){case"X":return Nu(Fu.basicOptionalMinutes,o);case"XX":return Nu(Fu.basic,o);case"XXXX":return Nu(Fu.basicOptionalSeconds,o);case"XXXXX":return Nu(Fu.extendedOptionalSeconds,o);case"XXX":default:return Nu(Fu.extended,o)}}},{key:"set",value:function(o,i,a){return i.timestampIsSet?o:new Date(o.getTime()-a)}}]),r}(Kn),cye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",10),cr(hr(n),"incompatibleTokens",["t","T","X"]),n}return kn(r,[{key:"parse",value:function(o,i){switch(i){case"x":return Nu(Fu.basicOptionalMinutes,o);case"xx":return Nu(Fu.basic,o);case"xxxx":return Nu(Fu.basicOptionalSeconds,o);case"xxxxx":return Nu(Fu.extendedOptionalSeconds,o);case"xxx":default:return Nu(Fu.extended,o)}}},{key:"set",value:function(o,i,a){return i.timestampIsSet?o:new Date(o.getTime()-a)}}]),r}(Kn),uye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",40),cr(hr(n),"incompatibleTokens","*"),n}return kn(r,[{key:"parse",value:function(o){return GY(o)}},{key:"set",value:function(o,i,a){return[new Date(a*1e3),{timestampIsSet:!0}]}}]),r}(Kn),dye=function(e){Fn(r,e);var t=Nn(r);function r(){var n;_n(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),cr(hr(n),"priority",20),cr(hr(n),"incompatibleTokens","*"),n}return kn(r,[{key:"parse",value:function(o){return GY(o)}},{key:"set",value:function(o,i,a){return[new Date(a),{timestampIsSet:!0}]}}]),r}(Kn),fye={G:new P1e,y:new M1e,Y:new R1e,R:new O1e,u:new D1e,Q:new F1e,q:new N1e,M:new L1e,L:new $1e,w:new U1e,I:new z1e,d:new W1e,D:new G1e,E:new q1e,e:new K1e,c:new Y1e,i:new Q1e,a:new Z1e,b:new J1e,B:new eye,h:new tye,H:new rye,K:new nye,k:new oye,m:new iye,s:new aye,S:new sye,X:new lye,x:new cye,t:new uye,T:new dye},hye=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pye=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mye=/^'([^]*?)'?$/,gye=/''/g,vye=/\S/,yye=/[a-zA-Z]/;function bye(e,t,r,n){var o,i,a,s,c,l,u,f,d,h,p,g,m,v,y,b,w,E;rr(3,arguments);var I=String(e),O=String(t),D=sd(),N=(o=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:D.locale)!==null&&o!==void 0?o:wO;if(!N.match)throw new RangeError("locale must contain match property");var U=On((a=(s=(c=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&c!==void 0?c:D.firstWeekContainsDate)!==null&&s!==void 0?s:(d=D.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&a!==void 0?a:1);if(!(U>=1&&U<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=On((p=(g=(m=(v=n==null?void 0:n.weekStartsOn)!==null&&v!==void 0?v:n==null||(y=n.locale)===null||y===void 0||(b=y.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:D.weekStartsOn)!==null&&g!==void 0?g:(w=D.locale)===null||w===void 0||(E=w.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&p!==void 0?p:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return I===""?tr(r):new Date(NaN);var F={firstWeekContainsDate:U,weekStartsOn:B,locale:N},T=[new A1e],P=O.match(pye).map(function(G){var V=G[0];if(V in tR){var X=tR[V];return X(G,N.formatLong)}return G}).join("").match(hye),_=[],C=aB(P),S;try{var x=function(){var V=S.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&zY(V)&&Vk(V,O,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&HY(V)&&Vk(V,O,e);var X=V[0],te=fye[X];if(te){var ee=te.incompatibleTokens;if(Array.isArray(ee)){var re=_.find(function(pe){return ee.includes(pe.token)||pe.token===X});if(re)throw new RangeError("The format string mustn't contain `".concat(re.fullToken,"` and `").concat(V,"` at the same time"))}else if(te.incompatibleTokens==="*"&&_.length>0)throw new RangeError("The format string mustn't contain `".concat(V,"` and any other token at the same time"));_.push({token:X,fullToken:V});var se=te.run(I,V,N.match,F);if(!se)return{v:new Date(NaN)};T.push(se.setter),I=se.rest}else{if(X.match(yye))throw new RangeError("Format string contains an unescaped latin alphabet character `"+X+"`");if(V==="''"?V="'":X==="'"&&(V=wye(V)),I.indexOf(V)===0)I=I.slice(V.length);else return{v:new Date(NaN)}}};for(C.s();!(S=C.n()).done;){var k=x();if(of(k)==="object")return k.v}}catch(G){C.e(G)}finally{C.f()}if(I.length>0&&vye.test(I))return new Date(NaN);var L=T.map(function(G){return G.priority}).sort(function(G,V){return V-G}).filter(function(G,V,X){return X.indexOf(G)===V}).map(function(G){return T.filter(function(V){return V.priority===G}).sort(function(V,X){return X.subPriority-V.subPriority})}).map(function(G){return G[0]}),j=tr(r);if(isNaN(j.getTime()))return new Date(NaN);var z=NY(j,zk(j)),Y={},K=aB(L),Q;try{for(K.s();!(Q=K.n()).done;){var q=Q.value;if(!q.validate(z,F))return new Date(NaN);var J=q.set(z,Y,F);Array.isArray(J)?(z=J[0],_1e(Y,J[1])):z=J}}catch(G){K.e(G)}finally{K.f()}return z}function wye(e){return e.match(mye)[1].replace(gye,"'")}function xye(e,t){rr(2,arguments);var r=tr(e),n=On(t);return r.setDate(n),r}function Cye(e,t){rr(2,arguments);var r=tr(e),n=On(t);return r.setHours(n),r}function Sye(e,t){rr(2,arguments);var r=tr(e),n=On(t);return r.setMinutes(n),r}function _ye(e,t){rr(2,arguments);var r=tr(e),n=On(t),o=r.getFullYear(),i=r.getDate(),a=new Date(0);a.setFullYear(o,n,15),a.setHours(0,0,0,0);var s=jY(a);return r.setMonth(n,Math.min(i,s)),r}function kye(e,t){rr(2,arguments);var r=tr(e),n=On(t);return r.setSeconds(n),r}function Eye(e,t){rr(2,arguments);var r=tr(e),n=On(t);return r.setMilliseconds(n),r}function Tye(e,t){rr(2,arguments);var r=tr(e),n=On(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function rR(e){rr(1,arguments);var t=tr(e);return t.setDate(1),t.setHours(0,0,0,0),t}function RS(e){rr(1,arguments);var t=tr(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function Hr(e,t){var r;rr(1,arguments);var n=On((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var o=Mye(e),i;if(o.date){var a=Rye(o.date,n);i=Oye(a.restDateString,a.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),c=0,l;if(o.time&&(c=Dye(o.time),isNaN(c)))return new Date(NaN);if(o.timezone){if(l=Fye(o.timezone),isNaN(l))return new Date(NaN)}else{var u=new Date(s+c),f=new Date(0);return f.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),f.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),f}return new Date(s+c+l)}var OS={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Iye=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Aye=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Pye=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Mye(e){var t={},r=e.split(OS.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],OS.timeZoneDelimiter.test(t.date)&&(t.date=e.split(OS.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var o=OS.timezone.exec(n);o?(t.time=n.replace(o[1],""),t.timezone=o[1]):t.time=n}return t}function Rye(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var o=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?o:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function Oye(e,t){if(t===null)return new Date(NaN);var r=e.match(Iye);if(!r)return new Date(NaN);var n=!!r[4],o=Uy(r[1]),i=Uy(r[2])-1,a=Uy(r[3]),s=Uy(r[4]),c=Uy(r[5])-1;if(n)return Uye(t,s,c)?Nye(t,s,c):new Date(NaN);var l=new Date(0);return!$ye(t,i,a)||!Bye(t,o)?new Date(NaN):(l.setUTCFullYear(t,i,Math.max(o,a)),l)}function Uy(e){return e?parseInt(e):1}function Dye(e){var t=e.match(Aye);if(!t)return NaN;var r=kA(t[1]),n=kA(t[2]),o=kA(t[3]);return Hye(r,n,o)?r*oI+n*nI+o*1e3:NaN}function kA(e){return e&&parseFloat(e.replace(",","."))||0}function Fye(e){if(e==="Z")return 0;var t=e.match(Pye);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return zye(n,o)?r*(n*oI+o*nI):NaN}function Nye(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var o=n.getUTCDay()||7,i=(t-1)*7+r+1-o;return n.setUTCDate(n.getUTCDate()+i),n}var Lye=[31,null,31,30,31,30,31,31,30,31,30,31];function YY(e){return e%400===0||e%4===0&&e%100!==0}function $ye(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(Lye[t]||(YY(e)?29:28))}function Bye(e,t){return t>=1&&t<=(YY(e)?366:365)}function Uye(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function Hye(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function zye(e,t){return t>=0&&t<=59}function jye(e,t){var r,n;rr(1,arguments);var o=tr(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var i=String((r=t==null?void 0:t.format)!==null&&r!==void 0?r:"extended"),a=String((n=t==null?void 0:t.representation)!==null&&n!==void 0?n:"complete");if(i!=="extended"&&i!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(a!=="date"&&a!=="time"&&a!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=i==="extended"?"-":"",u=i==="extended"?":":"";if(a!=="time"){var f=yn(o.getDate(),2),d=yn(o.getMonth()+1,2),h=yn(o.getFullYear(),4);s="".concat(h).concat(l).concat(d).concat(l).concat(f)}if(a!=="date"){var p=o.getTimezoneOffset();if(p!==0){var g=Math.abs(p),m=yn(Math.floor(g/60),2),v=yn(g%60,2),y=p<0?"+":"-";c="".concat(y).concat(m,":").concat(v)}else c="Z";var b=yn(o.getHours(),2),w=yn(o.getMinutes(),2),E=yn(o.getSeconds(),2),I=s===""?"":"T",O=[b,w,E].join(u);s="".concat(s).concat(I).concat(O).concat(c)}return s}function XY(e,t){rr(2,arguments);var r=tr(e).getTime(),n=tr(t.start).getTime(),o=tr(t.end).getTime();if(!(n<=o))throw new RangeError("Invalid interval");return r>=n&&r<=o}var nR={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(c,l){switch(c){case"P":return l.date({width:"short"});case"PP":return l.date({width:"medium"});case"PPP":return l.date({width:"long"});case"PPPP":default:return l.date({width:"full"})}},n=function(c,l){switch(c){case"p":return l.time({width:"short"});case"pp":return l.time({width:"medium"});case"ppp":return l.time({width:"long"});case"pppp":default:return l.time({width:"full"})}},o=function(c,l){var u=c.match(/(P+)(p+)?/)||[],f=u[1],d=u[2];if(!d)return r(c,l);var h;switch(f){case"P":h=l.dateTime({width:"short"});break;case"PP":h=l.dateTime({width:"medium"});break;case"PPP":h=l.dateTime({width:"long"});break;case"PPPP":default:h=l.dateTime({width:"full"});break}return h.replace("{{date}}",r(f,l)).replace("{{time}}",n(d,l))},i={p:n,P:o},a=i;t.default=a,e.exports=t.default})(nR,nR.exports);var Vye=nR.exports;const Wye=M1(Vye),Gye={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},qye={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",fullDateWithWeekday:"PPPP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",monthAndYear:"LLLL yyyy",monthAndDate:"MMMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",fullDateTime:"PP p",fullDateTime12h:"PP hh:mm aa",fullDateTime24h:"PP HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class Kye{constructor({locale:t,formats:r}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib="date-fns",this.locale=void 0,this.formats=void 0,this.formatTokenMap=Gye,this.escapedCharacters={start:"'",end:"'"},this.date=n=>typeof n>"u"?new Date:n===null?null:new Date(n),this.dateWithTimezone=n=>this.date(n),this.getTimezone=()=>"default",this.setTimezone=n=>n,this.toJsDate=n=>n,this.parseISO=n=>Hr(n),this.toISO=n=>jye(n,{format:"extended"}),this.parse=(n,o)=>n===""?null:bye(n,o,new Date,{locale:this.locale}),this.getCurrentLocaleCode=()=>{var n;return((n=this.locale)==null?void 0:n.code)||"en-US"},this.is12HourCycleInCurrentLocale=()=>this.locale?/a/.test(this.locale.formatLong.time()):!0,this.expandFormat=n=>{const o=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;return n.match(o).map(i=>{const a=i[0];if(a==="p"||a==="P"){const s=Wye[a],c=this.locale||wO;return s(i,c.formatLong,{})}return i}).join("")},this.getFormatHelperText=n=>this.expandFormat(n).replace(/(aaa|aa|a)/g,"(a|p)m").toLocaleLowerCase(),this.isNull=n=>n===null,this.isValid=n=>Bu(this.date(n)),this.format=(n,o)=>this.formatByString(n,this.formats[o]),this.formatByString=(n,o)=>Vo(n,o,{locale:this.locale}),this.formatNumber=n=>n,this.getDiff=(n,o,i)=>{switch(i){case"years":return Vge(n,this.date(o));case"quarters":return Kge(n,this.date(o));case"months":return FY(n,this.date(o));case"weeks":return Qge(n,this.date(o));case"days":return jk(n,this.date(o));case"hours":return Jge(n,this.date(o));case"minutes":return eve(n,this.date(o));case"seconds":return tve(n,this.date(o));default:return iI(n,this.date(o))}},this.isEqual=(n,o)=>n===null&&o===null?!0:xO(n,o),this.isSameYear=(n,o)=>w1e(n,o),this.isSameMonth=(n,o)=>x1e(n,o),this.isSameDay=(n,o)=>b1e(n,o),this.isSameHour=(n,o)=>C1e(n,o),this.isAfter=(n,o)=>ym(n,o),this.isAfterYear=(n,o)=>ym(n,SA(o)),this.isAfterDay=(n,o)=>ym(n,eR(o)),this.isBefore=(n,o)=>wg(n,o),this.isBeforeYear=(n,o)=>wg(n,RS(o)),this.isBeforeDay=(n,o)=>wg(n,af(o)),this.isWithinRange=(n,[o,i])=>XY(n,{start:o,end:i}),this.startOfYear=n=>RS(n),this.startOfMonth=n=>rR(n),this.startOfWeek=n=>vm(n,{locale:this.locale}),this.startOfDay=n=>af(n),this.endOfYear=n=>SA(n),this.endOfMonth=n=>Qw(n),this.endOfWeek=n=>CA(n,{locale:this.locale}),this.endOfDay=n=>eR(n),this.addYears=(n,o)=>Z$(n,o),this.addMonths=(n,o)=>q_(n,o),this.addWeeks=(n,o)=>zge(n,o),this.addDays=(n,o)=>JM(n,o),this.addHours=(n,o)=>Hge(n,o),this.addMinutes=(n,o)=>Bge(n,o),this.addSeconds=(n,o)=>Lge(n,o),this.getYear=n=>y1e(n),this.getMonth=n=>d1e(n),this.getDate=n=>l1e(n),this.getHours=n=>c1e(n),this.getMinutes=n=>u1e(n),this.getSeconds=n=>f1e(n),this.getMilliseconds=n=>h1e(n),this.setYear=(n,o)=>Tye(n,o),this.setMonth=(n,o)=>_ye(n,o),this.setDate=(n,o)=>xye(n,o),this.setHours=(n,o)=>Cye(n,o),this.setMinutes=(n,o)=>Sye(n,o),this.setSeconds=(n,o)=>kye(n,o),this.setMilliseconds=(n,o)=>Eye(n,o),this.getDaysInMonth=n=>jY(n),this.getNextMonth=n=>q_(n,1),this.getPreviousMonth=n=>q_(n,-1),this.getMonthArray=n=>{const i=[RS(n)];for(;i.length<12;){const a=i[i.length-1];i.push(this.getNextMonth(a))}return i},this.mergeDateAndTime=(n,o)=>this.setSeconds(this.setMinutes(this.setHours(n,this.getHours(o)),this.getMinutes(o)),this.getSeconds(o)),this.getWeekdays=()=>{const n=new Date;return rve({start:vm(n,{locale:this.locale}),end:CA(n,{locale:this.locale})}).map(o=>this.formatByString(o,"EEEEEE"))},this.getWeekArray=n=>{const o=vm(rR(n),{locale:this.locale}),i=CA(Qw(n),{locale:this.locale});let a=0,s=o;const c=[];for(;wg(s,i);){const l=Math.floor(a/7);c[l]=c[l]||[],c[l].push(s),s=JM(s,1),a+=1}return c},this.getWeekNumber=n=>v1e(n,{locale:this.locale}),this.getYearRange=(n,o)=>{const i=RS(n),a=SA(o),s=[];let c=i;for(;wg(c,a);)s.push(c),c=Z$(c,1);return s},this.getMeridiemText=n=>n==="am"?"AM":"PM",this.locale=t,this.formats=W({},qye,r)}}function ze(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function QY(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=QY(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function it(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=QY(e))&&(n&&(n+=" "),n+=t);return n}const x2="$$material";function ZY(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Yye=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Xye=ZY(function(e){return Yye.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function Qye(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Zye(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var Jye=function(){function e(r){var n=this;this._insertTag=function(o){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,i),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Zye(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Qye(o);try{i.insertRule(n,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),$a="-ms-",Kk="-moz-",jn="-webkit-",JY="comm",_O="rule",kO="decl",ebe="@import",eX="@keyframes",tbe="@layer",rbe=Math.abs,aI=String.fromCharCode,nbe=Object.assign;function obe(e,t){return Ca(e,0)^45?(((t<<2^Ca(e,0))<<2^Ca(e,1))<<2^Ca(e,2))<<2^Ca(e,3):0}function tX(e){return e.trim()}function ibe(e,t){return(e=t.exec(e))?e[0]:e}function Vn(e,t,r){return e.replace(t,r)}function oR(e,t){return e.indexOf(t)}function Ca(e,t){return e.charCodeAt(t)|0}function Zw(e,t,r){return e.slice(t,r)}function Pu(e){return e.length}function EO(e){return e.length}function DS(e,t){return t.push(e),e}function abe(e,t){return e.map(t).join("")}var sI=1,Zv=1,rX=0,qs=0,Ti=0,F1="";function lI(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:sI,column:Zv,length:a,return:""}}function Hy(e,t){return nbe(lI("",null,null,"",null,null,0),e,{length:-e.length},t)}function sbe(){return Ti}function lbe(){return Ti=qs>0?Ca(F1,--qs):0,Zv--,Ti===10&&(Zv=1,sI--),Ti}function bl(){return Ti=qs<rX?Ca(F1,qs++):0,Zv++,Ti===10&&(Zv=1,sI++),Ti}function qu(){return Ca(F1,qs)}function K_(){return qs}function C2(e,t){return Zw(F1,e,t)}function Jw(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nX(e){return sI=Zv=1,rX=Pu(F1=e),qs=0,[]}function oX(e){return F1="",e}function Y_(e){return tX(C2(qs-1,iR(e===91?e+2:e===40?e+1:e)))}function cbe(e){for(;(Ti=qu())&&Ti<33;)bl();return Jw(e)>2||Jw(Ti)>3?"":" "}function ube(e,t){for(;--t&&bl()&&!(Ti<48||Ti>102||Ti>57&&Ti<65||Ti>70&&Ti<97););return C2(e,K_()+(t<6&&qu()==32&&bl()==32))}function iR(e){for(;bl();)switch(Ti){case e:return qs;case 34:case 39:e!==34&&e!==39&&iR(Ti);break;case 40:e===41&&iR(e);break;case 92:bl();break}return qs}function dbe(e,t){for(;bl()&&e+Ti!==47+10;)if(e+Ti===42+42&&qu()===47)break;return"/*"+C2(t,qs-1)+"*"+aI(e===47?e:bl())}function fbe(e){for(;!Jw(qu());)bl();return C2(e,qs)}function hbe(e){return oX(X_("",null,null,null,[""],e=nX(e),0,[0],e))}function X_(e,t,r,n,o,i,a,s,c){for(var l=0,u=0,f=a,d=0,h=0,p=0,g=1,m=1,v=1,y=0,b="",w=o,E=i,I=n,O=b;m;)switch(p=y,y=bl()){case 40:if(p!=108&&Ca(O,f-1)==58){oR(O+=Vn(Y_(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=Y_(y);break;case 9:case 10:case 13:case 32:O+=cbe(p);break;case 92:O+=ube(K_()-1,7);continue;case 47:switch(qu()){case 42:case 47:DS(pbe(dbe(bl(),K_()),t,r),c);break;default:O+="/"}break;case 123*g:s[l++]=Pu(O)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:v==-1&&(O=Vn(O,/\f/g,"")),h>0&&Pu(O)-f&&DS(h>32?cB(O+";",n,r,f-1):cB(Vn(O," ","")+";",n,r,f-2),c);break;case 59:O+=";";default:if(DS(I=lB(O,t,r,l,u,o,s,b,w=[],E=[],f),i),y===123)if(u===0)X_(O,t,I,I,w,i,f,s,E);else switch(d===99&&Ca(O,3)===110?100:d){case 100:case 108:case 109:case 115:X_(e,I,I,n&&DS(lB(e,I,I,0,0,o,s,b,o,w=[],f),E),o,E,f,s,n?w:E);break;default:X_(O,I,I,I,[""],E,0,s,E)}}l=u=h=0,g=v=1,b=O="",f=a;break;case 58:f=1+Pu(O),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&lbe()==125)continue}switch(O+=aI(y),y*g){case 38:v=u>0?1:(O+="\f",-1);break;case 44:s[l++]=(Pu(O)-1)*v,v=1;break;case 64:qu()===45&&(O+=Y_(bl())),d=qu(),u=f=Pu(b=O+=fbe(K_())),y++;break;case 45:p===45&&Pu(O)==2&&(g=0)}}return i}function lB(e,t,r,n,o,i,a,s,c,l,u){for(var f=o-1,d=o===0?i:[""],h=EO(d),p=0,g=0,m=0;p<n;++p)for(var v=0,y=Zw(e,f+1,f=rbe(g=a[p])),b=e;v<h;++v)(b=tX(g>0?d[v]+" "+y:Vn(y,/&\f/g,d[v])))&&(c[m++]=b);return lI(e,t,r,o===0?_O:s,c,l,u)}function pbe(e,t,r){return lI(e,t,r,JY,aI(sbe()),Zw(e,2,-2),0)}function cB(e,t,r,n){return lI(e,t,r,kO,Zw(e,0,n),Zw(e,n+1,-1),n)}function av(e,t){for(var r="",n=EO(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function mbe(e,t,r,n){switch(e.type){case tbe:if(e.children.length)break;case ebe:case kO:return e.return=e.return||e.value;case JY:return"";case eX:return e.return=e.value+"{"+av(e.children,n)+"}";case _O:e.value=e.props.join(",")}return Pu(r=av(e.children,n))?e.return=e.value+"{"+r+"}":""}function gbe(e){var t=EO(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function vbe(e){return function(t){t.root||(t=t.return)&&e(t)}}var uB=function(t){var r=new WeakMap;return function(n){if(r.has(n))return r.get(n);var o=t(n);return r.set(n,o),o}},ybe=function(t,r,n){for(var o=0,i=0;o=i,i=qu(),o===38&&i===12&&(r[n]=1),!Jw(i);)bl();return C2(t,qs)},bbe=function(t,r){var n=-1,o=44;do switch(Jw(o)){case 0:o===38&&qu()===12&&(r[n]=1),t[n]+=ybe(qs-1,r,n);break;case 2:t[n]+=Y_(o);break;case 4:if(o===44){t[++n]=qu()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=aI(o)}while(o=bl());return t},wbe=function(t,r){return oX(bbe(nX(t),r))},dB=new WeakMap,xbe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!dB.get(n))&&!o){dB.set(t,!0);for(var i=[],a=wbe(r,i),s=n.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},Cbe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function iX(e,t){switch(obe(e,t)){case 5103:return jn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return jn+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return jn+e+Kk+e+$a+e+e;case 6828:case 4268:return jn+e+$a+e+e;case 6165:return jn+e+$a+"flex-"+e+e;case 5187:return jn+e+Vn(e,/(\w+).+(:[^]+)/,jn+"box-$1$2"+$a+"flex-$1$2")+e;case 5443:return jn+e+$a+"flex-item-"+Vn(e,/flex-|-self/,"")+e;case 4675:return jn+e+$a+"flex-line-pack"+Vn(e,/align-content|flex-|-self/,"")+e;case 5548:return jn+e+$a+Vn(e,"shrink","negative")+e;case 5292:return jn+e+$a+Vn(e,"basis","preferred-size")+e;case 6060:return jn+"box-"+Vn(e,"-grow","")+jn+e+$a+Vn(e,"grow","positive")+e;case 4554:return jn+Vn(e,/([^-])(transform)/g,"$1"+jn+"$2")+e;case 6187:return Vn(Vn(Vn(e,/(zoom-|grab)/,jn+"$1"),/(image-set)/,jn+"$1"),e,"")+e;case 5495:case 3959:return Vn(e,/(image-set\([^]*)/,jn+"$1$`$1");case 4968:return Vn(Vn(e,/(.+:)(flex-)?(.*)/,jn+"box-pack:$3"+$a+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+jn+e+e;case 4095:case 3583:case 4068:case 2532:return Vn(e,/(.+)-inline(.+)/,jn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Pu(e)-1-t>6)switch(Ca(e,t+1)){case 109:if(Ca(e,t+4)!==45)break;case 102:return Vn(e,/(.+:)(.+)-([^]+)/,"$1"+jn+"$2-$3$1"+Kk+(Ca(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~oR(e,"stretch")?iX(Vn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ca(e,t+1)!==115)break;case 6444:switch(Ca(e,Pu(e)-3-(~oR(e,"!important")&&10))){case 107:return Vn(e,":",":"+jn)+e;case 101:return Vn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+jn+(Ca(e,14)===45?"inline-":"")+"box$3$1"+jn+"$2$3$1"+$a+"$2box$3")+e}break;case 5936:switch(Ca(e,t+11)){case 114:return jn+e+$a+Vn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return jn+e+$a+Vn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return jn+e+$a+Vn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return jn+e+$a+e+e}return e}var Sbe=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case kO:t.return=iX(t.value,t.length);break;case eX:return av([Hy(t,{value:Vn(t.value,"@","@"+jn)})],o);case _O:if(t.length)return abe(t.props,function(i){switch(ibe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return av([Hy(t,{props:[Vn(i,/:(read-\w+)/,":"+Kk+"$1")]})],o);case"::placeholder":return av([Hy(t,{props:[Vn(i,/:(plac\w+)/,":"+jn+"input-$1")]}),Hy(t,{props:[Vn(i,/:(plac\w+)/,":"+Kk+"$1")]}),Hy(t,{props:[Vn(i,/:(plac\w+)/,$a+"input-$1")]})],o)}return""})}},_be=[Sbe],aX=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||_be,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)i[m[v]]=!0;s.push(g)});var c,l=[xbe,Cbe];{var u,f=[mbe,vbe(function(g){u.insert(g)})],d=gbe(l.concat(o,f)),h=function(m){return av(hbe(m),d)};c=function(m,v,y,b){u=y,h(m?m+"{"+v.styles+"}":v.styles),b&&(p.inserted[v.name]=!0)}}var p={key:r,sheet:new Jye({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return p.sheet.hydrate(s),p},sX={exports:{}},ao={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ua=typeof Symbol=="function"&&Symbol.for,TO=ua?Symbol.for("react.element"):60103,IO=ua?Symbol.for("react.portal"):60106,cI=ua?Symbol.for("react.fragment"):60107,uI=ua?Symbol.for("react.strict_mode"):60108,dI=ua?Symbol.for("react.profiler"):60114,fI=ua?Symbol.for("react.provider"):60109,hI=ua?Symbol.for("react.context"):60110,AO=ua?Symbol.for("react.async_mode"):60111,pI=ua?Symbol.for("react.concurrent_mode"):60111,mI=ua?Symbol.for("react.forward_ref"):60112,gI=ua?Symbol.for("react.suspense"):60113,kbe=ua?Symbol.for("react.suspense_list"):60120,vI=ua?Symbol.for("react.memo"):60115,yI=ua?Symbol.for("react.lazy"):60116,Ebe=ua?Symbol.for("react.block"):60121,Tbe=ua?Symbol.for("react.fundamental"):60117,Ibe=ua?Symbol.for("react.responder"):60118,Abe=ua?Symbol.for("react.scope"):60119;function kl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case TO:switch(e=e.type,e){case AO:case pI:case cI:case dI:case uI:case gI:return e;default:switch(e=e&&e.$$typeof,e){case hI:case mI:case yI:case vI:case fI:return e;default:return t}}case IO:return t}}}function lX(e){return kl(e)===pI}ao.AsyncMode=AO;ao.ConcurrentMode=pI;ao.ContextConsumer=hI;ao.ContextProvider=fI;ao.Element=TO;ao.ForwardRef=mI;ao.Fragment=cI;ao.Lazy=yI;ao.Memo=vI;ao.Portal=IO;ao.Profiler=dI;ao.StrictMode=uI;ao.Suspense=gI;ao.isAsyncMode=function(e){return lX(e)||kl(e)===AO};ao.isConcurrentMode=lX;ao.isContextConsumer=function(e){return kl(e)===hI};ao.isContextProvider=function(e){return kl(e)===fI};ao.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===TO};ao.isForwardRef=function(e){return kl(e)===mI};ao.isFragment=function(e){return kl(e)===cI};ao.isLazy=function(e){return kl(e)===yI};ao.isMemo=function(e){return kl(e)===vI};ao.isPortal=function(e){return kl(e)===IO};ao.isProfiler=function(e){return kl(e)===dI};ao.isStrictMode=function(e){return kl(e)===uI};ao.isSuspense=function(e){return kl(e)===gI};ao.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===cI||e===pI||e===dI||e===uI||e===gI||e===kbe||typeof e=="object"&&e!==null&&(e.$$typeof===yI||e.$$typeof===vI||e.$$typeof===fI||e.$$typeof===hI||e.$$typeof===mI||e.$$typeof===Tbe||e.$$typeof===Ibe||e.$$typeof===Abe||e.$$typeof===Ebe)};ao.typeOf=kl;sX.exports=ao;var Pbe=sX.exports,cX=Pbe,Mbe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Rbe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uX={};uX[cX.ForwardRef]=Mbe;uX[cX.Memo]=Rbe;var Obe=!0;function Dbe(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var dX=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Obe===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},fX=function(t,r,n){dX(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function Fbe(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Nbe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Lbe=/[A-Z]|^ms/g,$be=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hX=function(t){return t.charCodeAt(1)===45},fB=function(t){return t!=null&&typeof t!="boolean"},EA=ZY(function(e){return hX(e)?e:e.replace(Lbe,"-$&").toLowerCase()}),hB=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace($be,function(n,o,i){return Mu={name:o,styles:i,next:Mu},o})}return Nbe[t]!==1&&!hX(t)&&typeof r=="number"&&r!==0?r+"px":r};function ex(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Mu={name:r.name,styles:r.styles,next:Mu},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Mu={name:n.name,styles:n.styles,next:Mu},n=n.next;var o=r.styles+";";return o}return Bbe(e,t,r)}case"function":{if(e!==void 0){var i=Mu,a=r(e);return Mu=i,ex(e,t,a)}break}}if(t==null)return r;var s=t[r];return s!==void 0?s:r}function Bbe(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=ex(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object")t!=null&&t[a]!==void 0?n+=i+"{"+t[a]+"}":fB(a)&&(n+=EA(i)+":"+hB(i,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)fB(a[s])&&(n+=EA(i)+":"+hB(i,a[s])+";");else{var c=ex(e,t,a);switch(i){case"animation":case"animationName":{n+=EA(i)+":"+c+";";break}default:n+=i+"{"+c+"}"}}}return n}var pB=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Mu,PO=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,i="";Mu=void 0;var a=t[0];a==null||a.raw===void 0?(o=!1,i+=ex(n,r,a)):i+=a[0];for(var s=1;s<t.length;s++)i+=ex(n,r,t[s]),o&&(i+=a[s]);pB.lastIndex=0;for(var c="",l;(l=pB.exec(i))!==null;)c+="-"+l[1];var u=Fbe(i)+c;return{name:u,styles:i,next:Mu}},Ube=function(t){return t()},pX=jv["useInsertionEffect"]?jv["useInsertionEffect"]:!1,Hbe=pX||Ube,mB=pX||A.useLayoutEffect,mX=A.createContext(typeof HTMLElement<"u"?aX({key:"css"}):null),zbe=mX.Provider,gX=function(t){return A.forwardRef(function(r,n){var o=A.useContext(mX);return t(r,o,n)})},Jv=A.createContext({}),jbe=function(t,r){if(typeof r=="function"){var n=r(t);return n}return W({},t,r)},Vbe=uB(function(e){return uB(function(t){return jbe(e,t)})}),Wbe=function(t){var r=A.useContext(Jv);return t.theme!==r&&(r=Vbe(r)(t.theme)),A.createElement(Jv.Provider,{value:r},t.children)},Gbe=gX(function(e,t){var r=e.styles,n=PO([r],void 0,A.useContext(Jv)),o=A.useRef();return mB(function(){var i=t.key+"-global",a=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,c=document.querySelector('style[data-emotion="'+i+" "+n.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),c!==null&&(s=!0,c.setAttribute("data-emotion",i),a.hydrate([c])),o.current=[a,s],function(){a.flush()}},[t]),mB(function(){var i=o.current,a=i[0],s=i[1];if(s){i[1]=!1;return}if(n.next!==void 0&&fX(t,n.next,!0),a.tags.length){var c=a.tags[a.tags.length-1].nextElementSibling;a.before=c,a.flush()}t.insert("",n,a,!1)},[t,n.name]),null});function e1(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return PO(t)}var sp=function(){var t=e1.apply(void 0,arguments),r="animation-"+t.name;return{name:r,styles:"@keyframes "+r+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},qbe=Xye,Kbe=function(t){return t!=="theme"},gB=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?qbe:Kbe},vB=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Ybe=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return dX(r,n,o),Hbe(function(){return fX(r,n,o)}),null},Xbe=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,a;r!==void 0&&(i=r.label,a=r.target);var s=vB(t,r,n),c=s||gB(o),l=!c("as");return function(){var u=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&f.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{f.push(u[0][0]);for(var d=u.length,h=1;h<d;h++)f.push(u[h],u[0][h])}var p=gX(function(g,m,v){var y=l&&g.as||o,b="",w=[],E=g;if(g.theme==null){E={};for(var I in g)E[I]=g[I];E.theme=A.useContext(Jv)}typeof g.className=="string"?b=Dbe(m.registered,w,g.className):g.className!=null&&(b=g.className+" ");var O=PO(f.concat(w),m.registered,E);b+=m.key+"-"+O.name,a!==void 0&&(b+=" "+a);var D=l&&s===void 0?gB(y):c,N={};for(var U in g)l&&U==="as"||D(U)&&(N[U]=g[U]);return N.className=b,N.ref=v,A.createElement(A.Fragment,null,A.createElement(Ybe,{cache:m,serialized:O,isStringTag:typeof y=="string"}),A.createElement(y,N))});return p.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=f,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return"."+a}}),p.withComponent=function(g,m){return e(g,W({},r,m,{shouldForwardProp:vB(p,m,!0)})).apply(void 0,f)},p}},Qbe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],aR=Xbe.bind();Qbe.forEach(function(e){aR[e]=aR(e)});let sR;typeof document=="object"&&(sR=aX({key:"css",prepend:!0}));function vX(e){const{injectFirst:t,children:r}=e;return t&&sR?R(zbe,{value:sR,children:r}):r}function Zbe(e){return e==null||Object.keys(e).length===0}function yX(e){const{styles:t,defaultTheme:r={}}=e;return R(Gbe,{styles:typeof t=="function"?o=>t(Zbe(o)?r:o):t})}/**
 * @mui/styled-engine v5.15.14
 *
 * @license MIT
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */function MO(e,t){return aR(e,t)}const bX=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},Jbe=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:yX,StyledEngineProvider:vX,ThemeContext:Jv,css:e1,default:MO,internal_processStyles:bX,keyframes:sp},Symbol.toStringTag,{value:"Module"})),ewe=["values","unit","step"],twe=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>W({},r,{[n.key]:n.val}),{})};function wX(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,o=ze(e,ewe),i=twe(t),a=Object.keys(i);function s(d){return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r})`}function c(d){return`@media (max-width:${(typeof t[d]=="number"?t[d]:d)-n/100}${r})`}function l(d,h){const p=a.indexOf(h);return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r}) and (max-width:${(p!==-1&&typeof t[a[p]]=="number"?t[a[p]]:h)-n/100}${r})`}function u(d){return a.indexOf(d)+1<a.length?l(d,a[a.indexOf(d)+1]):s(d)}function f(d){const h=a.indexOf(d);return h===0?s(a[1]):h===a.length-1?c(a[h]):l(d,a[a.indexOf(d)+1]).replace("@media","@media not all and")}return W({keys:a,values:i,up:s,down:c,between:l,only:u,not:f,unit:r},o)}const rwe={borderRadius:4},nwe=rwe;function Zb(e,t){return t?ys(e,t,{clone:!1}):e}const RO={xs:0,sm:600,md:900,lg:1200,xl:1536},yB={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${RO[e]}px)`};function Ks(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||yB;return t.reduce((a,s,c)=>(a[i.up(i.keys[c])]=r(t[c]),a),{})}if(typeof t=="object"){const i=n.breakpoints||yB;return Object.keys(t).reduce((a,s)=>{if(Object.keys(i.values||RO).indexOf(s)!==-1){const c=i.up(s);a[c]=r(t[s],s)}else{const c=s;a[c]=t[c]}return a},{})}return r(t)}function xX(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((n,o)=>{const i=e.up(o);return n[i]={},n},{}))||{}}function CX(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function owe(e,...t){const r=xX(e),n=[r,...t].reduce((o,i)=>ys(o,i),{});return CX(Object.keys(r),n)}function iwe(e,t){if(typeof e!="object")return{};const r={},n=Object.keys(t);return Array.isArray(e)?n.forEach((o,i)=>{i<e.length&&(r[o]=!0)}):n.forEach(o=>{e[o]!=null&&(r[o]=!0)}),r}function bm({values:e,breakpoints:t,base:r}){const n=r||iwe(e,t),o=Object.keys(n);if(o.length===0)return e;let i;return o.reduce((a,s,c)=>(Array.isArray(e)?(a[s]=e[c]!=null?e[c]:e[i],i=c):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function t1(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Yk(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=t1(e,r)||n,t&&(o=t(o,n,e)),o}function vi(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],c=a.theme,l=t1(c,n)||{};return Ks(a,s,f=>{let d=Yk(l,o,f);return f===d&&typeof f=="string"&&(d=Yk(l,o,`${t}${f==="default"?"":ut(f)}`,f)),r===!1?d:{[r]:d}})};return i.propTypes={},i.filterProps=[t],i}function awe(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const swe={m:"margin",p:"padding"},lwe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},bB={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},cwe=awe(e=>{if(e.length>2)if(bB[e])e=bB[e];else return[e];const[t,r]=e.split(""),n=swe[t],o=lwe[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),OO=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],DO=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...OO,...DO];function S2(e,t,r,n){var o;const i=(o=t1(e,t,!1))!=null?o:r;return typeof i=="number"?a=>typeof a=="string"?a:i*a:Array.isArray(i)?a=>typeof a=="string"?a:i[a]:typeof i=="function"?i:()=>{}}function FO(e){return S2(e,"spacing",8)}function Lm(e,t){if(typeof t=="string"||t==null)return t;const r=Math.abs(t),n=e(r);return t>=0?n:typeof n=="number"?-n:`-${n}`}function uwe(e,t){return r=>e.reduce((n,o)=>(n[o]=Lm(t,r),n),{})}function dwe(e,t,r,n){if(t.indexOf(r)===-1)return null;const o=cwe(r),i=uwe(o,n),a=e[r];return Ks(e,a,i)}function SX(e,t){const r=FO(e.theme);return Object.keys(e).map(n=>dwe(e,t,n,r)).reduce(Zb,{})}function Yo(e){return SX(e,OO)}Yo.propTypes={};Yo.filterProps=OO;function Xo(e){return SX(e,DO)}Xo.propTypes={};Xo.filterProps=DO;function fwe(e=8){if(e.mui)return e;const t=FO({spacing:e}),r=(...n)=>(n.length===0?[1]:n).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return r.mui=!0,r}function bI(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?Zb(o,t[i](n)):o,{});return r.propTypes={},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function ec(e){return typeof e!="number"?e:`${e}px solid`}function bc(e,t){return vi({prop:e,themeKey:"borders",transform:t})}const hwe=bc("border",ec),pwe=bc("borderTop",ec),mwe=bc("borderRight",ec),gwe=bc("borderBottom",ec),vwe=bc("borderLeft",ec),ywe=bc("borderColor"),bwe=bc("borderTopColor"),wwe=bc("borderRightColor"),xwe=bc("borderBottomColor"),Cwe=bc("borderLeftColor"),Swe=bc("outline",ec),_we=bc("outlineColor"),wI=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=S2(e.theme,"shape.borderRadius",4),r=n=>({borderRadius:Lm(t,n)});return Ks(e,e.borderRadius,r)}return null};wI.propTypes={};wI.filterProps=["borderRadius"];bI(hwe,pwe,mwe,gwe,vwe,ywe,bwe,wwe,xwe,Cwe,wI,Swe,_we);const xI=e=>{if(e.gap!==void 0&&e.gap!==null){const t=S2(e.theme,"spacing",8),r=n=>({gap:Lm(t,n)});return Ks(e,e.gap,r)}return null};xI.propTypes={};xI.filterProps=["gap"];const CI=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=S2(e.theme,"spacing",8),r=n=>({columnGap:Lm(t,n)});return Ks(e,e.columnGap,r)}return null};CI.propTypes={};CI.filterProps=["columnGap"];const SI=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=S2(e.theme,"spacing",8),r=n=>({rowGap:Lm(t,n)});return Ks(e,e.rowGap,r)}return null};SI.propTypes={};SI.filterProps=["rowGap"];const kwe=vi({prop:"gridColumn"}),Ewe=vi({prop:"gridRow"}),Twe=vi({prop:"gridAutoFlow"}),Iwe=vi({prop:"gridAutoColumns"}),Awe=vi({prop:"gridAutoRows"}),Pwe=vi({prop:"gridTemplateColumns"}),Mwe=vi({prop:"gridTemplateRows"}),Rwe=vi({prop:"gridTemplateAreas"}),Owe=vi({prop:"gridArea"});bI(xI,CI,SI,kwe,Ewe,Twe,Iwe,Awe,Pwe,Mwe,Rwe,Owe);function sv(e,t){return t==="grey"?t:e}const Dwe=vi({prop:"color",themeKey:"palette",transform:sv}),Fwe=vi({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:sv}),Nwe=vi({prop:"backgroundColor",themeKey:"palette",transform:sv});bI(Dwe,Fwe,Nwe);function hl(e){return e<=1&&e!==0?`${e*100}%`:e}const Lwe=vi({prop:"width",transform:hl}),NO=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var n,o;const i=((n=e.theme)==null||(n=n.breakpoints)==null||(n=n.values)==null?void 0:n[r])||RO[r];return i?((o=e.theme)==null||(o=o.breakpoints)==null?void 0:o.unit)!=="px"?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:hl(r)}};return Ks(e,e.maxWidth,t)}return null};NO.filterProps=["maxWidth"];const $we=vi({prop:"minWidth",transform:hl}),Bwe=vi({prop:"height",transform:hl}),Uwe=vi({prop:"maxHeight",transform:hl}),Hwe=vi({prop:"minHeight",transform:hl});vi({prop:"size",cssProperty:"width",transform:hl});vi({prop:"size",cssProperty:"height",transform:hl});const zwe=vi({prop:"boxSizing"});bI(Lwe,NO,$we,Bwe,Uwe,Hwe,zwe);const jwe={border:{themeKey:"borders",transform:ec},borderTop:{themeKey:"borders",transform:ec},borderRight:{themeKey:"borders",transform:ec},borderBottom:{themeKey:"borders",transform:ec},borderLeft:{themeKey:"borders",transform:ec},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ec},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:wI},color:{themeKey:"palette",transform:sv},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:sv},backgroundColor:{themeKey:"palette",transform:sv},p:{style:Xo},pt:{style:Xo},pr:{style:Xo},pb:{style:Xo},pl:{style:Xo},px:{style:Xo},py:{style:Xo},padding:{style:Xo},paddingTop:{style:Xo},paddingRight:{style:Xo},paddingBottom:{style:Xo},paddingLeft:{style:Xo},paddingX:{style:Xo},paddingY:{style:Xo},paddingInline:{style:Xo},paddingInlineStart:{style:Xo},paddingInlineEnd:{style:Xo},paddingBlock:{style:Xo},paddingBlockStart:{style:Xo},paddingBlockEnd:{style:Xo},m:{style:Yo},mt:{style:Yo},mr:{style:Yo},mb:{style:Yo},ml:{style:Yo},mx:{style:Yo},my:{style:Yo},margin:{style:Yo},marginTop:{style:Yo},marginRight:{style:Yo},marginBottom:{style:Yo},marginLeft:{style:Yo},marginX:{style:Yo},marginY:{style:Yo},marginInline:{style:Yo},marginInlineStart:{style:Yo},marginInlineEnd:{style:Yo},marginBlock:{style:Yo},marginBlockStart:{style:Yo},marginBlockEnd:{style:Yo},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:xI},rowGap:{style:SI},columnGap:{style:CI},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:hl},maxWidth:{style:NO},minWidth:{transform:hl},height:{transform:hl},maxHeight:{transform:hl},minHeight:{transform:hl},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},_2=jwe;function Vwe(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Wwe(e,t){return typeof e=="function"?e(t):e}function _X(){function e(r,n,o,i){const a={[r]:n,theme:o},s=i[r];if(!s)return{[r]:n};const{cssProperty:c=r,themeKey:l,transform:u,style:f}=s;if(n==null)return null;if(l==="typography"&&n==="inherit")return{[r]:n};const d=t1(o,l)||{};return f?f(a):Ks(a,n,p=>{let g=Yk(d,u,p);return p===g&&typeof p=="string"&&(g=Yk(d,u,`${r}${p==="default"?"":ut(p)}`,p)),c===!1?g:{[c]:g}})}function t(r){var n;const{sx:o,theme:i={}}=r||{};if(!o)return null;const a=(n=i.unstable_sxConfig)!=null?n:_2;function s(c){let l=c;if(typeof c=="function")l=c(i);else if(typeof c!="object")return c;if(!l)return null;const u=xX(i.breakpoints),f=Object.keys(u);let d=u;return Object.keys(l).forEach(h=>{const p=Wwe(l[h],i);if(p!=null)if(typeof p=="object")if(a[h])d=Zb(d,e(h,p,i,a));else{const g=Ks({theme:i},p,m=>({[h]:m}));Vwe(g,p)?d[h]=t({sx:p,theme:i}):d=Zb(d,g)}else d=Zb(d,e(h,p,i,a))}),CX(f,d)}return Array.isArray(o)?o.map(s):s(o)}return t}const kX=_X();kX.filterProps=["sx"];const k2=kX;function EX(e,t){const r=this;return r.vars&&typeof r.getColorSchemeSelector=="function"?{[r.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:r.palette.mode===e?t:{}}const Gwe=["breakpoints","palette","spacing","shape"];function N1(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={}}=e,a=ze(e,Gwe),s=wX(r),c=fwe(o);let l=ys({breakpoints:s,direction:"ltr",components:{},palette:W({mode:"light"},n),spacing:c,shape:W({},nwe,i)},a);return l.applyStyles=EX,l=t.reduce((u,f)=>ys(u,f),l),l.unstable_sxConfig=W({},_2,a==null?void 0:a.unstable_sxConfig),l.unstable_sx=function(f){return k2({sx:f,theme:this})},l}const qwe=Object.freeze(Object.defineProperty({__proto__:null,default:N1,private_createBreakpoints:wX,unstable_applyStyles:EX},Symbol.toStringTag,{value:"Module"}));function Kwe(e){return Object.keys(e).length===0}function TX(e=null){const t=A.useContext(Jv);return!t||Kwe(t)?e:t}const Ywe=N1();function s0(e=Ywe){return TX(e)}function Xwe({styles:e,themeId:t,defaultTheme:r={}}){const n=s0(r),o=typeof e=="function"?e(t&&n[t]||n):e;return R(yX,{styles:o})}const Qwe=["sx"],Zwe=e=>{var t,r;const n={systemProps:{},otherProps:{}},o=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:_2;return Object.keys(e).forEach(i=>{o[i]?n.systemProps[i]=e[i]:n.otherProps[i]=e[i]}),n};function L1(e){const{sx:t}=e,r=ze(e,Qwe),{systemProps:n,otherProps:o}=Zwe(r);let i;return Array.isArray(t)?i=[n,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return $d(s)?W({},n,s):n}:i=W({},n,t),W({},o,{sx:i})}const Jwe=Object.freeze(Object.defineProperty({__proto__:null,default:k2,extendSxProp:L1,unstable_createStyleFunctionSx:_X,unstable_defaultSxConfig:_2},Symbol.toStringTag,{value:"Module"})),exe=["className","component"];function IX(e={}){const{themeId:t,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:o}=e,i=MO("div",{shouldForwardProp:s=>s!=="theme"&&s!=="sx"&&s!=="as"})(k2);return A.forwardRef(function(c,l){const u=s0(r),f=L1(c),{className:d,component:h="div"}=f,p=ze(f,exe);return R(i,W({as:h,ref:l,className:it(d,o?o(n):n),theme:t&&u[t]||u},p))})}const txe=Vt("MuiBox",["root"]),rxe=txe,nxe=IX({defaultClassName:rxe.root,generateClassName:tI.generate}),td=nxe,oxe=["ownerState"],ixe=["variants"],axe=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function sxe(e){return Object.keys(e).length===0}function lxe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function TA(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cxe=N1(),uxe=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function FS({defaultTheme:e,theme:t,themeId:r}){return sxe(t)?e:t[r]||t}function dxe(e){return e?(t,r)=>r[e]:null}function Q_(e,t){let{ownerState:r}=t,n=ze(t,oxe);const o=typeof e=="function"?e(W({ownerState:r},n)):e;if(Array.isArray(o))return o.flatMap(i=>Q_(i,W({ownerState:r},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let s=ze(o,ixe);return i.forEach(c=>{let l=!0;typeof c.props=="function"?l=c.props(W({ownerState:r},n,r)):Object.keys(c.props).forEach(u=>{(r==null?void 0:r[u])!==c.props[u]&&n[u]!==c.props[u]&&(l=!1)}),l&&(Array.isArray(s)||(s=[s]),s.push(typeof c.style=="function"?c.style(W({ownerState:r},n,r)):c.style))}),s}return o}function fxe(e={}){const{themeId:t,defaultTheme:r=cxe,rootShouldForwardProp:n=TA,slotShouldForwardProp:o=TA}=e,i=a=>k2(W({},a,{theme:FS(W({},a,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(a,s={})=>{bX(a,E=>E.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:l,skipVariantsResolver:u,skipSx:f,overridesResolver:d=dxe(uxe(l))}=s,h=ze(s,axe),p=u!==void 0?u:l&&l!=="Root"&&l!=="root"||!1,g=f||!1;let m,v=TA;l==="Root"||l==="root"?v=n:l?v=o:lxe(a)&&(v=void 0);const y=MO(a,W({shouldForwardProp:v,label:m},h)),b=E=>typeof E=="function"&&E.__emotion_real!==E||$d(E)?I=>Q_(E,W({},I,{theme:FS({theme:I.theme,defaultTheme:r,themeId:t})})):E,w=(E,...I)=>{let O=b(E);const D=I?I.map(b):[];c&&d&&D.push(B=>{const F=FS(W({},B,{defaultTheme:r,themeId:t}));if(!F.components||!F.components[c]||!F.components[c].styleOverrides)return null;const T=F.components[c].styleOverrides,P={};return Object.entries(T).forEach(([_,C])=>{P[_]=Q_(C,W({},B,{theme:F}))}),d(B,P)}),c&&!p&&D.push(B=>{var F;const T=FS(W({},B,{defaultTheme:r,themeId:t})),P=T==null||(F=T.components)==null||(F=F[c])==null?void 0:F.variants;return Q_({variants:P},W({},B,{theme:T}))}),g||D.push(i);const N=D.length-I.length;if(Array.isArray(E)&&N>0){const B=new Array(N).fill("");O=[...E,...B],O.raw=[...E.raw,...B]}const U=y(O,...D);return a.muiName&&(U.muiName=a.muiName),U};return y.withConfig&&(w.withConfig=y.withConfig),w}}const hxe=fxe(),Go=hxe;function LO(e){const{theme:t,name:r,props:n}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?n:yO(t.components[r].defaultProps,n)}function $O({props:e,name:t,defaultTheme:r,themeId:n}){let o=s0(r);return n&&(o=o[n]||o),LO({theme:o,name:t,props:e})}function pxe(e,t,r,n,o){const[i,a]=A.useState(()=>o&&r?r(e).matches:n?n(e).matches:t);return en(()=>{let s=!0;if(!r)return;const c=r(e),l=()=>{s&&a(c.matches)};return l(),c.addListener(l),()=>{s=!1,c.removeListener(l)}},[e,r]),i}const AX=jv["useSyncExternalStore"];function mxe(e,t,r,n,o){const i=A.useCallback(()=>t,[t]),a=A.useMemo(()=>{if(o&&r)return()=>r(e).matches;if(n!==null){const{matches:u}=n(e);return()=>u}return i},[i,e,n,o,r]),[s,c]=A.useMemo(()=>{if(r===null)return[i,()=>()=>{}];const u=r(e);return[()=>u.matches,f=>(u.addListener(f),()=>{u.removeListener(f)})]},[i,r,e]);return AX(c,s,a)}function E2(e,t={}){const r=TX(),n=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=n?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:s=!1}=LO({name:"MuiUseMediaQuery",props:t,theme:r});let c=typeof e=="function"?e(r):e;return c=c.replace(/^@media( ?)/m,""),(AX!==void 0?mxe:pxe)(c,o,i,a,s)}function BO(e,t=0,r=1){return Bp(e,t,r)}function gxe(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function _I(e){if(e.type)return e;if(e.charAt(0)==="#")return _I(gxe(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(nf(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error(nf(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}function UO(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function to(e,t){return e=_I(e),t=BO(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,UO(e)}function vxe(e,t){if(e=_I(e),t=BO(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return UO(e)}function yxe(e,t){if(e=_I(e),t=BO(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return UO(e)}const bxe=A.createContext(),l0=()=>{const e=A.useContext(bxe);return e??!1},wxe=(e,t)=>e.filter(r=>t.includes(r)),$1=(e,t,r)=>{const n=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{r((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:wxe(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.indexOf(i)!==-1){const a=t[i];a!==void 0&&r((s,c)=>{n===i?Object.assign(s,c):s[e.up(i)]=c},a)}}):(typeof t=="number"||typeof t=="string")&&r((o,i)=>{Object.assign(o,i)},t)};function sf(e){return e?`Level${e}`:""}function T2(e){return e.unstable_level>0&&e.container}function PX(e){return function(r){return`var(--Grid-${r}Spacing${sf(e.unstable_level)})`}}function HO(e){return function(r){return e.unstable_level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${sf(e.unstable_level-1)})`}}function zO(e){return e.unstable_level===0?"var(--Grid-columns)":`var(--Grid-columns${sf(e.unstable_level-1)})`}const xxe=({theme:e,ownerState:t})=>{const r=PX(t),n={};return $1(e.breakpoints,t.gridSize,(o,i)=>{let a={};i===!0&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / ${zO(t)}${T2(t)?` + ${r("column")}`:""})`}),o(n,a)}),n},Cxe=({theme:e,ownerState:t})=>{const r={};return $1(e.breakpoints,t.gridOffset,(n,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / ${zO(t)})`}),n(r,i)}),r},Sxe=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=T2(t)?{[`--Grid-columns${sf(t.unstable_level)}`]:zO(t)}:{"--Grid-columns":12};return $1(e.breakpoints,t.columns,(n,o)=>{n(r,{[`--Grid-columns${sf(t.unstable_level)}`]:o})}),r},_xe=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=HO(t),n=T2(t)?{[`--Grid-rowSpacing${sf(t.unstable_level)}`]:r("row")}:{};return $1(e.breakpoints,t.rowSpacing,(o,i)=>{var a;o(n,{[`--Grid-rowSpacing${sf(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},kxe=({theme:e,ownerState:t})=>{if(!t.container)return{};const r=HO(t),n=T2(t)?{[`--Grid-columnSpacing${sf(t.unstable_level)}`]:r("column")}:{};return $1(e.breakpoints,t.columnSpacing,(o,i)=>{var a;o(n,{[`--Grid-columnSpacing${sf(t.unstable_level)}`]:typeof i=="string"?i:(a=e.spacing)==null?void 0:a.call(e,i)})}),n},Exe=({theme:e,ownerState:t})=>{if(!t.container)return{};const r={};return $1(e.breakpoints,t.direction,(n,o)=>{n(r,{flexDirection:o})}),r},Txe=({ownerState:e})=>{const t=PX(e),r=HO(e);return W({minWidth:0,boxSizing:"border-box"},e.container&&W({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:`calc(${t("row")} / -2) calc(${t("column")} / -2)`},e.disableEqualOverflow&&{margin:`calc(${t("row")} * -1) 0px 0px calc(${t("column")} * -1)`}),(!e.container||T2(e))&&W({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},Ixe=e=>{const t=[];return Object.entries(e).forEach(([r,n])=>{n!==!1&&n!==void 0&&t.push(`grid-${r}-${String(n)}`)}),t},Axe=(e,t="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const n=[];return Object.entries(e).forEach(([o,i])=>{r(i)&&n.push(`spacing-${o}-${String(i)}`)}),n}return[]},Pxe=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,r])=>`direction-${t}-${r}`):[`direction-xs-${String(e)}`],Mxe=["className","children","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow","unstable_level"],Rxe=N1(),Oxe=Go("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Dxe(e){return $O({props:e,name:"MuiGrid",defaultTheme:Rxe})}function Fxe(e={}){const{createStyledComponent:t=Oxe,useThemeProps:r=Dxe,componentName:n="MuiGrid"}=e,o=A.createContext(void 0),i=(c,l)=>{const{container:u,direction:f,spacing:d,wrap:h,gridSize:p}=c,g={root:["root",u&&"container",h!=="wrap"&&`wrap-xs-${String(h)}`,...Pxe(f),...Ixe(p),...u?Axe(d,l.breakpoints.keys[0]):[]]};return pt(g,m=>Gt(n,m),{})},a=t(Sxe,kxe,_xe,xxe,Exe,Txe,Cxe),s=A.forwardRef(function(l,u){var f,d,h,p,g,m,v,y;const b=s0(),w=r(l),E=L1(w),I=A.useContext(o),{className:O,children:D,columns:N=12,container:U=!1,component:B="div",direction:F="row",wrap:T="wrap",spacing:P=0,rowSpacing:_=P,columnSpacing:C=P,disableEqualOverflow:S,unstable_level:x=0}=E,k=ze(E,Mxe);let L=S;x&&S!==void 0&&(L=l.disableEqualOverflow);const j={},z={},Y={};Object.entries(k).forEach(([te,ee])=>{b.breakpoints.values[te]!==void 0?j[te]=ee:b.breakpoints.values[te.replace("Offset","")]!==void 0?z[te.replace("Offset","")]=ee:Y[te]=ee});const K=(f=l.columns)!=null?f:x?void 0:N,Q=(d=l.spacing)!=null?d:x?void 0:P,q=(h=(p=l.rowSpacing)!=null?p:l.spacing)!=null?h:x?void 0:_,J=(g=(m=l.columnSpacing)!=null?m:l.spacing)!=null?g:x?void 0:C,G=W({},E,{level:x,columns:K,container:U,direction:F,wrap:T,spacing:Q,rowSpacing:q,columnSpacing:J,gridSize:j,gridOffset:z,disableEqualOverflow:(v=(y=L)!=null?y:I)!=null?v:!1,parentDisableEqualOverflow:I}),V=i(G,b);let X=R(a,W({ref:u,as:B,ownerState:G,className:it(V.root,O)},Y,{children:A.Children.map(D,te=>{if(A.isValidElement(te)&&iv(te,["Grid"])){var ee;return A.cloneElement(te,{unstable_level:(ee=te.props.unstable_level)!=null?ee:x+1})}return te})}));return L!==void 0&&L!==(I??!1)&&(X=R(o.Provider,{value:L,children:X})),X});return s.muiName="Grid",s}const Nxe=["component","direction","spacing","divider","children","className","useFlexGap"],Lxe=N1(),$xe=Go("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Bxe(e){return $O({props:e,name:"MuiStack",defaultTheme:Lxe})}function Uxe(e,t){const r=A.Children.toArray(e).filter(Boolean);return r.reduce((n,o,i)=>(n.push(o),i<r.length-1&&n.push(A.cloneElement(t,{key:`separator-${i}`})),n),[])}const Hxe=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],zxe=({ownerState:e,theme:t})=>{let r=W({display:"flex",flexDirection:"column"},Ks({theme:t},bm({values:e.direction,breakpoints:t.breakpoints.values}),n=>({flexDirection:n})));if(e.spacing){const n=FO(t),o=Object.keys(t.breakpoints.values).reduce((c,l)=>((typeof e.spacing=="object"&&e.spacing[l]!=null||typeof e.direction=="object"&&e.direction[l]!=null)&&(c[l]=!0),c),{}),i=bm({values:e.direction,base:o}),a=bm({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((c,l,u)=>{if(!i[c]){const d=l>0?i[u[l-1]]:"column";i[c]=d}}),r=ys(r,Ks({theme:t},a,(c,l)=>e.useFlexGap?{gap:Lm(n,c)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Hxe(l?i[l]:e.direction)}`]:Lm(n,c)}}))}return r=owe(t.breakpoints,r),r};function MX(e={}){const{createStyledComponent:t=$xe,useThemeProps:r=Bxe,componentName:n="MuiStack"}=e,o=()=>pt({root:["root"]},c=>Gt(n,c),{}),i=t(zxe);return A.forwardRef(function(c,l){const u=r(c),f=L1(u),{component:d="div",direction:h="column",spacing:p=0,divider:g,children:m,className:v,useFlexGap:y=!1}=f,b=ze(f,Nxe),w={direction:h,spacing:p,useFlexGap:y},E=o();return R(i,W({as:d,ownerState:w,ref:l,className:it(E.root,v)},b,{children:g?Uxe(m,g):m}))})}const jxe=MX(),Ho=jxe;function Vxe(e,t){return W({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var yi={},RX={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(RX);var Wr=RX.exports;const Wxe=su(J0e),Gxe=su(Age);var OX=Wr;Object.defineProperty(yi,"__esModule",{value:!0});var Vr=yi.alpha=LX;yi.blend=n2e;yi.colorChannel=void 0;var tx=yi.darken=VO;yi.decomposeColor=fc;yi.emphasize=r2e;var qxe=yi.getContrastRatio=Zxe;yi.getLuminance=Xk;yi.hexToRgb=DX;yi.hslToRgb=NX;var rx=yi.lighten=WO;yi.private_safeAlpha=Jxe;yi.private_safeColorChannel=void 0;yi.private_safeDarken=e2e;yi.private_safeEmphasize=$X;yi.private_safeLighten=t2e;yi.recomposeColor=B1;yi.rgbToHex=Qxe;var wB=OX(Wxe),Kxe=OX(Gxe);function jO(e,t=0,r=1){return(0,Kxe.default)(e,t,r)}function DX(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Yxe(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function fc(e){if(e.type)return e;if(e.charAt(0)==="#")return fc(DX(e));const t=e.indexOf("("),r=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error((0,wB.default)(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(o)===-1)throw new Error((0,wB.default)(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}const FX=e=>{const t=fc(e);return t.values.slice(0,3).map((r,n)=>t.type.indexOf("hsl")!==-1&&n!==0?`${r}%`:r).join(" ")};yi.colorChannel=FX;const Xxe=(e,t)=>{try{return FX(e)}catch{return e}};yi.private_safeColorChannel=Xxe;function B1(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.indexOf("rgb")!==-1?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Qxe(e){if(e.indexOf("#")===0)return e;const{values:t}=fc(e);return`#${t.map((r,n)=>Yxe(n===3?Math.round(255*r):r)).join("")}`}function NX(e){e=fc(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),a=(l,u=(l+r/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const c=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",c.push(t[3])),B1({type:s,values:c})}function Xk(e){e=fc(e);let t=e.type==="hsl"||e.type==="hsla"?fc(NX(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Zxe(e,t){const r=Xk(e),n=Xk(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function LX(e,t){return e=fc(e),t=jO(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,B1(e)}function Jxe(e,t,r){try{return LX(e,t)}catch{return e}}function VO(e,t){if(e=fc(e),t=jO(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]*=1-t;return B1(e)}function e2e(e,t,r){try{return VO(e,t)}catch{return e}}function WO(e,t){if(e=fc(e),t=jO(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return B1(e)}function t2e(e,t,r){try{return WO(e,t)}catch{return e}}function r2e(e,t=.15){return Xk(e)>.5?VO(e,t):WO(e,t)}function $X(e,t,r){try{return $X(e,t)}catch{return e}}function n2e(e,t,r,n=1){const o=(c,l)=>Math.round((c**(1/n)*(1-r)+l**(1/n)*r)**n),i=fc(e),a=fc(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return B1({type:"rgb",values:s})}const o2e={black:"#000",white:"#fff"},nx=o2e,i2e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},a2e=i2e,s2e={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Q0=s2e,l2e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Z0=l2e,c2e={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},zy=c2e,u2e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},J0=u2e,d2e={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},eg=d2e,f2e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},tg=f2e,h2e=["mode","contrastThreshold","tonalOffset"],xB={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:nx.white,default:nx.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},IA={text:{primary:nx.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:nx.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function CB(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=rx(e.main,o):t==="dark"&&(e.dark=tx(e.main,i)))}function p2e(e="light"){return e==="dark"?{main:J0[200],light:J0[50],dark:J0[400]}:{main:J0[700],light:J0[400],dark:J0[800]}}function m2e(e="light"){return e==="dark"?{main:Q0[200],light:Q0[50],dark:Q0[400]}:{main:Q0[500],light:Q0[300],dark:Q0[700]}}function g2e(e="light"){return e==="dark"?{main:Z0[500],light:Z0[300],dark:Z0[700]}:{main:Z0[700],light:Z0[400],dark:Z0[800]}}function v2e(e="light"){return e==="dark"?{main:eg[400],light:eg[300],dark:eg[700]}:{main:eg[700],light:eg[500],dark:eg[900]}}function y2e(e="light"){return e==="dark"?{main:tg[400],light:tg[300],dark:tg[700]}:{main:tg[800],light:tg[500],dark:tg[900]}}function b2e(e="light"){return e==="dark"?{main:zy[400],light:zy[300],dark:zy[700]}:{main:"#ed6c02",light:zy[500],dark:zy[900]}}function w2e(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2}=e,o=ze(e,h2e),i=e.primary||p2e(t),a=e.secondary||m2e(t),s=e.error||g2e(t),c=e.info||v2e(t),l=e.success||y2e(t),u=e.warning||b2e(t);function f(g){return qxe(g,IA.text.primary)>=r?IA.text.primary:xB.text.primary}const d=({color:g,name:m,mainShade:v=500,lightShade:y=300,darkShade:b=700})=>{if(g=W({},g),!g.main&&g[v]&&(g.main=g[v]),!g.hasOwnProperty("main"))throw new Error(nf(11,m?` (${m})`:"",v));if(typeof g.main!="string")throw new Error(nf(12,m?` (${m})`:"",JSON.stringify(g.main)));return CB(g,"light",y,n),CB(g,"dark",b,n),g.contrastText||(g.contrastText=f(g.main)),g},h={dark:IA,light:xB};return ys(W({common:W({},nx),mode:t,primary:d({color:i,name:"primary"}),secondary:d({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:d({color:s,name:"error"}),warning:d({color:u,name:"warning"}),info:d({color:c,name:"info"}),success:d({color:l,name:"success"}),grey:a2e,contrastThreshold:r,getContrastText:f,augmentColor:d,tonalOffset:n},h[t]),o)}const x2e=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function C2e(e){return Math.round(e*1e5)/1e5}const SB={textTransform:"uppercase"},_B='"Roboto", "Helvetica", "Arial", sans-serif';function S2e(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=_B,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:c=700,htmlFontSize:l=16,allVariants:u,pxToRem:f}=r,d=ze(r,x2e),h=o/14,p=f||(v=>`${v/l*h}rem`),g=(v,y,b,w,E)=>W({fontFamily:n,fontWeight:v,fontSize:p(y),lineHeight:b},n===_B?{letterSpacing:`${C2e(w/y)}em`}:{},E,u),m={h1:g(i,96,1.167,-1.5),h2:g(i,60,1.2,-.5),h3:g(a,48,1.167,0),h4:g(a,34,1.235,.25),h5:g(a,24,1.334,0),h6:g(s,20,1.6,.15),subtitle1:g(a,16,1.75,.15),subtitle2:g(s,14,1.57,.1),body1:g(a,16,1.5,.15),body2:g(a,14,1.43,.15),button:g(s,14,1.75,.4,SB),caption:g(a,12,1.66,.4),overline:g(a,12,2.66,1,SB),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ys(W({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:c},m),d,{clone:!1})}const _2e=.2,k2e=.14,E2e=.12;function Ro(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${_2e})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${k2e})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${E2e})`].join(",")}const T2e=["none",Ro(0,2,1,-1,0,1,1,0,0,1,3,0),Ro(0,3,1,-2,0,2,2,0,0,1,5,0),Ro(0,3,3,-2,0,3,4,0,0,1,8,0),Ro(0,2,4,-1,0,4,5,0,0,1,10,0),Ro(0,3,5,-1,0,5,8,0,0,1,14,0),Ro(0,3,5,-1,0,6,10,0,0,1,18,0),Ro(0,4,5,-2,0,7,10,1,0,2,16,1),Ro(0,5,5,-3,0,8,10,1,0,3,14,2),Ro(0,5,6,-3,0,9,12,1,0,3,16,2),Ro(0,6,6,-3,0,10,14,1,0,4,18,3),Ro(0,6,7,-4,0,11,15,1,0,4,20,3),Ro(0,7,8,-4,0,12,17,2,0,5,22,4),Ro(0,7,8,-4,0,13,19,2,0,5,24,4),Ro(0,7,9,-4,0,14,21,2,0,5,26,4),Ro(0,8,9,-5,0,15,22,2,0,6,28,5),Ro(0,8,10,-5,0,16,24,2,0,6,30,5),Ro(0,8,11,-5,0,17,26,2,0,6,32,5),Ro(0,9,11,-5,0,18,28,2,0,7,34,6),Ro(0,9,12,-6,0,19,29,2,0,7,36,6),Ro(0,10,13,-6,0,20,31,3,0,8,38,7),Ro(0,10,13,-6,0,21,33,3,0,8,40,7),Ro(0,10,14,-6,0,22,35,3,0,8,42,7),Ro(0,11,14,-7,0,23,36,3,0,9,44,8),Ro(0,11,15,-7,0,24,38,3,0,9,46,8)],I2e=T2e,A2e=["duration","easing","delay"],P2e={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},M2e={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kB(e){return`${Math.round(e)}ms`}function R2e(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function O2e(e){const t=W({},P2e,e.easing),r=W({},M2e,e.duration);return W({getAutoHeightDuration:R2e,create:(o=["all"],i={})=>{const{duration:a=r.standard,easing:s=t.easeInOut,delay:c=0}=i;return ze(i,A2e),(Array.isArray(o)?o:[o]).map(l=>`${l} ${typeof a=="string"?a:kB(a)} ${s} ${typeof c=="string"?c:kB(c)}`).join(",")}},e,{easing:t,duration:r})}const D2e={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},F2e=D2e,N2e=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function GO(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:i={}}=e,a=ze(e,N2e);if(e.vars)throw new Error(nf(18));const s=w2e(n),c=N1(e);let l=ys(c,{mixins:Vxe(c.breakpoints,r),palette:s,shadows:I2e.slice(),typography:S2e(s,i),transitions:O2e(o),zIndex:W({},F2e)});return l=ys(l,a),l=t.reduce((u,f)=>ys(u,f),l),l.unstable_sxConfig=W({},_2,a==null?void 0:a.unstable_sxConfig),l.unstable_sx=function(f){return k2({sx:f,theme:this})},l}function L2e(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function $2e(e){return parseFloat(e)}const B2e=GO(),kI=B2e;function An(){const e=s0(kI);return e[x2]||e}function Wt({props:e,name:t}){return $O({props:e,name:t,defaultTheme:kI,themeId:x2})}var I2={};const U2e=su(q0e);var AA={exports:{}},EB;function H2e(){return EB||(EB=1,function(e){function t(r,n){if(r==null)return{};var o={},i=Object.keys(r),a,s;for(s=0;s<i.length;s++)a=i[s],!(n.indexOf(a)>=0)&&(o[a]=r[a]);return o}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(AA)),AA.exports}const BX=su(Jbe),z2e=su(K0e),j2e=su(age),V2e=su(oge),W2e=su(qwe),G2e=su(Jwe);var U1=Wr;Object.defineProperty(I2,"__esModule",{value:!0});var q2e=I2.default=aCe;I2.shouldForwardProp=Z_;I2.systemDefaultTheme=void 0;var Wl=U1(U2e),lR=U1(H2e()),TB=eCe(BX),K2e=z2e;U1(j2e);U1(V2e);var Y2e=U1(W2e),X2e=U1(G2e);const Q2e=["ownerState"],Z2e=["variants"],J2e=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function UX(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(UX=function(n){return n?r:t})(e)}function eCe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=UX(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function tCe(e){return Object.keys(e).length===0}function rCe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Z_(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const nCe=I2.systemDefaultTheme=(0,Y2e.default)(),oCe=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function NS({defaultTheme:e,theme:t,themeId:r}){return tCe(t)?e:t[r]||t}function iCe(e){return e?(t,r)=>r[e]:null}function J_(e,t){let{ownerState:r}=t,n=(0,lR.default)(t,Q2e);const o=typeof e=="function"?e((0,Wl.default)({ownerState:r},n)):e;if(Array.isArray(o))return o.flatMap(i=>J_(i,(0,Wl.default)({ownerState:r},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let s=(0,lR.default)(o,Z2e);return i.forEach(c=>{let l=!0;typeof c.props=="function"?l=c.props((0,Wl.default)({ownerState:r},n,r)):Object.keys(c.props).forEach(u=>{(r==null?void 0:r[u])!==c.props[u]&&n[u]!==c.props[u]&&(l=!1)}),l&&(Array.isArray(s)||(s=[s]),s.push(typeof c.style=="function"?c.style((0,Wl.default)({ownerState:r},n,r)):c.style))}),s}return o}function aCe(e={}){const{themeId:t,defaultTheme:r=nCe,rootShouldForwardProp:n=Z_,slotShouldForwardProp:o=Z_}=e,i=a=>(0,X2e.default)((0,Wl.default)({},a,{theme:NS((0,Wl.default)({},a,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(a,s={})=>{(0,TB.internal_processStyles)(a,E=>E.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:l,skipVariantsResolver:u,skipSx:f,overridesResolver:d=iCe(oCe(l))}=s,h=(0,lR.default)(s,J2e),p=u!==void 0?u:l&&l!=="Root"&&l!=="root"||!1,g=f||!1;let m,v=Z_;l==="Root"||l==="root"?v=n:l?v=o:rCe(a)&&(v=void 0);const y=(0,TB.default)(a,(0,Wl.default)({shouldForwardProp:v,label:m},h)),b=E=>typeof E=="function"&&E.__emotion_real!==E||(0,K2e.isPlainObject)(E)?I=>J_(E,(0,Wl.default)({},I,{theme:NS({theme:I.theme,defaultTheme:r,themeId:t})})):E,w=(E,...I)=>{let O=b(E);const D=I?I.map(b):[];c&&d&&D.push(B=>{const F=NS((0,Wl.default)({},B,{defaultTheme:r,themeId:t}));if(!F.components||!F.components[c]||!F.components[c].styleOverrides)return null;const T=F.components[c].styleOverrides,P={};return Object.entries(T).forEach(([_,C])=>{P[_]=J_(C,(0,Wl.default)({},B,{theme:F}))}),d(B,P)}),c&&!p&&D.push(B=>{var F;const T=NS((0,Wl.default)({},B,{defaultTheme:r,themeId:t})),P=T==null||(F=T.components)==null||(F=F[c])==null?void 0:F.variants;return J_({variants:P},(0,Wl.default)({},B,{theme:T}))}),g||D.push(i);const N=D.length-I.length;if(Array.isArray(E)&&N>0){const B=new Array(N).fill("");O=[...E,...B],O.raw=[...E.raw,...B]}const U=y(O,...D);return a.muiName&&(U.muiName=a.muiName),U};return y.withConfig&&(w.withConfig=y.withConfig),w}}function EI(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const sCe=e=>EI(e)&&e!=="classes",Ja=sCe,lCe=q2e({themeId:x2,defaultTheme:kI,rootShouldForwardProp:Ja}),We=lCe,cCe=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},IB=cCe,uCe=["localeText"],cR=A.createContext(null),A2=function(t){var r;const{localeText:n}=t,o=ze(t,uCe),{utils:i,localeText:a}=(r=A.useContext(cR))!=null?r:{utils:void 0,localeText:void 0},s=Wt({props:o,name:"MuiLocalizationProvider"}),{children:c,dateAdapter:l,dateFormats:u,dateLibInstance:f,adapterLocale:d,localeText:h}=s,p=A.useMemo(()=>W({},h,a,n),[h,a,n]),g=A.useMemo(()=>{if(!l)return i||null;const y=new l({locale:d,formats:u,instance:f});if(!y.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
`));return y},[l,d,u,f,i]),m=A.useMemo(()=>g?{minDate:g.date("1900-01-01T00:00:00.000"),maxDate:g.date("2099-12-31T00:00:00.000")}:null,[g]),v=A.useMemo(()=>({utils:g,defaultDates:m,localeText:p}),[m,g,p]);return R(cR.Provider,{value:v,children:c})},dCe=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:W({},e)}}}}),HX={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,r)=>`Select ${e}. ${t===null?"No time selected":`Selected time is ${r.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},fCe=HX;dCe(HX);const lp=()=>{const e=A.useContext(cR);if(e===null)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
`));if(e.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
`));const t=A.useMemo(()=>W({},fCe,e.localeText),[e.localeText]);return A.useMemo(()=>W({},e,{localeText:t}),[e,t])},Hn=()=>lp().utils,cp=()=>lp().defaultDates,wc=()=>lp().localeText,H1=e=>{const t=Hn(),r=A.useRef();return r.current===void 0&&(r.current=t.dateWithTimezone(void 0,e)),r.current};function hCe(e){return Gt("MuiTypography",e)}Vt("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const pCe=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],mCe=e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${ut(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]};return pt(s,hCe,a)},gCe=We("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${ut(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>W({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),AB={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},vCe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},yCe=e=>vCe[e]||e,bCe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiTypography"}),o=yCe(n.color),i=L1(W({},n,{color:o})),{align:a="inherit",className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:f=!1,variant:d="body1",variantMapping:h=AB}=i,p=ze(i,pCe),g=W({},i,{align:a,color:o,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:f,variant:d,variantMapping:h}),m=c||(f?"p":h[d]||AB[d])||"span",v=mCe(g);return R(gCe,W({as:m,ref:r,ownerState:g,className:it(v.root,s)},p))}),jt=bCe;function Jc(e){return typeof e=="string"}function Vg(e,t,r){return e===void 0||Jc(e)?t:W({},t,{ownerState:W({},t.ownerState,r)})}function wCe(e,t,r=(n,o)=>n===o){return e.length===t.length&&e.every((n,o)=>r(n,t[o]))}const xCe={disableDefaultClasses:!1},CCe=A.createContext(xCe);function SCe(e){const{disableDefaultClasses:t}=A.useContext(CCe);return r=>t?"":e(r)}function Jb(e,t=[]){if(e===void 0)return{};const r={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]=="function"&&!t.includes(n)).forEach(n=>{r[n]=e[n]}),r}function Ku(e,t,r){return typeof e=="function"?e(t,r):e}function PB(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(r=>!(r.match(/^on[A-Z]/)&&typeof e[r]=="function")).forEach(r=>{t[r]=e[r]}),t}function zX(e){const{getSlotProps:t,additionalProps:r,externalSlotProps:n,externalForwardedProps:o,className:i}=e;if(!t){const h=it(r==null?void 0:r.className,i,o==null?void 0:o.className,n==null?void 0:n.className),p=W({},r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),g=W({},r,o,n);return h.length>0&&(g.className=h),Object.keys(p).length>0&&(g.style=p),{props:g,internalRef:void 0}}const a=Jb(W({},o,n)),s=PB(n),c=PB(o),l=t(a),u=it(l==null?void 0:l.className,r==null?void 0:r.className,i,o==null?void 0:o.className,n==null?void 0:n.className),f=W({},l==null?void 0:l.style,r==null?void 0:r.style,o==null?void 0:o.style,n==null?void 0:n.style),d=W({},l,r,c,s);return u.length>0&&(d.className=u),Object.keys(f).length>0&&(d.style=f),{props:d,internalRef:l.ref}}const _Ce=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function Cr(e){var t;const{elementType:r,externalSlotProps:n,ownerState:o,skipResolvingSlotProps:i=!1}=e,a=ze(e,_Ce),s=i?{}:Ku(n,o),{props:c,internalRef:l}=zX(W({},a,{externalSlotProps:s})),u=Ur(l,s==null?void 0:s.ref,(t=e.additionalProps)==null?void 0:t.ref);return Vg(r,W({},c,{ref:u}),o)}function qO(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Wk(e,t)}function kCe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function ECe(e,t){e.classList?e.classList.add(t):kCe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function MB(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function TCe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=MB(e.className,t):e.setAttribute("class",MB(e.className&&e.className.baseVal||"",t))}const RB={disabled:!1},Qk=sr.createContext(null);var jX=function(t){return t.scrollTop},Tb="unmounted",Dp="exited",Fp="entering",xg="entered",uR="exiting",vf=function(e){qO(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,c;return i.appearStatus=null,n.in?s?(c=Dp,i.appearStatus=Fp):c=xg:n.unmountOnExit||n.mountOnEnter?c=Tb:c=Dp,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===Tb?{status:Dp}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Fp&&a!==xg&&(i=Fp):(a===Fp||a===xg)&&(i=uR)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Fp){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Eb.findDOMNode(this);a&&jX(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Dp&&this.setState({status:Tb})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[Eb.findDOMNode(this),s],l=c[0],u=c[1],f=this.getTimeouts(),d=s?f.appear:f.enter;if(!o&&!a||RB.disabled){this.safeSetState({status:xg},function(){i.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:Fp},function(){i.props.onEntering(l,u),i.onTransitionEnd(d,function(){i.safeSetState({status:xg},function(){i.props.onEntered(l,u)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Eb.findDOMNode(this);if(!i||RB.disabled){this.safeSetState({status:Dp},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:uR},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Dp},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Eb.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Tb)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=ze(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return sr.createElement(Qk.Provider,{value:null},typeof a=="function"?a(o,s):sr.cloneElement(sr.Children.only(a),s))},t}(sr.Component);vf.contextType=Qk;vf.propTypes={};function rg(){}vf.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:rg,onEntering:rg,onEntered:rg,onExit:rg,onExiting:rg,onExited:rg};vf.UNMOUNTED=Tb;vf.EXITED=Dp;vf.ENTERING=Fp;vf.ENTERED=xg;vf.EXITING=uR;const TI=vf;var ICe=function(t,r){return t&&r&&r.split(" ").forEach(function(n){return ECe(t,n)})},PA=function(t,r){return t&&r&&r.split(" ").forEach(function(n){return TCe(t,n)})},KO=function(e){qO(t,e);function t(){for(var n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=e.call.apply(e,[this].concat(i))||this,n.appliedClasses={appear:{},enter:{},exit:{}},n.onEnter=function(s,c){var l=n.resolveArguments(s,c),u=l[0],f=l[1];n.removeClasses(u,"exit"),n.addClass(u,f?"appear":"enter","base"),n.props.onEnter&&n.props.onEnter(s,c)},n.onEntering=function(s,c){var l=n.resolveArguments(s,c),u=l[0],f=l[1],d=f?"appear":"enter";n.addClass(u,d,"active"),n.props.onEntering&&n.props.onEntering(s,c)},n.onEntered=function(s,c){var l=n.resolveArguments(s,c),u=l[0],f=l[1],d=f?"appear":"enter";n.removeClasses(u,d),n.addClass(u,d,"done"),n.props.onEntered&&n.props.onEntered(s,c)},n.onExit=function(s){var c=n.resolveArguments(s),l=c[0];n.removeClasses(l,"appear"),n.removeClasses(l,"enter"),n.addClass(l,"exit","base"),n.props.onExit&&n.props.onExit(s)},n.onExiting=function(s){var c=n.resolveArguments(s),l=c[0];n.addClass(l,"exit","active"),n.props.onExiting&&n.props.onExiting(s)},n.onExited=function(s){var c=n.resolveArguments(s),l=c[0];n.removeClasses(l,"exit"),n.addClass(l,"exit","done"),n.props.onExited&&n.props.onExited(s)},n.resolveArguments=function(s,c){return n.props.nodeRef?[n.props.nodeRef.current,s]:[s,c]},n.getClassNames=function(s){var c=n.props.classNames,l=typeof c=="string",u=l&&c?c+"-":"",f=l?""+u+s:c[s],d=l?f+"-active":c[s+"Active"],h=l?f+"-done":c[s+"Done"];return{baseClassName:f,activeClassName:d,doneClassName:h}},n}var r=t.prototype;return r.addClass=function(o,i,a){var s=this.getClassNames(i)[a+"ClassName"],c=this.getClassNames("enter"),l=c.doneClassName;i==="appear"&&a==="done"&&l&&(s+=" "+l),a==="active"&&o&&jX(o),s&&(this.appliedClasses[i][a]=s,ICe(o,s))},r.removeClasses=function(o,i){var a=this.appliedClasses[i],s=a.base,c=a.active,l=a.done;this.appliedClasses[i]={},s&&PA(o,s),c&&PA(o,c),l&&PA(o,l)},r.render=function(){var o=this.props;o.classNames;var i=ze(o,["classNames"]);return sr.createElement(TI,W({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(sr.Component);KO.defaultProps={classNames:""};KO.propTypes={};const ACe=KO;function YO(e,t){var r=function(i){return t&&A.isValidElement(i)?t(i):i},n=Object.create(null);return e&&A.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function PCe(e,t){e=e||{},t=t||{};function r(u){return u in t?t[u]:e[u]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var c in t){if(n[c])for(a=0;a<n[c].length;a++){var l=n[c][a];s[n[c][a]]=r(l)}s[c]=r(c)}for(a=0;a<o.length;a++)s[o[a]]=r(o[a]);return s}function Yp(e,t,r){return r[t]!=null?r[t]:e.props[t]}function MCe(e,t){return YO(e.children,function(r){return A.cloneElement(r,{onExited:t.bind(null,r),in:!0,appear:Yp(r,"appear",e),enter:Yp(r,"enter",e),exit:Yp(r,"exit",e)})})}function RCe(e,t,r){var n=YO(e.children),o=PCe(t,n);return Object.keys(o).forEach(function(i){var a=o[i];if(A.isValidElement(a)){var s=i in t,c=i in n,l=t[i],u=A.isValidElement(l)&&!l.props.in;c&&(!s||u)?o[i]=A.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:Yp(a,"exit",e),enter:Yp(a,"enter",e)}):!c&&s&&!u?o[i]=A.cloneElement(a,{in:!1}):c&&s&&A.isValidElement(l)&&(o[i]=A.cloneElement(a,{onExited:r.bind(null,a),in:l.props.in,exit:Yp(a,"exit",e),enter:Yp(a,"enter",e)}))}}),o}var OCe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},DCe={component:"div",childFactory:function(t){return t}},XO=function(e){qO(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(hr(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,c=i.firstRender;return{children:c?MCe(o,s):RCe(o,a,s),firstRender:!1}},r.handleExited=function(o,i){var a=YO(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var c=W({},s.children);return delete c[o.key],{children:c}}))},r.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=ze(o,["component","childFactory"]),c=this.state.contextValue,l=OCe(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?sr.createElement(Qk.Provider,{value:c},l):sr.createElement(Qk.Provider,{value:c},sr.createElement(i,s,l))},t}(sr.Component);XO.propTypes={};XO.defaultProps=DCe;const QO=XO;function FCe(e){const{className:t,classes:r,pulsate:n=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:c,timeout:l}=e,[u,f]=A.useState(!1),d=it(t,r.ripple,r.rippleVisible,n&&r.ripplePulsate),h={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},p=it(r.child,u&&r.childLeaving,n&&r.childPulsate);return!s&&!u&&f(!0),A.useEffect(()=>{if(!s&&c!=null){const g=setTimeout(c,l);return()=>{clearTimeout(g)}}},[c,s,l]),R("span",{className:d,style:h,children:R("span",{className:p})})}const NCe=Vt("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Xl=NCe,LCe=["center","classes","className"];let II=e=>e,OB,DB,FB,NB;const dR=550,$Ce=80,BCe=sp(OB||(OB=II`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),UCe=sp(DB||(DB=II`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),HCe=sp(FB||(FB=II`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),zCe=We("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),jCe=We(FCe,{name:"MuiTouchRipple",slot:"Ripple"})(NB||(NB=II`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),Xl.rippleVisible,BCe,dR,({theme:e})=>e.transitions.easing.easeInOut,Xl.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Xl.child,Xl.childLeaving,UCe,dR,({theme:e})=>e.transitions.easing.easeInOut,Xl.childPulsate,HCe,({theme:e})=>e.transitions.easing.easeInOut),VCe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=n,s=ze(n,LCe),[c,l]=A.useState([]),u=A.useRef(0),f=A.useRef(null);A.useEffect(()=>{f.current&&(f.current(),f.current=null)},[c]);const d=A.useRef(!1),h=jg(),p=A.useRef(null),g=A.useRef(null),m=A.useCallback(w=>{const{pulsate:E,rippleX:I,rippleY:O,rippleSize:D,cb:N}=w;l(U=>[...U,R(jCe,{classes:{ripple:it(i.ripple,Xl.ripple),rippleVisible:it(i.rippleVisible,Xl.rippleVisible),ripplePulsate:it(i.ripplePulsate,Xl.ripplePulsate),child:it(i.child,Xl.child),childLeaving:it(i.childLeaving,Xl.childLeaving),childPulsate:it(i.childPulsate,Xl.childPulsate)},timeout:dR,pulsate:E,rippleX:I,rippleY:O,rippleSize:D},u.current)]),u.current+=1,f.current=N},[i]),v=A.useCallback((w={},E={},I=()=>{})=>{const{pulsate:O=!1,center:D=o||E.pulsate,fakeElement:N=!1}=E;if((w==null?void 0:w.type)==="mousedown"&&d.current){d.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(d.current=!0);const U=N?null:g.current,B=U?U.getBoundingClientRect():{width:0,height:0,left:0,top:0};let F,T,P;if(D||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)F=Math.round(B.width/2),T=Math.round(B.height/2);else{const{clientX:_,clientY:C}=w.touches&&w.touches.length>0?w.touches[0]:w;F=Math.round(_-B.left),T=Math.round(C-B.top)}if(D)P=Math.sqrt((2*B.width**2+B.height**2)/3),P%2===0&&(P+=1);else{const _=Math.max(Math.abs((U?U.clientWidth:0)-F),F)*2+2,C=Math.max(Math.abs((U?U.clientHeight:0)-T),T)*2+2;P=Math.sqrt(_**2+C**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{m({pulsate:O,rippleX:F,rippleY:T,rippleSize:P,cb:I})},h.start($Ce,()=>{p.current&&(p.current(),p.current=null)})):m({pulsate:O,rippleX:F,rippleY:T,rippleSize:P,cb:I})},[o,m,h]),y=A.useCallback(()=>{v({},{pulsate:!0})},[v]),b=A.useCallback((w,E)=>{if(h.clear(),(w==null?void 0:w.type)==="touchend"&&p.current){p.current(),p.current=null,h.start(0,()=>{b(w,E)});return}p.current=null,l(I=>I.length>0?I.slice(1):I),f.current=E},[h]);return A.useImperativeHandle(r,()=>({pulsate:y,start:v,stop:b}),[y,v,b]),R(zCe,W({className:it(Xl.root,i.root,a),ref:g},s,{children:R(QO,{component:null,exit:!0,children:c})}))}),WCe=VCe;function GCe(e){return Gt("MuiButtonBase",e)}const qCe=Vt("MuiButtonBase",["root","disabled","focusVisible"]),KCe=qCe,YCe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],XCe=e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,a=pt({root:["root",t&&"disabled",r&&"focusVisible"]},GCe,o);return r&&n&&(a.root+=` ${n}`),a},QCe=We("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${KCe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ZCe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:c="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:f=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:w,onKeyUp:E,onMouseDown:I,onMouseLeave:O,onMouseUp:D,onTouchEnd:N,onTouchMove:U,onTouchStart:B,tabIndex:F=0,TouchRippleProps:T,touchRippleRef:P,type:_}=n,C=ze(n,YCe),S=A.useRef(null),x=A.useRef(null),k=Ur(x,P),{isFocusVisibleRef:L,onFocus:j,onBlur:z,ref:Y}=y2(),[K,Q]=A.useState(!1);l&&K&&Q(!1),A.useImperativeHandle(o,()=>({focusVisible:()=>{Q(!0),S.current.focus()}}),[]);const[q,J]=A.useState(!1);A.useEffect(()=>{J(!0)},[]);const G=q&&!u&&!l;A.useEffect(()=>{K&&d&&!u&&q&&x.current.pulsate()},[u,d,K,q]);function V(Oe,$e,et=f){return Mt(Ze=>($e&&$e(Ze),!et&&x.current&&x.current[Oe](Ze),!0))}const X=V("start",I),te=V("stop",m),ee=V("stop",v),re=V("stop",D),se=V("stop",Oe=>{K&&Oe.preventDefault(),O&&O(Oe)}),pe=V("start",B),ce=V("stop",N),ne=V("stop",U),he=V("stop",Oe=>{z(Oe),L.current===!1&&Q(!1),p&&p(Oe)},!1),oe=Mt(Oe=>{S.current||(S.current=Oe.currentTarget),j(Oe),L.current===!0&&(Q(!0),b&&b(Oe)),y&&y(Oe)}),le=()=>{const Oe=S.current;return c&&c!=="button"&&!(Oe.tagName==="A"&&Oe.href)},de=A.useRef(!1),ve=Mt(Oe=>{d&&!de.current&&K&&x.current&&Oe.key===" "&&(de.current=!0,x.current.stop(Oe,()=>{x.current.start(Oe)})),Oe.target===Oe.currentTarget&&le()&&Oe.key===" "&&Oe.preventDefault(),w&&w(Oe),Oe.target===Oe.currentTarget&&le()&&Oe.key==="Enter"&&!l&&(Oe.preventDefault(),g&&g(Oe))}),we=Mt(Oe=>{d&&Oe.key===" "&&x.current&&K&&!Oe.defaultPrevented&&(de.current=!1,x.current.stop(Oe,()=>{x.current.pulsate(Oe)})),E&&E(Oe),g&&Oe.target===Oe.currentTarget&&le()&&Oe.key===" "&&!Oe.defaultPrevented&&g(Oe)});let ie=c;ie==="button"&&(C.href||C.to)&&(ie=h);const ge={};ie==="button"?(ge.type=_===void 0?"button":_,ge.disabled=l):(!C.href&&!C.to&&(ge.role="button"),l&&(ge["aria-disabled"]=l));const Pe=Ur(r,Y,S),Fe=W({},n,{centerRipple:i,component:c,disabled:l,disableRipple:u,disableTouchRipple:f,focusRipple:d,tabIndex:F,focusVisible:K}),Ie=XCe(Fe);return xe(QCe,W({as:ie,className:it(Ie.root,s),ownerState:Fe,onBlur:he,onClick:g,onContextMenu:te,onFocus:oe,onKeyDown:ve,onKeyUp:we,onMouseDown:X,onMouseLeave:se,onMouseUp:re,onDragLeave:ee,onTouchEnd:ce,onTouchMove:ne,onTouchStart:pe,ref:Pe,tabIndex:l?-1:F,type:_},ge,C,{children:[a,G?R(WCe,W({ref:k,center:i},T)):null]}))}),au=ZCe;function JCe(e){return Gt("MuiIconButton",e)}const eSe=Vt("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),tSe=eSe,rSe=["edge","children","className","color","disabled","disableFocusRipple","size"],nSe=e=>{const{classes:t,disabled:r,color:n,edge:o,size:i}=e,a={root:["root",r&&"disabled",n!=="default"&&`color${ut(n)}`,o&&`edge${ut(o)}`,`size${ut(i)}`]};return pt(a,JCe,t)},oSe=We(au,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${ut(r.color)}`],r.edge&&t[`edge${ut(r.edge)}`],t[`size${ut(r.size)}`]]}})(({theme:e,ownerState:t})=>W({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var r;const n=(r=(e.vars||e).palette)==null?void 0:r[t.color];return W({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&W({color:n==null?void 0:n.main},!t.disableRipple&&{"&:hover":W({},n&&{backgroundColor:e.vars?`rgba(${n.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(n.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${tSe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),iSe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:c=!1,disableFocusRipple:l=!1,size:u="medium"}=n,f=ze(n,rSe),d=W({},n,{edge:o,color:s,disabled:c,disableFocusRipple:l,size:u}),h=nSe(d);return R(oSe,W({className:it(h.root,a),centerRipple:!0,focusRipple:!l,disabled:c,ref:r},f,{ownerState:d,children:i}))}),ri=iSe;function aSe(e){return Gt("MuiSvgIcon",e)}Vt("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const sSe=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],lSe=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${ut(t)}`,`fontSize${ut(r)}`]};return pt(o,aSe,n)},cSe=We("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ut(r.color)}`],t[`fontSize${ut(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,i,a,s,c,l,u,f,d,h,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((s=e.typography)==null||(c=s.pxToRem)==null?void 0:c.call(s,24))||"1.5rem",large:((l=e.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,35))||"2.1875rem"}[t.fontSize],color:(f=(d=(e.vars||e).palette)==null||(d=d[t.color])==null?void 0:d.main)!=null?f:{action:(h=(e.vars||e).palette)==null||(h=h.action)==null?void 0:h.active,disabled:(p=(e.vars||e).palette)==null||(p=p.action)==null?void 0:p.disabled,inherit:void 0}[t.color]}}),VX=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:c="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:f,viewBox:d="0 0 24 24"}=n,h=ze(n,sSe),p=A.isValidElement(o)&&o.type==="svg",g=W({},n,{color:a,component:s,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:d,hasSvgAsChild:p}),m={};u||(m.viewBox=d);const v=lSe(g);return xe(cSe,W({as:s,className:it(v.root,i),focusable:"false",color:l,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r},m,h,p&&o.props,{ownerState:g,children:[p?o.props.children:o,f?R("title",{children:f}):null]}))});VX.muiName="SvgIcon";const fR=VX;function Sr(e,t){function r(n,o){return R(fR,W({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return r.muiName=fR.muiName,A.memo(A.forwardRef(r))}const uSe={configure:e=>{tI.configure(e)}},dSe=Object.freeze(Object.defineProperty({__proto__:null,capitalize:ut,createChainedFunction:QM,createSvgIcon:Sr,debounce:ap,deprecatedPropType:sge,isMuiElement:iv,ownerDocument:In,ownerWindow:Gs,requirePropFactory:lge,setRef:Yw,unstable_ClassNameGenerator:uSe,unstable_useEnhancedEffect:en,unstable_useId:dn,unsupportedProp:dge,useControlled:sa,useEventCallback:Mt,useForkRef:Ur,useIsFocusVisible:y2},Symbol.toStringTag,{value:"Module"})),fSe=Sr(R("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),hSe=Sr(R("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),pSe=Sr(R("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),mSe=Sr(R("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");Sr(xe(A.Fragment,{children:[R("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),R("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");Sr(R("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");Sr(xe(A.Fragment,{children:[R("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),R("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const gSe=Sr(R("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function vSe(e){return Gt("MuiPickersArrowSwitcher",e)}Vt("MuiPickersArrowSwitcher",["root","spacer","button"]);const ySe=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],bSe=["ownerState"],wSe=["ownerState"],xSe=We("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),CSe=We("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),LB=We(ri,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>W({},e.hidden&&{visibility:"hidden"})),SSe=e=>{const{classes:t}=e;return pt({root:["root"],spacer:["spacer"],button:["button"]},vSe,t)},WX=A.forwardRef(function(t,r){var n,o,i,a;const c=An().direction==="rtl",l=Wt({props:t,name:"MuiPickersArrowSwitcher"}),{children:u,className:f,slots:d,slotProps:h,isNextDisabled:p,isNextHidden:g,onGoToNext:m,nextLabel:v,isPreviousDisabled:y,isPreviousHidden:b,onGoToPrevious:w,previousLabel:E}=l,I=ze(l,ySe),O=l,D=SSe(O),N={isDisabled:p,isHidden:g,goTo:m,label:v},U={isDisabled:y,isHidden:b,goTo:w,label:E},B=(n=d==null?void 0:d.previousIconButton)!=null?n:LB,F=Cr({elementType:B,externalSlotProps:h==null?void 0:h.previousIconButton,additionalProps:{size:"medium",title:U.label,"aria-label":U.label,disabled:U.isDisabled,edge:"end",onClick:U.goTo},ownerState:W({},O,{hidden:U.isHidden}),className:D.button}),T=(o=d==null?void 0:d.nextIconButton)!=null?o:LB,P=Cr({elementType:T,externalSlotProps:h==null?void 0:h.nextIconButton,additionalProps:{size:"medium",title:N.label,"aria-label":N.label,disabled:N.isDisabled,edge:"start",onClick:N.goTo},ownerState:W({},O,{hidden:N.isHidden}),className:D.button}),_=(i=d==null?void 0:d.leftArrowIcon)!=null?i:hSe,C=Cr({elementType:_,externalSlotProps:h==null?void 0:h.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),S=ze(C,bSe),x=(a=d==null?void 0:d.rightArrowIcon)!=null?a:pSe,k=Cr({elementType:x,externalSlotProps:h==null?void 0:h.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),L=ze(k,wSe);return xe(xSe,W({ref:r,className:it(D.root,f),ownerState:O},I,{children:[R(B,W({},F,{children:c?R(x,W({},L)):R(_,W({},S))})),u?R(jt,{variant:"subtitle1",component:"span",children:u}):R(CSe,{className:D.spacer,ownerState:O}),R(T,W({},P,{children:c?R(_,W({},S)):R(x,W({},L))}))]}))}),jy=(e,t)=>e.length!==t.length?!1:t.every(r=>e.includes(r)),_Se=({openTo:e,defaultOpenTo:t,views:r,defaultViews:n})=>{const o=r??n;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:o,openTo:i}},kSe=["hours","minutes","seconds"],ESe=e=>kSe.includes(e),$B=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),TSe=(e,t)=>(r,n)=>e?t.isAfter(r,n):$B(r,t)>$B(n,t);function GX({onChange:e,onViewChange:t,openTo:r,view:n,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){var c,l;const u=A.useRef(r),f=A.useRef(o),d=A.useRef(o.includes(r)?r:o[0]),[h,p]=sa({name:"useViews",state:"view",controlled:n,default:d.current}),g=A.useRef(i?h:null),[m,v]=sa({name:"useViews",state:"focusedView",controlled:a,default:g.current});A.useEffect(()=>{(u.current&&u.current!==r||f.current&&f.current.some(U=>!o.includes(U)))&&(p(o.includes(r)?r:o[0]),f.current=o,u.current=r)},[r,p,h,o]);const y=o.indexOf(h),b=(c=o[y-1])!=null?c:null,w=(l=o[y+1])!=null?l:null,E=Mt((U,B)=>{v(B?U:F=>U===F?null:F),s==null||s(U,B)}),I=Mt(U=>{U!==h&&(p(U),E(U,!0),t&&t(U))}),O=Mt(()=>{w&&I(w),E(w,!0)}),D=Mt((U,B,F)=>{const T=B==="finish",P=F?o.indexOf(F)<o.length-1:!!w;e(U,T&&P?"partial":B),T&&O()}),N=Mt((U,B,F)=>{e(U,B?"partial":"finish",F),B&&(I(B),E(B,!0))});return{view:h,setView:I,focusedView:m,setFocusedView:E,nextView:w,previousView:b,defaultView:o.includes(r)?r:o[0],goToNextView:O,setValueAndGoToNextView:D,setValueAndGoToView:N}}function qX(e,{disableFuture:t,maxDate:r,timezone:n}){const o=Hn();return A.useMemo(()=>{const i=o.dateWithTimezone(void 0,n),a=o.startOfMonth(t&&o.isBefore(i,r)?i:r);return!o.isAfter(a,e)},[t,r,e,o,n])}function KX(e,{disablePast:t,minDate:r,timezone:n}){const o=Hn();return A.useMemo(()=>{const i=o.dateWithTimezone(void 0,n),a=o.startOfMonth(t&&o.isAfter(i,r)?i:r);return!o.isBefore(a,e)},[t,r,e,o,n])}const ox=36,P2=2,AI=320,ISe=280,ZO=334,ASe=We("div")({overflow:"hidden",width:AI,maxHeight:ZO,display:"flex",flexDirection:"column",margin:"0 auto"}),ew=({date:e,disableFuture:t,disablePast:r,maxDate:n,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const c=a.startOfDay(a.dateWithTimezone(void 0,s));r&&a.isBefore(o,c)&&(o=c),t&&a.isAfter(n,c)&&(n=c);let l=e,u=e;for(a.isBefore(e,o)&&(l=o,u=null),a.isAfter(e,n)&&(u&&(u=n),l=null);l||u;){if(l&&a.isAfter(l,n)&&(l=null),u&&a.isBefore(u,o)&&(u=null),l){if(!i(l))return l;l=a.addDays(l,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},YX=(e,t)=>t==null||!e.isValid(t)?null:t,ca=(e,t,r)=>t==null||!e.isValid(t)?r:t,hR=(e,t,r)=>!e.isValid(t)&&t!=null&&!e.isValid(r)&&r!=null?!0:e.isEqual(t,r),JO=(e,t)=>{const n=[e.startOfYear(t)];for(;n.length<12;){const o=n[n.length-1];n.push(e.addMonths(o,1))}return n},pR=(e,t,r)=>{let n=t;return n=e.setHours(n,e.getHours(r)),n=e.setMinutes(n,e.getMinutes(r)),n=e.setSeconds(n,e.getSeconds(r)),n},Zk=(e,t,r)=>r==="date"?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),PSe=["year","month","day"],BB=e=>PSe.includes(e),eD=(e,{format:t,views:r},n)=>{if(t!=null)return t;const o=e.formats;return jy(r,["year"])?o.year:jy(r,["month"])?o.month:jy(r,["day"])?o.dayOfMonth:jy(r,["month","year"])?`${o.month} ${o.year}`:jy(r,["day","month"])?`${o.month} ${o.dayOfMonth}`:n?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},MSe=(e,t)=>{const r=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(n=>e.addDays(r,n))},tD=({timezone:e,value:t,defaultValue:r,onChange:n,valueManager:o})=>{var i,a;const s=Hn(),c=A.useRef(r),l=(i=t??c.current)!=null?i:o.emptyValue,u=A.useMemo(()=>o.getTimezone(s,l),[s,o,l]),f=Mt(g=>u==null?g:o.setTimezone(s,u,g)),d=(a=e??u)!=null?a:"default",h=A.useMemo(()=>o.setTimezone(s,d,l),[o,s,d,l]),p=Mt((g,...m)=>{const v=f(g);n==null||n(v,...m)});return{value:h,handleValueChange:p,timezone:d}},M2=({name:e,timezone:t,value:r,defaultValue:n,onChange:o,valueManager:i})=>{const[a,s]=sa({name:e,state:"value",controlled:r,default:n??i.emptyValue}),c=Mt((l,...u)=>{s(l),o==null||o(l,...u)});return tD({timezone:t,value:a,defaultValue:void 0,onChange:c,valueManager:i})},Ru={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},RSe=e=>Math.max(...e.map(t=>{var r;return(r=Ru[t.type])!=null?r:1})),Vy=(e,t,r)=>{if(t===Ru.year)return e.startOfYear(r);if(t===Ru.month)return e.startOfMonth(r);if(t===Ru.day)return e.startOfDay(r);let n=r;return t<Ru.minutes&&(n=e.setMinutes(n,0)),t<Ru.seconds&&(n=e.setSeconds(n,0)),t<Ru.milliseconds&&(n=e.setMilliseconds(n,0)),n},XX=({props:e,utils:t,granularity:r,timezone:n,getTodayDate:o})=>{var i;let a=o?o():Vy(t,r,Zk(t,n));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=Vy(t,r,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=Vy(t,r,e.maxDate));const s=TSe((i=e.disableIgnoringDatePartForTimeValidation)!=null?i:!1,t);return e.minTime!=null&&s(e.minTime,a)&&(a=Vy(t,r,e.disableIgnoringDatePartForTimeValidation?e.minTime:pR(t,a,e.minTime))),e.maxTime!=null&&s(a,e.maxTime)&&(a=Vy(t,r,e.disableIgnoringDatePartForTimeValidation?e.maxTime:pR(t,a,e.maxTime))),a},QX=(e,t)=>{const r=e.formatTokenMap[t];if(r==null)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
`));return typeof r=="string"?{type:r,contentType:r==="meridiem"?"letter":"digit",maxLength:void 0}:{type:r.sectionType,contentType:r.contentType,maxLength:r.maxLength}},OSe=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},PI=(e,t,r)=>{const n=[],o=e.dateWithTimezone(void 0,t),i=e.startOfWeek(o),a=e.endOfWeek(o);let s=i;for(;e.isBefore(s,a);)n.push(s),s=e.addDays(s,1);return n.map(c=>e.formatByString(c,r))},ZX=(e,t,r,n)=>{switch(r){case"month":return JO(e,e.dateWithTimezone(void 0,t)).map(o=>e.formatByString(o,n));case"weekDay":return PI(e,t,n);case"meridiem":{const o=e.dateWithTimezone(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,n))}default:return[]}},JX=(e,t,r)=>{let n=t;for(n=Number(n).toString();n.length<r;)n=`0${n}`;return n},eQ=(e,t,r,n,o)=>{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,r);return e.formatByString(a,o.format)}const i=r.toString();return o.hasLeadingZerosInInput?JX(e,i,o.maxLength):i},DSe=(e,t,r,n,o,i,a)=>{const s=OSe(n),c=n==="Home",l=n==="End",u=r.value===""||c||l,f=()=>{const h=o[r.type]({currentDate:i,format:r.format,contentType:r.contentType}),p=y=>eQ(e,t,y,h,r),g=r.type==="minutes"&&a!=null&&a.minutesStep?a.minutesStep:1;let v=parseInt(r.value,10)+s*g;if(u){if(r.type==="year"&&!l&&!c)return e.formatByString(e.dateWithTimezone(void 0,t),r.format);s>0||c?v=h.minimum:v=h.maximum}return v%g!==0&&((s<0||c)&&(v+=g-(g+v)%g),(s>0||l)&&(v-=v%g)),v>h.maximum?p(h.minimum+(v-h.maximum-1)%(h.maximum-h.minimum+1)):v<h.minimum?p(h.maximum-(h.minimum-v-1)%(h.maximum-h.minimum+1)):p(v)},d=()=>{const h=ZX(e,t,r.type,r.format);if(h.length===0)return r.value;if(u)return s>0||c?h[0]:h[h.length-1];const g=(h.indexOf(r.value)+h.length+s)%h.length;return h[g]};return r.contentType==="digit"||r.contentType==="digit-with-letter"?f():d()},rD=(e,t)=>{let r=e.value||e.placeholder;const n=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(r).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!n&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},Wg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),nD=(e,t)=>{let r=0,n=t?1:0;const o=[];for(let i=0;i<e.length;i+=1){const a=e[i],s=rD(a,t?"input-rtl":"input-ltr"),c=`${a.startSeparator}${s}${a.endSeparator}`,l=Wg(c).length,u=c.length,f=Wg(s),d=n+s.indexOf(f[0])+a.startSeparator.length,h=d+f.length;o.push(W({},a,{start:r,end:r+l,startInInput:d,endInInput:h})),r+=l,n+=u}return o},FSe=(e,t,r,n,o)=>{switch(n.type){case"year":return r.fieldYearPlaceholder({digitAmount:e.formatByString(e.dateWithTimezone(void 0,t),o).length,format:o});case"month":return r.fieldMonthPlaceholder({contentType:n.contentType,format:o});case"day":return r.fieldDayPlaceholder({format:o});case"weekDay":return r.fieldWeekDayPlaceholder({contentType:n.contentType,format:o});case"hours":return r.fieldHoursPlaceholder({format:o});case"minutes":return r.fieldMinutesPlaceholder({format:o});case"seconds":return r.fieldSecondsPlaceholder({format:o});case"meridiem":return r.fieldMeridiemPlaceholder({format:o});default:return o}},UB=(e,t,r,n)=>e.formatByString(e.parse(t,r),n),tQ=(e,t,r)=>e.formatByString(e.dateWithTimezone(void 0,t),r).length===4,rQ=(e,t,r,n,o)=>{if(r!=="digit")return!1;const i=e.dateWithTimezone(void 0,t);switch(n){case"year":return tQ(e,t,o)?e.formatByString(e.setYear(i,1),o)==="0001":e.formatByString(e.setYear(i,2001),o)==="01";case"month":return e.formatByString(e.startOfYear(i),o).length>1;case"day":return e.formatByString(e.startOfMonth(i),o).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),o).length>1;case"hours":return e.formatByString(e.setHours(i,1),o).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),o).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),o).length>1;default:throw new Error("Invalid section type")}},NSe=(e,t)=>{const r=[],{start:n,end:o}=e.escapedCharacters,i=new RegExp(`(\\${n}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)r.push({start:a.index,end:i.lastIndex-1});return r},HB=(e,t,r,n,o,i,a,s)=>{let c="";const l=[],u=e.date(),f=b=>{if(b==="")return null;const w=QX(e,b),E=rQ(e,t,w.contentType,w.type,b),I=a?E:w.contentType==="digit",O=o!=null&&e.isValid(o);let D=O?e.formatByString(o,b):"",N=null;if(I)if(E)N=D===""?e.formatByString(u,b).length:D.length;else{if(w.maxLength==null)throw new Error(`MUI: The token ${b} should have a 'maxDigitNumber' property on it's adapter`);N=w.maxLength,O&&(D=JX(e,D,N))}return l.push(W({},w,{format:b,maxLength:N,value:D,placeholder:FSe(e,t,r,w,b),hasLeadingZeros:E,hasLeadingZerosInFormat:E,hasLeadingZerosInInput:I,startSeparator:l.length===0?c:"",endSeparator:"",modified:!1})),null};let d=10,h=n,p=e.expandFormat(n);for(;p!==h;)if(h=p,p=e.expandFormat(h),d-=1,d<0)throw new Error("MUI: The format expansion seems to be  enter in an infinite loop. Please open an issue with the format passed to the picker component");const g=p,m=NSe(e,g),v=new RegExp(`^(${Object.keys(e.formatTokenMap).sort((b,w)=>w.length-b.length).join("|")})`,"g");let y="";for(let b=0;b<g.length;b+=1){const w=m.find(N=>N.start<=b&&N.end>=b),E=g[b],I=w!=null,O=`${y}${g.slice(b)}`,D=v.test(O);!I&&E.match(/([A-Za-z]+)/)&&D?(y=O.slice(0,v.lastIndex),b+=v.lastIndex-1):I&&(w==null?void 0:w.start)===b||(w==null?void 0:w.end)===b||(f(y),y="",l.length===0?c+=E:l[l.length-1].endSeparator+=E)}return f(y),l.map(b=>{const w=E=>{let I=E;return s&&I!==null&&I.includes(" ")&&(I=`⁩${I}⁦`),i==="spacious"&&["/",".","-"].includes(I)&&(I=` ${I} `),I};return b.startSeparator=w(b.startSeparator),b.endSeparator=w(b.endSeparator),b})},LSe=(e,t)=>{const r=t.some(s=>s.type==="day"),n=[],o=[];for(let s=0;s<t.length;s+=1){const c=t[s];r&&c.type==="weekDay"||(n.push(c.format),o.push(rD(c,"non-input")))}const i=n.join(" "),a=o.join(" ");return e.parse(a,i)},nQ=(e,t)=>{const n=e.map(o=>{const i=rD(o,t?"input-rtl":"input-ltr");return`${o.startSeparator}${i}${o.endSeparator}`}).join("");return t?`⁦${n}⁩`:n},$Se=(e,t)=>{const r=e.dateWithTimezone(void 0,t),n=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:i,longestMonth:a}=JO(e,r).reduce((s,c)=>{const l=e.getDaysInMonth(c);return l>s.maxDaysInMonth?{maxDaysInMonth:l,longestMonth:c}:s},{maxDaysInMonth:0,longestMonth:null});return{year:({format:s})=>({minimum:0,maximum:tQ(e,t,s)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(n)+1}),day:({currentDate:s})=>({minimum:1,maximum:s!=null&&e.isValid(s)?e.getDaysInMonth(s):i,longestMonth:a}),weekDay:({format:s,contentType:c})=>{if(c==="digit"){const l=PI(e,t,s).map(Number);return{minimum:Math.min(...l),maximum:Math.max(...l)}}return{minimum:1,maximum:7}},hours:({format:s})=>{const c=e.getHours(o);return e.formatByString(e.endOfDay(r),s)!==c.toString()?{minimum:1,maximum:Number(e.formatByString(e.startOfDay(r),s))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:0})}},BSe=(e,t,r,n,o)=>{switch(r.type){case"year":return e.setYear(o,e.getYear(n));case"month":return e.setMonth(o,e.getMonth(n));case"weekDay":{const i=PI(e,t,r.format),a=e.formatByString(n,r.format),s=i.indexOf(a),l=i.indexOf(r.value)-s;return e.addDays(n,l)}case"day":return e.setDate(o,e.getDate(n));case"meridiem":{const i=e.getHours(n)<12,a=e.getHours(o);return i&&a>=12?e.addHours(o,-12):!i&&a<12?e.addHours(o,12):o}case"hours":return e.setHours(o,e.getHours(n));case"minutes":return e.setMinutes(o,e.getMinutes(n));case"seconds":return e.setSeconds(o,e.getSeconds(n));default:return o}},zB={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},jB=(e,t,r,n,o,i)=>[...n].sort((a,s)=>zB[a.type]-zB[s.type]).reduce((a,s)=>!i||s.modified?BSe(e,t,s,r,a):a,o),USe=()=>navigator.userAgent.toLowerCase().indexOf("android")>-1,HSe=(e,t)=>{const r={};if(!t)return e.forEach((c,l)=>{const u=l===0?null:l-1,f=l===e.length-1?null:l+1;r[l]={leftIndex:u,rightIndex:f}}),{neighbors:r,startIndex:0,endIndex:e.length-1};const n={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((c,l)=>{var u;return l>=i&&((u=c.endSeparator)==null?void 0:u.includes(" "))&&c.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let c=a;c>=i;c-=1)o[c]=s,n[s]=c,s-=1;i=a+1}return e.forEach((c,l)=>{const u=o[l],f=u===0?null:n[u-1],d=u===e.length-1?null:n[u+1];r[l]={leftIndex:f,rightIndex:d}}),{neighbors:r,startIndex:n[0],endIndex:n[e.length-1]}},zSe=["value","referenceDate"],lf={emptyValue:null,getTodayValue:Zk,getInitialReferenceValue:e=>{let{value:t,referenceDate:r}=e,n=ze(e,zSe);return t!=null&&n.utils.isValid(t)?t:r??XX(n)},cleanValue:YX,areValuesEqual:hR,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,r)=>r==null?null:e.setTimezone(r,t)},jSe={updateReferenceValue:(e,t,r)=>t==null||!e.isValid(t)?r:t,getSectionsFromValue:(e,t,r,n,o)=>!e.isValid(t)&&!!r?r:nD(o(t),n),getValueStrFromSections:nQ,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:r=>r,getNewValuesFromNewActiveDate:r=>({value:r,referenceValue:r==null||!e.isValid(r)?t.referenceValue:r})}),parseValueStr:(e,t,r)=>r(e.trim(),t)},R2=e=>{if(e!==void 0)return Object.keys(e).reduce((t,r)=>W({},t,{[`${r.slice(0,1).toLowerCase()}${r.slice(1)}`]:e[r]}),{})},VSe=A.createContext({}),eu=VSe;function WSe(e){return Gt("MuiDivider",e)}const VB=Vt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),GSe=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],qSe=e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:s,variant:c}=e;return pt({root:["root",t&&"absolute",c,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",r&&"withChildren",r&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},WSe,n)},KSe=We("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>W({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Vr(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>W({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>W({},t.children&&t.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}}),({theme:e,ownerState:t})=>W({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}}),({ownerState:e})=>W({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),YSe=We("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>W({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),oQ=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,component:s=i?"div":"hr",flexItem:c=!1,light:l=!1,orientation:u="horizontal",role:f=s!=="hr"?"separator":void 0,textAlign:d="center",variant:h="fullWidth"}=n,p=ze(n,GSe),g=W({},n,{absolute:o,component:s,flexItem:c,light:l,orientation:u,role:f,textAlign:d,variant:h}),m=qSe(g);return R(KSe,W({as:s,className:it(m.root,a),role:f,ref:r,ownerState:g},p,{children:i?R(YSe,{className:m.wrapper,ownerState:g,children:i}):null}))});oQ.muiSkipListHighlight=!0;const yo=oQ;function XSe(e){return Gt("MuiListItemIcon",e)}const QSe=Vt("MuiListItemIcon",["root","alignItemsFlexStart"]),WB=QSe,ZSe=["className"],JSe=e=>{const{alignItems:t,classes:r}=e;return pt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},XSe,r)},e_e=We("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>W({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},t.alignItems==="flex-start"&&{marginTop:8})),t_e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiListItemIcon"}),{className:o}=n,i=ze(n,ZSe),a=A.useContext(eu),s=W({},n,{alignItems:a.alignItems}),c=JSe(s);return R(e_e,W({className:it(c.root,o),ownerState:s,ref:r},i))}),gl=t_e;function r_e(e){return Gt("MuiListItemText",e)}const n_e=Vt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Jk=n_e,o_e=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],i_e=e=>{const{classes:t,inset:r,primary:n,secondary:o,dense:i}=e;return pt({root:["root",r&&"inset",i&&"dense",n&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},r_e,t)},a_e=We("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Jk.primary}`]:t.primary},{[`& .${Jk.secondary}`]:t.secondary},t.root,r.inset&&t.inset,r.primary&&r.secondary&&t.multiline,r.dense&&t.dense]}})(({ownerState:e})=>W({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),s_e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:c,primaryTypographyProps:l,secondary:u,secondaryTypographyProps:f}=n,d=ze(n,o_e),{dense:h}=A.useContext(eu);let p=c??o,g=u;const m=W({},n,{disableTypography:a,inset:s,primary:!!p,secondary:!!g,dense:h}),v=i_e(m);return p!=null&&p.type!==jt&&!a&&(p=R(jt,W({variant:h?"body2":"body1",className:v.primary,component:l!=null&&l.variant?void 0:"span",display:"block"},l,{children:p}))),g!=null&&g.type!==jt&&!a&&(g=R(jt,W({variant:"body2",className:v.secondary,color:"text.secondary",display:"block"},f,{children:g}))),xe(a_e,W({className:it(v.root,i),ownerState:m,ref:r},d,{children:[p,g]}))}),ps=s_e;function l_e(e){return Gt("MuiMenuItem",e)}const c_e=Vt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Wy=c_e,u_e=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],d_e=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]},f_e=e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:a}=e,c=pt({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},l_e,a);return W({},a,c)},h_e=We(au,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:d_e})(({theme:e,ownerState:t})=>W({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Wy.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Wy.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Wy.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Wy.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Wy.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${VB.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${VB.inset}`]:{marginLeft:52},[`& .${Jk.root}`]:{marginTop:0,marginBottom:0},[`& .${Jk.inset}`]:{paddingLeft:36},[`& .${WB.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&W({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${WB.root} svg`]:{fontSize:"1.25rem"}}))),p_e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:c=!1,focusVisibleClassName:l,role:u="menuitem",tabIndex:f,className:d}=n,h=ze(n,u_e),p=A.useContext(eu),g=A.useMemo(()=>({dense:a||p.dense||!1,disableGutters:c}),[p.dense,a,c]),m=A.useRef(null);en(()=>{o&&m.current&&m.current.focus()},[o]);const v=W({},n,{dense:g.dense,divider:s,disableGutters:c}),y=f_e(n),b=Ur(m,r);let w;return n.disabled||(w=f!==void 0?f:-1),R(eu.Provider,{value:g,children:R(h_e,W({ref:b,role:u,tabIndex:w,component:i,focusVisibleClassName:it(y.focusVisible,l),className:it(y.root,d)},h,{ownerState:v,classes:y}))})}),go=p_e;function m_e(e){return Gt("MuiList",e)}Vt("MuiList",["root","padding","dense","subheader"]);const g_e=["children","className","component","dense","disablePadding","subheader"],v_e=e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e;return pt({root:["root",!r&&"padding",n&&"dense",o&&"subheader"]},m_e,t)},y_e=We("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})(({ownerState:e})=>W({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),b_e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:c=!1,subheader:l}=n,u=ze(n,g_e),f=A.useMemo(()=>({dense:s}),[s]),d=W({},n,{component:a,dense:s,disablePadding:c}),h=v_e(d);return R(eu.Provider,{value:f,children:xe(y_e,W({as:a,className:it(h.root,i),ref:r,ownerState:d},u,{children:[l,o]}))})}),z1=b_e,w_e=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function MA(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function GB(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function iQ(e,t){if(t===void 0)return!0;let r=e.innerText;return r===void 0&&(r=e.textContent),r=r.trim().toLowerCase(),r.length===0?!1:t.repeating?r[0]===t.keys[0]:r.indexOf(t.keys.join(""))===0}function Gy(e,t,r,n,o,i){let a=!1,s=o(e,t,t?r:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const c=n?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!iQ(s,i)||c)s=o(e,s,r);else return s.focus(),!0}return!1}const x_e=A.forwardRef(function(t,r){const{actions:n,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:c=!1,disableListWrap:l=!1,onKeyDown:u,variant:f="selectedMenu"}=t,d=ze(t,w_e),h=A.useRef(null),p=A.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});en(()=>{o&&h.current.focus()},[o]),A.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(b,{direction:w})=>{const E=!h.current.style.width;if(b.clientHeight<h.current.clientHeight&&E){const I=`${MY(In(b))}px`;h.current.style[w==="rtl"?"paddingLeft":"paddingRight"]=I,h.current.style.width=`calc(100% + ${I})`}return h.current}}),[]);const g=b=>{const w=h.current,E=b.key,I=In(w).activeElement;if(E==="ArrowDown")b.preventDefault(),Gy(w,I,l,c,MA);else if(E==="ArrowUp")b.preventDefault(),Gy(w,I,l,c,GB);else if(E==="Home")b.preventDefault(),Gy(w,null,l,c,MA);else if(E==="End")b.preventDefault(),Gy(w,null,l,c,GB);else if(E.length===1){const O=p.current,D=E.toLowerCase(),N=performance.now();O.keys.length>0&&(N-O.lastTime>500?(O.keys=[],O.repeating=!0,O.previousKeyMatched=!0):O.repeating&&D!==O.keys[0]&&(O.repeating=!1)),O.lastTime=N,O.keys.push(D);const U=I&&!O.repeating&&iQ(I,O);O.previousKeyMatched&&(U||Gy(w,I,!1,c,MA,O))?b.preventDefault():O.previousKeyMatched=!1}u&&u(b)},m=Ur(h,r);let v=-1;A.Children.forEach(a,(b,w)=>{if(!A.isValidElement(b)){v===w&&(v+=1,v>=a.length&&(v=-1));return}b.props.disabled||(f==="selectedMenu"&&b.props.selected||v===-1)&&(v=w),v===w&&(b.props.disabled||b.props.muiSkipListHighlight||b.type.muiSkipListHighlight)&&(v+=1,v>=a.length&&(v=-1))});const y=A.Children.map(a,(b,w)=>{if(w===v){const E={};return i&&(E.autoFocus=!0),b.props.tabIndex===void 0&&f==="selectedMenu"&&(E.tabIndex=0),A.cloneElement(b,E)}return b});return R(z1,W({role:"menu",ref:m,className:s,onKeyDown:g,tabIndex:o?0:-1},d,{children:y}))}),j1=x_e;function C_e(e){return Gt("MuiPickersDay",e)}const kp=Vt("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),S_e=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],__e=e=>{const{selected:t,disableMargin:r,disableHighlightToday:n,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:c}=e,l=a&&!s;return pt({root:["root",t&&!l&&"selected",i&&"disabled",!r&&"dayWithMargin",!n&&o&&"today",a&&s&&"dayOutsideMonth",l&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},C_e,c)},aQ=({theme:e,ownerState:t})=>W({},e.typography.caption,{width:ox,height:ox,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:to(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:to(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${kp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${kp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${kp.disabled}:not(.${kp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${kp.disabled}&.${kp.selected}`]:{opacity:.6}},!t.disableMargin&&{margin:`0 ${P2}px`},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:(e.vars||e).palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${kp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}),sQ=(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableMargin&&t.dayWithMargin,!r.disableHighlightToday&&r.today&&t.today,!r.outsideCurrentMonth&&r.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,r.outsideCurrentMonth&&!r.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},k_e=We(au,{name:"MuiPickersDay",slot:"Root",overridesResolver:sQ})(aQ),E_e=We("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:sQ})(({theme:e,ownerState:t})=>W({},aQ({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"})),qy=()=>{},T_e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:c=!1,disableMargin:l=!1,isAnimating:u,onClick:f,onDaySelect:d,onFocus:h=qy,onBlur:p=qy,onKeyDown:g=qy,onMouseDown:m=qy,onMouseEnter:v=qy,outsideCurrentMonth:y,selected:b=!1,showDaysOutsideCurrentMonth:w=!1,children:E,today:I=!1}=n,O=ze(n,S_e),D=W({},n,{autoFocus:o,disabled:s,disableHighlightToday:c,disableMargin:l,selected:b,showDaysOutsideCurrentMonth:w,today:I}),N=__e(D),U=Hn(),B=A.useRef(null),F=Ur(B,r);en(()=>{o&&!s&&!u&&!y&&B.current.focus()},[o,s,u,y]);const T=_=>{m(_),y&&_.preventDefault()},P=_=>{s||d(a),y&&_.currentTarget.focus(),f&&f(_)};return y&&!w?R(E_e,{className:it(N.root,N.hiddenDaySpacingFiller,i),ownerState:D,role:O.role}):R(k_e,W({className:it(N.root,i),ref:F,centerRipple:!0,disabled:s,tabIndex:b?0:-1,onKeyDown:_=>g(_,a),onFocus:_=>h(_,a),onBlur:_=>p(_,a),onMouseEnter:_=>v(_,a),onClick:P,onMouseDown:T},O,{ownerState:D,children:E||U.format(a,"dayOfMonth")}))}),lQ=A.memo(T_e);function I_e(e){const{badgeContent:t,invisible:r=!1,max:n=99,showZero:o=!1}=e,i=vO({badgeContent:t,max:n});let a=r;r===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:c=n}=a?i:e,l=s&&Number(s)>c?`${c}+`:s;return{badgeContent:s,invisible:a,max:c,displayValue:l}}const cQ="base";function A_e(e){return`${cQ}--${e}`}function P_e(e,t){return`${cQ}-${e}-${t}`}function uQ(e,t){const r=OY[t];return r?A_e(r):P_e(e,t)}function M_e(e,t){const r={};return t.forEach(n=>{r[n]=uQ(e,n)}),r}function qB(e){return e.substring(2).toLowerCase()}function R_e(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function oD(e){const{children:t,disableReactTree:r=!1,mouseEvent:n="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=A.useRef(!1),s=A.useRef(null),c=A.useRef(!1),l=A.useRef(!1);A.useEffect(()=>(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const u=Ur(t.ref,s),f=Mt(p=>{const g=l.current;l.current=!1;const m=In(s.current);if(!c.current||!s.current||"clientX"in p&&R_e(p,m))return;if(a.current){a.current=!1;return}let v;p.composedPath?v=p.composedPath().indexOf(s.current)>-1:v=!m.documentElement.contains(p.target)||s.current.contains(p.target),!v&&(r||!g)&&o(p)}),d=p=>g=>{l.current=!0;const m=t.props[p];m&&m(g)},h={ref:u};return i!==!1&&(h[i]=d(i)),A.useEffect(()=>{if(i!==!1){const p=qB(i),g=In(s.current),m=()=>{a.current=!0};return g.addEventListener(p,f),g.addEventListener("touchmove",m),()=>{g.removeEventListener(p,f),g.removeEventListener("touchmove",m)}}},[f,i]),n!==!1&&(h[n]=d(n)),A.useEffect(()=>{if(n!==!1){const p=qB(n),g=In(s.current);return g.addEventListener(p,f),()=>{g.removeEventListener(p,f)}}},[f,n]),R(A.Fragment,{children:A.cloneElement(t,h)})}const O_e=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function D_e(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function F_e(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}function N_e(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||F_e(e))}function L_e(e){const t=[],r=[];return Array.from(e.querySelectorAll(O_e)).forEach((n,o)=>{const i=D_e(n);i===-1||!N_e(n)||(i===0?t.push(n):r.push({documentOrder:o,tabIndex:i,node:n}))}),r.sort((n,o)=>n.tabIndex===o.tabIndex?n.documentOrder-o.documentOrder:n.tabIndex-o.tabIndex).map(n=>n.node).concat(t)}function $_e(){return!0}function iD(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=L_e,isEnabled:a=$_e,open:s}=e,c=A.useRef(!1),l=A.useRef(null),u=A.useRef(null),f=A.useRef(null),d=A.useRef(null),h=A.useRef(!1),p=A.useRef(null),g=Ur(t.ref,p),m=A.useRef(null);A.useEffect(()=>{!s||!p.current||(h.current=!r)},[r,s]),A.useEffect(()=>{if(!s||!p.current)return;const b=In(p.current);return p.current.contains(b.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex","-1"),h.current&&p.current.focus()),()=>{o||(f.current&&f.current.focus&&(c.current=!0,f.current.focus()),f.current=null)}},[s]),A.useEffect(()=>{if(!s||!p.current)return;const b=In(p.current),w=O=>{m.current=O,!(n||!a()||O.key!=="Tab")&&b.activeElement===p.current&&O.shiftKey&&(c.current=!0,u.current&&u.current.focus())},E=()=>{const O=p.current;if(O===null)return;if(!b.hasFocus()||!a()||c.current){c.current=!1;return}if(O.contains(b.activeElement)||n&&b.activeElement!==l.current&&b.activeElement!==u.current)return;if(b.activeElement!==d.current)d.current=null;else if(d.current!==null)return;if(!h.current)return;let D=[];if((b.activeElement===l.current||b.activeElement===u.current)&&(D=i(p.current)),D.length>0){var N,U;const B=!!((N=m.current)!=null&&N.shiftKey&&((U=m.current)==null?void 0:U.key)==="Tab"),F=D[0],T=D[D.length-1];typeof F!="string"&&typeof T!="string"&&(B?T.focus():F.focus())}else O.focus()};b.addEventListener("focusin",E),b.addEventListener("keydown",w,!0);const I=setInterval(()=>{b.activeElement&&b.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(I),b.removeEventListener("focusin",E),b.removeEventListener("keydown",w,!0)}},[r,n,o,a,s,i]);const v=b=>{f.current===null&&(f.current=b.relatedTarget),h.current=!0,d.current=b.target;const w=t.props.onFocus;w&&w(b)},y=b=>{f.current===null&&(f.current=b.relatedTarget),h.current=!0};return xe(A.Fragment,{children:[R("div",{tabIndex:s?0:-1,onFocus:y,ref:l,"data-testid":"sentinelStart"}),A.cloneElement(t,{ref:g,onFocus:v}),R("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}function B_e(e){return typeof e=="function"?e():e}const dQ=A.forwardRef(function(t,r){const{children:n,container:o,disablePortal:i=!1}=t,[a,s]=A.useState(null),c=Ur(A.isValidElement(n)?n.ref:null,r);if(en(()=>{i||s(B_e(o)||document.body)},[o,i]),en(()=>{if(a&&!i)return Yw(r,a),()=>{Yw(r,null)}},[r,a,i]),i){if(A.isValidElement(n)){const l={ref:c};return A.cloneElement(n,l)}return R(A.Fragment,{children:n})}return R(A.Fragment,{children:a&&ip.createPortal(n,a)})});function U_e(e){const t=In(e);return t.body===e?Gs(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function tw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function KB(e){return parseInt(Gs(e).getComputedStyle(e).paddingRight,10)||0}function H_e(e){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return r||n}function YB(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,a=>{const s=i.indexOf(a)===-1,c=!H_e(a);s&&c&&tw(a,o)})}function RA(e,t){let r=-1;return e.some((n,o)=>t(n)?(r=o,!0):!1),r}function z_e(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(U_e(n)){const a=MY(In(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${KB(n)+a}px`;const s=In(n).querySelectorAll(".mui-fixed");[].forEach.call(s,c=>{r.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${KB(c)+a}px`})}let i;if(n.parentNode instanceof DocumentFragment)i=In(n).body;else{const a=n.parentElement,s=Gs(n);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:n}r.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{r.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function j_e(e){const t=[];return[].forEach.call(e.children,r=>{r.getAttribute("aria-hidden")==="true"&&t.push(r)}),t}class V_e{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,r){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&tw(t.modalRef,!1);const o=j_e(r);YB(r,t.mount,t.modalRef,o,!0);const i=RA(this.containers,a=>a.container===r);return i!==-1?(this.containers[i].modals.push(t),n):(this.containers.push({modals:[t],container:r,restore:null,hiddenSiblings:o}),n)}mount(t,r){const n=RA(this.containers,i=>i.modals.indexOf(t)!==-1),o=this.containers[n];o.restore||(o.restore=z_e(o,r))}remove(t,r=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const o=RA(this.containers,a=>a.modals.indexOf(t)!==-1),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&tw(t.modalRef,r),YB(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&tw(a.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function W_e(e){return typeof e=="function"?e():e}function G_e(e){return e?e.props.hasOwnProperty("in"):!1}const q_e=new V_e;function K_e(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:o=q_e,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:c,onClose:l,open:u,rootRef:f}=e,d=A.useRef({}),h=A.useRef(null),p=A.useRef(null),g=Ur(p,f),[m,v]=A.useState(!u),y=G_e(c);let b=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(b=!1);const w=()=>In(h.current),E=()=>(d.current.modalRef=p.current,d.current.mount=h.current,d.current),I=()=>{o.mount(E(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},O=Mt(()=>{const C=W_e(t)||w().body;o.add(E(),C),p.current&&I()}),D=A.useCallback(()=>o.isTopModal(E()),[o]),N=Mt(C=>{h.current=C,C&&(u&&D()?I():p.current&&tw(p.current,b))}),U=A.useCallback(()=>{o.remove(E(),b)},[b,o]);A.useEffect(()=>()=>{U()},[U]),A.useEffect(()=>{u?O():(!y||!i)&&U()},[u,U,y,i,O]);const B=C=>S=>{var x;(x=C.onKeyDown)==null||x.call(C,S),!(S.key!=="Escape"||S.which===229||!D())&&(r||(S.stopPropagation(),l&&l(S,"escapeKeyDown")))},F=C=>S=>{var x;(x=C.onClick)==null||x.call(C,S),S.target===S.currentTarget&&l&&l(S,"backdropClick")};return{getRootProps:(C={})=>{const S=Jb(e);delete S.onTransitionEnter,delete S.onTransitionExited;const x=W({},S,C);return W({role:"presentation"},x,{onKeyDown:B(x),ref:g})},getBackdropProps:(C={})=>{const S=C;return W({"aria-hidden":!0},S,{onClick:F(S),open:u})},getTransitionProps:()=>{const C=()=>{v(!1),a&&a()},S=()=>{v(!0),s&&s(),i&&U()};return{onEnter:QM(C,c==null?void 0:c.props.onEnter),onExited:QM(S,c==null?void 0:c.props.onExited)}},rootRef:g,portalRef:N,isTopModal:D,exited:m,hasTransition:y}}function fQ(e){const{children:t,defer:r=!1,fallback:n=null}=e,[o,i]=A.useState(!1);return en(()=>{r||i(!0)},[r]),A.useEffect(()=>{r&&i(!0)},[r]),R(A.Fragment,{children:o?t:n})}var js="top",hc="bottom",pc="right",Vs="left",aD="auto",O2=[js,hc,pc,Vs],r1="start",ix="end",Y_e="clippingParents",hQ="viewport",Ky="popper",X_e="reference",XB=O2.reduce(function(e,t){return e.concat([t+"-"+r1,t+"-"+ix])},[]),pQ=[].concat(O2,[aD]).reduce(function(e,t){return e.concat([t,t+"-"+r1,t+"-"+ix])},[]),Q_e="beforeRead",Z_e="read",J_e="afterRead",eke="beforeMain",tke="main",rke="afterMain",nke="beforeWrite",oke="write",ike="afterWrite",ake=[Q_e,Z_e,J_e,eke,tke,rke,nke,oke,ike];function rd(e){return e?(e.nodeName||"").toLowerCase():null}function xl(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $m(e){var t=xl(e).Element;return e instanceof t||e instanceof Element}function lc(e){var t=xl(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function sD(e){if(typeof ShadowRoot>"u")return!1;var t=xl(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ske(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},o=t.attributes[r]||{},i=t.elements[r];!lc(i)||!rd(i)||(Object.assign(i.style,n),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function lke(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var o=t.elements[n],i=t.attributes[n]||{},a=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=a.reduce(function(c,l){return c[l]="",c},{});!lc(o)||!rd(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(c){o.removeAttribute(c)}))})}}const cke={name:"applyStyles",enabled:!0,phase:"write",fn:ske,effect:lke,requires:["computeStyles"]};function Yu(e){return e.split("-")[0]}var wm=Math.max,eE=Math.min,n1=Math.round;function mR(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function mQ(){return!/^((?!chrome|android).)*safari/i.test(mR())}function o1(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&lc(e)&&(o=e.offsetWidth>0&&n1(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&n1(n.height)/e.offsetHeight||1);var a=$m(e)?xl(e):window,s=a.visualViewport,c=!mQ()&&r,l=(n.left+(c&&s?s.offsetLeft:0))/o,u=(n.top+(c&&s?s.offsetTop:0))/i,f=n.width/o,d=n.height/i;return{width:f,height:d,top:u,right:l+f,bottom:u+d,left:l,x:l,y:u}}function lD(e){var t=o1(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function gQ(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&sD(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function cf(e){return xl(e).getComputedStyle(e)}function uke(e){return["table","td","th"].indexOf(rd(e))>=0}function up(e){return(($m(e)?e.ownerDocument:e.document)||window.document).documentElement}function MI(e){return rd(e)==="html"?e:e.assignedSlot||e.parentNode||(sD(e)?e.host:null)||up(e)}function QB(e){return!lc(e)||cf(e).position==="fixed"?null:e.offsetParent}function dke(e){var t=/firefox/i.test(mR()),r=/Trident/i.test(mR());if(r&&lc(e)){var n=cf(e);if(n.position==="fixed")return null}var o=MI(e);for(sD(o)&&(o=o.host);lc(o)&&["html","body"].indexOf(rd(o))<0;){var i=cf(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function D2(e){for(var t=xl(e),r=QB(e);r&&uke(r)&&cf(r).position==="static";)r=QB(r);return r&&(rd(r)==="html"||rd(r)==="body"&&cf(r).position==="static")?t:r||dke(e)||t}function cD(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rw(e,t,r){return wm(e,eE(t,r))}function fke(e,t,r){var n=rw(e,t,r);return n>r?r:n}function vQ(){return{top:0,right:0,bottom:0,left:0}}function yQ(e){return Object.assign({},vQ(),e)}function bQ(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var hke=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,yQ(typeof t!="number"?t:bQ(t,O2))};function pke(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Yu(r.placement),c=cD(s),l=[Vs,pc].indexOf(s)>=0,u=l?"height":"width";if(!(!i||!a)){var f=hke(o.padding,r),d=lD(i),h=c==="y"?js:Vs,p=c==="y"?hc:pc,g=r.rects.reference[u]+r.rects.reference[c]-a[c]-r.rects.popper[u],m=a[c]-r.rects.reference[c],v=D2(i),y=v?c==="y"?v.clientHeight||0:v.clientWidth||0:0,b=g/2-m/2,w=f[h],E=y-d[u]-f[p],I=y/2-d[u]/2+b,O=rw(w,I,E),D=c;r.modifiersData[n]=(t={},t[D]=O,t.centerOffset=O-I,t)}}function mke(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||gQ(t.elements.popper,o)&&(t.elements.arrow=o))}const gke={name:"arrow",enabled:!0,phase:"main",fn:pke,effect:mke,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function i1(e){return e.split("-")[1]}var vke={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yke(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:n1(r*o)/o||0,y:n1(n*o)/o||0}}function ZB(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=a.x,h=d===void 0?0:d,p=a.y,g=p===void 0?0:p,m=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=Vs,w=js,E=window;if(l){var I=D2(r),O="clientHeight",D="clientWidth";if(I===xl(r)&&(I=up(r),cf(I).position!=="static"&&s==="absolute"&&(O="scrollHeight",D="scrollWidth")),I=I,o===js||(o===Vs||o===pc)&&i===ix){w=hc;var N=f&&I===E&&E.visualViewport?E.visualViewport.height:I[O];g-=N-n.height,g*=c?1:-1}if(o===Vs||(o===js||o===hc)&&i===ix){b=pc;var U=f&&I===E&&E.visualViewport?E.visualViewport.width:I[D];h-=U-n.width,h*=c?1:-1}}var B=Object.assign({position:s},l&&vke),F=u===!0?yke({x:h,y:g},xl(r)):{x:h,y:g};if(h=F.x,g=F.y,c){var T;return Object.assign({},B,(T={},T[w]=y?"0":"",T[b]=v?"0":"",T.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",T))}return Object.assign({},B,(t={},t[w]=y?g+"px":"",t[b]=v?h+"px":"",t.transform="",t))}function bke(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=n===void 0?!0:n,i=r.adaptive,a=i===void 0?!0:i,s=r.roundOffsets,c=s===void 0?!0:s,l={placement:Yu(t.placement),variation:i1(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ZB(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ZB(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const wke={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:bke,data:{}};var LS={passive:!0};function xke(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=o===void 0?!0:o,a=n.resize,s=a===void 0?!0:a,c=xl(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&l.forEach(function(u){u.addEventListener("scroll",r.update,LS)}),s&&c.addEventListener("resize",r.update,LS),function(){i&&l.forEach(function(u){u.removeEventListener("scroll",r.update,LS)}),s&&c.removeEventListener("resize",r.update,LS)}}const Cke={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:xke,data:{}};var Ske={left:"right",right:"left",bottom:"top",top:"bottom"};function ek(e){return e.replace(/left|right|bottom|top/g,function(t){return Ske[t]})}var _ke={start:"end",end:"start"};function JB(e){return e.replace(/start|end/g,function(t){return _ke[t]})}function uD(e){var t=xl(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function dD(e){return o1(up(e)).left+uD(e).scrollLeft}function kke(e,t){var r=xl(e),n=up(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var l=mQ();(l||!l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+dD(e),y:c}}function Eke(e){var t,r=up(e),n=uD(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=wm(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=wm(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+dD(e),c=-n.scrollTop;return cf(o||r).direction==="rtl"&&(s+=wm(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}function fD(e){var t=cf(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function wQ(e){return["html","body","#document"].indexOf(rd(e))>=0?e.ownerDocument.body:lc(e)&&fD(e)?e:wQ(MI(e))}function nw(e,t){var r;t===void 0&&(t=[]);var n=wQ(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=xl(n),a=o?[i].concat(i.visualViewport||[],fD(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(nw(MI(a)))}function gR(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Tke(e,t){var r=o1(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function eU(e,t,r){return t===hQ?gR(kke(e,r)):$m(t)?Tke(t,r):gR(Eke(up(e)))}function Ike(e){var t=nw(MI(e)),r=["absolute","fixed"].indexOf(cf(e).position)>=0,n=r&&lc(e)?D2(e):e;return $m(n)?t.filter(function(o){return $m(o)&&gQ(o,n)&&rd(o)!=="body"}):[]}function Ake(e,t,r,n){var o=t==="clippingParents"?Ike(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(c,l){var u=eU(e,l,n);return c.top=wm(u.top,c.top),c.right=eE(u.right,c.right),c.bottom=eE(u.bottom,c.bottom),c.left=wm(u.left,c.left),c},eU(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function xQ(e){var t=e.reference,r=e.element,n=e.placement,o=n?Yu(n):null,i=n?i1(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(o){case js:c={x:a,y:t.y-r.height};break;case hc:c={x:a,y:t.y+t.height};break;case pc:c={x:t.x+t.width,y:s};break;case Vs:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var l=o?cD(o):null;if(l!=null){var u=l==="y"?"height":"width";switch(i){case r1:c[l]=c[l]-(t[u]/2-r[u]/2);break;case ix:c[l]=c[l]+(t[u]/2-r[u]/2);break}}return c}function ax(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,i=r.strategy,a=i===void 0?e.strategy:i,s=r.boundary,c=s===void 0?Y_e:s,l=r.rootBoundary,u=l===void 0?hQ:l,f=r.elementContext,d=f===void 0?Ky:f,h=r.altBoundary,p=h===void 0?!1:h,g=r.padding,m=g===void 0?0:g,v=yQ(typeof m!="number"?m:bQ(m,O2)),y=d===Ky?X_e:Ky,b=e.rects.popper,w=e.elements[p?y:d],E=Ake($m(w)?w:w.contextElement||up(e.elements.popper),c,u,a),I=o1(e.elements.reference),O=xQ({reference:I,element:b,strategy:"absolute",placement:o}),D=gR(Object.assign({},b,O)),N=d===Ky?D:I,U={top:E.top-N.top+v.top,bottom:N.bottom-E.bottom+v.bottom,left:E.left-N.left+v.left,right:N.right-E.right+v.right},B=e.modifiersData.offset;if(d===Ky&&B){var F=B[o];Object.keys(U).forEach(function(T){var P=[pc,hc].indexOf(T)>=0?1:-1,_=[js,hc].indexOf(T)>=0?"y":"x";U[T]+=F[_]*P})}return U}function Pke(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,l=c===void 0?pQ:c,u=i1(n),f=u?s?XB:XB.filter(function(p){return i1(p)===u}):O2,d=f.filter(function(p){return l.indexOf(p)>=0});d.length===0&&(d=f);var h=d.reduce(function(p,g){return p[g]=ax(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[Yu(g)],p},{});return Object.keys(h).sort(function(p,g){return h[p]-h[g]})}function Mke(e){if(Yu(e)===aD)return[];var t=ek(e);return[JB(e),t,JB(t)]}function Rke(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,l=r.padding,u=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,p=h===void 0?!0:h,g=r.allowedAutoPlacements,m=t.options.placement,v=Yu(m),y=v===m,b=c||(y||!p?[ek(m)]:Mke(m)),w=[m].concat(b).reduce(function(K,Q){return K.concat(Yu(Q)===aD?Pke(t,{placement:Q,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:g}):Q)},[]),E=t.rects.reference,I=t.rects.popper,O=new Map,D=!0,N=w[0],U=0;U<w.length;U++){var B=w[U],F=Yu(B),T=i1(B)===r1,P=[js,hc].indexOf(F)>=0,_=P?"width":"height",C=ax(t,{placement:B,boundary:u,rootBoundary:f,altBoundary:d,padding:l}),S=P?T?pc:Vs:T?hc:js;E[_]>I[_]&&(S=ek(S));var x=ek(S),k=[];if(i&&k.push(C[F]<=0),s&&k.push(C[S]<=0,C[x]<=0),k.every(function(K){return K})){N=B,D=!1;break}O.set(B,k)}if(D)for(var L=p?3:1,j=function(Q){var q=w.find(function(J){var G=O.get(J);if(G)return G.slice(0,Q).every(function(V){return V})});if(q)return N=q,"break"},z=L;z>0;z--){var Y=j(z);if(Y==="break")break}t.placement!==N&&(t.modifiersData[n]._skip=!0,t.placement=N,t.reset=!0)}}const Oke={name:"flip",enabled:!0,phase:"main",fn:Rke,requiresIfExists:["offset"],data:{_skip:!1}};function tU(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function rU(e){return[js,pc,hc,Vs].some(function(t){return e[t]>=0})}function Dke(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ax(t,{elementContext:"reference"}),s=ax(t,{altBoundary:!0}),c=tU(a,n),l=tU(s,o,i),u=rU(c),f=rU(l);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const Fke={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Dke};function Nke(e,t,r){var n=Yu(e),o=[Vs,js].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Vs,pc].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function Lke(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=o===void 0?[0,0]:o,a=pQ.reduce(function(u,f){return u[f]=Nke(f,t.rects,i),u},{}),s=a[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[n]=a}const $ke={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Lke};function Bke(e){var t=e.state,r=e.name;t.modifiersData[r]=xQ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Uke={name:"popperOffsets",enabled:!0,phase:"read",fn:Bke,data:{}};function Hke(e){return e==="x"?"y":"x"}function zke(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=o===void 0?!0:o,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,l=r.rootBoundary,u=r.altBoundary,f=r.padding,d=r.tether,h=d===void 0?!0:d,p=r.tetherOffset,g=p===void 0?0:p,m=ax(t,{boundary:c,rootBoundary:l,padding:f,altBoundary:u}),v=Yu(t.placement),y=i1(t.placement),b=!y,w=cD(v),E=Hke(w),I=t.modifiersData.popperOffsets,O=t.rects.reference,D=t.rects.popper,N=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,U=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(I){if(i){var T,P=w==="y"?js:Vs,_=w==="y"?hc:pc,C=w==="y"?"height":"width",S=I[w],x=S+m[P],k=S-m[_],L=h?-D[C]/2:0,j=y===r1?O[C]:D[C],z=y===r1?-D[C]:-O[C],Y=t.elements.arrow,K=h&&Y?lD(Y):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:vQ(),q=Q[P],J=Q[_],G=rw(0,O[C],K[C]),V=b?O[C]/2-L-G-q-U.mainAxis:j-G-q-U.mainAxis,X=b?-O[C]/2+L+G+J+U.mainAxis:z+G+J+U.mainAxis,te=t.elements.arrow&&D2(t.elements.arrow),ee=te?w==="y"?te.clientTop||0:te.clientLeft||0:0,re=(T=B==null?void 0:B[w])!=null?T:0,se=S+V-re-ee,pe=S+X-re,ce=rw(h?eE(x,se):x,S,h?wm(k,pe):k);I[w]=ce,F[w]=ce-S}if(s){var ne,he=w==="x"?js:Vs,oe=w==="x"?hc:pc,le=I[E],de=E==="y"?"height":"width",ve=le+m[he],we=le-m[oe],ie=[js,Vs].indexOf(v)!==-1,ge=(ne=B==null?void 0:B[E])!=null?ne:0,Pe=ie?ve:le-O[de]-D[de]-ge+U.altAxis,Fe=ie?le+O[de]+D[de]-ge-U.altAxis:we,Ie=h&&ie?fke(Pe,le,Fe):rw(h?Pe:ve,le,h?Fe:we);I[E]=Ie,F[E]=Ie-le}t.modifiersData[n]=F}}const jke={name:"preventOverflow",enabled:!0,phase:"main",fn:zke,requiresIfExists:["offset"]};function Vke(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Wke(e){return e===xl(e)||!lc(e)?uD(e):Vke(e)}function Gke(e){var t=e.getBoundingClientRect(),r=n1(t.width)/e.offsetWidth||1,n=n1(t.height)/e.offsetHeight||1;return r!==1||n!==1}function qke(e,t,r){r===void 0&&(r=!1);var n=lc(t),o=lc(t)&&Gke(t),i=up(t),a=o1(e,o,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((rd(t)!=="body"||fD(i))&&(s=Wke(t)),lc(t)?(c=o1(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=dD(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function Kke(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function o(i){r.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&o(c)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||o(i)}),n}function Yke(e){var t=Kke(e);return ake.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function Xke(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Qke(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var nU={placement:"bottom",modifiers:[],strategy:"absolute"};function oU(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Zke(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,o=t.defaultOptions,i=o===void 0?nU:o;return function(s,c,l){l===void 0&&(l=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},nU,i),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},f=[],d=!1,h={state:u,setOptions:function(v){var y=typeof v=="function"?v(u.options):v;g(),u.options=Object.assign({},i,u.options,y),u.scrollParents={reference:$m(s)?nw(s):s.contextElement?nw(s.contextElement):[],popper:nw(c)};var b=Yke(Qke([].concat(n,u.options.modifiers)));return u.orderedModifiers=b.filter(function(w){return w.enabled}),p(),h.update()},forceUpdate:function(){if(!d){var v=u.elements,y=v.reference,b=v.popper;if(oU(y,b)){u.rects={reference:qke(y,D2(b),u.options.strategy==="fixed"),popper:lD(b)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(U){return u.modifiersData[U.name]=Object.assign({},U.data)});for(var w=0;w<u.orderedModifiers.length;w++){if(u.reset===!0){u.reset=!1,w=-1;continue}var E=u.orderedModifiers[w],I=E.fn,O=E.options,D=O===void 0?{}:O,N=E.name;typeof I=="function"&&(u=I({state:u,options:D,name:N,instance:h})||u)}}}},update:Xke(function(){return new Promise(function(m){h.forceUpdate(),m(u)})}),destroy:function(){g(),d=!0}};if(!oU(s,c))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function p(){u.orderedModifiers.forEach(function(m){var v=m.name,y=m.options,b=y===void 0?{}:y,w=m.effect;if(typeof w=="function"){var E=w({state:u,name:v,instance:h,options:b}),I=function(){};f.push(E||I)}})}function g(){f.forEach(function(m){return m()}),f=[]}return h}}var Jke=[Cke,Uke,wke,cke,$ke,Oke,jke,gke,Fke],eEe=Zke({defaultModifiers:Jke});const CQ="Popper";function tEe(e){return uQ(CQ,e)}M_e(CQ,["root"]);const rEe=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],nEe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function oEe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function vR(e){return typeof e=="function"?e():e}function iEe(e){return e.nodeType!==void 0}const aEe=()=>pt({root:["root"]},SCe(tEe)),sEe={},lEe=A.forwardRef(function(t,r){var n;const{anchorEl:o,children:i,direction:a,disablePortal:s,modifiers:c,open:l,placement:u,popperOptions:f,popperRef:d,slotProps:h={},slots:p={},TransitionProps:g}=t,m=ze(t,rEe),v=A.useRef(null),y=Ur(v,r),b=A.useRef(null),w=Ur(b,d),E=A.useRef(w);en(()=>{E.current=w},[w]),A.useImperativeHandle(d,()=>b.current,[]);const I=oEe(u,a),[O,D]=A.useState(I),[N,U]=A.useState(vR(o));A.useEffect(()=>{b.current&&b.current.forceUpdate()}),A.useEffect(()=>{o&&U(vR(o))},[o]),en(()=>{if(!N||!l)return;const _=x=>{D(x.placement)};let C=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:x})=>{_(x)}}];c!=null&&(C=C.concat(c)),f&&f.modifiers!=null&&(C=C.concat(f.modifiers));const S=eEe(N,v.current,W({placement:I},f,{modifiers:C}));return E.current(S),()=>{S.destroy(),E.current(null)}},[N,s,c,l,f,I]);const B={placement:O};g!==null&&(B.TransitionProps=g);const F=aEe(),T=(n=p.root)!=null?n:"div",P=Cr({elementType:T,externalSlotProps:h.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:t,className:F.root});return R(T,W({},P,{children:typeof i=="function"?i(B):i}))}),SQ=A.forwardRef(function(t,r){const{anchorEl:n,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:c=!1,modifiers:l,open:u,placement:f="bottom",popperOptions:d=sEe,popperRef:h,style:p,transition:g=!1,slotProps:m={},slots:v={}}=t,y=ze(t,nEe),[b,w]=A.useState(!0),E=()=>{w(!1)},I=()=>{w(!0)};if(!c&&!u&&(!g||b))return null;let O;if(i)O=i;else if(n){const U=vR(n);O=U&&iEe(U)?In(U).body:In(null).body}const D=!u&&c&&(!g||b)?"none":void 0,N=g?{in:u,onEnter:E,onExited:I}:void 0;return R(dQ,{disablePortal:s,container:O,children:R(lEe,W({anchorEl:n,direction:a,disablePortal:s,modifiers:l,ref:r,open:g?!b:u,placement:f,popperOptions:d,popperRef:h,slotProps:m,slots:v},y,{style:W({position:"fixed",top:0,left:0,display:D},p),TransitionProps:N,children:o}))})}),cEe=2;function _Q(e,t){return e-t}function iU(e,t){var r;const{index:n}=(r=e.reduce((o,i,a)=>{const s=Math.abs(t-i);return o===null||s<o.distance||s===o.distance?{distance:s,index:a}:o},null))!=null?r:{};return n}function $S(e,t){if(t.current!==void 0&&e.changedTouches){const r=e;for(let n=0;n<r.changedTouches.length;n+=1){const o=r.changedTouches[n];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function tE(e,t,r){return(e-t)*100/(r-t)}function uEe(e,t,r){return(r-t)*e+t}function dEe(e){if(Math.abs(e)<1){const r=e.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function fEe(e,t,r){const n=Math.round((e-r)/t)*t+r;return Number(n.toFixed(dEe(t)))}function aU({values:e,newValue:t,index:r}){const n=e.slice();return n[r]=t,n.sort(_Q)}function BS({sliderRef:e,activeIndex:t,setActive:r}){var n,o;const i=In(e.current);if(!((n=e.current)!=null&&n.contains(i.activeElement))||Number(i==null||(o=i.activeElement)==null?void 0:o.getAttribute("data-index"))!==t){var a;(a=e.current)==null||a.querySelector(`[type="range"][data-index="${t}"]`).focus()}r&&r(t)}function US(e,t){return typeof e=="number"&&typeof t=="number"?e===t:typeof e=="object"&&typeof t=="object"?wCe(e,t):!1}const hEe={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},pEe=e=>e;let HS;function sU(){return HS===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?HS=CSS.supports("touch-action","none"):HS=!0),HS}function mEe(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:o=!1,isRtl:i=!1,marks:a=!1,max:s=100,min:c=0,name:l,onChange:u,onChangeCommitted:f,orientation:d="horizontal",rootRef:h,scale:p=pEe,step:g=1,shiftStep:m=10,tabIndex:v,value:y}=e,b=A.useRef(),[w,E]=A.useState(-1),[I,O]=A.useState(-1),[D,N]=A.useState(!1),U=A.useRef(0),[B,F]=sa({controlled:y,default:r??c,name:"Slider"}),T=u&&((Ie,Oe,$e)=>{const et=Ie.nativeEvent||Ie,Ze=new et.constructor(et.type,et);Object.defineProperty(Ze,"target",{writable:!0,value:{value:Oe,name:l}}),u(Ze,Oe,$e)}),P=Array.isArray(B);let _=P?B.slice().sort(_Q):[B];_=_.map(Ie=>Ie==null?c:Bp(Ie,c,s));const C=a===!0&&g!==null?[...Array(Math.floor((s-c)/g)+1)].map((Ie,Oe)=>({value:c+g*Oe})):a||[],S=C.map(Ie=>Ie.value),{isFocusVisibleRef:x,onBlur:k,onFocus:L,ref:j}=y2(),[z,Y]=A.useState(-1),K=A.useRef(),Q=Ur(j,K),q=Ur(h,Q),J=Ie=>Oe=>{var $e;const et=Number(Oe.currentTarget.getAttribute("data-index"));L(Oe),x.current===!0&&Y(et),O(et),Ie==null||($e=Ie.onFocus)==null||$e.call(Ie,Oe)},G=Ie=>Oe=>{var $e;k(Oe),x.current===!1&&Y(-1),O(-1),Ie==null||($e=Ie.onBlur)==null||$e.call(Ie,Oe)},V=(Ie,Oe)=>{const $e=Number(Ie.currentTarget.getAttribute("data-index")),et=_[$e],Ze=S.indexOf(et);let Ne=Oe;if(C&&g==null){const Qe=S[S.length-1];Ne>Qe?Ne=Qe:Ne<S[0]?Ne=S[0]:Ne=Ne<et?S[Ze-1]:S[Ze+1]}if(Ne=Bp(Ne,c,s),P){o&&(Ne=Bp(Ne,_[$e-1]||-1/0,_[$e+1]||1/0));const Qe=Ne;Ne=aU({values:_,newValue:Ne,index:$e});let Xe=$e;o||(Xe=Ne.indexOf(Qe)),BS({sliderRef:K,activeIndex:Xe})}F(Ne),Y($e),T&&!US(Ne,B)&&T(Ie,Ne,$e),f&&f(Ie,Ne)},X=Ie=>Oe=>{var $e;if(g!==null){const et=Number(Oe.currentTarget.getAttribute("data-index")),Ze=_[et];let Ne=null;(Oe.key==="ArrowLeft"||Oe.key==="ArrowDown")&&Oe.shiftKey||Oe.key==="PageDown"?Ne=Math.max(Ze-m,c):((Oe.key==="ArrowRight"||Oe.key==="ArrowUp")&&Oe.shiftKey||Oe.key==="PageUp")&&(Ne=Math.min(Ze+m,s)),Ne!==null&&(V(Oe,Ne),Oe.preventDefault())}Ie==null||($e=Ie.onKeyDown)==null||$e.call(Ie,Oe)};en(()=>{if(n&&K.current.contains(document.activeElement)){var Ie;(Ie=document.activeElement)==null||Ie.blur()}},[n]),n&&w!==-1&&E(-1),n&&z!==-1&&Y(-1);const te=Ie=>Oe=>{var $e;($e=Ie.onChange)==null||$e.call(Ie,Oe),V(Oe,Oe.target.valueAsNumber)},ee=A.useRef();let re=d;i&&d==="horizontal"&&(re+="-reverse");const se=({finger:Ie,move:Oe=!1})=>{const{current:$e}=K,{width:et,height:Ze,bottom:Ne,left:Qe}=$e.getBoundingClientRect();let Xe;re.indexOf("vertical")===0?Xe=(Ne-Ie.y)/Ze:Xe=(Ie.x-Qe)/et,re.indexOf("-reverse")!==-1&&(Xe=1-Xe);let rt;if(rt=uEe(Xe,c,s),g)rt=fEe(rt,g,c);else{const At=iU(S,rt);rt=S[At]}rt=Bp(rt,c,s);let ht=0;if(P){Oe?ht=ee.current:ht=iU(_,rt),o&&(rt=Bp(rt,_[ht-1]||-1/0,_[ht+1]||1/0));const At=rt;rt=aU({values:_,newValue:rt,index:ht}),o&&Oe||(ht=rt.indexOf(At),ee.current=ht)}return{newValue:rt,activeIndex:ht}},pe=Mt(Ie=>{const Oe=$S(Ie,b);if(!Oe)return;if(U.current+=1,Ie.type==="mousemove"&&Ie.buttons===0){ce(Ie);return}const{newValue:$e,activeIndex:et}=se({finger:Oe,move:!0});BS({sliderRef:K,activeIndex:et,setActive:E}),F($e),!D&&U.current>cEe&&N(!0),T&&!US($e,B)&&T(Ie,$e,et)}),ce=Mt(Ie=>{const Oe=$S(Ie,b);if(N(!1),!Oe)return;const{newValue:$e}=se({finger:Oe,move:!0});E(-1),Ie.type==="touchend"&&O(-1),f&&f(Ie,$e),b.current=void 0,he()}),ne=Mt(Ie=>{if(n)return;sU()||Ie.preventDefault();const Oe=Ie.changedTouches[0];Oe!=null&&(b.current=Oe.identifier);const $e=$S(Ie,b);if($e!==!1){const{newValue:Ze,activeIndex:Ne}=se({finger:$e});BS({sliderRef:K,activeIndex:Ne,setActive:E}),F(Ze),T&&!US(Ze,B)&&T(Ie,Ze,Ne)}U.current=0;const et=In(K.current);et.addEventListener("touchmove",pe,{passive:!0}),et.addEventListener("touchend",ce,{passive:!0})}),he=A.useCallback(()=>{const Ie=In(K.current);Ie.removeEventListener("mousemove",pe),Ie.removeEventListener("mouseup",ce),Ie.removeEventListener("touchmove",pe),Ie.removeEventListener("touchend",ce)},[ce,pe]);A.useEffect(()=>{const{current:Ie}=K;return Ie.addEventListener("touchstart",ne,{passive:sU()}),()=>{Ie.removeEventListener("touchstart",ne),he()}},[he,ne]),A.useEffect(()=>{n&&he()},[n,he]);const oe=Ie=>Oe=>{var $e;if(($e=Ie.onMouseDown)==null||$e.call(Ie,Oe),n||Oe.defaultPrevented||Oe.button!==0)return;Oe.preventDefault();const et=$S(Oe,b);if(et!==!1){const{newValue:Ne,activeIndex:Qe}=se({finger:et});BS({sliderRef:K,activeIndex:Qe,setActive:E}),F(Ne),T&&!US(Ne,B)&&T(Oe,Ne,Qe)}U.current=0;const Ze=In(K.current);Ze.addEventListener("mousemove",pe,{passive:!0}),Ze.addEventListener("mouseup",ce)},le=tE(P?_[0]:c,c,s),de=tE(_[_.length-1],c,s)-le,ve=(Ie={})=>{const Oe=Jb(Ie),$e={onMouseDown:oe(Oe||{})},et=W({},Oe,$e);return W({},Ie,{ref:q},et)},we=Ie=>Oe=>{var $e;($e=Ie.onMouseOver)==null||$e.call(Ie,Oe);const et=Number(Oe.currentTarget.getAttribute("data-index"));O(et)},ie=Ie=>Oe=>{var $e;($e=Ie.onMouseLeave)==null||$e.call(Ie,Oe),O(-1)};return{active:w,axis:re,axisProps:hEe,dragging:D,focusedThumbIndex:z,getHiddenInputProps:(Ie={})=>{var Oe;const $e=Jb(Ie),et={onChange:te($e||{}),onFocus:J($e||{}),onBlur:G($e||{}),onKeyDown:X($e||{})},Ze=W({},$e,et);return W({tabIndex:v,"aria-labelledby":t,"aria-orientation":d,"aria-valuemax":p(s),"aria-valuemin":p(c),name:l,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(Oe=e.step)!=null?Oe:void 0,disabled:n},Ie,Ze,{style:W({},Ege,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:ve,getThumbProps:(Ie={})=>{const Oe=Jb(Ie),$e={onMouseOver:we(Oe||{}),onMouseLeave:ie(Oe||{})};return W({},Ie,Oe,$e)},marks:C,open:I,range:P,rootRef:q,trackLeap:de,trackOffset:le,values:_,getThumbStyle:Ie=>({pointerEvents:w!==-1&&w!==Ie?"none":void 0})}}const gEe=["onChange","maxRows","minRows","style","value"];function zS(e){return parseInt(e,10)||0}const vEe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function yEe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const bEe=A.forwardRef(function(t,r){const{onChange:n,maxRows:o,minRows:i=1,style:a,value:s}=t,c=ze(t,gEe),{current:l}=A.useRef(s!=null),u=A.useRef(null),f=Ur(r,u),d=A.useRef(null),h=A.useCallback(()=>{const m=u.current,y=Gs(m).getComputedStyle(m);if(y.width==="0px")return{outerHeightStyle:0,overflowing:!1};const b=d.current;b.style.width=y.width,b.value=m.value||t.placeholder||"x",b.value.slice(-1)===`
`&&(b.value+=" ");const w=y.boxSizing,E=zS(y.paddingBottom)+zS(y.paddingTop),I=zS(y.borderBottomWidth)+zS(y.borderTopWidth),O=b.scrollHeight;b.value="x";const D=b.scrollHeight;let N=O;i&&(N=Math.max(Number(i)*D,N)),o&&(N=Math.min(Number(o)*D,N)),N=Math.max(N,D);const U=N+(w==="border-box"?E+I:0),B=Math.abs(N-O)<=1;return{outerHeightStyle:U,overflowing:B}},[o,i,t.placeholder]),p=A.useCallback(()=>{const m=h();if(yEe(m))return;const v=u.current;v.style.height=`${m.outerHeightStyle}px`,v.style.overflow=m.overflowing?"hidden":""},[h]);en(()=>{const m=()=>{p()};let v;const y=ap(m),b=u.current,w=Gs(b);w.addEventListener("resize",y);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(m),E.observe(b)),()=>{y.clear(),cancelAnimationFrame(v),w.removeEventListener("resize",y),E&&E.disconnect()}},[h,p]),en(()=>{p()});const g=m=>{l||p(),n&&n(m)};return xe(A.Fragment,{children:[R("textarea",W({value:s,onChange:g,ref:f,rows:i,style:a},c)),R("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:d,tabIndex:-1,style:W({},vEe.shadow,a,{paddingTop:0,paddingBottom:0})})]})});function lU(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function kQ(e={}){const{ignoreAccents:t=!0,ignoreCase:r=!0,limit:n,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:c,getOptionLabel:l})=>{let u=a?c.trim():c;r&&(u=u.toLowerCase()),t&&(u=lU(u));const f=u?s.filter(d=>{let h=(i||l)(d);return r&&(h=h.toLowerCase()),t&&(h=lU(h)),o==="start"?h.indexOf(u)===0:h.indexOf(u)>-1}):s;return typeof n=="number"?f.slice(0,n):f}}function jS(e,t){for(let r=0;r<e.length;r+=1)if(t(e[r]))return r;return-1}const wEe=kQ(),cU=5,xEe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))};function CEe(e){const{unstable_isActiveElementInListbox:t=xEe,unstable_classNamePrefix:r="Mui",autoComplete:n=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:c=!1,componentName:l="useAutocomplete",defaultValue:u=e.multiple?[]:null,disableClearable:f=!1,disableCloseOnSelect:d=!1,disabled:h,disabledItemsFocusable:p=!1,disableListWrap:g=!1,filterOptions:m=wEe,filterSelectedOptions:v=!1,freeSolo:y=!1,getOptionDisabled:b,getOptionKey:w,getOptionLabel:E=me=>{var _e;return(_e=me.label)!=null?_e:me},groupBy:I,handleHomeEndKeys:O=!e.freeSolo,id:D,includeInputInList:N=!1,inputValue:U,isOptionEqualToValue:B=(me,_e)=>me===_e,multiple:F=!1,onChange:T,onClose:P,onHighlightChange:_,onInputChange:C,onOpen:S,open:x,openOnFocus:k=!1,options:L,readOnly:j=!1,selectOnFocus:z=!e.freeSolo,value:Y}=e,K=dn(D);let Q=E;Q=me=>{const _e=E(me);return typeof _e!="string"?String(_e):_e};const q=A.useRef(!1),J=A.useRef(!0),G=A.useRef(null),V=A.useRef(null),[X,te]=A.useState(null),[ee,re]=A.useState(-1),se=o?0:-1,pe=A.useRef(se),[ce,ne]=sa({controlled:Y,default:u,name:l}),[he,oe]=sa({controlled:U,default:"",name:l,state:"inputValue"}),[le,de]=A.useState(!1),ve=A.useCallback((me,_e)=>{if(!(F?ce.length<_e.length:_e!==null)&&!s)return;let De;if(F)De="";else if(_e==null)De="";else{const je=Q(_e);De=typeof je=="string"?je:""}he!==De&&(oe(De),C&&C(me,De,"reset"))},[Q,he,F,C,oe,s,ce]),[we,ie]=sa({controlled:x,default:!1,name:l,state:"open"}),[ge,Pe]=A.useState(!0),Fe=!F&&ce!=null&&he===Q(ce),Ie=we&&!j,Oe=Ie?m(L.filter(me=>!(v&&(F?ce:[ce]).some(_e=>_e!==null&&B(me,_e)))),{inputValue:Fe&&ge?"":he,getOptionLabel:Q}):[],$e=vO({filteredOptions:Oe,value:ce,inputValue:he});A.useEffect(()=>{const me=ce!==$e.value;le&&!me||y&&!me||ve(null,ce)},[ce,ve,le,$e.value,y]);const et=we&&Oe.length>0&&!j,Ze=Mt(me=>{me===-1?G.current.focus():X.querySelector(`[data-tag-index="${me}"]`).focus()});A.useEffect(()=>{F&&ee>ce.length-1&&(re(-1),Ze(-1))},[ce,F,ee,Ze]);function Ne(me,_e){if(!V.current||me<0||me>=Oe.length)return-1;let Be=me;for(;;){const De=V.current.querySelector(`[data-option-index="${Be}"]`),je=p?!1:!De||De.disabled||De.getAttribute("aria-disabled")==="true";if(De&&De.hasAttribute("tabindex")&&!je)return Be;if(_e==="next"?Be=(Be+1)%Oe.length:Be=(Be-1+Oe.length)%Oe.length,Be===me)return-1}}const Qe=Mt(({event:me,index:_e,reason:Be="auto"})=>{if(pe.current=_e,_e===-1?G.current.removeAttribute("aria-activedescendant"):G.current.setAttribute("aria-activedescendant",`${K}-option-${_e}`),_&&_(me,_e===-1?null:Oe[_e],Be),!V.current)return;const De=V.current.querySelector(`[role="option"].${r}-focused`);De&&(De.classList.remove(`${r}-focused`),De.classList.remove(`${r}-focusVisible`));let je=V.current;if(V.current.getAttribute("role")!=="listbox"&&(je=V.current.parentElement.querySelector('[role="listbox"]')),!je)return;if(_e===-1){je.scrollTop=0;return}const Le=V.current.querySelector(`[data-option-index="${_e}"]`);if(Le&&(Le.classList.add(`${r}-focused`),Be==="keyboard"&&Le.classList.add(`${r}-focusVisible`),je.scrollHeight>je.clientHeight&&Be!=="mouse"&&Be!=="touch")){const lt=Le,vt=je.clientHeight+je.scrollTop,Bt=lt.offsetTop+lt.offsetHeight;Bt>vt?je.scrollTop=Bt-je.clientHeight:lt.offsetTop-lt.offsetHeight*(I?1.3:0)<je.scrollTop&&(je.scrollTop=lt.offsetTop-lt.offsetHeight*(I?1.3:0))}}),Xe=Mt(({event:me,diff:_e,direction:Be="next",reason:De="auto"})=>{if(!Ie)return;const Le=Ne((()=>{const lt=Oe.length-1;if(_e==="reset")return se;if(_e==="start")return 0;if(_e==="end")return lt;const vt=pe.current+_e;return vt<0?vt===-1&&N?-1:g&&pe.current!==-1||Math.abs(_e)>1?0:lt:vt>lt?vt===lt+1&&N?-1:g||Math.abs(_e)>1?lt:0:vt})(),Be);if(Qe({index:Le,reason:De,event:me}),n&&_e!=="reset")if(Le===-1)G.current.value=he;else{const lt=Q(Oe[Le]);G.current.value=lt,lt.toLowerCase().indexOf(he.toLowerCase())===0&&he.length>0&&G.current.setSelectionRange(he.length,lt.length)}}),rt=()=>{const me=(_e,Be)=>{const De=_e?Q(_e):"",je=Be?Q(Be):"";return De===je};if(pe.current!==-1&&$e.filteredOptions&&$e.filteredOptions.length!==Oe.length&&$e.inputValue===he&&(F?ce.length===$e.value.length&&$e.value.every((_e,Be)=>Q(ce[Be])===Q(_e)):me($e.value,ce))){const _e=$e.filteredOptions[pe.current];if(_e)return jS(Oe,Be=>Q(Be)===Q(_e))}return-1},ht=A.useCallback(()=>{if(!Ie)return;const me=rt();if(me!==-1){pe.current=me;return}const _e=F?ce[0]:ce;if(Oe.length===0||_e==null){Xe({diff:"reset"});return}if(V.current){if(_e!=null){const Be=Oe[pe.current];if(F&&Be&&jS(ce,je=>B(Be,je))!==-1)return;const De=jS(Oe,je=>B(je,_e));De===-1?Xe({diff:"reset"}):Qe({index:De});return}if(pe.current>=Oe.length-1){Qe({index:Oe.length-1});return}Qe({index:pe.current})}},[Oe.length,F?!1:ce,v,Xe,Qe,Ie,he,F]),At=Mt(me=>{Yw(V,me),me&&ht()});A.useEffect(()=>{ht()},[ht]);const Qt=me=>{we||(ie(!0),Pe(!0),S&&S(me))},Nt=(me,_e)=>{we&&(ie(!1),P&&P(me,_e))},Ue=(me,_e,Be,De)=>{if(F){if(ce.length===_e.length&&ce.every((je,Le)=>je===_e[Le]))return}else if(ce===_e)return;T&&T(me,_e,Be,De),ne(_e)},Ye=A.useRef(!1),tt=(me,_e,Be="selectOption",De="options")=>{let je=Be,Le=_e;if(F){Le=Array.isArray(ce)?ce.slice():[];const lt=jS(Le,vt=>B(_e,vt));lt===-1?Le.push(_e):De!=="freeSolo"&&(Le.splice(lt,1),je="removeOption")}ve(me,Le),Ue(me,Le,je,{option:_e}),!d&&(!me||!me.ctrlKey&&!me.metaKey)&&Nt(me,je),(a===!0||a==="touch"&&Ye.current||a==="mouse"&&!Ye.current)&&G.current.blur()};function st(me,_e){if(me===-1)return-1;let Be=me;for(;;){if(_e==="next"&&Be===ce.length||_e==="previous"&&Be===-1)return-1;const De=X.querySelector(`[data-tag-index="${Be}"]`);if(!De||!De.hasAttribute("tabindex")||De.disabled||De.getAttribute("aria-disabled")==="true")Be+=_e==="next"?1:-1;else return Be}}const mt=(me,_e)=>{if(!F)return;he===""&&Nt(me,"toggleInput");let Be=ee;ee===-1?he===""&&_e==="previous"&&(Be=ce.length-1):(Be+=_e==="next"?1:-1,Be<0&&(Be=0),Be===ce.length&&(Be=-1)),Be=st(Be,_e),re(Be),Ze(Be)},_t=me=>{q.current=!0,oe(""),C&&C(me,"","clear"),Ue(me,F?[]:null,"clear")},Pt=me=>_e=>{if(me.onKeyDown&&me.onKeyDown(_e),!_e.defaultMuiPrevented&&(ee!==-1&&["ArrowLeft","ArrowRight"].indexOf(_e.key)===-1&&(re(-1),Ze(-1)),_e.which!==229))switch(_e.key){case"Home":Ie&&O&&(_e.preventDefault(),Xe({diff:"start",direction:"next",reason:"keyboard",event:_e}));break;case"End":Ie&&O&&(_e.preventDefault(),Xe({diff:"end",direction:"previous",reason:"keyboard",event:_e}));break;case"PageUp":_e.preventDefault(),Xe({diff:-cU,direction:"previous",reason:"keyboard",event:_e}),Qt(_e);break;case"PageDown":_e.preventDefault(),Xe({diff:cU,direction:"next",reason:"keyboard",event:_e}),Qt(_e);break;case"ArrowDown":_e.preventDefault(),Xe({diff:1,direction:"next",reason:"keyboard",event:_e}),Qt(_e);break;case"ArrowUp":_e.preventDefault(),Xe({diff:-1,direction:"previous",reason:"keyboard",event:_e}),Qt(_e);break;case"ArrowLeft":mt(_e,"previous");break;case"ArrowRight":mt(_e,"next");break;case"Enter":if(pe.current!==-1&&Ie){const Be=Oe[pe.current],De=b?b(Be):!1;if(_e.preventDefault(),De)return;tt(_e,Be,"selectOption"),n&&G.current.setSelectionRange(G.current.value.length,G.current.value.length)}else y&&he!==""&&Fe===!1&&(F&&_e.preventDefault(),tt(_e,he,"createOption","freeSolo"));break;case"Escape":Ie?(_e.preventDefault(),_e.stopPropagation(),Nt(_e,"escape")):c&&(he!==""||F&&ce.length>0)&&(_e.preventDefault(),_e.stopPropagation(),_t(_e));break;case"Backspace":if(F&&!j&&he===""&&ce.length>0){const Be=ee===-1?ce.length-1:ee,De=ce.slice();De.splice(Be,1),Ue(_e,De,"removeOption",{option:ce[Be]})}break;case"Delete":if(F&&!j&&he===""&&ce.length>0&&ee!==-1){const Be=ee,De=ce.slice();De.splice(Be,1),Ue(_e,De,"removeOption",{option:ce[Be]})}break}},Ut=me=>{de(!0),k&&!q.current&&Qt(me)},wt=me=>{if(t(V)){G.current.focus();return}de(!1),J.current=!0,q.current=!1,i&&pe.current!==-1&&Ie?tt(me,Oe[pe.current],"blur"):i&&y&&he!==""?tt(me,he,"blur","freeSolo"):s&&ve(me,ce),Nt(me,"blur")},Dt=me=>{const _e=me.target.value;he!==_e&&(oe(_e),Pe(!1),C&&C(me,_e,"input")),_e===""?!f&&!F&&Ue(me,null,"clear"):Qt(me)},qt=me=>{const _e=Number(me.currentTarget.getAttribute("data-option-index"));pe.current!==_e&&Qe({event:me,index:_e,reason:"mouse"})},Tt=me=>{Qe({event:me,index:Number(me.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Ye.current=!0},Me=me=>{const _e=Number(me.currentTarget.getAttribute("data-option-index"));tt(me,Oe[_e],"selectOption"),Ye.current=!1},Ge=me=>_e=>{const Be=ce.slice();Be.splice(me,1),Ue(_e,Be,"removeOption",{option:ce[me]})},nt=me=>{we?Nt(me,"toggleInput"):Qt(me)},fe=me=>{me.currentTarget.contains(me.target)&&me.target.getAttribute("id")!==K&&me.preventDefault()},ke=me=>{me.currentTarget.contains(me.target)&&(G.current.focus(),z&&J.current&&G.current.selectionEnd-G.current.selectionStart===0&&G.current.select(),J.current=!1)},be=me=>{!h&&(he===""||!we)&&nt(me)};let Ce=y&&he.length>0;Ce=Ce||(F?ce.length>0:ce!==null);let Ee=Oe;return I&&(Ee=Oe.reduce((me,_e,Be)=>{const De=I(_e);return me.length>0&&me[me.length-1].group===De?me[me.length-1].options.push(_e):me.push({key:Be,index:Be,group:De,options:[_e]}),me},[])),h&&le&&wt(),{getRootProps:(me={})=>W({"aria-owns":et?`${K}-listbox`:null},me,{onKeyDown:Pt(me),onMouseDown:fe,onClick:ke}),getInputLabelProps:()=>({id:`${K}-label`,htmlFor:K}),getInputProps:()=>({id:K,value:he,onBlur:wt,onFocus:Ut,onChange:Dt,onMouseDown:be,"aria-activedescendant":Ie?"":null,"aria-autocomplete":n?"both":"list","aria-controls":et?`${K}-listbox`:void 0,"aria-expanded":et,autoComplete:"off",ref:G,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:_t}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:nt}),getTagProps:({index:me})=>W({key:me,"data-tag-index":me,tabIndex:-1},!j&&{onDelete:Ge(me)}),getListboxProps:()=>({role:"listbox",id:`${K}-listbox`,"aria-labelledby":`${K}-label`,ref:At,onMouseDown:me=>{me.preventDefault()}}),getOptionProps:({index:me,option:_e})=>{var Be;const De=(F?ce:[ce]).some(Le=>Le!=null&&B(_e,Le)),je=b?b(_e):!1;return{key:(Be=w==null?void 0:w(_e))!=null?Be:Q(_e),tabIndex:-1,role:"option",id:`${K}-option-${me}`,onMouseMove:qt,onClick:Me,onTouchStart:Tt,"data-option-index":me,"aria-disabled":je,"aria-selected":De}},id:K,inputValue:he,value:ce,dirty:Ce,expanded:Ie&&X,popupOpen:Ie,focused:le||ee!==-1,anchorEl:X,setAnchorEl:te,focusedTag:ee,groupedOptions:Ee}}function c0({props:e,states:t,muiFormControl:r}){return t.reduce((n,o)=>(n[o]=e[o],r&&typeof e[o]>"u"&&(n[o]=r[o]),n),{})}const SEe=A.createContext(void 0),RI=SEe;function yf(){return A.useContext(RI)}function EQ(e){return R(Xwe,W({},e,{defaultTheme:kI,themeId:x2}))}function uU(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function rE(e,t=!1){return e&&(uU(e.value)&&e.value!==""||t&&uU(e.defaultValue)&&e.defaultValue!=="")}function _Ee(e){return e.startAdornment}function kEe(e){return Gt("MuiInputBase",e)}const EEe=Vt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),cl=EEe,TEe=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],OI=(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,r.size==="small"&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${ut(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]},DI=(e,t)=>{const{ownerState:r}=e;return[t.input,r.size==="small"&&t.inputSizeSmall,r.multiline&&t.inputMultiline,r.type==="search"&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]},IEe=e=>{const{classes:t,color:r,disabled:n,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:f,size:d,startAdornment:h,type:p}=e,g={root:["root",`color${ut(r)}`,n&&"disabled",o&&"error",c&&"fullWidth",a&&"focused",s&&"formControl",d&&d!=="medium"&&`size${ut(d)}`,u&&"multiline",h&&"adornedStart",i&&"adornedEnd",l&&"hiddenLabel",f&&"readOnly"],input:["input",n&&"disabled",p==="search"&&"inputTypeSearch",u&&"inputMultiline",d==="small"&&"inputSizeSmall",l&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",f&&"readOnly"]};return pt(g,kEe,t)},FI=We("div",{name:"MuiInputBase",slot:"Root",overridesResolver:OI})(({theme:e,ownerState:t})=>W({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${cl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&W({padding:"4px 0 5px"},t.size==="small"&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),NI=We("input",{name:"MuiInputBase",slot:"Input",overridesResolver:DI})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light",n=W({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return W({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${cl.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${cl.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},t.size==="small"&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},t.type==="search"&&{MozAppearance:"textfield"})}),AEe=R(EQ,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),PEe=A.forwardRef(function(t,r){var n;const o=Wt({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:c,components:l={},componentsProps:u={},defaultValue:f,disabled:d,disableInjectingGlobalStyles:h,endAdornment:p,fullWidth:g=!1,id:m,inputComponent:v="input",inputProps:y={},inputRef:b,maxRows:w,minRows:E,multiline:I=!1,name:O,onBlur:D,onChange:N,onClick:U,onFocus:B,onKeyDown:F,onKeyUp:T,placeholder:P,readOnly:_,renderSuffix:C,rows:S,slotProps:x={},slots:k={},startAdornment:L,type:j="text",value:z}=o,Y=ze(o,TEe),K=y.value!=null?y.value:z,{current:Q}=A.useRef(K!=null),q=A.useRef(),J=A.useCallback(Ie=>{},[]),G=Ur(q,b,y.ref,J),[V,X]=A.useState(!1),te=yf(),ee=c0({props:o,muiFormControl:te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ee.focused=te?te.focused:V,A.useEffect(()=>{!te&&d&&V&&(X(!1),D&&D())},[te,d,V,D]);const re=te&&te.onFilled,se=te&&te.onEmpty,pe=A.useCallback(Ie=>{rE(Ie)?re&&re():se&&se()},[re,se]);en(()=>{Q&&pe({value:K})},[K,pe,Q]);const ce=Ie=>{if(ee.disabled){Ie.stopPropagation();return}B&&B(Ie),y.onFocus&&y.onFocus(Ie),te&&te.onFocus?te.onFocus(Ie):X(!0)},ne=Ie=>{D&&D(Ie),y.onBlur&&y.onBlur(Ie),te&&te.onBlur?te.onBlur(Ie):X(!1)},he=(Ie,...Oe)=>{if(!Q){const $e=Ie.target||q.current;if($e==null)throw new Error(nf(1));pe({value:$e.value})}y.onChange&&y.onChange(Ie,...Oe),N&&N(Ie,...Oe)};A.useEffect(()=>{pe(q.current)},[]);const oe=Ie=>{q.current&&Ie.currentTarget===Ie.target&&q.current.focus(),U&&U(Ie)};let le=v,de=y;I&&le==="input"&&(S?de=W({type:void 0,minRows:S,maxRows:S},de):de=W({type:void 0,maxRows:w,minRows:E},de),le=bEe);const ve=Ie=>{pe(Ie.animationName==="mui-auto-fill-cancel"?q.current:{value:"x"})};A.useEffect(()=>{te&&te.setAdornedStart(!!L)},[te,L]);const we=W({},o,{color:ee.color||"primary",disabled:ee.disabled,endAdornment:p,error:ee.error,focused:ee.focused,formControl:te,fullWidth:g,hiddenLabel:ee.hiddenLabel,multiline:I,size:ee.size,startAdornment:L,type:j}),ie=IEe(we),ge=k.root||l.Root||FI,Pe=x.root||u.root||{},Fe=k.input||l.Input||NI;return de=W({},de,(n=x.input)!=null?n:u.input),xe(A.Fragment,{children:[!h&&AEe,xe(ge,W({},Pe,!Jc(ge)&&{ownerState:W({},we,Pe.ownerState)},{ref:r,onClick:oe},Y,{className:it(ie.root,Pe.className,c,_&&"MuiInputBase-readOnly"),children:[L,R(RI.Provider,{value:null,children:R(Fe,W({ownerState:we,"aria-invalid":ee.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:f,disabled:ee.disabled,id:m,onAnimationStart:ve,name:O,placeholder:P,readOnly:_,required:ee.required,rows:S,value:K,onKeyDown:F,onKeyUp:T,type:j},de,!Jc(Fe)&&{as:le,ownerState:W({},we,de.ownerState)},{ref:G,className:it(ie.input,de.className,_&&"MuiInputBase-readOnly"),onBlur:ne,onChange:he,onFocus:ce}))}),p,C?C(W({},ee,{startAdornment:L})):null]}))]})}),V1=PEe;function MEe(e){return Gt("MuiInput",e)}const REe=W({},cl,Vt("MuiInput",["root","underline","input"])),oh=REe,OEe=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],DEe=e=>{const{classes:t,disableUnderline:r}=e,o=pt({root:["root",!r&&"underline"],input:["input"]},MEe,t);return W({},t,o)},FEe=We(FI,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...OI(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),W({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oh.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oh.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oh.disabled}, .${oh.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${oh.disabled}:before`]:{borderBottomStyle:"dotted"}})}),NEe=We(NI,{name:"MuiInput",slot:"Input",overridesResolver:DI})({}),TQ=A.forwardRef(function(t,r){var n,o,i,a;const s=Wt({props:t,name:"MuiInput"}),{disableUnderline:c,components:l={},componentsProps:u,fullWidth:f=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:g={},type:m="text"}=s,v=ze(s,OEe),y=DEe(s),w={root:{ownerState:{disableUnderline:c}}},E=p??u?ys(p??u,w):w,I=(n=(o=g.root)!=null?o:l.Root)!=null?n:FEe,O=(i=(a=g.input)!=null?a:l.Input)!=null?i:NEe;return R(V1,W({slots:{root:I,input:O},slotProps:E,fullWidth:f,inputComponent:d,multiline:h,ref:r,type:m},v,{classes:y}))});TQ.muiName="Input";const IQ=TQ;function LEe(e){return Gt("MuiFilledInput",e)}const $Ee=W({},cl,Vt("MuiFilledInput",["root","underline","input"])),ul=$Ee,BEe=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],UEe=e=>{const{classes:t,disableUnderline:r}=e,o=pt({root:["root",!r&&"underline"],input:["input"]},LEe,t);return W({},t,o)},HEe=We(FI,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[...OI(e,t),!r.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var r;const n=e.palette.mode==="light",o=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return W({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${ul.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${ul.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(r=(e.vars||e).palette[t.color||"primary"])==null?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ul.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ul.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ul.disabled}, .${ul.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ul.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&W({padding:"25px 12px 8px"},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9}))}),zEe=We(NI,{name:"MuiFilledInput",slot:"Input",overridesResolver:DI})(({theme:e,ownerState:t})=>W({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&t.size==="small"&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),AQ=A.forwardRef(function(t,r){var n,o,i,a;const s=Wt({props:t,name:"MuiFilledInput"}),{components:c={},componentsProps:l,fullWidth:u=!1,inputComponent:f="input",multiline:d=!1,slotProps:h,slots:p={},type:g="text"}=s,m=ze(s,BEe),v=W({},s,{fullWidth:u,inputComponent:f,multiline:d,type:g}),y=UEe(s),b={root:{ownerState:v},input:{ownerState:v}},w=h??l?ys(b,h??l):b,E=(n=(o=p.root)!=null?o:c.Root)!=null?n:HEe,I=(i=(a=p.input)!=null?a:c.Input)!=null?i:zEe;return R(V1,W({slots:{root:E,input:I},componentsProps:w,fullWidth:u,inputComponent:f,multiline:d,ref:r,type:g},m,{classes:y}))});AQ.muiName="Input";const PQ=AQ;var dU;const jEe=["children","classes","className","label","notched"],VEe=We("fieldset",{shouldForwardProp:Ja})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),WEe=We("legend",{shouldForwardProp:Ja})(({ownerState:e,theme:t})=>W({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&W({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));function GEe(e){const{className:t,label:r,notched:n}=e,o=ze(e,jEe),i=r!=null&&r!=="",a=W({},e,{notched:n,withLabel:i});return R(VEe,W({"aria-hidden":!0,className:t,ownerState:a},o,{children:R(WEe,{ownerState:a,children:i?R("span",{children:r}):dU||(dU=R("span",{className:"notranslate",children:"​"}))})}))}function qEe(e){return Gt("MuiOutlinedInput",e)}const KEe=W({},cl,Vt("MuiOutlinedInput",["root","notchedOutline","input"])),Su=KEe,YEe=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],XEe=e=>{const{classes:t}=e,n=pt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},qEe,t);return W({},t,n)},QEe=We(FI,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:OI})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return W({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Su.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Su.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${Su.focused} .${Su.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${Su.error} .${Su.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Su.disabled} .${Su.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&W({padding:"16.5px 14px"},t.size==="small"&&{padding:"8.5px 14px"}))}),ZEe=We(GEe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),JEe=We(NI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:DI})(({theme:e,ownerState:t})=>W({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},t.size==="small"&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),MQ=A.forwardRef(function(t,r){var n,o,i,a,s;const c=Wt({props:t,name:"MuiOutlinedInput"}),{components:l={},fullWidth:u=!1,inputComponent:f="input",label:d,multiline:h=!1,notched:p,slots:g={},type:m="text"}=c,v=ze(c,YEe),y=XEe(c),b=yf(),w=c0({props:c,muiFormControl:b,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),E=W({},c,{color:w.color||"primary",disabled:w.disabled,error:w.error,focused:w.focused,formControl:b,fullWidth:u,hiddenLabel:w.hiddenLabel,multiline:h,size:w.size,type:m}),I=(n=(o=g.root)!=null?o:l.Root)!=null?n:QEe,O=(i=(a=g.input)!=null?a:l.Input)!=null?i:JEe;return R(V1,W({slots:{root:I,input:O},renderSuffix:D=>R(ZEe,{ownerState:E,className:y.notchedOutline,label:d!=null&&d!==""&&w.required?s||(s=xe(A.Fragment,{children:[d," ","*"]})):d,notched:typeof p<"u"?p:!!(D.startAdornment||D.filled||D.focused)}),fullWidth:u,inputComponent:f,multiline:h,ref:r,type:m},v,{classes:W({},y,{notchedOutline:null})}))});MQ.muiName="Input";const hD=MQ;function eTe(e){return Gt("MuiFormLabel",e)}const tTe=Vt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ow=tTe,rTe=["children","className","color","component","disabled","error","filled","focused","required"],nTe=e=>{const{classes:t,color:r,focused:n,disabled:o,error:i,filled:a,required:s}=e,c={root:["root",`color${ut(r)}`,o&&"disabled",i&&"error",a&&"filled",n&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return pt(c,eTe,t)},oTe=We("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>W({},t.root,e.color==="secondary"&&t.colorSecondary,e.filled&&t.filled)})(({theme:e,ownerState:t})=>W({color:(e.vars||e).palette.text.secondary},e.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${ow.focused}`]:{color:(e.vars||e).palette[t.color].main},[`&.${ow.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${ow.error}`]:{color:(e.vars||e).palette.error.main}})),iTe=We("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${ow.error}`]:{color:(e.vars||e).palette.error.main}})),aTe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiFormLabel"}),{children:o,className:i,component:a="label"}=n,s=ze(n,rTe),c=yf(),l=c0({props:n,muiFormControl:c,states:["color","required","focused","disabled","error","filled"]}),u=W({},n,{color:l.color||"primary",component:a,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),f=nTe(u);return xe(oTe,W({as:a,ownerState:u,className:it(f.root,i),ref:r},s,{children:[o,l.required&&xe(iTe,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))}),sTe=aTe;function lTe(e){return Gt("MuiInputLabel",e)}Vt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const cTe=["disableAnimation","margin","shrink","variant","className"],uTe=e=>{const{classes:t,formControl:r,size:n,shrink:o,disableAnimation:i,variant:a,required:s}=e,c={root:["root",r&&"formControl",!i&&"animated",o&&"shrink",n&&n!=="normal"&&`size${ut(n)}`,a],asterisk:[s&&"asterisk"]},l=pt(c,lTe,t);return W({},t,l)},dTe=We(sTe,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${ow.asterisk}`]:t.asterisk},t.root,r.formControl&&t.formControl,r.size==="small"&&t.sizeSmall,r.shrink&&t.shrink,!r.disableAnimation&&t.animated,r.focused&&t.focused,t[r.variant]]}})(({theme:e,ownerState:t})=>W({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},t.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},t.size==="small"&&{transform:"translate(0, 17px) scale(1)"},t.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!t.disableAnimation&&{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},t.variant==="filled"&&W({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},t.shrink&&W({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},t.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),t.variant==="outlined"&&W({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},t.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},t.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),fTe=A.forwardRef(function(t,r){const n=Wt({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,shrink:i,className:a}=n,s=ze(n,cTe),c=yf();let l=i;typeof l>"u"&&c&&(l=c.filled||c.focused||c.adornedStart);const u=c0({props:n,muiFormControl:c,states:["size","variant","required","focused"]}),f=W({},n,{disableAnimation:o,formControl:c,shrink:l,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),d=uTe(f);return R(dTe,W({"data-shrink":l,ownerState:f,ref:r,className:it(d.root,a)},s,{classes:d}))}),F2=fTe;function hTe(e){return Gt("MuiFormControl",e)}Vt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const pTe=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],mTe=e=>{const{classes:t,margin:r,fullWidth:n}=e,o={root:["root",r!=="none"&&`margin${ut(r)}`,n&&"fullWidth"]};return pt(o,hTe,t)},gTe=We("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>W({},t.root,t[`margin${ut(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>W({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),vTe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:c=!1,error:l=!1,focused:u,fullWidth:f=!1,hiddenLabel:d=!1,margin:h="none",required:p=!1,size:g="medium",variant:m="outlined"}=n,v=ze(n,pTe),y=W({},n,{color:a,component:s,disabled:c,error:l,fullWidth:f,hiddenLabel:d,margin:h,required:p,size:g,variant:m}),b=mTe(y),[w,E]=A.useState(()=>{let T=!1;return o&&A.Children.forEach(o,P=>{if(!iv(P,["Input","Select"]))return;const _=iv(P,["Select"])?P.props.input:P;_&&_Ee(_.props)&&(T=!0)}),T}),[I,O]=A.useState(()=>{let T=!1;return o&&A.Children.forEach(o,P=>{iv(P,["Input","Select"])&&(rE(P.props,!0)||rE(P.props.inputProps,!0))&&(T=!0)}),T}),[D,N]=A.useState(!1);c&&D&&N(!1);const U=u!==void 0&&!c?u:D;let B;const F=A.useMemo(()=>({adornedStart:w,setAdornedStart:E,color:a,disabled:c,error:l,filled:I,focused:U,fullWidth:f,hiddenLabel:d,size:g,onBlur:()=>{N(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{N(!0)},registerEffect:B,required:p,variant:m}),[w,a,c,l,I,U,f,d,B,p,g,m]);return R(RI.Provider,{value:F,children:R(gTe,W({as:s,ownerState:y,className:it(b.root,i),ref:r},v,{children:o}))})}),N2=vTe;function yTe(e){return Gt("MuiFormHelperText",e)}const bTe=Vt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),fU=bTe;var hU;const wTe=["children","className","component","disabled","error","filled","focused","margin","required","variant"],xTe=e=>{const{classes:t,contained:r,size:n,disabled:o,error:i,filled:a,focused:s,required:c}=e,l={root:["root",o&&"disabled",i&&"error",n&&`size${ut(n)}`,r&&"contained",s&&"focused",a&&"filled",c&&"required"]};return pt(l,yTe,t)},CTe=We("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.size&&t[`size${ut(r.size)}`],r.contained&&t.contained,r.filled&&t.filled]}})(({theme:e,ownerState:t})=>W({color:(e.vars||e).palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${fU.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${fU.error}`]:{color:(e.vars||e).palette.error.main}},t.size==="small"&&{marginTop:4},t.contained&&{marginLeft:14,marginRight:14})),STe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p"}=n,s=ze(n,wTe),c=yf(),l=c0({props:n,muiFormControl:c,states:["variant","size","disabled","error","filled","focused","required"]}),u=W({},n,{component:a,contained:l.variant==="filled"||l.variant==="outlined",variant:l.variant,size:l.size,disabled:l.disabled,error:l.error,filled:l.filled,focused:l.focused,required:l.required}),f=xTe(u);return R(CTe,W({as:a,ownerState:u,className:it(f.root,i),ref:r},s,{children:o===" "?hU||(hU=R("span",{className:"notranslate",children:"​"})):o}))}),pD=STe,mD=e=>e.scrollTop;function a1(e,t){var r,n;const{timeout:o,easing:i,style:a={}}=e;return{duration:(r=a.transitionDuration)!=null?r:typeof o=="number"?o:o[t.mode]||0,easing:(n=a.transitionTimingFunction)!=null?n:typeof i=="object"?i[t.mode]:i,delay:a.transitionDelay}}const _Te=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function yR(e){return`scale(${e}, ${e**2})`}const kTe={entering:{opacity:1,transform:yR(1)},entered:{opacity:1,transform:"none"}},OA=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),RQ=A.forwardRef(function(t,r){const{addEndListener:n,appear:o=!0,children:i,easing:a,in:s,onEnter:c,onEntered:l,onEntering:u,onExit:f,onExited:d,onExiting:h,style:p,timeout:g="auto",TransitionComponent:m=TI}=t,v=ze(t,_Te),y=jg(),b=A.useRef(),w=An(),E=A.useRef(null),I=Ur(E,i.ref,r),O=_=>C=>{if(_){const S=E.current;C===void 0?_(S):_(S,C)}},D=O(u),N=O((_,C)=>{mD(_);const{duration:S,delay:x,easing:k}=a1({style:p,timeout:g,easing:a},{mode:"enter"});let L;g==="auto"?(L=w.transitions.getAutoHeightDuration(_.clientHeight),b.current=L):L=S,_.style.transition=[w.transitions.create("opacity",{duration:L,delay:x}),w.transitions.create("transform",{duration:OA?L:L*.666,delay:x,easing:k})].join(","),c&&c(_,C)}),U=O(l),B=O(h),F=O(_=>{const{duration:C,delay:S,easing:x}=a1({style:p,timeout:g,easing:a},{mode:"exit"});let k;g==="auto"?(k=w.transitions.getAutoHeightDuration(_.clientHeight),b.current=k):k=C,_.style.transition=[w.transitions.create("opacity",{duration:k,delay:S}),w.transitions.create("transform",{duration:OA?k:k*.666,delay:OA?S:S||k*.333,easing:x})].join(","),_.style.opacity=0,_.style.transform=yR(.75),f&&f(_)}),T=O(d);return R(m,W({appear:o,in:s,nodeRef:E,onEnter:N,onEntered:U,onEntering:D,onExit:F,onExited:T,onExiting:B,addEndListener:_=>{g==="auto"&&y.start(b.current||0,_),n&&n(E.current,_)},timeout:g==="auto"?null:g},v,{children:(_,C)=>A.cloneElement(i,W({style:W({opacity:0,transform:yR(.75),visibility:_==="exited"&&!s?"hidden":void 0},kTe[_],p,i.props.style),ref:I},C))}))});RQ.muiSupportAuto=!0;const s1=RQ,ETe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],TTe={entering:{opacity:1},entered:{opacity:1}},ITe=A.forwardRef(function(t,r){const n=An(),o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:c,in:l,onEnter:u,onEntered:f,onEntering:d,onExit:h,onExited:p,onExiting:g,style:m,timeout:v=o,TransitionComponent:y=TI}=t,b=ze(t,ETe),w=A.useRef(null),E=Ur(w,s.ref,r),I=P=>_=>{if(P){const C=w.current;_===void 0?P(C):P(C,_)}},O=I(d),D=I((P,_)=>{mD(P);const C=a1({style:m,timeout:v,easing:c},{mode:"enter"});P.style.webkitTransition=n.transitions.create("opacity",C),P.style.transition=n.transitions.create("opacity",C),u&&u(P,_)}),N=I(f),U=I(g),B=I(P=>{const _=a1({style:m,timeout:v,easing:c},{mode:"exit"});P.style.webkitTransition=n.transitions.create("opacity",_),P.style.transition=n.transitions.create("opacity",_),h&&h(P)}),F=I(p);return R(y,W({appear:a,in:l,nodeRef:w,onEnter:D,onEntered:N,onEntering:O,onExit:B,onExited:F,onExiting:U,addEndListener:P=>{i&&i(w.current,P)},timeout:v},b,{children:(P,_)=>A.cloneElement(s,W({style:W({opacity:0,visibility:P==="exited"&&!l?"hidden":void 0},TTe[P],m,s.props.style),ref:E},_))}))}),W1=ITe;function ATe(e){return Gt("MuiBackdrop",e)}Vt("MuiBackdrop",["root","invisible"]);const PTe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],MTe=e=>{const{classes:t,invisible:r}=e;return pt({root:["root",r&&"invisible"]},ATe,t)},RTe=We("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})(({ownerState:e})=>W({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),OTe=A.forwardRef(function(t,r){var n,o,i;const a=Wt({props:t,name:"MuiBackdrop"}),{children:s,className:c,component:l="div",components:u={},componentsProps:f={},invisible:d=!1,open:h,slotProps:p={},slots:g={},TransitionComponent:m=W1,transitionDuration:v}=a,y=ze(a,PTe),b=W({},a,{component:l,invisible:d}),w=MTe(b),E=(n=p.root)!=null?n:f.root;return R(m,W({in:h,timeout:v},y,{children:R(RTe,W({"aria-hidden":!0},E,{as:(o=(i=g.root)!=null?i:u.Root)!=null?o:l,className:it(w.root,c,E==null?void 0:E.className),ownerState:W({},b,E==null?void 0:E.ownerState),classes:w,ref:r,children:s}))}))}),Yh=OTe;function DTe(e){return Gt("MuiModal",e)}Vt("MuiModal",["root","hidden","backdrop"]);const FTe=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],NTe=e=>{const{open:t,exited:r,classes:n}=e;return pt({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},DTe,n)},LTe=We("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})(({theme:e,ownerState:t})=>W({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),$Te=We(Yh,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),BTe=A.forwardRef(function(t,r){var n,o,i,a,s,c;const l=Wt({name:"MuiModal",props:t}),{BackdropComponent:u=$Te,BackdropProps:f,className:d,closeAfterTransition:h=!1,children:p,container:g,component:m,components:v={},componentsProps:y={},disableAutoFocus:b=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:E=!1,disablePortal:I=!1,disableRestoreFocus:O=!1,disableScrollLock:D=!1,hideBackdrop:N=!1,keepMounted:U=!1,onBackdropClick:B,open:F,slotProps:T,slots:P}=l,_=ze(l,FTe),C=W({},l,{closeAfterTransition:h,disableAutoFocus:b,disableEnforceFocus:w,disableEscapeKeyDown:E,disablePortal:I,disableRestoreFocus:O,disableScrollLock:D,hideBackdrop:N,keepMounted:U}),{getRootProps:S,getBackdropProps:x,getTransitionProps:k,portalRef:L,isTopModal:j,exited:z,hasTransition:Y}=K_e(W({},C,{rootRef:r})),K=W({},C,{exited:z}),Q=NTe(K),q={};if(p.props.tabIndex===void 0&&(q.tabIndex="-1"),Y){const{onEnter:re,onExited:se}=k();q.onEnter=re,q.onExited=se}const J=(n=(o=P==null?void 0:P.root)!=null?o:v.Root)!=null?n:LTe,G=(i=(a=P==null?void 0:P.backdrop)!=null?a:v.Backdrop)!=null?i:u,V=(s=T==null?void 0:T.root)!=null?s:y.root,X=(c=T==null?void 0:T.backdrop)!=null?c:y.backdrop,te=Cr({elementType:J,externalSlotProps:V,externalForwardedProps:_,getSlotProps:S,additionalProps:{ref:r,as:m},ownerState:K,className:it(d,V==null?void 0:V.className,Q==null?void 0:Q.root,!K.open&&K.exited&&(Q==null?void 0:Q.hidden))}),ee=Cr({elementType:G,externalSlotProps:X,additionalProps:f,getSlotProps:re=>x(W({},re,{onClick:se=>{B&&B(se),re!=null&&re.onClick&&re.onClick(se)}})),className:it(X==null?void 0:X.className,f==null?void 0:f.className,Q==null?void 0:Q.backdrop),ownerState:K});return!U&&!F&&(!Y||z)?null:R(dQ,{ref:L,container:g,disablePortal:I,children:xe(J,W({},te,{children:[!N&&u?R(G,W({},ee)):null,R(iD,{disableEnforceFocus:w,disableAutoFocus:b,disableRestoreFocus:O,isEnabled:j,open:F,children:A.cloneElement(p,q)})]}))})}),gD=BTe;function UTe(e){return Gt("MuiPaper",e)}Vt("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const HTe=["className","component","elevation","square","variant"],zTe=e=>{const{square:t,elevation:r,variant:n,classes:o}=e,i={root:["root",n,!t&&"rounded",n==="elevation"&&`elevation${r}`]};return pt(i,UTe,o)},jTe=We("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],!r.square&&t.rounded,r.variant==="elevation"&&t[`elevation${r.elevation}`]]}})(({theme:e,ownerState:t})=>{var r;return W({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&W({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Vr("#fff",IB(t.elevation))}, ${Vr("#fff",IB(t.elevation))})`},e.vars&&{backgroundImage:(r=e.vars.overlays)==null?void 0:r[t.elevation]}))}),VTe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiPaper"}),{className:o,component:i="div",elevation:a=1,square:s=!1,variant:c="elevation"}=n,l=ze(n,HTe),u=W({},n,{component:i,elevation:a,square:s,variant:c}),f=zTe(u);return R(jTe,W({as:i,ownerState:u,className:it(f.root,o),ref:r},l))}),Es=VTe;function WTe(e){return Gt("MuiPopover",e)}Vt("MuiPopover",["root","paper"]);const GTe=["onEntering"],qTe=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],KTe=["slotProps"];function pU(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.height/2:t==="bottom"&&(r=e.height),r}function mU(e,t){let r=0;return typeof t=="number"?r=t:t==="center"?r=e.width/2:t==="right"&&(r=e.width),r}function gU(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function DA(e){return typeof e=="function"?e():e}const YTe=e=>{const{classes:t}=e;return pt({root:["root"],paper:["paper"]},WTe,t)},XTe=We(gD,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),OQ=We(Es,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),QTe=A.forwardRef(function(t,r){var n,o,i;const a=Wt({props:t,name:"MuiPopover"}),{action:s,anchorEl:c,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:f="anchorEl",children:d,className:h,container:p,elevation:g=8,marginThreshold:m=16,open:v,PaperProps:y={},slots:b,slotProps:w,transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:I=s1,transitionDuration:O="auto",TransitionProps:{onEntering:D}={},disableScrollLock:N=!1}=a,U=ze(a.TransitionProps,GTe),B=ze(a,qTe),F=(n=w==null?void 0:w.paper)!=null?n:y,T=A.useRef(),P=Ur(T,F.ref),_=W({},a,{anchorOrigin:l,anchorReference:f,elevation:g,marginThreshold:m,externalPaperSlotProps:F,transformOrigin:E,TransitionComponent:I,transitionDuration:O,TransitionProps:U}),C=YTe(_),S=A.useCallback(()=>{if(f==="anchorPosition")return u;const re=DA(c),pe=(re&&re.nodeType===1?re:In(T.current).body).getBoundingClientRect();return{top:pe.top+pU(pe,l.vertical),left:pe.left+mU(pe,l.horizontal)}},[c,l.horizontal,l.vertical,u,f]),x=A.useCallback(re=>({vertical:pU(re,E.vertical),horizontal:mU(re,E.horizontal)}),[E.horizontal,E.vertical]),k=A.useCallback(re=>{const se={width:re.offsetWidth,height:re.offsetHeight},pe=x(se);if(f==="none")return{top:null,left:null,transformOrigin:gU(pe)};const ce=S();let ne=ce.top-pe.vertical,he=ce.left-pe.horizontal;const oe=ne+se.height,le=he+se.width,de=Gs(DA(c)),ve=de.innerHeight-m,we=de.innerWidth-m;if(m!==null&&ne<m){const ie=ne-m;ne-=ie,pe.vertical+=ie}else if(m!==null&&oe>ve){const ie=oe-ve;ne-=ie,pe.vertical+=ie}if(m!==null&&he<m){const ie=he-m;he-=ie,pe.horizontal+=ie}else if(le>we){const ie=le-we;he-=ie,pe.horizontal+=ie}return{top:`${Math.round(ne)}px`,left:`${Math.round(he)}px`,transformOrigin:gU(pe)}},[c,f,S,x,m]),[L,j]=A.useState(v),z=A.useCallback(()=>{const re=T.current;if(!re)return;const se=k(re);se.top!==null&&(re.style.top=se.top),se.left!==null&&(re.style.left=se.left),re.style.transformOrigin=se.transformOrigin,j(!0)},[k]);A.useEffect(()=>(N&&window.addEventListener("scroll",z),()=>window.removeEventListener("scroll",z)),[c,N,z]);const Y=(re,se)=>{D&&D(re,se),z()},K=()=>{j(!1)};A.useEffect(()=>{v&&z()}),A.useImperativeHandle(s,()=>v?{updatePosition:()=>{z()}}:null,[v,z]),A.useEffect(()=>{if(!v)return;const re=ap(()=>{z()}),se=Gs(c);return se.addEventListener("resize",re),()=>{re.clear(),se.removeEventListener("resize",re)}},[c,v,z]);let Q=O;O==="auto"&&!I.muiSupportAuto&&(Q=void 0);const q=p||(c?In(DA(c)).body:void 0),J=(o=b==null?void 0:b.root)!=null?o:XTe,G=(i=b==null?void 0:b.paper)!=null?i:OQ,V=Cr({elementType:G,externalSlotProps:W({},F,{style:L?F.style:W({},F.style,{opacity:0})}),additionalProps:{elevation:g,ref:P},ownerState:_,className:it(C.paper,F==null?void 0:F.className)}),X=Cr({elementType:J,externalSlotProps:(w==null?void 0:w.root)||{},externalForwardedProps:B,additionalProps:{ref:r,slotProps:{backdrop:{invisible:!0}},container:q,open:v},ownerState:_,className:it(C.root,h)}),{slotProps:te}=X,ee=ze(X,KTe);return R(J,W({},ee,!Jc(J)&&{slotProps:te,disableScrollLock:N},{children:R(I,W({appear:!0,in:v,onEntering:Y,onExited:K,timeout:Q},U,{children:R(G,W({},V,{children:d}))}))}))}),ZTe=QTe;function JTe(e){return Gt("MuiMenu",e)}Vt("MuiMenu",["root","paper","list"]);const eIe=["onEntering"],tIe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],rIe={vertical:"top",horizontal:"right"},nIe={vertical:"top",horizontal:"left"},oIe=e=>{const{classes:t}=e;return pt({root:["root"],paper:["paper"],list:["list"]},JTe,t)},iIe=We(ZTe,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),aIe=We(OQ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),sIe=We(j1,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),lIe=A.forwardRef(function(t,r){var n,o;const i=Wt({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:c,disableAutoFocusItem:l=!1,MenuListProps:u={},onClose:f,open:d,PaperProps:h={},PopoverClasses:p,transitionDuration:g="auto",TransitionProps:{onEntering:m}={},variant:v="selectedMenu",slots:y={},slotProps:b={}}=i,w=ze(i.TransitionProps,eIe),E=ze(i,tIe),I=l0(),O=W({},i,{autoFocus:a,disableAutoFocusItem:l,MenuListProps:u,onEntering:m,PaperProps:h,transitionDuration:g,TransitionProps:w,variant:v}),D=oIe(O),N=a&&!l&&d,U=A.useRef(null),B=(x,k)=>{U.current&&U.current.adjustStyleForScrollbar(x,{direction:I?"rtl":"ltr"}),m&&m(x,k)},F=x=>{x.key==="Tab"&&(x.preventDefault(),f&&f(x,"tabKeyDown"))};let T=-1;A.Children.map(s,(x,k)=>{A.isValidElement(x)&&(x.props.disabled||(v==="selectedMenu"&&x.props.selected||T===-1)&&(T=k))});const P=(n=y.paper)!=null?n:aIe,_=(o=b.paper)!=null?o:h,C=Cr({elementType:y.root,externalSlotProps:b.root,ownerState:O,className:[D.root,c]}),S=Cr({elementType:P,externalSlotProps:_,ownerState:O,className:D.paper});return R(iIe,W({onClose:f,anchorOrigin:{vertical:"bottom",horizontal:I?"right":"left"},transformOrigin:I?rIe:nIe,slots:{paper:P,root:y.root},slotProps:{root:C,paper:S},open:d,ref:r,transitionDuration:g,TransitionProps:W({onEntering:B},w),ownerState:O},E,{classes:p,children:R(sIe,W({onKeyDown:F,actions:U,autoFocus:a&&(T===-1||l),autoFocusItem:N,variant:v},u,{className:it(D.list,u.className),children:s}))}))}),vD=lIe;function cIe(e){return Gt("MuiNativeSelect",e)}const uIe=Vt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),yD=uIe,dIe=["className","disabled","error","IconComponent","inputRef","variant"],fIe=e=>{const{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,s={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ut(r)}`,i&&"iconOpen",n&&"disabled"]};return pt(s,cIe,t)},DQ=({ownerState:e,theme:t})=>W({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":W({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:t.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${yD.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},e.variant==="filled"&&{"&&&":{paddingRight:32}},e.variant==="outlined"&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),hIe=We("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Ja,overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.select,t[r.variant],r.error&&t.error,{[`&.${yD.multiple}`]:t.multiple}]}})(DQ),FQ=({ownerState:e,theme:t})=>W({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${yD.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},e.variant==="filled"&&{right:7},e.variant==="outlined"&&{right:7}),pIe=We("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${ut(r.variant)}`],r.open&&t.iconOpen]}})(FQ),mIe=A.forwardRef(function(t,r){const{className:n,disabled:o,error:i,IconComponent:a,inputRef:s,variant:c="standard"}=t,l=ze(t,dIe),u=W({},t,{disabled:o,variant:c,error:i}),f=fIe(u);return xe(A.Fragment,{children:[R(hIe,W({ownerState:u,className:it(f.select,n),disabled:o,ref:s||r},l)),t.multiple?null:R(pIe,{as:a,ownerState:u,className:f.icon})]})}),gIe=mIe;function vIe(e){return Gt("MuiSelect",e)}const yIe=Vt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Yy=yIe;var vU;const bIe=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],wIe=We("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`&.${Yy.select}`]:t.select},{[`&.${Yy.select}`]:t[r.variant]},{[`&.${Yy.error}`]:t.error},{[`&.${Yy.multiple}`]:t.multiple}]}})(DQ,{[`&.${Yy.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),xIe=We("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.icon,r.variant&&t[`icon${ut(r.variant)}`],r.open&&t.iconOpen]}})(FQ),CIe=We("input",{shouldForwardProp:e=>EI(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function yU(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function SIe(e){return e==null||typeof e=="string"&&!e.trim()}const _Ie=e=>{const{classes:t,variant:r,disabled:n,multiple:o,open:i,error:a}=e,s={select:["select",r,n&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${ut(r)}`,i&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return pt(s,vIe,t)},kIe=A.forwardRef(function(t,r){var n;const{"aria-describedby":o,"aria-label":i,autoFocus:a,autoWidth:s,children:c,className:l,defaultOpen:u,defaultValue:f,disabled:d,displayEmpty:h,error:p=!1,IconComponent:g,inputRef:m,labelId:v,MenuProps:y={},multiple:b,name:w,onBlur:E,onChange:I,onClose:O,onFocus:D,onOpen:N,open:U,readOnly:B,renderValue:F,SelectDisplayProps:T={},tabIndex:P,value:_,variant:C="standard"}=t,S=ze(t,bIe),[x,k]=sa({controlled:_,default:f,name:"Select"}),[L,j]=sa({controlled:U,default:u,name:"Select"}),z=A.useRef(null),Y=A.useRef(null),[K,Q]=A.useState(null),{current:q}=A.useRef(U!=null),[J,G]=A.useState(),V=Ur(r,m),X=A.useCallback(Ne=>{Y.current=Ne,Ne&&Q(Ne)},[]),te=K==null?void 0:K.parentNode;A.useImperativeHandle(V,()=>({focus:()=>{Y.current.focus()},node:z.current,value:x}),[x]),A.useEffect(()=>{u&&L&&K&&!q&&(G(s?null:te.clientWidth),Y.current.focus())},[K,s]),A.useEffect(()=>{a&&Y.current.focus()},[a]),A.useEffect(()=>{if(!v)return;const Ne=In(Y.current).getElementById(v);if(Ne){const Qe=()=>{getSelection().isCollapsed&&Y.current.focus()};return Ne.addEventListener("click",Qe),()=>{Ne.removeEventListener("click",Qe)}}},[v]);const ee=(Ne,Qe)=>{Ne?N&&N(Qe):O&&O(Qe),q||(G(s?null:te.clientWidth),j(Ne))},re=Ne=>{Ne.button===0&&(Ne.preventDefault(),Y.current.focus(),ee(!0,Ne))},se=Ne=>{ee(!1,Ne)},pe=A.Children.toArray(c),ce=Ne=>{const Qe=pe.find(Xe=>Xe.props.value===Ne.target.value);Qe!==void 0&&(k(Qe.props.value),I&&I(Ne,Qe))},ne=Ne=>Qe=>{let Xe;if(Qe.currentTarget.hasAttribute("tabindex")){if(b){Xe=Array.isArray(x)?x.slice():[];const rt=x.indexOf(Ne.props.value);rt===-1?Xe.push(Ne.props.value):Xe.splice(rt,1)}else Xe=Ne.props.value;if(Ne.props.onClick&&Ne.props.onClick(Qe),x!==Xe&&(k(Xe),I)){const rt=Qe.nativeEvent||Qe,ht=new rt.constructor(rt.type,rt);Object.defineProperty(ht,"target",{writable:!0,value:{value:Xe,name:w}}),I(ht,Ne)}b||ee(!1,Qe)}},he=Ne=>{B||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Ne.key)!==-1&&(Ne.preventDefault(),ee(!0,Ne))},oe=K!==null&&L,le=Ne=>{!oe&&E&&(Object.defineProperty(Ne,"target",{writable:!0,value:{value:x,name:w}}),E(Ne))};delete S["aria-invalid"];let de,ve;const we=[];let ie=!1;(rE({value:x})||h)&&(F?de=F(x):ie=!0);const ge=pe.map(Ne=>{if(!A.isValidElement(Ne))return null;let Qe;if(b){if(!Array.isArray(x))throw new Error(nf(2));Qe=x.some(Xe=>yU(Xe,Ne.props.value)),Qe&&ie&&we.push(Ne.props.children)}else Qe=yU(x,Ne.props.value),Qe&&ie&&(ve=Ne.props.children);return A.cloneElement(Ne,{"aria-selected":Qe?"true":"false",onClick:ne(Ne),onKeyUp:Xe=>{Xe.key===" "&&Xe.preventDefault(),Ne.props.onKeyUp&&Ne.props.onKeyUp(Xe)},role:"option",selected:Qe,value:void 0,"data-value":Ne.props.value})});ie&&(b?we.length===0?de=null:de=we.reduce((Ne,Qe,Xe)=>(Ne.push(Qe),Xe<we.length-1&&Ne.push(", "),Ne),[]):de=ve);let Pe=J;!s&&q&&K&&(Pe=te.clientWidth);let Fe;typeof P<"u"?Fe=P:Fe=d?null:0;const Ie=T.id||(w?`mui-component-select-${w}`:void 0),Oe=W({},t,{variant:C,value:x,open:oe,error:p}),$e=_Ie(Oe),et=W({},y.PaperProps,(n=y.slotProps)==null?void 0:n.paper),Ze=dn();return xe(A.Fragment,{children:[R(wIe,W({ref:X,tabIndex:Fe,role:"combobox","aria-controls":Ze,"aria-disabled":d?"true":void 0,"aria-expanded":oe?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,Ie].filter(Boolean).join(" ")||void 0,"aria-describedby":o,onKeyDown:he,onMouseDown:d||B?null:re,onBlur:le,onFocus:D},T,{ownerState:Oe,className:it(T.className,$e.select,l),id:Ie,children:SIe(de)?vU||(vU=R("span",{className:"notranslate",children:"​"})):de})),R(CIe,W({"aria-invalid":p,value:Array.isArray(x)?x.join(","):x,name:w,ref:z,"aria-hidden":!0,onChange:ce,tabIndex:-1,disabled:d,className:$e.nativeInput,autoFocus:a,ownerState:Oe},S)),R(xIe,{as:g,className:$e.icon,ownerState:Oe}),R(vD,W({id:`menu-${w||""}`,anchorEl:te,open:oe,onClose:se,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:W({"aria-labelledby":v,role:"listbox","aria-multiselectable":b?"true":void 0,disableListWrap:!0,id:Ze},y.MenuListProps),slotProps:W({},y.slotProps,{paper:W({},et,{style:W({minWidth:Pe},et!=null?et.style:null)})}),children:ge}))]})}),EIe=kIe,NQ=Sr(R("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),TIe=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],IIe=["root"],AIe=e=>{const{classes:t}=e;return t},bD={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Ja(e)&&e!=="variant",slot:"Root"},PIe=We(IQ,bD)(""),MIe=We(hD,bD)(""),RIe=We(PQ,bD)(""),LQ=A.forwardRef(function(t,r){const n=Wt({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:c=!1,displayEmpty:l=!1,IconComponent:u=NQ,id:f,input:d,inputProps:h,label:p,labelId:g,MenuProps:m,multiple:v=!1,native:y=!1,onClose:b,onOpen:w,open:E,renderValue:I,SelectDisplayProps:O,variant:D="outlined"}=n,N=ze(n,TIe),U=y?gIe:EIe,B=yf(),F=c0({props:n,muiFormControl:B,states:["variant","error"]}),T=F.variant||D,P=W({},n,{variant:T,classes:a}),_=AIe(P),C=ze(_,IIe),S=d||{standard:R(PIe,{ownerState:P}),outlined:R(MIe,{label:p,ownerState:P}),filled:R(RIe,{ownerState:P})}[T],x=Ur(r,S.ref);return R(A.Fragment,{children:A.cloneElement(S,W({inputComponent:U,inputProps:W({children:i,error:F.error,IconComponent:u,variant:T,type:void 0,multiple:v},y?{id:f}:{autoWidth:o,defaultOpen:c,displayEmpty:l,labelId:g,MenuProps:m,onClose:b,onOpen:w,open:E,renderValue:I,SelectDisplayProps:W({id:f},O)},h,{classes:h?ys(C,h.classes):C},d?d.props.inputProps:{})},(v&&y||l)&&T==="outlined"?{notched:!0}:{},{ref:x,className:it(S.props.className,s,_.root)},!d&&{variant:T},N))})});LQ.muiName="Select";const L2=LQ;function OIe(e){return Gt("MuiTextField",e)}Vt("MuiTextField",["root"]);const DIe=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],FIe={standard:IQ,filled:PQ,outlined:hD},NIe=e=>{const{classes:t}=e;return pt({root:["root"]},OIe,t)},LIe=We(N2,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$Ie=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:c="primary",defaultValue:l,disabled:u=!1,error:f=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:g,InputLabelProps:m,inputProps:v,InputProps:y,inputRef:b,label:w,maxRows:E,minRows:I,multiline:O=!1,name:D,onBlur:N,onChange:U,onFocus:B,placeholder:F,required:T=!1,rows:P,select:_=!1,SelectProps:C,type:S,value:x,variant:k="outlined"}=n,L=ze(n,DIe),j=W({},n,{autoFocus:i,color:c,disabled:u,error:f,fullWidth:h,multiline:O,required:T,select:_,variant:k}),z=NIe(j),Y={};k==="outlined"&&(m&&typeof m.shrink<"u"&&(Y.notched=m.shrink),Y.label=w),_&&((!C||!C.native)&&(Y.id=void 0),Y["aria-describedby"]=void 0);const K=dn(g),Q=p&&K?`${K}-helper-text`:void 0,q=w&&K?`${K}-label`:void 0,J=FIe[k],G=R(J,W({"aria-describedby":Q,autoComplete:o,autoFocus:i,defaultValue:l,fullWidth:h,multiline:O,name:D,rows:P,maxRows:E,minRows:I,type:S,value:x,id:K,inputRef:b,onBlur:N,onChange:U,onFocus:B,placeholder:F,inputProps:v},Y,y));return xe(LIe,W({className:it(z.root,s),disabled:u,error:f,fullWidth:h,ref:r,required:T,color:c,variant:k,ownerState:j},L,{children:[w!=null&&w!==""&&R(F2,W({htmlFor:K,id:q},m,{children:w})),_?R(L2,W({"aria-describedby":Q,id:K,labelId:q,value:x,input:G},C,{children:a})):G,p&&R(pD,W({id:Q},d,{children:p}))]}))}),Xa=$Ie;function wD(e,t,r,n){const{value:o,onError:i}=e,a=lp(),s=A.useRef(n),c=t({adapter:a,value:o,props:e});return A.useEffect(()=>{i&&!r(c,s.current)&&i(c,o),s.current=c},[r,i,s,c,o]),c}const BIe=e=>{const t=Hn(),r=wc(),n=lp(),i=An().direction==="rtl",{valueManager:a,fieldValueManager:s,valueType:c,validator:l,internalProps:u,internalProps:{value:f,defaultValue:d,referenceDate:h,onChange:p,format:g,formatDensity:m="dense",selectedSections:v,onSelectedSectionsChange:y,shouldRespectLeadingZeros:b=!1,timezone:w}}=e,{timezone:E,value:I,handleValueChange:O}=tD({timezone:w,value:f,defaultValue:d,onChange:p,valueManager:a}),D=A.useMemo(()=>$Se(t,E),[t,E]),N=A.useCallback((K,Q=null)=>s.getSectionsFromValue(t,K,Q,i,q=>HB(t,E,r,g,q,m,b,i)),[s,g,r,i,b,t,m,E]),U=A.useMemo(()=>s.getValueStrFromSections(N(a.emptyValue),i),[s,N,a.emptyValue,i]),[B,F]=A.useState(()=>{const K=N(I),Q={sections:K,value:I,referenceValue:a.emptyValue,tempValueStrAndroid:null},q=RSe(K),J=a.getInitialReferenceValue({referenceDate:h,value:I,utils:t,props:u,granularity:q,timezone:E});return W({},Q,{referenceValue:J})}),[T,P]=sa({controlled:v,default:null,name:"useField",state:"selectedSectionIndexes"}),_=K=>{P(K),y==null||y(K),F(Q=>W({},Q,{selectedSectionQuery:null}))},C=A.useMemo(()=>{if(T==null)return null;if(T==="all")return{startIndex:0,endIndex:B.sections.length-1,shouldSelectBoundarySelectors:!0};if(typeof T=="number")return{startIndex:T,endIndex:T};if(typeof T=="string"){const K=B.sections.findIndex(Q=>Q.type===T);return{startIndex:K,endIndex:K}}return T},[T,B.sections]),S=({value:K,referenceValue:Q,sections:q})=>{if(F(G=>W({},G,{sections:q,value:K,referenceValue:Q,tempValueStrAndroid:null})),a.areValuesEqual(t,B.value,K))return;const J={validationError:l({adapter:n,value:K,props:W({},u,{value:K,timezone:E})})};O(K,J)},x=(K,Q)=>{const q=[...B.sections];return q[K]=W({},q[K],{value:Q,modified:!0}),nD(q,i)},k=()=>{S({value:a.emptyValue,referenceValue:B.referenceValue,sections:N(a.emptyValue)})},L=()=>{if(C==null)return;const K=B.sections[C.startIndex],Q=s.getActiveDateManager(t,B,K),J=Q.getSections(B.sections).filter(te=>te.value!=="").length===(K.value===""?0:1),G=x(C.startIndex,""),V=J?null:t.date(new Date("")),X=Q.getNewValuesFromNewActiveDate(V);(V!=null&&!t.isValid(V))!=(Q.date!=null&&!t.isValid(Q.date))?S(W({},X,{sections:G})):F(te=>W({},te,X,{sections:G,tempValueStrAndroid:null}))},j=K=>{const Q=(G,V)=>{const X=t.parse(G,g);if(X==null||!t.isValid(X))return null;const te=HB(t,E,r,g,X,m,b,i);return jB(t,E,X,te,V,!1)},q=s.parseValueStr(K,B.referenceValue,Q),J=s.updateReferenceValue(t,q,B.referenceValue);S({value:q,referenceValue:J,sections:N(q,B.sections)})},z=({activeSection:K,newSectionValue:Q,shouldGoToNextSection:q})=>{q&&C&&C.startIndex<B.sections.length-1?_(C.startIndex+1):C&&C.startIndex!==C.endIndex&&_(C.startIndex);const J=s.getActiveDateManager(t,B,K),G=x(C.startIndex,Q),V=J.getSections(G),X=LSe(t,V);let te,ee;if(X!=null&&t.isValid(X)){const re=jB(t,E,X,V,J.referenceDate,!0);te=J.getNewValuesFromNewActiveDate(re),ee=!0}else te=J.getNewValuesFromNewActiveDate(X),ee=(X!=null&&!t.isValid(X))!=(J.date!=null&&!t.isValid(J.date));return ee?S(W({},te,{sections:G})):F(re=>W({},re,te,{sections:G,tempValueStrAndroid:null}))},Y=K=>F(Q=>W({},Q,{tempValueStrAndroid:K}));return A.useEffect(()=>{const K=N(B.value);F(Q=>W({},Q,{sections:K}))},[g,t.locale]),A.useEffect(()=>{let K=!1;a.areValuesEqual(t,B.value,I)?K=a.getTimezone(t,B.value)!==a.getTimezone(t,I):K=!0,K&&F(Q=>W({},Q,{value:I,referenceValue:s.updateReferenceValue(t,I,Q.referenceValue),sections:N(I)}))},[I]),{state:B,selectedSectionIndexes:C,setSelectedSections:_,clearValue:k,clearActiveSection:L,updateSectionValue:z,updateValueFromValueStr:j,setTempAndroidValueStr:Y,sectionsValueBoundaries:D,placeholder:U,timezone:E}},UIe=5e3,ng=e=>e.saveQuery!=null,HIe=({sections:e,updateSectionValue:t,sectionsValueBoundaries:r,setTempAndroidValueStr:n,timezone:o})=>{const i=Hn(),[a,s]=A.useState(null),c=Mt(()=>s(null));A.useEffect(()=>{var h;a!=null&&((h=e[a.sectionIndex])==null?void 0:h.type)!==a.sectionType&&c()},[e,a,c]),A.useEffect(()=>{if(a!=null){const h=setTimeout(()=>c(),UIe);return()=>{window.clearTimeout(h)}}return()=>{}},[a,c]);const l=({keyPressed:h,sectionIndex:p},g,m)=>{const v=h.toLowerCase(),y=e[p];if(a!=null&&(!m||m(a.value))&&a.sectionIndex===p){const w=`${a.value}${v}`,E=g(w,y);if(!ng(E))return s({sectionIndex:p,value:w,sectionType:y.type}),E}const b=g(v,y);return ng(b)&&!b.saveQuery?(c(),null):(s({sectionIndex:p,value:v,sectionType:y.type}),ng(b)?null:b)},u=h=>{const p=(v,y,b)=>{const w=y.filter(E=>E.toLowerCase().startsWith(b));return w.length===0?{saveQuery:!1}:{sectionValue:w[0],shouldGoToNextSection:w.length===1}},g=(v,y,b,w)=>{const E=I=>ZX(i,o,y.type,I);if(y.contentType==="letter")return p(y.format,E(y.format),v);if(b&&w!=null&&QX(i,b).contentType==="letter"){const I=E(b),O=p(b,I,v);return ng(O)?{saveQuery:!1}:W({},O,{sectionValue:w(O.sectionValue,I)})}return{saveQuery:!1}};return l(h,(v,y)=>{switch(y.type){case"month":{const b=w=>UB(i,w,i.formats.month,y.format);return g(v,y,i.formats.month,b)}case"weekDay":{const b=(w,E)=>E.indexOf(w).toString();return g(v,y,i.formats.weekday,b)}case"meridiem":return g(v,y);default:return{saveQuery:!1}}})},f=h=>{const p=(m,v)=>{const y=+`${m}`,b=r[v.type]({currentDate:null,format:v.format,contentType:v.contentType});if(y>b.maximum)return{saveQuery:!1};if(y<b.minimum)return{saveQuery:!0};const w=+`${m}0`>b.maximum||m.length===b.maximum.toString().length;return{sectionValue:eQ(i,o,y,b,v),shouldGoToNextSection:w}};return l(h,(m,v)=>{if(v.contentType==="digit"||v.contentType==="digit-with-letter")return p(m,v);if(v.type==="month"){const y=rQ(i,o,"digit","month","MM"),b=p(m,{type:v.type,format:"MM",hasLeadingZerosInFormat:y,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(ng(b))return b;const w=UB(i,b.sectionValue,"MM",v.format);return W({},b,{sectionValue:w})}if(v.type==="weekDay"){const y=p(m,v);if(ng(y))return y;const b=PI(i,o,v.format)[Number(y.sectionValue)-1];return W({},y,{sectionValue:b})}return{saveQuery:!1}},m=>!Number.isNaN(Number(m)))};return{applyCharacterEditing:Mt(h=>{const p=e[h.sectionIndex],m=!Number.isNaN(Number(h.keyPressed))?f(h):u(h);m==null?n(null):t({activeSection:p,newSectionValue:m.sectionValue,shouldGoToNextSection:m.shouldGoToNextSection})}),resetCharacterQuery:c}};function zIe(e,t){return Array.isArray(t)?t.every(r=>e.indexOf(r)!==-1):e.indexOf(t)!==-1}const nE=(e,t)=>r=>{(r.key==="Enter"||r.key===" ")&&(e(r),r.preventDefault(),r.stopPropagation()),t&&t(r)},jIe=e=>{setTimeout(e,0)},Bm=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?Bm(t.shadowRoot):t:null},$Q="@media (pointer: fine)",VIe=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],BQ=e=>{const t=Hn(),{state:r,selectedSectionIndexes:n,setSelectedSections:o,clearValue:i,clearActiveSection:a,updateSectionValue:s,updateValueFromValueStr:c,setTempAndroidValueStr:l,sectionsValueBoundaries:u,placeholder:f,timezone:d}=BIe(e),{inputRef:h,internalProps:p,internalProps:{readOnly:g=!1,unstableFieldRef:m,minutesStep:v},forwardedProps:{onClick:y,onKeyDown:b,onFocus:w,onBlur:E,onMouseUp:I,onPaste:O,error:D,clearable:N,onClear:U,disabled:B},fieldValueManager:F,valueManager:T,validator:P}=e,_=ze(e.forwardedProps,VIe),{applyCharacterEditing:C,resetCharacterQuery:S}=HIe({sections:r.sections,updateSectionValue:s,sectionsValueBoundaries:u,setTempAndroidValueStr:l,timezone:d}),x=A.useRef(null),k=Ur(h,x),L=A.useRef(void 0),z=An().direction==="rtl",Y=A.useMemo(()=>HSe(r.sections,z),[r.sections,z]),K=()=>{var le;if(g){o(null);return}const de=(le=x.current.selectionStart)!=null?le:0;let ve;de<=r.sections[0].startInInput||de>=r.sections[r.sections.length-1].endInInput?ve=1:ve=r.sections.findIndex(ie=>ie.startInInput-ie.startSeparator.length>de);const we=ve===-1?r.sections.length-1:ve-1;o(we)},Q=Mt((le,...de)=>{le.isDefaultPrevented()||(y==null||y(le,...de),K())}),q=Mt(le=>{I==null||I(le),le.preventDefault()}),J=Mt((...le)=>{w==null||w(...le);const de=x.current;window.clearTimeout(L.current),L.current=setTimeout(()=>{!de||de!==x.current||n!=null||g||(de.value.length&&Number(de.selectionEnd)-Number(de.selectionStart)===de.value.length?o("all"):K())})}),G=Mt((...le)=>{E==null||E(...le),o(null)}),V=Mt(le=>{if(O==null||O(le),g){le.preventDefault();return}const de=le.clipboardData.getData("text");if(n&&n.startIndex===n.endIndex){const ve=r.sections[n.startIndex],we=/^[a-zA-Z]+$/.test(de),ie=/^[0-9]+$/.test(de),ge=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(de);if(ve.contentType==="letter"&&we||ve.contentType==="digit"&&ie||ve.contentType==="digit-with-letter"&&ge)return;if(we||ie){le.preventDefault();return}}le.preventDefault(),S(),c(de)}),X=Mt(le=>{if(g)return;const de=le.target.value;if(de===""){S(),i();return}const ve=le.nativeEvent.data,we=ve&&ve.length>1,ie=we?ve:de,ge=Wg(ie);if(n==null||we){c(we?ve:ge);return}let Pe;if(n.startIndex===0&&n.endIndex===r.sections.length-1&&ge.length===1)Pe=ge;else{const Fe=Wg(F.getValueStrFromSections(r.sections,z));let Ie=-1,Oe=-1;for(let Ne=0;Ne<Fe.length;Ne+=1)Ie===-1&&Fe[Ne]!==ge[Ne]&&(Ie=Ne),Oe===-1&&Fe[Fe.length-Ne-1]!==ge[ge.length-Ne-1]&&(Oe=Ne);const $e=r.sections[n.startIndex];if(Ie<$e.start||Fe.length-Oe-1>$e.end)return;const Ze=ge.length-Fe.length+$e.end-Wg($e.endSeparator||"").length;Pe=ge.slice($e.start+Wg($e.startSeparator||"").length,Ze)}if(Pe.length===0){USe()?l(ie):(S(),a());return}C({keyPressed:Pe,sectionIndex:n.startIndex})}),te=Mt(le=>{switch(b==null||b(le),!0){case(le.key==="a"&&(le.ctrlKey||le.metaKey)):{le.preventDefault(),o("all");break}case le.key==="ArrowRight":{if(le.preventDefault(),n==null)o(Y.startIndex);else if(n.startIndex!==n.endIndex)o(n.endIndex);else{const de=Y.neighbors[n.startIndex].rightIndex;de!==null&&o(de)}break}case le.key==="ArrowLeft":{if(le.preventDefault(),n==null)o(Y.endIndex);else if(n.startIndex!==n.endIndex)o(n.startIndex);else{const de=Y.neighbors[n.startIndex].leftIndex;de!==null&&o(de)}break}case le.key==="Delete":{if(le.preventDefault(),g)break;n==null||n.startIndex===0&&n.endIndex===r.sections.length-1?i():a(),S();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(le.key):{if(le.preventDefault(),g||n==null)break;const de=r.sections[n.startIndex],ve=F.getActiveDateManager(t,r,de),we=DSe(t,d,de,le.key,u,ve.date,{minutesStep:v});s({activeSection:de,newSectionValue:we,shouldGoToNextSection:!1});break}}});en(()=>{if(!x.current)return;if(n==null){x.current.scrollLeft&&(x.current.scrollLeft=0);return}const le=r.sections[n.startIndex],de=r.sections[n.endIndex];let ve=le.startInInput,we=de.endInInput;if(n.shouldSelectBoundarySelectors&&(ve-=le.startSeparator.length,we+=de.endSeparator.length),ve!==x.current.selectionStart||we!==x.current.selectionEnd){const ie=x.current.scrollTop;x.current===Bm(document)&&x.current.setSelectionRange(ve,we),x.current.scrollTop=ie}});const ee=wD(W({},p,{value:r.value,timezone:d}),P,T.isSameError,T.defaultErrorState),re=A.useMemo(()=>D!==void 0?D:T.hasError(ee),[T,ee,D]);A.useEffect(()=>{!re&&!n&&S()},[r.referenceValue,n,re]),A.useEffect(()=>(x.current&&x.current===document.activeElement&&o("all"),()=>window.clearTimeout(L.current)),[]),A.useEffect(()=>{r.tempValueStrAndroid!=null&&n!=null&&(S(),a())},[r.tempValueStrAndroid]);const se=A.useMemo(()=>{var le;return(le=r.tempValueStrAndroid)!=null?le:F.getValueStrFromSections(r.sections,z)},[r.sections,F,r.tempValueStrAndroid,z]),pe=A.useMemo(()=>n==null||r.sections[n.startIndex].contentType==="letter"?"text":"numeric",[n,r.sections]),ce=x.current&&x.current===Bm(document),ne=T.areValuesEqual(t,r.value,T.emptyValue),he=!ce&&ne;A.useImperativeHandle(m,()=>({getSections:()=>r.sections,getActiveSectionIndex:()=>{var le,de;const ve=(le=x.current.selectionStart)!=null?le:0,we=(de=x.current.selectionEnd)!=null?de:0;if(ve===0&&we===0)return null;const ie=ve<=r.sections[0].startInInput?1:r.sections.findIndex(ge=>ge.startInInput-ge.startSeparator.length>ve);return ie===-1?r.sections.length-1:ie-1},setSelectedSections:le=>o(le)}));const oe=Mt((le,...de)=>{var ve;le.preventDefault(),U==null||U(le,...de),i(),x==null||(ve=x.current)==null||ve.focus(),o(0)});return W({placeholder:f,autoComplete:"off",disabled:!!B},_,{value:he?"":se,inputMode:pe,readOnly:g,onClick:Q,onFocus:J,onBlur:G,onPaste:V,onChange:X,onKeyDown:te,onMouseUp:q,onClear:oe,error:re,ref:k,clearable:!!(N&&!ne&&!g&&!B)})},l1=({props:e,value:t,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:n,shouldDisableMonth:o,shouldDisableYear:i,disablePast:a,disableFuture:s,timezone:c}=e,l=r.utils.dateWithTimezone(void 0,c),u=ca(r.utils,e.minDate,r.defaultDates.minDate),f=ca(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(n&&n(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(i&&i(t)):return"shouldDisableYear";case!!(s&&r.utils.isAfterDay(t,l)):return"disableFuture";case!!(a&&r.utils.isBeforeDay(t,l)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(f&&r.utils.isAfterDay(t,f)):return"maxDate";default:return null}},bR=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],wR=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],UQ=["minDateTime","maxDateTime"],WIe=[...bR,...wR,...UQ],LI=e=>WIe.reduce((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t),{}),GIe=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],xD=(e,t)=>{const r=W({},e),n={},o=i=>{r.hasOwnProperty(i)&&(n[i]=r[i],delete r[i])};return GIe.forEach(o),t==="date"?bR.forEach(o):t==="time"?wR.forEach(o):t==="date-time"&&(bR.forEach(o),wR.forEach(o),UQ.forEach(o)),{forwardedProps:r,internalProps:n}},qIe=e=>{var t,r,n;const o=Hn(),i=cp();return W({},e,{disablePast:(t=e.disablePast)!=null?t:!1,disableFuture:(r=e.disableFuture)!=null?r:!1,format:(n=e.format)!=null?n:o.formats.keyboardDate,minDate:ca(o,e.minDate,i.minDate),maxDate:ca(o,e.maxDate,i.maxDate)})},xR=({props:e,inputRef:t})=>{const r=qIe(e),{forwardedProps:n,internalProps:o}=xD(r,"date");return BQ({inputRef:t,forwardedProps:n,internalProps:o,valueManager:lf,fieldValueManager:jSe,validator:l1,valueType:"date"})};function KIe(e){return Gt("MuiInputAdornment",e)}const YIe=Vt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),bU=YIe;var wU;const XIe=["children","className","component","disablePointerEvents","disableTypography","position","variant"],QIe=(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${ut(r.position)}`],r.disablePointerEvents===!0&&t.disablePointerEvents,t[r.variant]]},ZIe=e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:o,size:i,variant:a}=e,s={root:["root",r&&"disablePointerEvents",o&&`position${ut(o)}`,a,n&&"hiddenLabel",i&&`size${ut(i)}`]};return pt(s,KIe,t)},JIe=We("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:QIe})(({theme:e,ownerState:t})=>W({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},t.variant==="filled"&&{[`&.${bU.positionStart}&:not(.${bU.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),e4e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:c=!1,position:l,variant:u}=n,f=ze(n,XIe),d=yf()||{};let h=u;u&&d.variant,d&&!h&&(h=d.variant);const p=W({},n,{hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:s,position:l,variant:h}),g=ZIe(p);return R(RI.Provider,{value:null,children:R(JIe,W({as:a,ownerState:p,className:it(g.root,i),ref:r},f,{children:typeof o=="string"&&!c?R(jt,{color:"text.secondary",children:o}):xe(A.Fragment,{children:[l==="start"?wU||(wU=R("span",{className:"notranslate",children:"​"})):null,o]})}))})}),c1=e4e;function t4e(e){return Gt("MuiDialogContent",e)}Vt("MuiDialogContent",["root","dividers"]);function r4e(e){return Gt("MuiDialogTitle",e)}const n4e=Vt("MuiDialogTitle",["root"]),o4e=n4e,i4e=["className","dividers"],a4e=e=>{const{classes:t,dividers:r}=e;return pt({root:["root",r&&"dividers"]},t4e,t)},s4e=We("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>W({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${o4e.root} + &`]:{paddingTop:0}})),l4e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1}=n,a=ze(n,i4e),s=W({},n,{dividers:i}),c=a4e(s);return R(s4e,W({className:it(c.root,o),ownerState:s,ref:r},a))}),CD=l4e;function c4e(e){return Gt("MuiDialog",e)}const u4e=Vt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),iw=u4e,d4e=A.createContext({}),HQ=d4e,f4e=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],h4e=We(Yh,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),p4e=e=>{const{classes:t,scroll:r,maxWidth:n,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${ut(r)}`],paper:["paper",`paperScroll${ut(r)}`,`paperWidth${ut(String(n))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return pt(a,c4e,t)},m4e=We(gD,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),g4e=We("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.container,t[`scroll${ut(r.scroll)}`]]}})(({ownerState:e})=>W({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),v4e=We(Es,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`scrollPaper${ut(r.scroll)}`],t[`paperWidth${ut(String(r.maxWidth))}`],r.fullWidth&&t.paperFullWidth,r.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>W({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${iw.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${iw.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${iw.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),y4e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDialog"}),o=An(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,BackdropComponent:c,BackdropProps:l,children:u,className:f,disableEscapeKeyDown:d=!1,fullScreen:h=!1,fullWidth:p=!1,maxWidth:g="sm",onBackdropClick:m,onClose:v,open:y,PaperComponent:b=Es,PaperProps:w={},scroll:E="paper",TransitionComponent:I=W1,transitionDuration:O=i,TransitionProps:D}=n,N=ze(n,f4e),U=W({},n,{disableEscapeKeyDown:d,fullScreen:h,fullWidth:p,maxWidth:g,scroll:E}),B=p4e(U),F=A.useRef(),T=S=>{F.current=S.target===S.currentTarget},P=S=>{F.current&&(F.current=null,m&&m(S),v&&v(S,"backdropClick"))},_=dn(s),C=A.useMemo(()=>({titleId:_}),[_]);return R(m4e,W({className:it(B.root,f),closeAfterTransition:!0,components:{Backdrop:h4e},componentsProps:{backdrop:W({transitionDuration:O,as:c},l)},disableEscapeKeyDown:d,onClose:v,open:y,ref:r,onClick:P,ownerState:U},N,{children:R(I,W({appear:!0,in:y,timeout:O,role:"presentation"},D,{children:R(g4e,{className:it(B.container),onMouseDown:T,ownerState:U,children:R(v4e,W({as:b,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":_},w,{className:it(B.paper,w.className),ownerState:U,children:R(HQ.Provider,{value:C,children:u})}))})}))}))}),SD=y4e,b4e=We(SD)({[`& .${iw.container}`]:{outline:0},[`& .${iw.paper}`]:{outline:0,minWidth:AI}}),w4e=We(CD)({"&:first-of-type":{padding:0}});function zQ(e){var t,r;const{children:n,onDismiss:o,open:i,slots:a,slotProps:s}=e,c=(t=a==null?void 0:a.dialog)!=null?t:b4e,l=(r=a==null?void 0:a.mobileTransition)!=null?r:W1;return R(c,W({open:i,onClose:o},s==null?void 0:s.dialog,{TransitionComponent:l,TransitionProps:s==null?void 0:s.mobileTransition,PaperComponent:a==null?void 0:a.mobilePaper,PaperProps:s==null?void 0:s.mobilePaper,children:R(w4e,{children:n})}))}var _D={};Object.defineProperty(_D,"__esModule",{value:!0});var jQ=_D.default=void 0,x4e=S4e(A),C4e=BX;function VQ(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(VQ=function(n){return n?r:t})(e)}function S4e(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=VQ(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function _4e(e){return Object.keys(e).length===0}function k4e(e=null){const t=x4e.useContext(C4e.ThemeContext);return!t||_4e(t)?e:t}jQ=_D.default=k4e;const E4e=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],T4e=We(SQ,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),I4e=A.forwardRef(function(t,r){var n;const o=jQ(),i=Wt({props:t,name:"MuiPopper"}),{anchorEl:a,component:s,components:c,componentsProps:l,container:u,disablePortal:f,keepMounted:d,modifiers:h,open:p,placement:g,popperOptions:m,popperRef:v,transition:y,slots:b,slotProps:w}=i,E=ze(i,E4e),I=(n=b==null?void 0:b.root)!=null?n:c==null?void 0:c.Root,O=W({anchorEl:a,container:u,disablePortal:f,keepMounted:d,modifiers:h,open:p,placement:g,popperOptions:m,popperRef:v,transition:y},E);return R(T4e,W({as:s,direction:o==null?void 0:o.direction,slots:{root:I},slotProps:w??l},O,{ref:r}))}),bf=I4e;function A4e(e){return Gt("MuiPickersPopper",e)}Vt("MuiPickersPopper",["root","paper"]);const P4e="@media (prefers-reduced-motion: reduce)",lv=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),xU=lv&&lv[1]?parseInt(lv[1],10):null,CU=lv&&lv[2]?parseInt(lv[2],10):null,M4e=xU&&xU<10||CU&&CU<13||!1,kD=()=>E2(P4e,{defaultMatches:!1})||M4e,R4e=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],O4e=e=>{const{classes:t}=e;return pt({root:["root"],paper:["paper"]},A4e,t)},D4e=We(bf,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),F4e=We(Es,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({ownerState:e})=>W({outline:0,transformOrigin:"top center"},e.placement.includes("top")&&{transformOrigin:"bottom center"}));function N4e(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function L4e(e,t){const r=A.useRef(!1),n=A.useRef(!1),o=A.useRef(null),i=A.useRef(!1);A.useEffect(()=>{if(!e)return;function c(){i.current=!0}return document.addEventListener("mousedown",c,!0),document.addEventListener("touchstart",c,!0),()=>{document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),i.current=!1}},[e]);const a=Mt(c=>{if(!i.current)return;const l=n.current;n.current=!1;const u=In(o.current);if(!o.current||"clientX"in c&&N4e(c,u))return;if(r.current){r.current=!1;return}let f;c.composedPath?f=c.composedPath().indexOf(o.current)>-1:f=!u.documentElement.contains(c.target)||o.current.contains(c.target),!f&&!l&&t(c)}),s=()=>{n.current=!0};return A.useEffect(()=>{if(e){const c=In(o.current),l=()=>{r.current=!0};return c.addEventListener("touchstart",a),c.addEventListener("touchmove",l),()=>{c.removeEventListener("touchstart",a),c.removeEventListener("touchmove",l)}}},[e,a]),A.useEffect(()=>{if(e){const c=In(o.current);return c.addEventListener("click",a),()=>{c.removeEventListener("click",a),n.current=!1}}},[e,a]),[o,s,s]}const $4e=A.forwardRef((e,t)=>{const{PaperComponent:r,popperPlacement:n,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:c,onPaperTouchStart:l}=e,u=ze(e,R4e),f=W({},o,{placement:n}),d=Cr({elementType:r,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:f});return R(r,W({},u,d,{onClick:h=>{var p;c(h),(p=d.onClick)==null||p.call(d,h)},onTouchStart:h=>{var p;l(h),(p=d.onTouchStart)==null||p.call(d,h)},ownerState:f,children:i}))});function WQ(e){var t,r,n,o;const i=Wt({props:e,name:"MuiPickersPopper"}),{anchorEl:a,children:s,containerRef:c=null,shouldRestoreFocus:l,onBlur:u,onDismiss:f,open:d,role:h,placement:p,slots:g,slotProps:m,reduceAnimations:v}=i;A.useEffect(()=>{function k(L){d&&(L.key==="Escape"||L.key==="Esc")&&f()}return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[f,d]);const y=A.useRef(null);A.useEffect(()=>{h==="tooltip"||l&&!l()||(d?y.current=Bm(document):y.current&&y.current instanceof HTMLElement&&setTimeout(()=>{y.current instanceof HTMLElement&&y.current.focus()}))},[d,h,l]);const[b,w,E]=L4e(d,u??f),I=A.useRef(null),O=Ur(I,c),D=Ur(O,b),N=i,U=O4e(N),B=kD(),F=v??B,T=k=>{k.key==="Escape"&&(k.stopPropagation(),f())},P=((t=g==null?void 0:g.desktopTransition)!=null?t:F)?W1:s1,_=(r=g==null?void 0:g.desktopTrapFocus)!=null?r:iD,C=(n=g==null?void 0:g.desktopPaper)!=null?n:F4e,S=(o=g==null?void 0:g.popper)!=null?o:D4e,x=Cr({elementType:S,externalSlotProps:m==null?void 0:m.popper,additionalProps:{transition:!0,role:h,open:d,anchorEl:a,placement:p,onKeyDown:T},className:U.root,ownerState:i});return R(S,W({},x,{children:({TransitionProps:k,placement:L})=>R(_,W({open:d,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:h==="tooltip",isEnabled:()=>!0},m==null?void 0:m.desktopTrapFocus,{children:R(P,W({},k,m==null?void 0:m.desktopTransition,{children:R($4e,{PaperComponent:C,ownerState:N,popperPlacement:L,ref:D,onPaperClick:w,onPaperTouchStart:E,paperClasses:U.paper,paperSlotProps:m==null?void 0:m.desktopPaper,children:s})}))}))}))}function GQ(e){return Gt("MuiPickersToolbar",e)}Vt("MuiPickersToolbar",["root","content"]);const B4e=e=>{const{classes:t,isLandscape:r}=e;return pt({root:["root"],content:["content"],penIconButton:["penIconButton",r&&"penIconButtonLandscape"]},GQ,t)},U4e=We("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>W({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})),H4e=We("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})(({ownerState:e})=>{var t;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:e.isLandscape?"flex-start":"space-between",flexDirection:e.isLandscape?(t=e.landscapeDirection)!=null?t:"column":"row",flex:1,alignItems:e.isLandscape?"flex-start":"center"}}),qQ=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:c}=n,l=n,u=B4e(l);return s?null:xe(U4e,{ref:r,className:it(u.root,i),ownerState:l,children:[R(jt,{color:"text.secondary",variant:"overline",id:c,children:a}),R(H4e,{className:u.content,ownerState:l,children:o})]})});function z4e(e){return Gt("MuiPickersToolbarText",e)}const SU=Vt("MuiPickersToolbarText",["root","selected"]);function j4e(e){return Gt("MuiButton",e)}const V4e=Vt("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),VS=V4e,W4e=A.createContext({}),KQ=W4e,G4e=A.createContext(void 0),YQ=G4e,q4e=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],K4e=e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${ut(t)}`,`size${ut(o)}`,`${i}Size${ut(o)}`,`color${ut(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${ut(o)}`],endIcon:["icon","endIcon",`iconSize${ut(o)}`]},c=pt(s,j4e,a);return W({},a,c)},XQ=e=>W({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Y4e=We(au,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${ut(r.color)}`],t[`size${ut(r.size)}`],t[`${r.variant}Size${ut(r.size)}`],r.color==="inherit"&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var r,n;const o=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],i=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return W({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":W({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":W({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${VS.focusVisible}`]:W({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${VS.disabled}`]:W({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Vr(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(r=(n=e.palette).getContrastText)==null?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${VS.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${VS.disabled}`]:{boxShadow:"none"}}),X4e=We("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${ut(r.size)}`]]}})(({ownerState:e})=>W({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},XQ(e))),Q4e=We("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${ut(r.size)}`]]}})(({ownerState:e})=>W({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},XQ(e))),Z4e=A.forwardRef(function(t,r){const n=A.useContext(KQ),o=A.useContext(YQ),i=yO(n,t),a=Wt({props:i,name:"MuiButton"}),{children:s,color:c="primary",component:l="button",className:u,disabled:f=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:g,fullWidth:m=!1,size:v="medium",startIcon:y,type:b,variant:w="text"}=a,E=ze(a,q4e),I=W({},a,{color:c,component:l,disabled:f,disableElevation:d,disableFocusRipple:h,fullWidth:m,size:v,type:b,variant:w}),O=K4e(I),D=y&&R(X4e,{className:O.startIcon,ownerState:I,children:y}),N=p&&R(Q4e,{className:O.endIcon,ownerState:I,children:p}),U=o||"";return xe(Y4e,W({ownerState:I,className:it(n.className,O.root,u,U),component:l,disabled:f,focusRipple:!h,focusVisibleClassName:it(O.focusVisible,g),ref:r,type:b},E,{classes:O,children:[D,s,N]}))}),Ft=Z4e,J4e=["className","selected","value"],e3e=e=>{const{classes:t,selected:r}=e;return pt({root:["root",r&&"selected"]},z4e,t)},t3e=We(jt,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${SU.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${SU.selected}`]:{color:(e.vars||e).palette.text.primary}})),r3e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=n,a=ze(n,J4e),s=e3e(n);return R(t3e,W({ref:r,className:it(o,s.root),component:"span"},a,{children:i}))}),n3e=["align","className","selected","typographyClassName","value","variant","width"],o3e=e=>{const{classes:t}=e;return pt({root:["root"]},GQ,t)},i3e=We(Ft,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),_U=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:c,variant:l,width:u}=n,f=ze(n,n3e),d=o3e(n);return R(i3e,W({variant:"text",ref:r,className:it(i,d.root)},u?{sx:{width:u}}:{},f,{children:R(r3e,{align:o,className:s,variant:l,value:c,selected:a})}))}),a3e=({open:e,onOpen:t,onClose:r})=>{const n=A.useRef(typeof e=="boolean").current,[o,i]=A.useState(!1);A.useEffect(()=>{if(n){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[n,e]);const a=A.useCallback(s=>{n||i(s),s&&t&&t(),!s&&r&&r()},[n,t,r]);return{isOpen:o,setIsOpen:a}},s3e=e=>{const{action:t,hasChanged:r,dateState:n,isControlled:o}=e,i=!o&&!n.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:r(n.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:r(n.lastPublishedValue):!1},l3e=e=>{const{action:t,hasChanged:r,dateState:n,isControlled:o,closeOnSelect:i}=e,a=!o&&!n.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:r(n.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:r(n.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&r(n.lastCommittedValue):!1},c3e=e=>{const{action:t,closeOnSelect:r}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&r:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},u3e=({props:e,valueManager:t,valueType:r,wrapperVariant:n,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:c,closeOnSelect:l=n==="desktop",selectedSections:u,onSelectedSectionsChange:f,timezone:d}=e,{current:h}=A.useRef(c),{current:p}=A.useRef(s!==void 0),g=Hn(),m=lp(),[v,y]=sa({controlled:u,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:b,setIsOpen:w}=a3e(e),[E,I]=A.useState(()=>{let J;return s!==void 0?J=s:h!==void 0?J=h:J=t.emptyValue,{draft:J,lastPublishedValue:J,lastCommittedValue:J,lastControlledValue:s,hasBeenModifiedSinceMount:!1}}),{timezone:O,handleValueChange:D}=tD({timezone:d,value:s,defaultValue:h,onChange:a,valueManager:t});wD(W({},e,{value:E.draft,timezone:O}),o,t.isSameError,t.defaultErrorState);const N=Mt(J=>{const G={action:J,dateState:E,hasChanged:ee=>!t.areValuesEqual(g,J.value,ee),isControlled:p,closeOnSelect:l},V=s3e(G),X=l3e(G),te=c3e(G);if(I(ee=>W({},ee,{draft:J.value,lastPublishedValue:V?J.value:ee.lastPublishedValue,lastCommittedValue:X?J.value:ee.lastCommittedValue,hasBeenModifiedSinceMount:!0})),V){const re={validationError:J.name==="setValueFromField"?J.context.validationError:o({adapter:m,value:J.value,props:W({},e,{value:J.value,timezone:O})})};J.name==="setValueFromShortcut"&&J.shortcut!=null&&(re.shortcut=J.shortcut),D(J.value,re)}X&&i&&i(J.value),te&&w(!1)});if(s!==void 0&&(E.lastControlledValue===void 0||!t.areValuesEqual(g,E.lastControlledValue,s))){const J=t.areValuesEqual(g,E.draft,s);I(G=>W({},G,{lastControlledValue:s},J?{}:{lastCommittedValue:s,lastPublishedValue:s,draft:s,hasBeenModifiedSinceMount:!0}))}const U=Mt(()=>{N({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),B=Mt(()=>{N({value:E.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),F=Mt(()=>{N({value:E.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),T=Mt(()=>{N({value:E.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),P=Mt(()=>{N({value:t.getTodayValue(g,O,r),name:"setValueFromAction",pickerAction:"today"})}),_=Mt(()=>w(!0)),C=Mt(()=>w(!1)),S=Mt((J,G="partial")=>N({name:"setValueFromView",value:J,selectionState:G})),x=Mt((J,G,V)=>N({name:"setValueFromShortcut",value:J,changeImportance:G??"accept",shortcut:V})),k=Mt((J,G)=>N({name:"setValueFromField",value:J,context:G})),L=Mt(J=>{y(J),f==null||f(J)}),j={onClear:U,onAccept:B,onDismiss:F,onCancel:T,onSetToday:P,onOpen:_,onClose:C},z={value:E.draft,onChange:k,selectedSections:v,onSelectedSectionsChange:L},Y=A.useMemo(()=>t.cleanValue(g,E.draft),[g,t,E.draft]),K={value:Y,onChange:S,onClose:C,open:b,onSelectedSectionsChange:L},q=W({},j,{value:Y,onChange:S,onSelectShortcut:x,isValid:J=>{const G=o({adapter:m,value:J,props:W({},e,{value:J,timezone:O})});return!t.hasError(G)}});return{open:b,fieldProps:z,viewProps:K,layoutProps:q,actions:j}},d3e=["className","sx"],f3e=({props:e,propsFromPickerValue:t,additionalViewProps:r,inputRef:n,autoFocusView:o})=>{const{onChange:i,open:a,onSelectedSectionsChange:s,onClose:c}=t,{views:l,openTo:u,onViewChange:f,disableOpenPicker:d,viewRenderers:h,timezone:p}=e,g=ze(e,d3e),{view:m,setView:v,defaultView:y,focusedView:b,setFocusedView:w,setValueAndGoToNextView:E}=GX({view:void 0,views:l,openTo:u,onChange:i,onViewChange:f,autoFocus:o}),{hasUIView:I,viewModeLookup:O}=A.useMemo(()=>l.reduce((P,_)=>{let C;return d?C="field":h[_]!=null?C="UI":C="field",P.viewModeLookup[_]=C,C==="UI"&&(P.hasUIView=!0),P},{hasUIView:!1,viewModeLookup:{}}),[d,h,l]),D=A.useMemo(()=>l.reduce((P,_)=>h[_]!=null&&ESe(_)?P+1:P,0),[h,l]),N=O[m],U=Mt(()=>N==="UI"),[B,F]=A.useState(N==="UI"?m:null);return B!==m&&O[m]==="UI"&&F(m),en(()=>{N==="field"&&a&&(c(),setTimeout(()=>{n==null||n.current.focus(),s(m)}))},[m]),en(()=>{if(!a)return;let P=m;N==="field"&&B!=null&&(P=B),P!==y&&O[P]==="UI"&&O[y]==="UI"&&(P=y),P!==m&&v(P),w(P,!0)},[a]),{hasUIView:I,shouldRestoreFocus:U,layoutProps:{views:l,view:B,onViewChange:v},renderCurrentView:()=>{if(B==null)return null;const P=h[B];return P==null?null:P(W({},g,r,t,{views:l,timezone:p,onChange:E,view:B,onViewChange:v,focusedView:b,onFocusedViewChange:w,showViewSwitcher:D>1,timeViewsCount:D}))}}};function kU(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const h3e=(e,t)=>{const[r,n]=A.useState(kU);return en(()=>{const i=()=>{n(kU())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),zIe(e,["hours","minutes","seconds"])?!1:(t||r)==="landscape"},p3e=({props:e,propsFromPickerValue:t,propsFromPickerViews:r,wrapperVariant:n})=>{const{orientation:o}=e,i=h3e(r.views,o);return{layoutProps:W({},r,t,{isLandscape:i,wrapperVariant:n,disabled:e.disabled,readOnly:e.readOnly})}},QQ=(e,t="warning")=>{let r=!1;const n=Array.isArray(e)?e.join(`
`):e;return()=>{r||(r=!0,t==="error"?console.error(n):console.warn(n))}};QQ(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const $I=({props:e,valueManager:t,valueType:r,wrapperVariant:n,inputRef:o,additionalViewProps:i,validator:a,autoFocusView:s})=>{const c=u3e({props:e,valueManager:t,valueType:r,wrapperVariant:n,validator:a}),l=f3e({props:e,inputRef:o,additionalViewProps:i,autoFocusView:s,propsFromPickerValue:c.viewProps}),u=p3e({props:e,wrapperVariant:n,propsFromPickerValue:c.layoutProps,propsFromPickerViews:l.layoutProps});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:l.renderCurrentView,hasUIView:l.hasUIView,shouldRestoreFocus:l.shouldRestoreFocus,layoutProps:u.layoutProps}};function ZQ(e){return Gt("MuiPickersLayout",e)}const FA=Vt("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]);function m3e(e){return Gt("MuiDialogActions",e)}Vt("MuiDialogActions",["root","spacing"]);const g3e=["className","disableSpacing"],v3e=e=>{const{classes:t,disableSpacing:r}=e;return pt({root:["root",!r&&"spacing"]},m3e,t)},y3e=We("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableSpacing&&t.spacing]}})(({ownerState:e})=>W({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),b3e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1}=n,a=ze(n,g3e),s=W({},n,{disableSpacing:i}),c=v3e(s);return R(y3e,W({className:it(c.root,o),ownerState:s,ref:r},a))}),ED=b3e,w3e=["onAccept","onClear","onCancel","onSetToday","actions"];function x3e(e){const{onAccept:t,onClear:r,onCancel:n,onSetToday:o,actions:i}=e,a=ze(e,w3e),s=wc();if(i==null||i.length===0)return null;const c=i==null?void 0:i.map(l=>{switch(l){case"clear":return R(Ft,{onClick:r,children:s.clearButtonLabel},l);case"cancel":return R(Ft,{onClick:n,children:s.cancelButtonLabel},l);case"accept":return R(Ft,{onClick:t,children:s.okButtonLabel},l);case"today":return R(Ft,{onClick:o,children:s.todayButtonLabel},l);default:return null}});return R(ED,W({},a,{children:c}))}function C3e(e){return Gt("MuiListItem",e)}const S3e=Vt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Cg=S3e;function _3e(e){return Gt("MuiListItemButton",e)}const k3e=Vt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Sg=k3e,E3e=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],T3e=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.alignItems==="flex-start"&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters]},I3e=e=>{const{alignItems:t,classes:r,dense:n,disabled:o,disableGutters:i,divider:a,selected:s}=e,l=pt({root:["root",n&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},_3e,r);return W({},r,l)},A3e=We(au,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:T3e})(({theme:e,ownerState:t})=>W({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Sg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Sg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Sg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Sg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Sg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),P3e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:f,selected:d=!1,className:h}=n,p=ze(n,E3e),g=A.useContext(eu),m=A.useMemo(()=>({dense:c||g.dense||!1,alignItems:o,disableGutters:l}),[o,g.dense,c,l]),v=A.useRef(null);en(()=>{i&&v.current&&v.current.focus()},[i]);const y=W({},n,{alignItems:o,dense:m.dense,disableGutters:l,divider:u,selected:d}),b=I3e(y),w=Ur(v,r);return R(eu.Provider,{value:m,children:R(A3e,W({ref:w,href:p.href||p.to,component:(p.href||p.to)&&a==="div"?"button":a,focusVisibleClassName:it(b.focusVisible,f),ownerState:y,className:it(b.root,h)},p,{classes:b,children:s}))})}),M3e=P3e;function R3e(e){return Gt("MuiListItemSecondaryAction",e)}Vt("MuiListItemSecondaryAction",["root","disableGutters"]);const O3e=["className"],D3e=e=>{const{disableGutters:t,classes:r}=e;return pt({root:["root",t&&"disableGutters"]},R3e,r)},F3e=We("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})(({ownerState:e})=>W({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),JQ=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiListItemSecondaryAction"}),{className:o}=n,i=ze(n,O3e),a=A.useContext(eu),s=W({},n,{disableGutters:a.disableGutters}),c=D3e(s);return R(F3e,W({className:it(c.root,o),ownerState:s,ref:r},i))});JQ.muiName="ListItemSecondaryAction";const N3e=JQ,L3e=["className"],$3e=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],B3e=(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.alignItems==="flex-start"&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]},U3e=e=>{const{alignItems:t,button:r,classes:n,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:c,hasSecondaryAction:l,selected:u}=e;return pt({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",c&&"divider",i&&"disabled",r&&"button",t==="flex-start"&&"alignItemsFlexStart",l&&"secondaryAction",u&&"selected"],container:["container"]},C3e,n)},H3e=We("div",{name:"MuiListItem",slot:"Root",overridesResolver:B3e})(({theme:e,ownerState:t})=>W({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&W({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Sg.root}`]:{paddingRight:48}},{[`&.${Cg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Cg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Cg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Cg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.alignItems==="flex-start"&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Cg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),z3e=We("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),j3e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiListItem"}),{alignItems:o="center",autoFocus:i=!1,button:a=!1,children:s,className:c,component:l,components:u={},componentsProps:f={},ContainerComponent:d="li",ContainerProps:{className:h}={},dense:p=!1,disabled:g=!1,disableGutters:m=!1,disablePadding:v=!1,divider:y=!1,focusVisibleClassName:b,secondaryAction:w,selected:E=!1,slotProps:I={},slots:O={}}=n,D=ze(n.ContainerProps,L3e),N=ze(n,$3e),U=A.useContext(eu),B=A.useMemo(()=>({dense:p||U.dense||!1,alignItems:o,disableGutters:m}),[o,U.dense,p,m]),F=A.useRef(null);en(()=>{i&&F.current&&F.current.focus()},[i]);const T=A.Children.toArray(s),P=T.length&&iv(T[T.length-1],["ListItemSecondaryAction"]),_=W({},n,{alignItems:o,autoFocus:i,button:a,dense:B.dense,disabled:g,disableGutters:m,disablePadding:v,divider:y,hasSecondaryAction:P,selected:E}),C=U3e(_),S=Ur(F,r),x=O.root||u.Root||H3e,k=I.root||f.root||{},L=W({className:it(C.root,k.className,c),disabled:g},N);let j=l||"li";return a&&(L.component=l||"div",L.focusVisibleClassName=it(Cg.focusVisible,b),j=au),P?(j=!L.component&&!l?"div":j,d==="li"&&(j==="li"?j="div":L.component==="li"&&(L.component="div")),R(eu.Provider,{value:B,children:xe(z3e,W({as:d,className:it(C.container,h),ref:S,ownerState:_},D,{children:[R(x,W({},k,!Jc(x)&&{as:j,ownerState:W({},_,k.ownerState)},L,{children:T})),T.pop()]}))})):R(eu.Provider,{value:B,children:xe(x,W({},k,{as:j,ref:S},!Jc(x)&&{ownerState:W({},_,k.ownerState)},L,{children:[T,w&&R(N3e,{children:w})]}))})}),BI=j3e,V3e=Sr(R("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function W3e(e){return Gt("MuiChip",e)}const G3e=Vt("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Ln=G3e,q3e=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],K3e=e=>{const{classes:t,disabled:r,size:n,color:o,iconColor:i,onDelete:a,clickable:s,variant:c}=e,l={root:["root",c,r&&"disabled",`size${ut(n)}`,`color${ut(o)}`,s&&"clickable",s&&`clickableColor${ut(o)}`,a&&"deletable",a&&`deletableColor${ut(o)}`,`${c}${ut(o)}`],label:["label",`label${ut(n)}`],avatar:["avatar",`avatar${ut(n)}`,`avatarColor${ut(o)}`],icon:["icon",`icon${ut(n)}`,`iconColor${ut(i)}`],deleteIcon:["deleteIcon",`deleteIcon${ut(n)}`,`deleteIconColor${ut(o)}`,`deleteIcon${ut(c)}Color${ut(o)}`]};return pt(l,W3e,t)},Y3e=We("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{color:n,iconColor:o,clickable:i,onDelete:a,size:s,variant:c}=r;return[{[`& .${Ln.avatar}`]:t.avatar},{[`& .${Ln.avatar}`]:t[`avatar${ut(s)}`]},{[`& .${Ln.avatar}`]:t[`avatarColor${ut(n)}`]},{[`& .${Ln.icon}`]:t.icon},{[`& .${Ln.icon}`]:t[`icon${ut(s)}`]},{[`& .${Ln.icon}`]:t[`iconColor${ut(o)}`]},{[`& .${Ln.deleteIcon}`]:t.deleteIcon},{[`& .${Ln.deleteIcon}`]:t[`deleteIcon${ut(s)}`]},{[`& .${Ln.deleteIcon}`]:t[`deleteIconColor${ut(n)}`]},{[`& .${Ln.deleteIcon}`]:t[`deleteIcon${ut(c)}Color${ut(n)}`]},t.root,t[`size${ut(s)}`],t[`color${ut(n)}`],i&&t.clickable,i&&n!=="default"&&t[`clickableColor${ut(n)})`],a&&t.deletable,a&&n!=="default"&&t[`deletableColor${ut(n)}`],t[c],t[`${c}${ut(n)}`]]}})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return W({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Ln.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Ln.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:r,fontSize:e.typography.pxToRem(12)},[`& .${Ln.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Ln.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Ln.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Ln.icon}`]:W({marginLeft:5,marginRight:-6},t.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&W({color:e.vars?e.vars.palette.Chip.defaultIconColor:r},t.color!=="default"&&{color:"inherit"})),[`& .${Ln.deleteIcon}`]:W({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Vr(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Vr(e.palette.text.primary,.4)}},t.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},t.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:Vr(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},t.size==="small"&&{height:24},t.color!=="default"&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Ln.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Vr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&t.color!=="default"&&{[`&.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})},({theme:e,ownerState:t})=>W({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Vr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Ln.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Vr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&t.color!=="default"&&{[`&:hover, &.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}}),({theme:e,ownerState:t})=>W({},t.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Ln.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Ln.avatar}`]:{marginLeft:4},[`& .${Ln.avatarSmall}`]:{marginLeft:2},[`& .${Ln.icon}`]:{marginLeft:4},[`& .${Ln.iconSmall}`]:{marginLeft:2},[`& .${Ln.deleteIcon}`]:{marginRight:5},[`& .${Ln.deleteIconSmall}`]:{marginRight:3}},t.variant==="outlined"&&t.color!=="default"&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Vr(e.palette[t.color].main,.7)}`,[`&.${Ln.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Ln.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Vr(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Ln.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:Vr(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}})),X3e=We("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:r}=e,{size:n}=r;return[t.label,t[`label${ut(n)}`]]}})(({ownerState:e})=>W({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function EU(e){return e.key==="Backspace"||e.key==="Delete"}const Q3e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:c,deleteIcon:l,disabled:u=!1,icon:f,label:d,onClick:h,onDelete:p,onKeyDown:g,onKeyUp:m,size:v="medium",variant:y="filled",tabIndex:b,skipFocusWhenDisabled:w=!1}=n,E=ze(n,q3e),I=A.useRef(null),O=Ur(I,r),D=k=>{k.stopPropagation(),p&&p(k)},N=k=>{k.currentTarget===k.target&&EU(k)&&k.preventDefault(),g&&g(k)},U=k=>{k.currentTarget===k.target&&(p&&EU(k)?p(k):k.key==="Escape"&&I.current&&I.current.blur()),m&&m(k)},B=a!==!1&&h?!0:a,F=B||p?au:c||"div",T=W({},n,{component:F,disabled:u,size:v,color:s,iconColor:A.isValidElement(f)&&f.props.color||s,onDelete:!!p,clickable:B,variant:y}),P=K3e(T),_=F===au?W({component:c||"div",focusVisibleClassName:P.focusVisible},p&&{disableRipple:!0}):{};let C=null;p&&(C=l&&A.isValidElement(l)?A.cloneElement(l,{className:it(l.props.className,P.deleteIcon),onClick:D}):R(V3e,{className:it(P.deleteIcon),onClick:D}));let S=null;o&&A.isValidElement(o)&&(S=A.cloneElement(o,{className:it(P.avatar,o.props.className)}));let x=null;return f&&A.isValidElement(f)&&(x=A.cloneElement(f,{className:it(P.icon,f.props.className)})),xe(Y3e,W({as:F,className:it(P.root,i),disabled:B&&u?!0:void 0,onClick:h,onKeyDown:N,onKeyUp:U,ref:O,tabIndex:w&&u?-1:b,ownerState:T},_,E,{children:[S||x,R(X3e,{className:it(P.label),ownerState:T,children:d}),C]}))}),bo=Q3e,Z3e=["items","changeImportance","isLandscape","onChange","isValid"],J3e=["getValue"];function eAe(e){const{items:t,changeImportance:r,onChange:n,isValid:o}=e,i=ze(e,Z3e);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:c}=s,l=ze(s,J3e);const u=c({isValid:o});return{label:l.label,onClick:()=>{n(u,r,l)},disabled:!o(u)}});return R(z1,W({dense:!0,sx:[{maxHeight:ZO,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>R(BI,{children:R(bo,W({},s))},s.label))}))}function tAe(e){return e.view!==null}const rAe=e=>{const{classes:t,isLandscape:r}=e;return pt({root:["root",r&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},ZQ,t)},nAe=e=>{var t,r;const{wrapperVariant:n,onAccept:o,onClear:i,onCancel:a,onSetToday:s,view:c,views:l,onViewChange:u,value:f,onChange:d,onSelectShortcut:h,isValid:p,isLandscape:g,disabled:m,readOnly:v,children:y,components:b,componentsProps:w,slots:E,slotProps:I}=e,O=E??R2(b),D=I??w,N=rAe(e),U=(t=O==null?void 0:O.actionBar)!=null?t:x3e,B=Cr({elementType:U,externalSlotProps:D==null?void 0:D.actionBar,additionalProps:{onAccept:o,onClear:i,onCancel:a,onSetToday:s,actions:n==="desktop"?[]:["cancel","accept"],className:N.actionBar},ownerState:W({},e,{wrapperVariant:n})}),F=R(U,W({},B)),T=O==null?void 0:O.toolbar,P=Cr({elementType:T,externalSlotProps:D==null?void 0:D.toolbar,additionalProps:{isLandscape:g,onChange:d,value:f,view:c,onViewChange:u,views:l,disabled:m,readOnly:v,className:N.toolbar},ownerState:W({},e,{wrapperVariant:n})}),_=tAe(P)&&T?R(T,W({},P)):null,C=y,S=O==null?void 0:O.tabs,x=c&&S?R(S,W({view:c,onViewChange:u},D==null?void 0:D.tabs)):null,k=(r=O==null?void 0:O.shortcuts)!=null?r:eAe,L=Cr({elementType:k,externalSlotProps:D==null?void 0:D.shortcuts,additionalProps:{isValid:p,isLandscape:g,onChange:h,className:N.shortcuts},ownerState:{isValid:p,isLandscape:g,onChange:h,className:N.shortcuts,wrapperVariant:n}}),j=c&&k?R(k,W({},L)):null;return{toolbar:_,content:C,tabs:x,actionBar:F,shortcuts:j}},oAe=nAe,iAe=e=>{const{isLandscape:t,classes:r}=e;return pt({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},ZQ,r)},eZ=We("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${FA.toolbar}`]:t.isLandscape?{gridColumn:e.direction==="rtl"?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${FA.shortcuts}`]:t.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:e.direction==="rtl"?3:1,gridRow:"2 / 3"},[`& .${FA.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));eZ.propTypes={as:ue.elementType,ownerState:ue.shape({isLandscape:ue.bool.isRequired}).isRequired,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object])};const aAe=We("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),UI=function(t){const r=Wt({props:t,name:"MuiPickersLayout"}),{toolbar:n,content:o,tabs:i,actionBar:a,shortcuts:s}=oAe(r),{sx:c,className:l,isLandscape:u,ref:f,wrapperVariant:d}=r,h=r,p=iAe(h);return xe(eZ,{ref:f,sx:c,className:it(l,p.root),ownerState:h,children:[u?s:n,u?n:s,R(aAe,{className:p.contentWrapper,children:d==="desktop"?xe(A.Fragment,{children:[o,i]}):xe(A.Fragment,{children:[i,o]})}),a]})},sAe=e=>Gt("MuiPickersSlideTransition",e),$l=Vt("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),lAe=["children","className","reduceAnimations","slideDirection","transKey","classes"],cAe=e=>{const{classes:t,slideDirection:r}=e,n={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${r}`],exitActive:[`slideExitActiveLeft-${r}`]};return pt(n,sAe,t)},uAe=We(QO,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${$l["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${$l["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${$l.slideEnterActive}`]:t.slideEnterActive},{[`.${$l.slideExit}`]:t.slideExit},{[`.${$l["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${$l["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${$l["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${$l["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${$l.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${$l.slideExit}`]:{transform:"translate(0%)"},[`& .${$l["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${$l["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function dAe(e){const t=Wt({props:e,name:"MuiPickersSlideTransition"}),{children:r,className:n,reduceAnimations:o,transKey:i}=t,a=ze(t,lAe),s=cAe(t),c=An();if(o)return R("div",{className:it(s.root,n),children:r});const l={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return R(uAe,{className:it(s.root,n),childFactory:u=>A.cloneElement(u,{classNames:l}),role:"presentation",children:R(ACe,W({mountOnEnter:!0,unmountOnExit:!0,timeout:c.transitions.duration.complex,classNames:l},a,{children:r}),i)})}const tZ=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:r,minDate:n,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const c=lp();return A.useCallback(l=>l1({adapter:c,value:l,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:r,minDate:n,maxDate:o,disableFuture:i,disablePast:a,timezone:s}})!==null,[c,e,t,r,n,o,i,a,s])},fAe=e=>Gt("MuiDayCalendar",e);Vt("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const hAe=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],pAe=["ownerState"],mAe=e=>{const{classes:t}=e;return pt({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},fAe,t)},rZ=(ox+P2*2)*6,gAe=We("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),vAe=We("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),yAe=We(jt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),bAe=We(jt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),wAe=We(jt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>W({},e.typography.caption,{width:ox,height:ox,padding:0,margin:`0 ${P2}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),xAe=We("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:rZ}),CAe=We(dAe,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:rZ}),SAe=We("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),_Ae=We("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${P2}px 0`,display:"flex",justifyContent:"center"});function kAe(e){var t,r,n;let{parentProps:o,day:i,focusableDay:a,selectedDays:s,isDateDisabled:c,currentMonthNumber:l,isViewFocused:u}=e,f=ze(e,hAe);const{disabled:d,disableHighlightToday:h,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:g,components:m,componentsProps:v,slots:y,slotProps:b,timezone:w}=o,E=Hn(),I=H1(w),O=a!==null&&E.isSameDay(i,a),D=s.some(S=>E.isSameDay(S,i)),N=E.isSameDay(i,I),U=(t=(r=y==null?void 0:y.day)!=null?r:m==null?void 0:m.Day)!=null?t:lQ,B=Cr({elementType:U,externalSlotProps:(n=b==null?void 0:b.day)!=null?n:v==null?void 0:v.day,additionalProps:W({disableHighlightToday:h,showDaysOutsideCurrentMonth:g,role:"gridcell",isAnimating:p,"data-timestamp":E.toJsDate(i).valueOf()},f),ownerState:W({},o,{day:i,selected:D})}),F=ze(B,pAe),T=A.useMemo(()=>d||c(i),[d,c,i]),P=A.useMemo(()=>E.getMonth(i)!==l,[E,i,l]),_=A.useMemo(()=>{const S=E.startOfMonth(E.setMonth(i,l));return g?E.isSameDay(i,E.startOfWeek(S)):E.isSameDay(i,S)},[l,i,g,E]),C=A.useMemo(()=>{const S=E.endOfMonth(E.setMonth(i,l));return g?E.isSameDay(i,E.endOfWeek(S)):E.isSameDay(i,S)},[l,i,g,E]);return R(U,W({},F,{day:i,disabled:T,autoFocus:u&&O,today:N,outsideCurrentMonth:P,isFirstVisibleCell:_,isLastVisibleCell:C,selected:D,tabIndex:O?0:-1,"aria-selected":D,"aria-current":N?"date":void 0}))}function nZ(e){const t=Wt({props:e,name:"MuiDayCalendar"}),{onFocusedDayChange:r,className:n,currentMonth:o,selectedDays:i,focusedDay:a,loading:s,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:l,readOnly:u,reduceAnimations:f,renderLoading:d=()=>R("span",{children:"..."}),slideDirection:h,TransitionProps:p,disablePast:g,disableFuture:m,minDate:v,maxDate:y,shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:E,dayOfWeekFormatter:I,hasFocus:O,onFocusedViewChange:D,gridLabelId:N,displayWeekNumber:U,fixedWeekNumber:B,autoFocus:F,timezone:T}=t,P=H1(T),_=Hn(),C=mAe(t),x=An().direction==="rtl",k=I||((he,oe)=>_.format(oe,"weekdayShort").charAt(0).toUpperCase()),L=tZ({shouldDisableDate:b,shouldDisableMonth:w,shouldDisableYear:E,minDate:v,maxDate:y,disablePast:g,disableFuture:m,timezone:T}),j=wc(),[z,Y]=sa({name:"DayCalendar",state:"hasFocus",controlled:O,default:F??!1}),[K,Q]=A.useState(()=>a||P),q=Mt(he=>{u||c(he)}),J=he=>{L(he)||(r(he),Q(he),D==null||D(!0),Y(!0))},G=Mt((he,oe)=>{switch(he.key){case"ArrowUp":J(_.addDays(oe,-7)),he.preventDefault();break;case"ArrowDown":J(_.addDays(oe,7)),he.preventDefault();break;case"ArrowLeft":{const le=_.addDays(oe,x?1:-1),de=_.addMonths(oe,x?1:-1),ve=ew({utils:_,date:le,minDate:x?le:_.startOfMonth(de),maxDate:x?_.endOfMonth(de):le,isDateDisabled:L,timezone:T});J(ve||le),he.preventDefault();break}case"ArrowRight":{const le=_.addDays(oe,x?-1:1),de=_.addMonths(oe,x?-1:1),ve=ew({utils:_,date:le,minDate:x?_.startOfMonth(de):le,maxDate:x?le:_.endOfMonth(de),isDateDisabled:L,timezone:T});J(ve||le),he.preventDefault();break}case"Home":J(_.startOfWeek(oe)),he.preventDefault();break;case"End":J(_.endOfWeek(oe)),he.preventDefault();break;case"PageUp":J(_.addMonths(oe,1)),he.preventDefault();break;case"PageDown":J(_.addMonths(oe,-1)),he.preventDefault();break}}),V=Mt((he,oe)=>J(oe)),X=Mt((he,oe)=>{z&&_.isSameDay(K,oe)&&(D==null||D(!1))}),te=_.getMonth(o),ee=A.useMemo(()=>i.filter(he=>!!he).map(he=>_.startOfDay(he)),[_,i]),re=te,se=A.useMemo(()=>A.createRef(),[re]),pe=_.startOfWeek(P),ce=A.useMemo(()=>{const he=_.startOfMonth(o),oe=_.endOfMonth(o);return L(K)||_.isAfterDay(K,oe)||_.isBeforeDay(K,he)?ew({utils:_,date:K,minDate:he,maxDate:oe,disablePast:g,disableFuture:m,isDateDisabled:L,timezone:T}):K},[o,m,g,K,L,_,T]),ne=A.useMemo(()=>{const he=_.setTimezone(o,T),oe=_.getWeekArray(he);let le=_.addMonths(he,1);for(;B&&oe.length<B;){const de=_.getWeekArray(le),ve=_.isSameDay(oe[oe.length-1][0],de[0][0]);de.slice(ve?1:0).forEach(we=>{oe.length<B&&oe.push(we)}),le=_.addMonths(le,1)}return oe},[o,B,_,T]);return xe(gAe,{role:"grid","aria-labelledby":N,className:C.root,children:[xe(vAe,{role:"row",className:C.header,children:[U&&R(bAe,{variant:"caption",role:"columnheader","aria-label":j.calendarWeekNumberHeaderLabel,className:C.weekNumberLabel,children:j.calendarWeekNumberHeaderText}),MSe(_,P).map((he,oe)=>{var le;const de=_.format(he,"weekdayShort");return R(yAe,{variant:"caption",role:"columnheader","aria-label":_.format(_.addDays(pe,oe),"weekday"),className:C.weekDayLabel,children:(le=k==null?void 0:k(de,he))!=null?le:de},de+oe.toString())})]}),s?R(xAe,{className:C.loadingContainer,children:d()}):R(CAe,W({transKey:re,onExited:l,reduceAnimations:f,slideDirection:h,className:it(n,C.slideTransition)},p,{nodeRef:se,children:R(SAe,{ref:se,role:"rowgroup",className:C.monthContainer,children:ne.map((he,oe)=>xe(_Ae,{role:"row",className:C.weekContainer,"aria-rowindex":oe+1,children:[U&&R(wAe,{className:C.weekNumber,role:"rowheader","aria-label":j.calendarWeekNumberAriaLabelText(_.getWeekNumber(he[0])),children:j.calendarWeekNumberText(_.getWeekNumber(he[0]))}),he.map((le,de)=>R(kAe,{parentProps:t,day:le,selectedDays:ee,focusableDay:ce,onKeyDown:G,onFocus:V,onBlur:X,onDaySelect:q,isDateDisabled:L,currentMonthNumber:te,isViewFocused:z,"aria-colindex":de+1},le.toString()))]},`week-${he[0]}`))})}))]})}const EAe=(e,t,r)=>(n,o)=>{switch(o.type){case"changeMonth":return W({},n,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return W({},n,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(n.focusedDay!=null&&o.focusedDay!=null&&r.isSameDay(o.focusedDay,n.focusedDay))return n;const i=o.focusedDay!=null&&!t&&!r.isSameMonth(n.currentMonth,o.focusedDay);return W({},n,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?r.startOfMonth(o.focusedDay):n.currentMonth,slideDirection:o.focusedDay!=null&&r.isAfterDay(o.focusedDay,n.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},oZ=e=>{const{value:t,referenceDate:r,defaultCalendarMonth:n,disableFuture:o,disablePast:i,disableSwitchToMonthOnDayFocus:a=!1,maxDate:s,minDate:c,onMonthChange:l,reduceAnimations:u,shouldDisableDate:f,timezone:d}=e,h=H1(d),p=Hn(),g=A.useRef(EAe(!!u,a,p)).current,m=A.useMemo(()=>{let D=null;return r?D=r:n&&(D=p.startOfMonth(n)),lf.getInitialReferenceValue({value:t,utils:p,timezone:d,props:e,referenceDate:D,granularity:Ru.day})},[]),[v,y]=A.useReducer(g,{isMonthSwitchingAnimating:!1,focusedDay:p.isValid(t)?t:h,currentMonth:p.startOfMonth(m),slideDirection:"left"}),b=A.useCallback(D=>{y(W({type:"changeMonth"},D)),l&&l(D.newMonth)},[l]),w=A.useCallback(D=>{const N=D;p.isSameMonth(N,v.currentMonth)||b({newMonth:p.startOfMonth(N),direction:p.isAfterDay(N,v.currentMonth)?"left":"right"})},[v.currentMonth,b,p]),E=tZ({shouldDisableDate:f,minDate:c,maxDate:s,disableFuture:o,disablePast:i,timezone:d}),I=A.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]),O=Mt((D,N)=>{E(D)||y({type:"changeFocusedDay",focusedDay:D,withoutMonthSwitchingAnimation:N})});return{referenceDate:m,calendarState:v,changeMonth:w,changeFocusedDay:O,isDateDisabled:E,onMonthSwitchingAnimationEnd:I,handleChangeMonth:b}},TAe=["ownerState"],iZ=({clearable:e,fieldProps:t,InputProps:r,onClear:n,slots:o,slotProps:i,components:a,componentsProps:s})=>{var c,l,u,f,d,h;const p=wc(),g=(c=(l=o==null?void 0:o.clearButton)!=null?l:a==null?void 0:a.ClearButton)!=null?c:ri,m=Cr({elementType:g,externalSlotProps:(u=i==null?void 0:i.clearButton)!=null?u:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:p.fieldClearLabel}}),v=ze(m,TAe),y=(f=(d=o==null?void 0:o.clearIcon)!=null?d:a==null?void 0:a.ClearIcon)!=null?f:gSe,b=Cr({elementType:y,externalSlotProps:(h=i==null?void 0:i.clearIcon)!=null?h:s==null?void 0:s.clearIcon,ownerState:{}}),w=W({},r,{endAdornment:e?xe(A.Fragment,{children:[R(c1,{position:"end",sx:{marginRight:r!=null&&r.endAdornment?-1:-1.5},children:R(g,W({},v,{onClick:n,children:R(y,W({fontSize:"small"},b))}))}),r==null?void 0:r.endAdornment]}):r==null?void 0:r.endAdornment}),E=W({},t,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(t.sx)?t.sx:[t.sx]]});return{InputProps:w,fieldProps:E}},IAe=["components","componentsProps","slots","slotProps","InputProps","inputProps"],AAe=["inputRef"],PAe=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],aZ=A.forwardRef(function(t,r){var n,o,i;const a=Wt({props:t,name:"MuiDateField"}),{components:s,componentsProps:c,slots:l,slotProps:u,InputProps:f,inputProps:d}=a,h=ze(a,IAe),p=a,g=(n=(o=l==null?void 0:l.textField)!=null?o:s==null?void 0:s.TextField)!=null?n:Xa,m=Cr({elementType:g,externalSlotProps:(i=u==null?void 0:u.textField)!=null?i:c==null?void 0:c.textField,externalForwardedProps:h,ownerState:p}),{inputRef:v}=m,y=ze(m,AAe);y.inputProps=W({},d,y.inputProps),y.InputProps=W({},f,y.InputProps);const b=xR({props:y,inputRef:v}),{ref:w,onPaste:E,onKeyDown:I,inputMode:O,readOnly:D,clearable:N,onClear:U}=b,B=ze(b,PAe),{InputProps:F,fieldProps:T}=iZ({onClear:U,clearable:N,fieldProps:B,InputProps:B.InputProps,slots:l,slotProps:u,components:s,componentsProps:c});return R(g,W({ref:r},T,{InputProps:W({},F,{readOnly:D}),inputProps:W({},B.inputProps,{inputMode:O,onPaste:E,onKeyDown:I,ref:w})}))}),MAe=e=>Gt("MuiPickersFadeTransitionGroup",e);Vt("MuiPickersFadeTransitionGroup",["root"]);const RAe=e=>{const{classes:t}=e;return pt({root:["root"]},MAe,t)},OAe=We(QO,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function sZ(e){const t=Wt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:r,className:n,reduceAnimations:o,transKey:i}=t,a=RAe(t),s=An();return o?r:R(OAe,{className:it(a.root,n),children:R(W1,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:r},i)})}function DAe(e){return Gt("MuiPickersMonth",e)}const WS=Vt("MuiPickersMonth",["root","monthButton","disabled","selected"]),FAe=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],NAe=e=>{const{disabled:t,selected:r,classes:n}=e;return pt({root:["root"],monthButton:["monthButton",t&&"disabled",r&&"selected"]},DAe,n)},LAe=We("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e})=>({flexBasis:e.monthsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),$Ae=We("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${WS.disabled}`]:t.disabled},{[`&.${WS.selected}`]:t.selected}]})(({theme:e})=>W({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:to(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:to(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${WS.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${WS.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),BAe=A.memo(function(t){const r=Wt({props:t,name:"MuiPickersMonth"}),{autoFocus:n,children:o,disabled:i,selected:a,value:s,tabIndex:c,onClick:l,onKeyDown:u,onFocus:f,onBlur:d,"aria-current":h,"aria-label":p}=r,g=ze(r,FAe),m=A.useRef(null),v=NAe(r);return en(()=>{if(n){var y;(y=m.current)==null||y.focus()}},[n]),R(LAe,W({className:v.root,ownerState:r},g,{children:R($Ae,{ref:m,disabled:i,type:"button",role:"radio",tabIndex:i?-1:c,"aria-current":h,"aria-checked":a,"aria-label":p,onClick:y=>l(y,s),onKeyDown:y=>u(y,s),onFocus:y=>f(y,s),onBlur:y=>d(y,s),className:v.monthButton,ownerState:r,children:o})}))});function UAe(e){return Gt("MuiMonthCalendar",e)}Vt("MuiMonthCalendar",["root"]);const HAe=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],zAe=e=>{const{classes:t}=e;return pt({root:["root"]},UAe,t)};function jAe(e,t){const r=Hn(),n=cp(),o=Wt({props:e,name:t});return W({disableFuture:!1,disablePast:!1},o,{minDate:ca(r,o.minDate,n.minDate),maxDate:ca(r,o.maxDate,n.maxDate)})}const VAe=We("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:AI,boxSizing:"border-box"}),WAe=A.forwardRef(function(t,r){const n=jAe(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:c,disableFuture:l,disablePast:u,maxDate:f,minDate:d,onChange:h,shouldDisableMonth:p,readOnly:g,disableHighlightToday:m,autoFocus:v=!1,onMonthFocus:y,hasFocus:b,onFocusedViewChange:w,monthsPerRow:E=3,timezone:I,gridLabelId:O}=n,D=ze(n,HAe),{value:N,handleValueChange:U,timezone:B}=M2({name:"MonthCalendar",timezone:I,value:i,defaultValue:a,onChange:h,valueManager:lf}),F=H1(B),T=s0(),P=Hn(),_=A.useMemo(()=>lf.getInitialReferenceValue({value:N,utils:P,props:n,timezone:B,referenceDate:s,granularity:Ru.month}),[]),C=n,S=zAe(C),x=A.useMemo(()=>P.getMonth(F),[P,F]),k=A.useMemo(()=>N!=null?P.getMonth(N):m?null:P.getMonth(_),[N,P,m,_]),[L,j]=A.useState(()=>k||x),[z,Y]=sa({name:"MonthCalendar",state:"hasFocus",controlled:b,default:v??!1}),K=Mt(te=>{Y(te),w&&w(te)}),Q=A.useCallback(te=>{const ee=P.startOfMonth(u&&P.isAfter(F,d)?F:d),re=P.startOfMonth(l&&P.isBefore(F,f)?F:f),se=P.startOfMonth(te);return P.isBefore(se,ee)||P.isAfter(se,re)?!0:p?p(se):!1},[l,u,f,d,F,p,P]),q=Mt((te,ee)=>{if(g)return;const re=P.setMonth(N??_,ee);U(re)}),J=Mt(te=>{Q(P.setMonth(N??_,te))||(j(te),K(!0),y&&y(te))});A.useEffect(()=>{j(te=>k!==null&&te!==k?k:te)},[k]);const G=Mt((te,ee)=>{switch(te.key){case"ArrowUp":J((12+ee-3)%12),te.preventDefault();break;case"ArrowDown":J((12+ee+3)%12),te.preventDefault();break;case"ArrowLeft":J((12+ee+(T.direction==="ltr"?-1:1))%12),te.preventDefault();break;case"ArrowRight":J((12+ee+(T.direction==="ltr"?1:-1))%12),te.preventDefault();break}}),V=Mt((te,ee)=>{J(ee)}),X=Mt((te,ee)=>{L===ee&&K(!1)});return R(VAe,W({ref:r,className:it(S.root,o),ownerState:C,role:"radiogroup","aria-labelledby":O},D,{children:JO(P,N??_).map(te=>{const ee=P.getMonth(te),re=P.format(te,"monthShort"),se=P.format(te,"month"),pe=ee===k,ce=c||Q(te);return R(BAe,{selected:pe,value:ee,onClick:q,onKeyDown:G,autoFocus:z&&ee===L,disabled:ce,tabIndex:ee===L?0:-1,onFocus:V,onBlur:X,"aria-current":x===ee?"date":void 0,"aria-label":se,monthsPerRow:E,children:re},re)})}))});function GAe(e){return Gt("MuiPickersYear",e)}const GS=Vt("MuiPickersYear",["root","yearButton","selected","disabled"]),qAe=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],KAe=e=>{const{disabled:t,selected:r,classes:n}=e;return pt({root:["root"],yearButton:["yearButton",t&&"disabled",r&&"selected"]},GAe,n)},YAe=We("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e})=>({flexBasis:e.yearsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),XAe=We("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${GS.disabled}`]:t.disabled},{[`&.${GS.selected}`]:t.selected}]})(({theme:e})=>W({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:to(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:to(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${GS.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${GS.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),QAe=A.memo(function(t){const r=Wt({props:t,name:"MuiPickersYear"}),{autoFocus:n,className:o,children:i,disabled:a,selected:s,value:c,tabIndex:l,onClick:u,onKeyDown:f,onFocus:d,onBlur:h,"aria-current":p}=r,g=ze(r,qAe),m=A.useRef(null),v=KAe(r);return A.useEffect(()=>{n&&m.current.focus()},[n]),R(YAe,W({className:it(v.root,o),ownerState:r},g,{children:R(XAe,{ref:m,disabled:a,type:"button",role:"radio",tabIndex:a?-1:l,"aria-current":p,"aria-checked":s,onClick:y=>u(y,c),onKeyDown:y=>f(y,c),onFocus:y=>d(y,c),onBlur:y=>h(y,c),className:v.yearButton,ownerState:r,children:i})}))});function ZAe(e){return Gt("MuiYearCalendar",e)}Vt("MuiYearCalendar",["root"]);const JAe=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],ePe=e=>{const{classes:t}=e;return pt({root:["root"]},ZAe,t)};function tPe(e,t){var r;const n=Hn(),o=cp(),i=Wt({props:e,name:t});return W({disablePast:!1,disableFuture:!1},i,{yearsPerRow:(r=i.yearsPerRow)!=null?r:3,minDate:ca(n,i.minDate,o.minDate),maxDate:ca(n,i.maxDate,o.maxDate)})}const rPe=We("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:AI,maxHeight:ISe,boxSizing:"border-box",position:"relative"}),nPe=A.forwardRef(function(t,r){const n=tPe(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:c,disabled:l,disableFuture:u,disablePast:f,maxDate:d,minDate:h,onChange:p,readOnly:g,shouldDisableYear:m,disableHighlightToday:v,onYearFocus:y,hasFocus:b,onFocusedViewChange:w,yearsPerRow:E,timezone:I,gridLabelId:O}=n,D=ze(n,JAe),{value:N,handleValueChange:U,timezone:B}=M2({name:"YearCalendar",timezone:I,value:a,defaultValue:s,onChange:p,valueManager:lf}),F=H1(B),T=s0(),P=Hn(),_=A.useMemo(()=>lf.getInitialReferenceValue({value:N,utils:P,props:n,timezone:B,referenceDate:c,granularity:Ru.year}),[]),C=n,S=ePe(C),x=A.useMemo(()=>P.getYear(F),[P,F]),k=A.useMemo(()=>N!=null?P.getYear(N):v?null:P.getYear(_),[N,P,v,_]),[L,j]=A.useState(()=>k||x),[z,Y]=sa({name:"YearCalendar",state:"hasFocus",controlled:b,default:o??!1}),K=Mt(re=>{Y(re),w&&w(re)}),Q=A.useCallback(re=>{if(f&&P.isBeforeYear(re,F)||u&&P.isAfterYear(re,F)||h&&P.isBeforeYear(re,h)||d&&P.isAfterYear(re,d))return!0;if(!m)return!1;const se=P.startOfYear(re);return m(se)},[u,f,d,h,F,m,P]),q=Mt((re,se)=>{if(g)return;const pe=P.setYear(N??_,se);U(pe)}),J=Mt(re=>{Q(P.setYear(N??_,re))||(j(re),K(!0),y==null||y(re))});A.useEffect(()=>{j(re=>k!==null&&re!==k?k:re)},[k]);const G=Mt((re,se)=>{switch(re.key){case"ArrowUp":J(se-E),re.preventDefault();break;case"ArrowDown":J(se+E),re.preventDefault();break;case"ArrowLeft":J(se+(T.direction==="ltr"?-1:1)),re.preventDefault();break;case"ArrowRight":J(se+(T.direction==="ltr"?1:-1)),re.preventDefault();break}}),V=Mt((re,se)=>{J(se)}),X=Mt((re,se)=>{L===se&&K(!1)}),te=A.useRef(null),ee=Ur(r,te);return A.useEffect(()=>{if(o||te.current===null)return;const re=te.current.querySelector('[tabindex="0"]');if(!re)return;const se=re.offsetHeight,pe=re.offsetTop,ce=te.current.clientHeight,ne=te.current.scrollTop,he=pe+se;se>ce||pe<ne||(te.current.scrollTop=he-ce/2-se/2)},[o]),R(rPe,W({ref:ee,className:it(S.root,i),ownerState:C,role:"radiogroup","aria-labelledby":O},D,{children:P.getYearRange(h,d).map(re=>{const se=P.getYear(re),pe=se===k,ce=l||Q(re);return R(QAe,{selected:pe,value:se,onClick:q,onKeyDown:G,autoFocus:z&&se===L,disabled:ce,tabIndex:se===L?0:-1,onFocus:V,onBlur:X,"aria-current":x===se?"date":void 0,yearsPerRow:E,children:P.format(re,"year")},P.format(re,"year"))})}))}),oPe=e=>Gt("MuiPickersCalendarHeader",e),iPe=Vt("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),aPe=["slots","slotProps","components","componentsProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],sPe=["ownerState"],lPe=e=>{const{classes:t}=e;return pt({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},oPe,t)},cPe=We("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),uPe=We("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>W({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),dPe=We("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),fPe=We(ri,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})(({ownerState:e})=>W({marginRight:"auto"},e.view==="year"&&{[`.${iPe.switchViewIcon}`]:{transform:"rotate(180deg)"}})),hPe=We(fSe,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),lZ=A.forwardRef(function(t,r){var n,o,i,a;const s=wc(),c=Hn(),l=Wt({props:t,name:"MuiPickersCalendarHeader"}),{slots:u,slotProps:f,components:d,currentMonth:h,disabled:p,disableFuture:g,disablePast:m,maxDate:v,minDate:y,onMonthChange:b,onViewChange:w,view:E,reduceAnimations:I,views:O,labelId:D,className:N,timezone:U}=l,B=ze(l,aPe),F=l,T=lPe(l),P=(n=(o=u==null?void 0:u.switchViewButton)!=null?o:d==null?void 0:d.SwitchViewButton)!=null?n:fPe,_=Cr({elementType:P,externalSlotProps:f==null?void 0:f.switchViewButton,additionalProps:{size:"small","aria-label":s.calendarViewSwitchingButtonAriaLabel(E)},ownerState:F,className:T.switchViewButton}),C=(i=(a=u==null?void 0:u.switchViewIcon)!=null?a:d==null?void 0:d.SwitchViewIcon)!=null?i:hPe,S=Cr({elementType:C,externalSlotProps:f==null?void 0:f.switchViewIcon,ownerState:void 0,className:T.switchViewIcon}),x=ze(S,sPe),k=()=>b(c.addMonths(h,1),"left"),L=()=>b(c.addMonths(h,-1),"right"),j=qX(h,{disableFuture:g,maxDate:v,timezone:U}),z=KX(h,{disablePast:m,minDate:y,timezone:U}),Y=()=>{if(!(O.length===1||!w||p))if(O.length===2)w(O.find(K=>K!==E)||O[0]);else{const K=O.indexOf(E)!==0?0:1;w(O[K])}};return O.length===1&&O[0]==="year"?null:xe(cPe,W({},B,{ownerState:F,className:it(N,T.root),ref:r,children:[xe(uPe,{role:"presentation",onClick:Y,ownerState:F,"aria-live":"polite",className:T.labelContainer,children:[R(sZ,{reduceAnimations:I,transKey:c.format(h,"monthAndYear"),children:R(dPe,{id:D,ownerState:F,className:T.label,children:c.format(h,"monthAndYear")})}),O.length>1&&!p&&R(P,W({},_,{children:R(C,W({},x))}))]}),R(W1,{in:E==="day",children:R(WX,{slots:u,slotProps:f,onGoToPrevious:L,isPreviousDisabled:z,previousLabel:s.previousMonth,onGoToNext:k,isNextDisabled:j,nextLabel:s.nextMonth})})]}))}),pPe=e=>Gt("MuiDateCalendar",e);Vt("MuiDateCalendar",["root","viewTransitionContainer"]);const mPe=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"],gPe=e=>{const{classes:t}=e;return pt({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},pPe,t)};function vPe(e,t){var r,n,o,i,a,s,c;const l=Hn(),u=cp(),f=kD(),d=Wt({props:e,name:t});return W({},d,{loading:(r=d.loading)!=null?r:!1,disablePast:(n=d.disablePast)!=null?n:!1,disableFuture:(o=d.disableFuture)!=null?o:!1,openTo:(i=d.openTo)!=null?i:"day",views:(a=d.views)!=null?a:["year","day"],reduceAnimations:(s=d.reduceAnimations)!=null?s:f,renderLoading:(c=d.renderLoading)!=null?c:()=>R("span",{children:"..."}),minDate:ca(l,d.minDate,u.minDate),maxDate:ca(l,d.maxDate,u.maxDate)})}const yPe=We(ASe,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:ZO}),bPe=We(sZ,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),wPe=A.forwardRef(function(t,r){var n,o,i;const a=Hn(),s=dn(),c=vPe(t,"MuiDateCalendar"),{autoFocus:l,onViewChange:u,value:f,defaultValue:d,referenceDate:h,disableFuture:p,disablePast:g,defaultCalendarMonth:m,onChange:v,onYearChange:y,onMonthChange:b,reduceAnimations:w,shouldDisableDate:E,shouldDisableMonth:I,shouldDisableYear:O,view:D,views:N,openTo:U,className:B,disabled:F,readOnly:T,minDate:P,maxDate:_,disableHighlightToday:C,focusedView:S,onFocusedViewChange:x,showDaysOutsideCurrentMonth:k,fixedWeekNumber:L,dayOfWeekFormatter:j,components:z,componentsProps:Y,slots:K,slotProps:Q,loading:q,renderLoading:J,displayWeekNumber:G,yearsPerRow:V,monthsPerRow:X,timezone:te}=c,ee=ze(c,mPe),{value:re,handleValueChange:se,timezone:pe}=M2({name:"DateCalendar",timezone:te,value:f,defaultValue:d,onChange:v,valueManager:lf}),{view:ce,setView:ne,focusedView:he,setFocusedView:oe,goToNextView:le,setValueAndGoToNextView:de}=GX({view:D,views:N,openTo:U,onChange:se,onViewChange:u,autoFocus:l,focusedView:S,onFocusedViewChange:x}),{referenceDate:ve,calendarState:we,changeFocusedDay:ie,changeMonth:ge,handleChangeMonth:Pe,isDateDisabled:Fe,onMonthSwitchingAnimationEnd:Ie}=oZ({value:re,defaultCalendarMonth:m,referenceDate:h,reduceAnimations:w,onMonthChange:b,minDate:P,maxDate:_,shouldDisableDate:E,disablePast:g,disableFuture:p,timezone:pe}),Oe=F&&re||P,$e=F&&re||_,et=`${s}-grid-label`,Ze=he!==null,Ne=(n=(o=K==null?void 0:K.calendarHeader)!=null?o:z==null?void 0:z.CalendarHeader)!=null?n:lZ,Qe=Cr({elementType:Ne,externalSlotProps:(i=Q==null?void 0:Q.calendarHeader)!=null?i:Y==null?void 0:Y.calendarHeader,additionalProps:{views:N,view:ce,currentMonth:we.currentMonth,onViewChange:ne,onMonthChange:(st,mt)=>Pe({newMonth:st,direction:mt}),minDate:Oe,maxDate:$e,disabled:F,disablePast:g,disableFuture:p,reduceAnimations:w,timezone:pe,labelId:et,slots:K,slotProps:Q},ownerState:c}),Xe=Mt(st=>{const mt=a.startOfMonth(st),_t=a.endOfMonth(st),Pt=Fe(st)?ew({utils:a,date:st,minDate:a.isBefore(P,mt)?mt:P,maxDate:a.isAfter(_,_t)?_t:_,disablePast:g,disableFuture:p,isDateDisabled:Fe,timezone:pe}):st;Pt?(de(Pt,"finish"),b==null||b(mt)):(le(),ge(mt)),ie(Pt,!0)}),rt=Mt(st=>{const mt=a.startOfYear(st),_t=a.endOfYear(st),Pt=Fe(st)?ew({utils:a,date:st,minDate:a.isBefore(P,mt)?mt:P,maxDate:a.isAfter(_,_t)?_t:_,disablePast:g,disableFuture:p,isDateDisabled:Fe,timezone:pe}):st;Pt?(de(Pt,"finish"),y==null||y(Pt)):(le(),ge(mt)),ie(Pt,!0)}),ht=Mt(st=>se(st&&pR(a,st,re??ve),"finish"));A.useEffect(()=>{re!=null&&a.isValid(re)&&ge(re)},[re]);const At=c,Qt=gPe(At),Nt={disablePast:g,disableFuture:p,maxDate:_,minDate:P},Ue={disableHighlightToday:C,readOnly:T,disabled:F,timezone:pe,gridLabelId:et},Ye=A.useRef(ce);A.useEffect(()=>{Ye.current!==ce&&(he===Ye.current&&oe(ce,!0),Ye.current=ce)},[he,oe,ce]);const tt=A.useMemo(()=>[re],[re]);return xe(yPe,W({ref:r,className:it(Qt.root,B),ownerState:At},ee,{children:[R(Ne,W({},Qe)),R(bPe,{reduceAnimations:w,className:Qt.viewTransitionContainer,transKey:ce,ownerState:At,children:xe("div",{children:[ce==="year"&&R(nPe,W({},Nt,Ue,{value:re,onChange:rt,shouldDisableYear:O,hasFocus:Ze,onFocusedViewChange:st=>oe("year",st),yearsPerRow:V,referenceDate:ve})),ce==="month"&&R(WAe,W({},Nt,Ue,{hasFocus:Ze,className:B,value:re,onChange:Xe,shouldDisableMonth:I,onFocusedViewChange:st=>oe("month",st),monthsPerRow:X,referenceDate:ve})),ce==="day"&&R(nZ,W({},we,Nt,Ue,{onMonthSwitchingAnimationEnd:Ie,onFocusedDayChange:ie,reduceAnimations:w,selectedDays:tt,onSelectedDaysChange:ht,shouldDisableDate:E,shouldDisableMonth:I,shouldDisableYear:O,hasFocus:Ze,onFocusedViewChange:st=>oe("day",st),showDaysOutsideCurrentMonth:k,fixedWeekNumber:L,dayOfWeekFormatter:j,displayWeekNumber:G,components:z,componentsProps:Y,slots:K,slotProps:Q,loading:q,renderLoading:J}))]})})]}))});function xPe(e){return Gt("MuiSkeleton",e)}Vt("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const CPe=["animation","className","component","height","style","variant","width"];let oE=e=>e,TU,IU,AU,PU;const SPe=e=>{const{classes:t,variant:r,animation:n,hasChildren:o,width:i,height:a}=e;return pt({root:["root",r,n,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},xPe,t)},_Pe=sp(TU||(TU=oE`
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }

  100% {
    opacity: 1;
  }
`)),kPe=sp(IU||(IU=oE`
  0% {
    transform: translateX(-100%);
  }

  50% {
    /* +0.5s of delay between each loop */
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
`)),EPe=We("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.animation!==!1&&t[r.animation],r.hasChildren&&t.withChildren,r.hasChildren&&!r.width&&t.fitContent,r.hasChildren&&!r.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const r=L2e(e.shape.borderRadius)||"px",n=$2e(e.shape.borderRadius);return W({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:to(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${r}/${Math.round(n/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&e1(AU||(AU=oE`
      animation: ${0} 2s ease-in-out 0.5s infinite;
    `),_Pe),({ownerState:e,theme:t})=>e.animation==="wave"&&e1(PU||(PU=oE`
      position: relative;
      overflow: hidden;

      /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
      -webkit-mask-image: -webkit-radial-gradient(white, black);

      &::after {
        animation: ${0} 2s linear 0.5s infinite;
        background: linear-gradient(
          90deg,
          transparent,
          ${0},
          transparent
        );
        content: '';
        position: absolute;
        transform: translateX(-100%); /* Avoid flash during server-side hydration */
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
      }
    `),kPe,(t.vars||t).palette.action.hover)),TPe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:s,style:c,variant:l="text",width:u}=n,f=ze(n,CPe),d=W({},n,{animation:o,component:a,variant:l,hasChildren:!!f.children}),h=SPe(d);return R(EPe,W({as:a,ref:r,className:it(h.root,i),ownerState:d},f,{style:W({width:u,height:s},c)}))}),IPe=TPe;function APe(e){return Gt("MuiDatePickerToolbar",e)}Vt("MuiDatePickerToolbar",["root","title"]);const PPe=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views"],MPe=e=>{const{classes:t}=e;return pt({root:["root"],title:["title"]},APe,t)},RPe=We(qQ,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),OPe=We(jt,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})(({ownerState:e})=>W({},e.isLandscape&&{margin:"auto 16px auto auto"})),DPe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:c}=n,l=ze(n,PPe),u=Hn(),f=wc(),d=MPe(n),h=A.useMemo(()=>{if(!o)return s;const g=eD(u,{format:a,views:c},!0);return u.formatByString(o,g)},[o,a,s,u,c]),p=n;return R(RPe,W({ref:r,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:d.root},l,{children:R(OPe,{variant:"h4",align:i?"left":"center",ownerState:p,className:d.title,children:h})}))});function cZ(e,t){var r,n,o,i;const a=Hn(),s=cp(),c=Wt({props:e,name:t}),l=A.useMemo(()=>{var f;return((f=c.localeText)==null?void 0:f.toolbarTitle)==null?c.localeText:W({},c.localeText,{datePickerToolbarTitle:c.localeText.toolbarTitle})},[c.localeText]),u=(r=c.slots)!=null?r:R2(c.components);return W({},c,{localeText:l},_Se({views:c.views,openTo:c.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:(n=c.disableFuture)!=null?n:!1,disablePast:(o=c.disablePast)!=null?o:!1,minDate:ca(a,c.minDate,s.minDate),maxDate:ca(a,c.maxDate,s.maxDate),slots:W({toolbar:DPe},u),slotProps:(i=c.slotProps)!=null?i:c.componentsProps})}const FPe=["props","getOpenDialogAriaText"],NPe=["ownerState"],LPe=["ownerState"],$Pe=e=>{var t,r,n,o,i;let{props:a,getOpenDialogAriaText:s}=e,c=ze(e,FPe);const{slots:l,slotProps:u,className:f,sx:d,format:h,formatDensity:p,timezone:g,label:m,inputRef:v,readOnly:y,disabled:b,autoFocus:w,localeText:E,reduceAnimations:I}=a,O=Hn(),D=A.useRef(null),N=A.useRef(null),U=dn(),B=(t=u==null||(r=u.toolbar)==null?void 0:r.hidden)!=null?t:!1,{open:F,actions:T,hasUIView:P,layoutProps:_,renderCurrentView:C,shouldRestoreFocus:S,fieldProps:x}=$I(W({},c,{props:a,inputRef:D,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),k=(n=l.inputAdornment)!=null?n:c1,L=Cr({elementType:k,externalSlotProps:u==null?void 0:u.inputAdornment,additionalProps:{position:"end"},ownerState:a}),j=ze(L,NPe),z=(o=l.openPickerButton)!=null?o:ri,Y=Cr({elementType:z,externalSlotProps:u==null?void 0:u.openPickerButton,additionalProps:{disabled:b||y,onClick:F?T.onClose:T.onOpen,"aria-label":s(x.value,O),edge:j.position},ownerState:a}),K=ze(Y,LPe),Q=l.openPickerIcon,q=l.field,J=Cr({elementType:q,externalSlotProps:u==null?void 0:u.field,additionalProps:W({},x,B&&{id:U},{readOnly:y,disabled:b,className:f,sx:d,format:h,formatDensity:p,timezone:g,label:m,autoFocus:w&&!a.open,focused:F?!0:void 0}),ownerState:a});P&&(J.InputProps=W({},J.InputProps,{ref:N,[`${j.position}Adornment`]:R(k,W({},j,{children:R(z,W({},K,{children:R(Q,W({},u==null?void 0:u.openPickerIcon))}))}))}));const G=W({textField:l.textField,clearIcon:l.clearIcon,clearButton:l.clearButton},J.slots),V=(i=l.layout)!=null?i:UI,X=Ur(D,J.inputRef,v);let te=U;B&&(m?te=`${U}-label`:te=void 0);const ee=W({},u,{toolbar:W({},u==null?void 0:u.toolbar,{titleId:U}),popper:W({"aria-labelledby":te},u==null?void 0:u.popper)});return{renderPicker:()=>xe(A2,{localeText:E,children:[R(q,W({},J,{slots:G,slotProps:ee,inputRef:X})),R(WQ,W({role:"dialog",placement:"bottom-start",anchorEl:N.current},T,{open:F,slots:l,slotProps:ee,shouldRestoreFocus:S,reduceAnimations:I,children:R(V,W({},_,ee==null?void 0:ee.layout,{slots:l,slotProps:ee,children:C()}))}))]})}},cv=({view:e,onViewChange:t,views:r,focusedView:n,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:f,disablePast:d,minDate:h,maxDate:p,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:b,monthsPerRow:w,onYearChange:E,yearsPerRow:I,defaultCalendarMonth:O,components:D,componentsProps:N,slots:U,slotProps:B,loading:F,renderLoading:T,disableHighlightToday:P,readOnly:_,disabled:C,showDaysOutsideCurrentMonth:S,dayOfWeekFormatter:x,sx:k,autoFocus:L,fixedWeekNumber:j,displayWeekNumber:z,timezone:Y})=>R(wPe,{view:e,onViewChange:t,views:r.filter(BB),focusedView:n&&BB(n)?n:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:f,disablePast:d,minDate:h,maxDate:p,shouldDisableDate:g,shouldDisableMonth:m,shouldDisableYear:v,reduceAnimations:y,onMonthChange:b,monthsPerRow:w,onYearChange:E,yearsPerRow:I,defaultCalendarMonth:O,components:D,componentsProps:N,slots:U,slotProps:B,loading:F,renderLoading:T,disableHighlightToday:P,readOnly:_,disabled:C,showDaysOutsideCurrentMonth:S,dayOfWeekFormatter:x,sx:k,autoFocus:L,fixedWeekNumber:j,displayWeekNumber:z,timezone:Y}),uZ=A.forwardRef(function(t,r){var n,o,i,a;const s=wc(),c=Hn(),l=cZ(t,"MuiDesktopDatePicker"),u=W({day:cv,month:cv,year:cv},l.viewRenderers),f=W({},l,{viewRenderers:u,format:eD(c,l,!1),yearsPerRow:(n=l.yearsPerRow)!=null?n:4,slots:W({openPickerIcon:mSe,field:aZ},l.slots),slotProps:W({},l.slotProps,{field:h=>{var p;return W({},Ku((p=l.slotProps)==null?void 0:p.field,h),LI(l),{ref:r})},toolbar:W({hidden:!0},(o=l.slotProps)==null?void 0:o.toolbar)})}),{renderPicker:d}=$Pe({props:f,valueManager:lf,valueType:"date",getOpenDialogAriaText:(i=(a=f.localeText)==null?void 0:a.openDatePickerDialogue)!=null?i:s.openDatePickerDialogue,validator:l1});return d()});uZ.propTypes={autoFocus:ue.bool,className:ue.string,closeOnSelect:ue.bool,components:ue.object,componentsProps:ue.object,dayOfWeekFormatter:ue.func,defaultCalendarMonth:ue.any,defaultValue:ue.any,disabled:ue.bool,disableFuture:ue.bool,disableHighlightToday:ue.bool,disableOpenPicker:ue.bool,disablePast:ue.bool,displayWeekNumber:ue.bool,fixedWeekNumber:ue.number,format:ue.string,formatDensity:ue.oneOf(["dense","spacious"]),inputRef:JT,label:ue.node,loading:ue.bool,localeText:ue.object,maxDate:ue.any,minDate:ue.any,monthsPerRow:ue.oneOf([3,4]),onAccept:ue.func,onChange:ue.func,onClose:ue.func,onError:ue.func,onMonthChange:ue.func,onOpen:ue.func,onSelectedSectionsChange:ue.func,onViewChange:ue.func,onYearChange:ue.func,open:ue.bool,openTo:ue.oneOf(["day","month","year"]),orientation:ue.oneOf(["landscape","portrait"]),readOnly:ue.bool,reduceAnimations:ue.bool,referenceDate:ue.any,renderLoading:ue.func,selectedSections:ue.oneOfType([ue.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),ue.number,ue.shape({endIndex:ue.number.isRequired,startIndex:ue.number.isRequired})]),shouldDisableDate:ue.func,shouldDisableMonth:ue.func,shouldDisableYear:ue.func,showDaysOutsideCurrentMonth:ue.bool,slotProps:ue.object,slots:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),timezone:ue.string,value:ue.any,view:ue.oneOf(["day","month","year"]),viewRenderers:ue.shape({day:ue.func,month:ue.func,year:ue.func}),views:ue.arrayOf(ue.oneOf(["day","month","year"]).isRequired),yearsPerRow:ue.oneOf([3,4])};const BPe=["props","getOpenDialogAriaText"],UPe=e=>{var t,r,n;let{props:o,getOpenDialogAriaText:i}=e,a=ze(e,BPe);const{slots:s,slotProps:c,className:l,sx:u,format:f,formatDensity:d,timezone:h,label:p,inputRef:g,readOnly:m,disabled:v,localeText:y}=o,b=Hn(),w=A.useRef(null),E=dn(),I=(t=c==null||(r=c.toolbar)==null?void 0:r.hidden)!=null?t:!1,{open:O,actions:D,layoutProps:N,renderCurrentView:U,fieldProps:B}=$I(W({},a,{props:o,inputRef:w,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),F=s.field,T=Cr({elementType:F,externalSlotProps:c==null?void 0:c.field,additionalProps:W({},B,I&&{id:E},!(v||m)&&{onClick:D.onOpen,onKeyDown:nE(D.onOpen)},{readOnly:m??!0,disabled:v,className:l,sx:u,format:f,formatDensity:d,timezone:h,label:p}),ownerState:o});T.inputProps=W({},T.inputProps,{"aria-label":i(B.value,b)});const P=W({textField:s.textField},T.slots),_=(n=s.layout)!=null?n:UI,C=Ur(w,T.inputRef,g);let S=E;I&&(p?S=`${E}-label`:S=void 0);const x=W({},c,{toolbar:W({},c==null?void 0:c.toolbar,{titleId:E}),mobilePaper:W({"aria-labelledby":S},c==null?void 0:c.mobilePaper)});return{renderPicker:()=>xe(A2,{localeText:y,children:[R(F,W({},T,{slots:P,slotProps:x,inputRef:C})),R(zQ,W({},D,{open:O,slots:s,slotProps:x,children:R(_,W({},N,x==null?void 0:x.layout,{slots:s,slotProps:x,children:U()}))}))]})}},dZ=A.forwardRef(function(t,r){var n,o,i;const a=wc(),s=Hn(),c=cZ(t,"MuiMobileDatePicker"),l=W({day:cv,month:cv,year:cv},c.viewRenderers),u=W({},c,{viewRenderers:l,format:eD(s,c,!1),slots:W({field:aZ},c.slots),slotProps:W({},c.slotProps,{field:d=>{var h;return W({},Ku((h=c.slotProps)==null?void 0:h.field,d),LI(c),{ref:r})},toolbar:W({hidden:!1},(n=c.slotProps)==null?void 0:n.toolbar)})}),{renderPicker:f}=UPe({props:u,valueManager:lf,valueType:"date",getOpenDialogAriaText:(o=(i=u.localeText)==null?void 0:i.openDatePickerDialogue)!=null?o:a.openDatePickerDialogue,validator:l1});return f()});dZ.propTypes={autoFocus:ue.bool,className:ue.string,closeOnSelect:ue.bool,components:ue.object,componentsProps:ue.object,dayOfWeekFormatter:ue.func,defaultCalendarMonth:ue.any,defaultValue:ue.any,disabled:ue.bool,disableFuture:ue.bool,disableHighlightToday:ue.bool,disableOpenPicker:ue.bool,disablePast:ue.bool,displayWeekNumber:ue.bool,fixedWeekNumber:ue.number,format:ue.string,formatDensity:ue.oneOf(["dense","spacious"]),inputRef:JT,label:ue.node,loading:ue.bool,localeText:ue.object,maxDate:ue.any,minDate:ue.any,monthsPerRow:ue.oneOf([3,4]),onAccept:ue.func,onChange:ue.func,onClose:ue.func,onError:ue.func,onMonthChange:ue.func,onOpen:ue.func,onSelectedSectionsChange:ue.func,onViewChange:ue.func,onYearChange:ue.func,open:ue.bool,openTo:ue.oneOf(["day","month","year"]),orientation:ue.oneOf(["landscape","portrait"]),readOnly:ue.bool,reduceAnimations:ue.bool,referenceDate:ue.any,renderLoading:ue.func,selectedSections:ue.oneOfType([ue.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),ue.number,ue.shape({endIndex:ue.number.isRequired,startIndex:ue.number.isRequired})]),shouldDisableDate:ue.func,shouldDisableMonth:ue.func,shouldDisableYear:ue.func,showDaysOutsideCurrentMonth:ue.bool,slotProps:ue.object,slots:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),timezone:ue.string,value:ue.any,view:ue.oneOf(["day","month","year"]),viewRenderers:ue.shape({day:ue.func,month:ue.func,year:ue.func}),views:ue.arrayOf(ue.oneOf(["day","month","year"]).isRequired),yearsPerRow:ue.oneOf([3,4])};const HPe=["desktopModeMediaQuery"],TD=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=$Q}=n,i=ze(n,HPe);return E2(o,{defaultMatches:!0})?R(uZ,W({ref:r},i)):R(dZ,W({ref:r},i))});function zPe(e){return Gt("MuiTab",e)}const jPe=Vt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Ep=jPe,VPe=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],WPe=e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:o,icon:i,label:a,selected:s,disabled:c}=e,l={root:["root",i&&a&&"labelIcon",`textColor${ut(r)}`,n&&"fullWidth",o&&"wrapped",s&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return pt(l,zPe,t)},GPe=We(au,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${ut(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>W({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:t.iconPosition==="top"||t.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${Ep.iconWrapper}`]:W({},t.iconPosition==="top"&&{marginBottom:6},t.iconPosition==="bottom"&&{marginTop:6},t.iconPosition==="start"&&{marginRight:e.spacing(1)},t.iconPosition==="end"&&{marginLeft:e.spacing(1)})},t.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${Ep.selected}`]:{opacity:1},[`&.${Ep.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.textColor==="primary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Ep.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Ep.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.textColor==="secondary"&&{color:(e.vars||e).palette.text.secondary,[`&.${Ep.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Ep.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)})),qPe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:c,iconPosition:l="top",indicator:u,label:f,onChange:d,onClick:h,onFocus:p,selected:g,selectionFollowsFocus:m,textColor:v="inherit",value:y,wrapped:b=!1}=n,w=ze(n,VPe),E=W({},n,{disabled:i,disableFocusRipple:a,selected:g,icon:!!c,iconPosition:l,label:!!f,fullWidth:s,textColor:v,wrapped:b}),I=WPe(E),O=c&&f&&A.isValidElement(c)?A.cloneElement(c,{className:it(I.iconWrapper,c.props.className)}):c,D=U=>{!g&&d&&d(U,y),h&&h(U)},N=U=>{m&&!g&&d&&d(U,y),p&&p(U)};return xe(GPe,W({focusRipple:!a,className:it(I.root,o),ref:r,role:"tab","aria-selected":g,disabled:i,onClick:D,onFocus:N,ownerState:E,tabIndex:g?0:-1},w,{children:[l==="top"||l==="start"?xe(A.Fragment,{children:[O,f]}):xe(A.Fragment,{children:[f,O]}),u]}))}),KPe=qPe;function YPe(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function XPe(e,t,r,n={},o=()=>{}){const{ease:i=YPe,duration:a=300}=n;let s=null;const c=t[e];let l=!1;const u=()=>{l=!0},f=d=>{if(l){o(new Error("Animation cancelled"));return}s===null&&(s=d);const h=Math.min(1,(d-s)/a);if(t[e]=i(h)*(r-c)+c,h>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(f)};return c===r?(o(new Error("Element already at target position")),u):(requestAnimationFrame(f),u)}const QPe=["onChange"],ZPe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function JPe(e){const{onChange:t}=e,r=ze(e,QPe),n=A.useRef(),o=A.useRef(null),i=()=>{n.current=o.current.offsetHeight-o.current.clientHeight};return en(()=>{const a=ap(()=>{const c=n.current;i(),c!==n.current&&t(n.current)}),s=Gs(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),A.useEffect(()=>{i(),t(n.current)},[t]),R("div",W({style:ZPe,ref:o},r))}const fZ=Sr(R("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),hZ=Sr(R("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function eMe(e){return Gt("MuiTabScrollButton",e)}const tMe=Vt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),rMe=tMe,nMe=["className","slots","slotProps","direction","orientation","disabled"],oMe=e=>{const{classes:t,orientation:r,disabled:n}=e;return pt({root:["root",r,n&&"disabled"]},eMe,t)},iMe=We(au,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})(({ownerState:e})=>W({width:40,flexShrink:0,opacity:.8,[`&.${rMe.disabled}`]:{opacity:0}},e.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}})),aMe=A.forwardRef(function(t,r){var n,o;const i=Wt({props:t,name:"MuiTabScrollButton"}),{className:a,slots:s={},slotProps:c={},direction:l}=i,u=ze(i,nMe),f=l0(),d=W({isRtl:f},i),h=oMe(d),p=(n=s.StartScrollButtonIcon)!=null?n:fZ,g=(o=s.EndScrollButtonIcon)!=null?o:hZ,m=Cr({elementType:p,externalSlotProps:c.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),v=Cr({elementType:g,externalSlotProps:c.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return R(iMe,W({component:"div",className:it(h.root,a),ref:r,role:null,ownerState:d,tabIndex:null},u,{children:l==="left"?R(p,W({},m)):R(g,W({},v))}))}),sMe=aMe;function lMe(e){return Gt("MuiTabs",e)}const cMe=Vt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),NA=cMe,uMe=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],MU=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,RU=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,qS=(e,t,r)=>{let n=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(n)return;n=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=r(e,o);else{o.focus();return}}},dMe=e=>{const{vertical:t,fixed:r,hideScrollbar:n,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:c}=e;return pt({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},lMe,c)},fMe=We("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${NA.scrollButtons}`]:t.scrollButtons},{[`& .${NA.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>W({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${NA.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}})),hMe=We("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})(({ownerState:e})=>W({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),pMe=We("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})(({ownerState:e})=>W({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),mMe=We("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>W({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},e.indicatorColor==="primary"&&{backgroundColor:(t.vars||t).palette.primary.main},e.indicatorColor==="secondary"&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),gMe=We(JPe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),OU={},vMe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiTabs"}),o=An(),i=l0(),{"aria-label":a,"aria-labelledby":s,action:c,centered:l=!1,children:u,className:f,component:d="div",allowScrollButtonsMobile:h=!1,indicatorColor:p="primary",onChange:g,orientation:m="horizontal",ScrollButtonComponent:v=sMe,scrollButtons:y="auto",selectionFollowsFocus:b,slots:w={},slotProps:E={},TabIndicatorProps:I={},TabScrollButtonProps:O={},textColor:D="primary",value:N,variant:U="standard",visibleScrollbar:B=!1}=n,F=ze(n,uMe),T=U==="scrollable",P=m==="vertical",_=P?"scrollTop":"scrollLeft",C=P?"top":"left",S=P?"bottom":"right",x=P?"clientHeight":"clientWidth",k=P?"height":"width",L=W({},n,{component:d,allowScrollButtonsMobile:h,indicatorColor:p,orientation:m,vertical:P,scrollButtons:y,textColor:D,variant:U,visibleScrollbar:B,fixed:!T,hideScrollbar:T&&!B,scrollableX:T&&!P,scrollableY:T&&P,centered:l&&!T,scrollButtonsHideMobile:!h}),j=dMe(L),z=Cr({elementType:w.StartScrollButtonIcon,externalSlotProps:E.startScrollButtonIcon,ownerState:L}),Y=Cr({elementType:w.EndScrollButtonIcon,externalSlotProps:E.endScrollButtonIcon,ownerState:L}),[K,Q]=A.useState(!1),[q,J]=A.useState(OU),[G,V]=A.useState(!1),[X,te]=A.useState(!1),[ee,re]=A.useState(!1),[se,pe]=A.useState({overflow:"hidden",scrollbarWidth:0}),ce=new Map,ne=A.useRef(null),he=A.useRef(null),oe=()=>{const Xe=ne.current;let rt;if(Xe){const At=Xe.getBoundingClientRect();rt={clientWidth:Xe.clientWidth,scrollLeft:Xe.scrollLeft,scrollTop:Xe.scrollTop,scrollLeftNormalized:Cge(Xe,i?"rtl":"ltr"),scrollWidth:Xe.scrollWidth,top:At.top,bottom:At.bottom,left:At.left,right:At.right}}let ht;if(Xe&&N!==!1){const At=he.current.children;if(At.length>0){const Qt=At[ce.get(N)];ht=Qt?Qt.getBoundingClientRect():null}}return{tabsMeta:rt,tabMeta:ht}},le=Mt(()=>{const{tabsMeta:Xe,tabMeta:rt}=oe();let ht=0,At;if(P)At="top",rt&&Xe&&(ht=rt.top-Xe.top+Xe.scrollTop);else if(At=i?"right":"left",rt&&Xe){const Nt=i?Xe.scrollLeftNormalized+Xe.clientWidth-Xe.scrollWidth:Xe.scrollLeft;ht=(i?-1:1)*(rt[At]-Xe[At]+Nt)}const Qt={[At]:ht,[k]:rt?rt[k]:0};if(isNaN(q[At])||isNaN(q[k]))J(Qt);else{const Nt=Math.abs(q[At]-Qt[At]),Ue=Math.abs(q[k]-Qt[k]);(Nt>=1||Ue>=1)&&J(Qt)}}),de=(Xe,{animation:rt=!0}={})=>{rt?XPe(_,ne.current,Xe,{duration:o.transitions.duration.standard}):ne.current[_]=Xe},ve=Xe=>{let rt=ne.current[_];P?rt+=Xe:(rt+=Xe*(i?-1:1),rt*=i&&RY()==="reverse"?-1:1),de(rt)},we=()=>{const Xe=ne.current[x];let rt=0;const ht=Array.from(he.current.children);for(let At=0;At<ht.length;At+=1){const Qt=ht[At];if(rt+Qt[x]>Xe){At===0&&(rt=Xe);break}rt+=Qt[x]}return rt},ie=()=>{ve(-1*we())},ge=()=>{ve(we())},Pe=A.useCallback(Xe=>{pe({overflow:null,scrollbarWidth:Xe})},[]),Fe=()=>{const Xe={};Xe.scrollbarSizeListener=T?R(gMe,{onChange:Pe,className:it(j.scrollableX,j.hideScrollbar)}):null;const ht=T&&(y==="auto"&&(G||X)||y===!0);return Xe.scrollButtonStart=ht?R(v,W({slots:{StartScrollButtonIcon:w.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:z},orientation:m,direction:i?"right":"left",onClick:ie,disabled:!G},O,{className:it(j.scrollButtons,O.className)})):null,Xe.scrollButtonEnd=ht?R(v,W({slots:{EndScrollButtonIcon:w.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Y},orientation:m,direction:i?"left":"right",onClick:ge,disabled:!X},O,{className:it(j.scrollButtons,O.className)})):null,Xe},Ie=Mt(Xe=>{const{tabsMeta:rt,tabMeta:ht}=oe();if(!(!ht||!rt)){if(ht[C]<rt[C]){const At=rt[_]+(ht[C]-rt[C]);de(At,{animation:Xe})}else if(ht[S]>rt[S]){const At=rt[_]+(ht[S]-rt[S]);de(At,{animation:Xe})}}}),Oe=Mt(()=>{T&&y!==!1&&re(!ee)});A.useEffect(()=>{const Xe=ap(()=>{ne.current&&le()});let rt;const ht=Nt=>{Nt.forEach(Ue=>{Ue.removedNodes.forEach(Ye=>{var tt;(tt=rt)==null||tt.unobserve(Ye)}),Ue.addedNodes.forEach(Ye=>{var tt;(tt=rt)==null||tt.observe(Ye)})}),Xe(),Oe()},At=Gs(ne.current);At.addEventListener("resize",Xe);let Qt;return typeof ResizeObserver<"u"&&(rt=new ResizeObserver(Xe),Array.from(he.current.children).forEach(Nt=>{rt.observe(Nt)})),typeof MutationObserver<"u"&&(Qt=new MutationObserver(ht),Qt.observe(he.current,{childList:!0})),()=>{var Nt,Ue;Xe.clear(),At.removeEventListener("resize",Xe),(Nt=Qt)==null||Nt.disconnect(),(Ue=rt)==null||Ue.disconnect()}},[le,Oe]),A.useEffect(()=>{const Xe=Array.from(he.current.children),rt=Xe.length;if(typeof IntersectionObserver<"u"&&rt>0&&T&&y!==!1){const ht=Xe[0],At=Xe[rt-1],Qt={root:ne.current,threshold:.99},Nt=st=>{V(!st[0].isIntersecting)},Ue=new IntersectionObserver(Nt,Qt);Ue.observe(ht);const Ye=st=>{te(!st[0].isIntersecting)},tt=new IntersectionObserver(Ye,Qt);return tt.observe(At),()=>{Ue.disconnect(),tt.disconnect()}}},[T,y,ee,u==null?void 0:u.length]),A.useEffect(()=>{Q(!0)},[]),A.useEffect(()=>{le()}),A.useEffect(()=>{Ie(OU!==q)},[Ie,q]),A.useImperativeHandle(c,()=>({updateIndicator:le,updateScrollButtons:Oe}),[le,Oe]);const $e=R(mMe,W({},I,{className:it(j.indicator,I.className),ownerState:L,style:W({},q,I.style)}));let et=0;const Ze=A.Children.map(u,Xe=>{if(!A.isValidElement(Xe))return null;const rt=Xe.props.value===void 0?et:Xe.props.value;ce.set(rt,et);const ht=rt===N;return et+=1,A.cloneElement(Xe,W({fullWidth:U==="fullWidth",indicator:ht&&!K&&$e,selected:ht,selectionFollowsFocus:b,onChange:g,textColor:D,value:rt},et===1&&N===!1&&!Xe.props.tabIndex?{tabIndex:0}:{}))}),Ne=Xe=>{const rt=he.current,ht=In(rt).activeElement;if(ht.getAttribute("role")!=="tab")return;let Qt=m==="horizontal"?"ArrowLeft":"ArrowUp",Nt=m==="horizontal"?"ArrowRight":"ArrowDown";switch(m==="horizontal"&&i&&(Qt="ArrowRight",Nt="ArrowLeft"),Xe.key){case Qt:Xe.preventDefault(),qS(rt,ht,RU);break;case Nt:Xe.preventDefault(),qS(rt,ht,MU);break;case"Home":Xe.preventDefault(),qS(rt,null,MU);break;case"End":Xe.preventDefault(),qS(rt,null,RU);break}},Qe=Fe();return xe(fMe,W({className:it(j.root,f),ownerState:L,ref:r,as:d},F,{children:[Qe.scrollButtonStart,Qe.scrollbarSizeListener,xe(hMe,{className:j.scroller,ownerState:L,style:{overflow:se.overflow,[P?`margin${i?"Left":"Right"}`:"marginBottom"]:B?void 0:-se.scrollbarWidth},ref:ne,children:[R(pMe,{"aria-label":a,"aria-labelledby":s,"aria-orientation":m==="vertical"?"vertical":null,className:j.flexContainer,ownerState:L,onKeyDown:Ne,ref:he,role:"tablist",children:Ze}),K&&$e]}),Qe.scrollButtonEnd]}))}),yMe=vMe;function bMe(e){return Gt("MuiDateRangePickerDay",e)}const Oo=Vt("MuiDateRangePickerDay",["root","rangeIntervalDayHighlight","rangeIntervalDayHighlightStart","rangeIntervalDayHighlightEnd","rangeIntervalPreview","rangeIntervalDayPreview","rangeIntervalDayPreviewStart","rangeIntervalDayPreviewEnd","outsideCurrentMonth","startOfMonth","endOfMonth","firstVisibleCell","lastVisibleCell","hiddenDayFiller","day","dayOutsideRangeInterval","dayInsideRangeInterval","notSelectedDate"]),HI=()=>"MTcwMTY0MDgwMDAwMA==",wMe=["className","day","outsideCurrentMonth","isEndOfHighlighting","isEndOfPreviewing","isHighlighting","isPreviewing","isStartOfHighlighting","isStartOfPreviewing","selected","isVisuallySelected","sx","draggable","isFirstVisibleCell","isLastVisibleCell"],xMe=HI(),CMe=e=>{const{isHighlighting:t,outsideCurrentMonth:r,isStartOfHighlighting:n,isStartOfMonth:o,isEndOfHighlighting:i,isEndOfMonth:a,isPreviewing:s,isStartOfPreviewing:c,isEndOfPreviewing:l,isFirstVisibleCell:u,isLastVisibleCell:f,isHiddenDayFiller:d,selected:h,classes:p}=e;return pt({root:["root",t&&"rangeIntervalDayHighlight",n&&"rangeIntervalDayHighlightStart",i&&"rangeIntervalDayHighlightEnd",r&&"outsideCurrentMonth",o&&"startOfMonth",a&&"endOfMonth",u&&"firstVisibleCell",f&&"lastVisibleCell",d&&"hiddenDayFiller"],rangeIntervalPreview:["rangeIntervalPreview",s&&"rangeIntervalDayPreview",(c||o)&&"rangeIntervalDayPreviewStart",(l||a)&&"rangeIntervalDayPreviewEnd"],day:["day",!h&&"notSelectedDate",!t&&"dayOutsideRangeInterval",!h&&t&&"dayInsideRangeInterval"]},bMe,p)},tk={borderTopRightRadius:"50%",borderBottomRightRadius:"50%"},rk={borderTopLeftRadius:"50%",borderBottomLeftRadius:"50%"},pZ=We("div",{name:"MuiDateRangePickerDay",slot:"Root",overridesResolver:(e,t)=>[{[`&.${Oo.rangeIntervalDayHighlight}`]:t.rangeIntervalDayHighlight},{[`&.${Oo.rangeIntervalDayHighlightStart}`]:t.rangeIntervalDayHighlightStart},{[`&.${Oo.rangeIntervalDayHighlightEnd}`]:t.rangeIntervalDayHighlightEnd},{[`&.${Oo.firstVisibleCell}`]:t.firstVisibleCell},{[`&.${Oo.lastVisibleCell}`]:t.lastVisibleCell},{[`&.${Oo.startOfMonth}`]:t.startOfMonth},{[`&.${Oo.endOfMonth}`]:t.endOfMonth},{[`&.${Oo.outsideCurrentMonth}`]:t.outsideCurrentMonth},{[`&.${Oo.hiddenDayFiller}`]:t.hiddenDayFiller},t.root]})(({theme:e,ownerState:t})=>t.isHiddenDayFiller?{}:W({[`&:first-of-type .${Oo.rangeIntervalDayPreview}`]:W({},rk,{borderLeftColor:(e.vars||e).palette.divider}),[`&:last-of-type .${Oo.rangeIntervalDayPreview}`]:W({},tk,{borderRightColor:(e.vars||e).palette.divider})},t.isHighlighting&&{borderRadius:0,color:(e.vars||e).palette.primary.contrastText,backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:to(e.palette.primary.main,e.palette.action.focusOpacity),"&:first-of-type":rk,"&:last-of-type":tk},(t.isStartOfHighlighting||t.isFirstVisibleCell)&&W({},rk,{paddingLeft:0}),(t.isEndOfHighlighting||t.isLastVisibleCell)&&W({},tk,{paddingRight:0})));pZ.propTypes={ownerState:ue.object.isRequired};const mZ=We("div",{name:"MuiDateRangePickerDay",slot:"RangeIntervalPreview",overridesResolver:(e,t)=>[{[`&.${Oo.rangeIntervalDayPreview}`]:t.rangeIntervalDayPreview},{[`&.${Oo.rangeIntervalDayPreviewStart}`]:t.rangeIntervalDayPreviewStart},{[`&.${Oo.rangeIntervalDayPreviewEnd}`]:t.rangeIntervalDayPreviewEnd},t.rangeIntervalPreview]})(({theme:e,ownerState:t})=>W({border:"2px solid transparent"},t.isPreviewing&&!t.isHiddenDayFiller&&W({borderRadius:0,border:`2px dashed ${(e.vars||e).palette.divider}`,borderLeftColor:"transparent",borderRightColor:"transparent"},(t.isStartOfPreviewing||t.isFirstVisibleCell)&&W({borderLeftColor:(e.vars||e).palette.divider},rk),(t.isEndOfPreviewing||t.isLastVisibleCell)&&W({borderRightColor:(e.vars||e).palette.divider},tk))));mZ.propTypes={ownerState:ue.object.isRequired};const SMe=We(lQ,{name:"MuiDateRangePickerDay",slot:"Day",overridesResolver:(e,t)=>[{[`&.${Oo.dayInsideRangeInterval}`]:t.dayInsideRangeInterval},{[`&.${Oo.dayOutsideRangeInterval}`]:t.dayOutsideRangeInterval},{[`&.${Oo.notSelectedDate}`]:t.notSelectedDate},t.day]})(({ownerState:e})=>W({transform:"scale(1.1)","& > *":{transform:"scale(0.9)"}},e.draggable&&{cursor:"grab"},e.draggable&&{touchAction:"none"})),_Me=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDateRangePickerDay"}),{className:o,day:i,outsideCurrentMonth:a,isHighlighting:s,isPreviewing:c,selected:l=!1,isVisuallySelected:u,sx:f,draggable:d,isFirstVisibleCell:h,isLastVisibleCell:p}=n,g=ze(n,wMe);b2("x-date-pickers-pro",xMe);const m=Hn(),v=m.isSameDay(i,m.endOfMonth(i)),y=m.isSameDay(i,m.startOfMonth(i)),b=W({},n,{selected:l,isStartOfMonth:y,isEndOfMonth:v,draggable:d,isFirstVisibleCell:h,isLastVisibleCell:p,isHiddenDayFiller:a&&!g.showDaysOutsideCurrentMonth}),w=CMe(b);return R(pZ,{className:it(w.root,o),ownerState:b,sx:f,children:R(mZ,{className:w.rangeIntervalPreview,ownerState:b,children:R(SMe,W({},g,{ref:r,disableMargin:!0,day:i,selected:u,outsideCurrentMonth:a,className:w.day,ownerState:b,draggable:d,isFirstVisibleCell:h,isLastVisibleCell:p}))})})}),kMe=A.memo(_Me),EMe=MX({createStyledComponent:We("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Wt({props:e,name:"MuiStack"})}),Jt=EMe,LA=e=>{const t=[],r=[];return e.forEach(n=>{n.dateName==="start"?t.push(n):r.push(n)}),{startDate:t,endDate:r}},TMe=e=>e.map((t,r)=>r===e.length-1?W({},t,{separator:null}):t),IMe=["value","referenceDate"],xm={emptyValue:[null,null],getTodayValue:(e,t,r)=>[Zk(e,t,r),Zk(e,t,r)],getInitialReferenceValue:e=>{let{value:t,referenceDate:r}=e,n=ze(e,IMe);const o=t[0]!=null&&n.utils.isValid(t[0]),i=t[1]!=null&&n.utils.isValid(t[1]);if(o&&i)return t;const a=r??XX(n);return[o?t[0]:a,i?t[1]:a]},cleanValue:(e,t)=>t.map(r=>YX(e,r)),areValuesEqual:(e,t,r)=>hR(e,t[0],r[0])&&hR(e,t[1],r[1]),isSameError:(e,t)=>t!==null&&e[1]===t[1]&&e[0]===t[0],hasError:e=>e[0]!=null||e[1]!=null,defaultErrorState:[null,null],getTimezone:(e,t)=>{const r=t[0]==null||!e.isValid(t[0])?null:e.getTimezone(t[0]),n=t[1]==null||!e.isValid(t[1])?null:e.getTimezone(t[1]);if(r!=null&&n!=null&&r!==n)throw new Error("MUI: The timezone of the start and the end date should be the same");return r??n},setTimezone:(e,t,r)=>[r[0]==null?null:e.setTimezone(r[0],t),r[1]==null?null:e.setTimezone(r[1],t)]},AMe={updateReferenceValue:(e,t,r)=>{const n=t[0]!=null&&e.isValid(t[0]),o=t[1]!=null&&e.isValid(t[1]);return!n&&!o?r:n&&o?t:n?[t[0],r[0]]:[r[1],t[1]]},getSectionsFromValue:(e,[t,r],n,o,i)=>{const a=n==null?{startDate:null,endDate:null}:LA(n),s=(c,l,u)=>{if(!e.isValid(c)&&!!l)return l;const d=i(c);return d.map((h,p)=>p===d.length-1&&u==="start"?W({},h,{dateName:u,endSeparator:`${h.endSeparator}${o?"⁩ – ⁦":" – "}`}):W({},h,{dateName:u}))};return nD([...s(t,a.startDate,"start"),...s(r,a.endDate,"end")],o)},getValueStrFromSections:(e,t)=>{const r=LA(e);return nQ([...r.startDate,...r.endDate],t)},parseValueStr:(e,t,r)=>{const[n,o]=e.split("–");return[n,o].map((i,a)=>i==null?null:r(i.trim(),t[a]))},getActiveDateManager:(e,t,r)=>{const n=r.dateName==="start"?0:1,o=(i,a)=>n===0?[i,a[1]]:[a[0],i];return{date:t.value[n],referenceDate:t.referenceValue[n],getSections:i=>{const a=LA(i);return n===0?TMe(a.startDate):a.endDate},getNewValuesFromNewActiveDate:i=>({value:o(i,t.value),referenceValue:i==null||!e.isValid(i)?t.referenceValue:o(i,t.referenceValue)})}}},$2=(e,t)=>!!(t&&t[0]&&t[1]&&!e.isBefore(t[1],t[0])),$A=(e,t,r)=>$2(e,r)&&e.isWithinRange(t,r),nk=(e,t,r)=>$2(e,r)&&e.isSameDay(t,r[0]),Ib=(e,t,r)=>$2(e,r)&&e.isSameDay(t,r[1]),PMe=["shouldDisableDate"],sx=({props:e,value:t,adapter:r})=>{const[n,o]=t,{shouldDisableDate:i}=e,a=ze(e,PMe),s=[l1({adapter:r,value:n,props:W({},a,{shouldDisableDate:c=>!!(i!=null&&i(c,"start"))})}),l1({adapter:r,value:o,props:W({},a,{shouldDisableDate:c=>!!(i!=null&&i(c,"end"))})})];return s[0]||s[1]?s:n===null||o===null?[null,null]:$2(r.utils,t)?[null,null]:["invalidRange","invalidRange"]},gZ=e=>{var t,r,n;const o=Hn(),i=cp();return W({},e,{disablePast:(t=e.disablePast)!=null?t:!1,disableFuture:(r=e.disableFuture)!=null?r:!1,format:(n=e.format)!=null?n:o.formats.keyboardDate,minDate:ca(o,e.minDate,i.minDate),maxDate:ca(o,e.maxDate,i.maxDate)})},MMe=({props:e,inputRef:t})=>{const r=gZ(e),{forwardedProps:n,internalProps:o}=xD(r,"date");return BQ({inputRef:t,forwardedProps:n,internalProps:o,valueManager:xm,fieldValueManager:AMe,validator:sx,valueType:"date"})},DU=(e,t)=>Object.keys(e).reduce((r,n)=>(t.includes(n)||(r[n]=e[n]),r),{}),RMe=({sharedProps:e,startTextFieldProps:t,startInputRef:r,unstableStartFieldRef:n,endTextFieldProps:o,endInputRef:i,unstableEndFieldRef:a})=>{const s=gZ(e),c=lp(),{value:l,defaultValue:u,format:f,formatDensity:d,shouldRespectLeadingZeros:h,onChange:p,disabled:g,readOnly:m,selectedSections:v,onSelectedSectionsChange:y,timezone:b}=s,{value:w,handleValueChange:E,timezone:I}=M2({name:"useMultiInputDateRangeField",timezone:b,value:l,defaultValue:u,onChange:p,valueManager:xm}),O=_=>(C,S)=>{const x=_===0?[C,w[1]]:[w[0],C],k=W({},S,{validationError:sx({adapter:c,value:x,props:W({},s,{timezone:I})})});E(x,k)},D=Mt(O(0)),N=Mt(O(1)),U=wD(W({},s,{value:w,timezone:I}),sx,xm.isSameError,xm.defaultErrorState),B=W({error:!!U[0]},t,{disabled:g,readOnly:m,format:f,formatDensity:d,shouldRespectLeadingZeros:h,timezone:I,unstableFieldRef:n,value:l===void 0?void 0:l[0],defaultValue:u===void 0?void 0:u[0],onChange:D,selectedSections:v,onSelectedSectionsChange:y}),F=W({error:!!U[1]},o,{format:f,formatDensity:d,shouldRespectLeadingZeros:h,disabled:g,readOnly:m,timezone:I,unstableFieldRef:a,value:l===void 0?void 0:l[1],defaultValue:u===void 0?void 0:u[1],onChange:N,selectedSections:v,onSelectedSectionsChange:y}),T=xR({props:B,inputRef:r}),P=xR({props:F,inputRef:i});return{startDate:DU(T,["clearable","onClear"]),endDate:DU(P,["clearable","onClear"])}},OMe=["slots","slotProps","components","componentsProps","disabled","autoFocus","unstableStartFieldRef","unstableEndFieldRef","className"],DMe=["onKeyDown","ref","readOnly","inputMode"],FMe=["onKeyDown","ref","readOnly","inputMode"];Vt("MuiMultiInputDateRangeField",["root","separator"]);const NMe=e=>Gt("MuiMultiInputDateRangeField",e),LMe=e=>{const{classes:t}=e;return pt({root:["root"],separator:["separator"]},NMe,t)},$Me=We(A.forwardRef((e,t)=>R(Jt,W({ref:t,spacing:2,direction:"row",alignItems:"baseline"},e))),{name:"MuiMultiInputDateRangeField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),BMe=We(e=>{var t;return R(jt,W({},e,{children:(t=e.children)!=null?t:" – "}))},{name:"MuiMultiInputDateRangeField",slot:"Separator",overridesResolver:(e,t)=>t.separator})({}),vZ=A.forwardRef(function(t,r){var n,o,i,a;const s=Wt({props:t,name:"MuiMultiInputDateRangeField"}),{internalProps:c,forwardedProps:l}=xD(s,"date"),{slots:u,slotProps:f,components:d,componentsProps:h,disabled:p,autoFocus:g,unstableStartFieldRef:m,unstableEndFieldRef:v,className:y}=l,b=ze(l,OMe),w=u??R2(d),E=f??h,I=s,O=LMe(I),D=(n=w==null?void 0:w.root)!=null?n:$Me,N=Cr({elementType:D,externalSlotProps:E==null?void 0:E.root,externalForwardedProps:b,additionalProps:{ref:r},ownerState:I,className:it(y,O.root)}),U=(o=w==null?void 0:w.textField)!=null?o:Xa,B=Cr({elementType:U,externalSlotProps:E==null?void 0:E.textField,additionalProps:{autoFocus:g},ownerState:W({},I,{position:"start"})}),F=Cr({elementType:U,externalSlotProps:E==null?void 0:E.textField,ownerState:W({},I,{position:"end"})}),T=(i=w==null?void 0:w.separator)!=null?i:BMe,P=Cr({elementType:T,externalSlotProps:(a=E==null?void 0:E.separator)!=null?a:h==null?void 0:h.separator,ownerState:I,className:O.separator}),_=RMe({sharedProps:W({},c,{disabled:p}),startTextFieldProps:B,endTextFieldProps:F,unstableStartFieldRef:m,unstableEndFieldRef:v,startInputRef:B.inputRef,endInputRef:F.inputRef}),{startDate:{onKeyDown:C,ref:S,readOnly:x,inputMode:k},endDate:{onKeyDown:L,ref:j,readOnly:z,inputMode:Y}}=_,K=ze(_.startDate,FMe),Q=ze(_.endDate,DMe);return xe(D,W({},N,{children:[R(U,W({fullWidth:!0},K,{InputProps:W({},K.InputProps,{readOnly:x}),inputProps:W({},K.inputProps,{ref:S,inputMode:k,onKeyDown:C})})),R(T,W({},P)),R(U,W({fullWidth:!0},Q,{InputProps:W({},Q.InputProps,{readOnly:z}),inputProps:W({},Q.inputProps,{ref:j,readOnly:z,inputMode:Y,onKeyDown:L})}))]}))}),UMe=["slots","slotProps","components","componentsProps","InputProps","inputProps"],HMe=["inputRef"],zMe=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],yZ=A.forwardRef(function(t,r){var n,o,i;const a=Wt({props:t,name:"MuiSingleInputDateRangeField"}),{slots:s,slotProps:c,components:l,componentsProps:u,InputProps:f,inputProps:d}=a,h=ze(a,UMe),p=a,g=(n=(o=s==null?void 0:s.textField)!=null?o:l==null?void 0:l.TextField)!=null?n:Xa,m=Cr({elementType:g,externalSlotProps:(i=c==null?void 0:c.textField)!=null?i:u==null?void 0:u.textField,externalForwardedProps:h,ownerState:p}),{inputRef:v}=m,y=ze(m,HMe);y.inputProps=W({},d,y.inputProps),y.InputProps=W({},f,y.InputProps);const b=MMe({props:y,inputRef:v}),{ref:w,onPaste:E,onKeyDown:I,inputMode:O,readOnly:D,clearable:N,onClear:U}=b,B=ze(b,zMe),{InputProps:F,fieldProps:T}=iZ({onClear:U,clearable:N,fieldProps:B,InputProps:B.InputProps,slots:s,slotProps:c,components:l,componentsProps:u});return R(g,W({ref:r},T,{InputProps:W({},F,{readOnly:D}),inputProps:W({},B.inputProps,{inputMode:O,onPaste:E,onKeyDown:I,ref:w})}))});yZ.fieldType="single-input";const jMe=e=>Gt("MuiDateRangeCalendar",e),FU=Vt("MuiDateRangeCalendar",["root","monthContainer","dayDragging"]);function CR({utils:e,range:t,newDate:r,rangePosition:n,allowRangeFlip:o=!1}){const[i,a]=t;if(n==="start"){const c=o?{nextSelection:"start",newRange:[a,r]}:{nextSelection:"end",newRange:[r,null]};return a&&e.isAfter(r,a)?c:{nextSelection:"end",newRange:[r,a]}}const s=o?{nextSelection:"end",newRange:[r,i]}:{nextSelection:"end",newRange:[r,null]};return i&&e.isBefore(r,i)?s:{nextSelection:"start",newRange:[i,r]}}function VMe(e){if(e.newDate==null)return[null,null];const[t,r]=e.range,{newRange:n}=CR(e);if(!t||!r)return n;const[o,i]=n;return e.rangePosition==="end"?[r,i]:[o,t]}const og=(e,t,r)=>{const n=e.dataset.timestamp;if(!n)return null;const o=+n;return t.dateWithTimezone(new Date(o).toISOString(),r)},WMe=e=>e.target.dataset.timestamp===e.dataTransfer.getData("draggingDate"),bZ=e=>e&&(e instanceof HTMLButtonElement&&!e.disabled?e:e.children.length?bZ(e.children[0]):null),BA=(e,t)=>{var r;if(((r=e.changedTouches)==null?void 0:r.length)===1&&e.touches.length<=1){const n=document.elementFromPoint(e.changedTouches[0].clientX,e.changedTouches[0].clientY),o=bZ(n);return t&&o===e.changedTouches[0].target?null:o}return null},GMe=({utils:e,setRangeDragDay:t,setIsDragging:r,isDragging:n,onDatePositionChange:o,onDrop:i,disableDragEditing:a,dateRange:s,timezone:c})=>{const l=A.useRef(null);A.useEffect(()=>{l.current=document.createElement("img"),l.current.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},[]);const u=w=>{if(w==null)return!1;const E=!a&&!!s[0]&&!!s[1],I=nk(e,w,s),O=Ib(e,w,s);return E&&(I||O)},f=Mt(w=>{const E=og(w.target,e,c);if(!u(E))return;w.stopPropagation(),l.current&&w.dataTransfer.setDragImage(l.current,0,0),t(E),w.dataTransfer.effectAllowed="move",r(!0);const I=w.target.dataset;I.timestamp&&w.dataTransfer.setData("draggingDate",I.timestamp),I.position&&o(I.position)}),d=Mt(w=>{const E=BA(w);if(!E)return;const I=og(E,e,c);u(I)&&t(I)}),h=Mt(w=>{n&&(w.preventDefault(),w.stopPropagation(),w.dataTransfer.dropEffect="move",t(og(w.target,e,c)))}),p=Mt(w=>{const E=BA(w);if(!E)return;const I=og(E,e,c);if(I&&t(I),!(E===w.changedTouches[0].target)||!u(I))return;r(!0);const N=w.target.dataset;N.position&&o(N.position)}),g=Mt(w=>{n&&(w.preventDefault(),w.stopPropagation())}),m=Mt(w=>{n&&(w.preventDefault(),w.stopPropagation(),w.dataTransfer.dropEffect="move")}),v=Mt(w=>{if(!n)return;t(null),r(!1);const E=BA(w,!0);if(!E)return;E.focus();const I=og(E,e,c);I&&i(I)}),y=Mt(w=>{n&&(w.preventDefault(),w.stopPropagation(),r(!1),t(null))}),b=Mt(w=>{if(!n||(w.preventDefault(),w.stopPropagation(),r(!1),t(null),w.currentTarget.focus(),WMe(w)))return;const E=og(w.target,e,c);E&&i(E)});return{onDragStart:f,onDragEnter:h,onDragLeave:g,onDragOver:m,onDragEnd:y,onDrop:b,onTouchStart:d,onTouchMove:p,onTouchEnd:v}},qMe=({disableDragEditing:e,utils:t,onDatePositionChange:r,onDrop:n,dateRange:o,timezone:i})=>{const[a,s]=A.useState(!1),[c,l]=A.useState(null),u=Mt(h=>{t.isEqual(h,c)||l(h)}),f=A.useMemo(()=>{const[h,p]=o;if(c){if(h&&t.isBefore(c,h))return"start";if(p&&t.isAfter(c,p))return"end"}return null},[o,c,t]),d=GMe({utils:t,onDatePositionChange:r,onDrop:n,setIsDragging:s,isDragging:a,setRangeDragDay:u,disableDragEditing:e,dateRange:o,timezone:i});return A.useMemo(()=>W({isDragging:a,rangeDragDay:c,draggingDatePosition:f},e?{}:d),[a,c,f,e,d])},ID=e=>{var t;const r=A.useRef(),[n,o]=sa({name:"useRangePosition",state:"rangePosition",controlled:e.rangePosition,default:(t=e.defaultRangePosition)!=null?t:"start"}),i=s=>{if(r.current==null)return;const c=r.current.getSections(),l=s==="start"?0:c.length/2;r.current.setSelectedSections(l)},a=Mt(s=>{var c;o(s),(c=e.onRangePositionChange)==null||c.call(e,s),i(s)});return{rangePosition:n,onRangePositionChange:a,singleInputFieldRef:r}},KMe=["value","defaultValue","referenceDate","onChange","className","disableFuture","disablePast","minDate","maxDate","shouldDisableDate","reduceAnimations","onMonthChange","defaultCalendarMonth","rangePosition","defaultRangePosition","onRangePositionChange","calendars","currentMonthCalendarPosition","components","componentsProps","slots","slotProps","loading","renderLoading","disableHighlightToday","readOnly","disabled","showDaysOutsideCurrentMonth","dayOfWeekFormatter","disableAutoMonthSwitching","autoFocus","fixedWeekNumber","disableDragEditing","displayWeekNumber","timezone"],YMe=["isDragging","rangeDragDay","draggingDatePosition"],XMe=HI(),QMe=We("div",{name:"MuiDateRangeCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row"}),ZMe=We("div",{name:"MuiDateRangeCalendar",slot:"Container",overridesResolver:(e,t)=>t.monthContainer})(({theme:e})=>({"&:not(:last-of-type)":{borderRight:`1px solid ${(e.vars||e).palette.divider}`}})),JMe=We(WX)({padding:"16px 16px 8px 16px",display:"flex",alignItems:"center",justifyContent:"space-between"}),eRe=40,tRe=(eRe+P2*2)*6;QQ(["The `currentMonthCalendarPosition` prop must be an integer between `1` and the amount of calendars rendered.","For example if you have 2 calendars rendered, it should be equal to either 1 or 2."]);const rRe=We(nZ)(({theme:e})=>({minWidth:312,minHeight:tRe,[`&.${FU.dayDragging}`]:{[`& .${Oo.day}`]:{cursor:"grabbing"},[`& .${Oo.root}:not(.${Oo.rangeIntervalDayHighlightStart}):not(.${Oo.rangeIntervalDayHighlightEnd}) .${Oo.day}:not(.${Oo.notSelectedDate})`]:{opacity:.6}},[`&:not(.${FU.dayDragging}) .${Oo.dayOutsideRangeInterval}`]:{"@media (pointer: fine)":{"&:hover":{border:`1px solid ${(e.vars||e).palette.grey[500]}`}}}}));function nRe(e,t){var r,n,o,i,a,s,c;const l=Hn(),u=cp(),f=kD(),d=Wt({props:e,name:t});return W({},d,{renderLoading:(r=d.renderLoading)!=null?r:()=>R("span",{children:"..."}),reduceAnimations:(n=d.reduceAnimations)!=null?n:f,loading:(o=e.loading)!=null?o:!1,disablePast:(i=e.disablePast)!=null?i:!1,disableFuture:(a=e.disableFuture)!=null?a:!1,minDate:ca(l,d.minDate,u.minDate),maxDate:ca(l,d.maxDate,u.maxDate),calendars:(s=d.calendars)!=null?s:2,disableDragEditing:(c=d.disableDragEditing)!=null?c:!1})}const oRe=e=>{const{classes:t,isDragging:r}=e;return pt({root:["root"],monthContainer:["monthContainer"],dayCalendar:[r&&"dayDragging"]},jMe,t)},iRe=A.forwardRef(function(t,r){const n=nRe(t,"MuiDateRangeCalendar"),o=E2($Q,{defaultMatches:!1}),{value:i,defaultValue:a,referenceDate:s,onChange:c,className:l,disableFuture:u,disablePast:f,minDate:d,maxDate:h,shouldDisableDate:p,reduceAnimations:g,onMonthChange:m,defaultCalendarMonth:v,rangePosition:y,defaultRangePosition:b,onRangePositionChange:w,calendars:E,currentMonthCalendarPosition:I=1,components:O,componentsProps:D,slots:N,slotProps:U,loading:B,renderLoading:F,disableHighlightToday:T,readOnly:P,disabled:_,showDaysOutsideCurrentMonth:C,dayOfWeekFormatter:S,disableAutoMonthSwitching:x,autoFocus:k,fixedWeekNumber:L,disableDragEditing:j,displayWeekNumber:z,timezone:Y}=n,K=ze(n,KMe),{value:Q,handleValueChange:q,timezone:J}=M2({name:"DateRangeCalendar",timezone:Y,value:i,defaultValue:a,onChange:c,valueManager:xm}),G=Hn(),V=wc(),X=H1(J),te=N??R2(O),ee=U??D,{rangePosition:re,onRangePositionChange:se}=ID({rangePosition:y,defaultRangePosition:b,onRangePositionChange:w}),pe=Mt(Me=>{re!==Me&&se(Me)}),ce=Mt((Me,Ge,nt=!1)=>{const{nextSelection:fe,newRange:ke}=CR({newDate:Me,utils:G,range:Q,rangePosition:re,allowRangeFlip:nt});se(fe);const be=re==="end"&&$2(G,ke);q(ke,be?"finish":"partial")}),ne=Mt(Me=>{ce(Me,void 0,!0)}),he=j||_||P,oe=A.useMemo(()=>[Q[0]==null||!G.isValid(Q[0])?Q[0]:G.startOfDay(Q[0]),Q[1]==null||!G.isValid(Q[1])?Q[1]:G.endOfDay(Q[1])],[Q,G]),le=qMe({disableDragEditing:he,onDrop:ne,onDatePositionChange:pe,utils:G,dateRange:oe,timezone:J}),{isDragging:de,rangeDragDay:ve,draggingDatePosition:we}=le,ie=ze(le,YMe),ge=W({},n,{isDragging:de}),Pe=oRe(ge),Fe=A.useMemo(()=>{if(!oe[0]||!oe[1]||!ve)return[null,null];const Me=CR({utils:G,range:oe,newDate:ve,rangePosition:re,allowRangeFlip:!0}).newRange;return Me[0]!==null&&Me[1]!==null?[G.startOfDay(Me[0]),G.endOfDay(Me[1])]:Me},[re,ve,G,oe]),Ie=A.useMemo(()=>{if(p)return Me=>p(Me,we||re)},[p,re,we]),{calendarState:Oe,changeFocusedDay:$e,changeMonth:et,handleChangeMonth:Ze,onMonthSwitchingAnimationEnd:Ne}=oZ({value:Q[0]||Q[1],referenceDate:s,defaultCalendarMonth:v,disableFuture:u,disablePast:f,disableSwitchToMonthOnDayFocus:!0,maxDate:h,minDate:d,onMonthChange:m,reduceAnimations:g,shouldDisableDate:Ie,timezone:J}),Qe=A.useRef(null);A.useEffect(()=>{var Me,Ge;const nt=re==="start"?Q[0]:Q[1];if(!nt||!G.isValid(nt))return;const fe=re==="start"?(Me=Qe.current)==null?void 0:Me[0]:(Ge=Qe.current)==null?void 0:Ge[1];if(Qe.current=Q,x&&fe&&G.isEqual(fe,nt))return;const ke=E-1,be=G.getMonth(Oe.currentMonth),Ce=G.getMonth(nt);if(!G.isSameYear(Oe.currentMonth,nt)||Ce<be||Ce>be+ke){const Ee=re==="start"?nt:G.addMonths(nt,-ke);et(Ee)}},[re,Q]);const Xe=A.useCallback(()=>{et(G.addMonths(Oe.currentMonth,1))},[et,Oe.currentMonth,G]),rt=A.useCallback(()=>{et(G.addMonths(Oe.currentMonth,-1))},[et,Oe.currentMonth,G]),ht=qX(Oe.currentMonth,{disableFuture:u,maxDate:h,timezone:J}),At=KX(Oe.currentMonth,{disablePast:f,minDate:d,timezone:J}),Qt={disablePast:f,disableFuture:u,maxDate:h,minDate:d},Nt={disableHighlightToday:T,readOnly:P,disabled:_},Ue=_&&Q[0]||d,Ye=_&&Q[1]||h,[tt,st]=A.useState(null),mt=A.useMemo(()=>({onMouseLeave:()=>st(null)}),[]),_t=VMe({utils:G,range:oe,newDate:tt,rangePosition:re}),Pt=Mt((Me,Ge)=>{$A(G,Ge,oe)?st(null):st(Ge)}),Ut=W({day:kMe},te),wt=W({},ee,{day:Me=>{var Ge;const{day:nt}=Me,fe=nk(G,nt,oe),ke=Ib(G,nt,oe),Ce=!he&&oe[0]&&oe[1]&&(fe||ke);let Ee;fe?Ee="start":ke&&(Ee="end");const me=de?nk(G,nt,Fe):fe,_e=de?Ib(G,nt,Fe):ke;return W({isPreviewing:o?$A(G,nt,_t):!1,isStartOfPreviewing:o?nk(G,nt,_t):!1,isEndOfPreviewing:o?Ib(G,nt,_t):!1,isHighlighting:$A(G,nt,de?Fe:oe),isStartOfHighlighting:me,isEndOfHighlighting:de?Ib(G,nt,Fe):ke,onMouseEnter:o?Pt:void 0,isVisuallySelected:Me.selected||de&&(me||_e),"data-position":Ee},ie,{draggable:Ce?!0:void 0},(Ge=Ku(ee==null?void 0:ee.day,Me))!=null?Ge:{})}}),Dt=A.useMemo(()=>Array.from({length:E}).map((Me,Ge)=>Ge),[E]),qt=A.useMemo(()=>{const Me=G.addMonths(Oe.currentMonth,1-I);return Array.from({length:E}).map((Ge,nt)=>G.addMonths(Me,nt))},[G,Oe.currentMonth,E,I]),Tt=A.useMemo(()=>{var Me;return k?Q[0]!=null?qt.find(Ge=>G.isSameMonth(Ge,Q[0])):Q[1]!=null?qt.find(Ge=>G.isSameMonth(Ge,Q[1])):(Me=qt.find(Ge=>G.isSameMonth(Ge,X)))!=null?Me:qt[0]:null},[G,Q,qt,k,X]);return xe(QMe,W({ref:r,className:it(l,Pe.root),ownerState:ge},K,{children:[R(DY,{packageName:"x-date-pickers-pro",releaseInfo:XMe}),Dt.map((Me,Ge)=>xe(ZMe,{className:Pe.monthContainer,children:[E===1?R(lZ,{views:["day"],view:"day",currentMonth:Oe.currentMonth,onMonthChange:(nt,fe)=>Ze({newMonth:nt,direction:fe}),minDate:Ue,maxDate:Ye,disabled:_,disablePast:f,disableFuture:u,reduceAnimations:g,slots:te,slotProps:ee,timezone:J}):R(JMe,{onGoToPrevious:rt,onGoToNext:Xe,isPreviousHidden:Ge!==0,isPreviousDisabled:At,previousLabel:V.previousMonth,isNextHidden:Ge!==E-1,isNextDisabled:ht,nextLabel:V.nextMonth,slots:te,slotProps:ee,children:G.format(qt[Me],"monthAndYear")}),R(rRe,W({className:Pe.dayCalendar},Oe,Qt,Nt,{onMonthSwitchingAnimationEnd:Ne,onFocusedDayChange:$e,reduceAnimations:g,selectedDays:Q,onSelectedDaysChange:ce,currentMonth:qt[Me],TransitionProps:mt,shouldDisableDate:Ie,showDaysOutsideCurrentMonth:E===1&&C,dayOfWeekFormatter:S,loading:B,renderLoading:F,slots:Ut,slotProps:wt,autoFocus:Me===Tt,fixedWeekNumber:L,displayWeekNumber:z,timezone:J}),Ge)]},Me))]}))});function aRe(e){return Gt("MuiDateRangePickerToolbar",e)}Vt("MuiDateRangePickerToolbar",["root","container"]);const sRe=["value","rangePosition","onRangePositionChange","toolbarFormat","className"],lRe=e=>{const{classes:t}=e;return pt({root:["root"],container:["container"]},aRe,t)},cRe=We(qQ,{name:"MuiDateRangePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),uRe=We("div",{name:"MuiDateRangePickerToolbar",slot:"Container",overridesResolver:(e,t)=>t.container})({display:"flex"}),dRe=A.forwardRef(function(t,r){const n=Hn(),o=Wt({props:t,name:"MuiDateRangePickerToolbar"}),{value:[i,a],rangePosition:s,onRangePositionChange:c,toolbarFormat:l,className:u}=o,f=ze(o,sRe),d=wc(),h=i?n.formatByString(i,l||n.formats.shortDate):d.start,p=a?n.formatByString(a,l||n.formats.shortDate):d.end,g=o,m=lRe(g);return R(cRe,W({},f,{toolbarTitle:d.dateRangePickerToolbarTitle,isLandscape:!1,className:it(u,m.root),ownerState:g,ref:r,children:xe(uRe,{className:m.container,children:[R(_U,{variant:i!==null?"h5":"h6",value:h,selected:s==="start",onClick:()=>c("start")}),xe(jt,{variant:"h5",children:[" ","–"," "]}),R(_U,{variant:a!==null?"h5":"h6",value:p,selected:s==="end",onClick:()=>c("end")})]})}))}),fRe=["components","componentsProps"];function wZ(e,t){var r,n,o,i;const a=Hn(),s=cp(),c=Wt({props:e,name:t}),{components:l,componentsProps:u}=c,f=ze(c,fRe),d=A.useMemo(()=>{var h;return((h=f.localeText)==null?void 0:h.toolbarTitle)==null?f.localeText:W({},f.localeText,{dateRangePickerToolbarTitle:f.localeText.toolbarTitle})},[f.localeText]);return W({},f,{localeText:d,disableFuture:(r=f.disableFuture)!=null?r:!1,disablePast:(n=f.disablePast)!=null?n:!1,minDate:ca(a,f.minDate,s.minDate),maxDate:ca(a,f.maxDate,s.maxDate),slots:W({toolbar:dRe},(o=f.slots)!=null?o:R2(l)),slotProps:(i=f.slotProps)!=null?i:u})}const xZ=({value:e,defaultValue:t,referenceDate:r,onChange:n,className:o,classes:i,disableFuture:a,disablePast:s,minDate:c,maxDate:l,shouldDisableDate:u,reduceAnimations:f,onMonthChange:d,defaultCalendarMonth:h,rangePosition:p,defaultRangePosition:g,onRangePositionChange:m,calendars:v,currentMonthCalendarPosition:y,components:b,componentsProps:w,slots:E,slotProps:I,loading:O,renderLoading:D,disableHighlightToday:N,readOnly:U,disabled:B,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:T,disableAutoMonthSwitching:P,sx:_,autoFocus:C,fixedWeekNumber:S,disableDragEditing:x,displayWeekNumber:k,timezone:L})=>R(iRe,{value:e,defaultValue:t,referenceDate:r,onChange:n,className:o,classes:i,disableFuture:a,disablePast:s,minDate:c,maxDate:l,shouldDisableDate:u,reduceAnimations:f,onMonthChange:d,defaultCalendarMonth:h,rangePosition:p,defaultRangePosition:g,onRangePositionChange:m,calendars:v,currentMonthCalendarPosition:y,components:b,componentsProps:w,slots:E,slotProps:I,loading:O,renderLoading:D,disableHighlightToday:N,readOnly:U,disabled:B,showDaysOutsideCurrentMonth:F,dayOfWeekFormatter:T,disableAutoMonthSwitching:P,sx:_,autoFocus:C,fixedWeekNumber:S,disableDragEditing:x,displayWeekNumber:k,timezone:L}),hRe=["clearable","onClear"],pRe=({wrapperVariant:e,open:t,actions:r,readOnly:n,labelId:o,disableOpenPicker:i,onBlur:a,rangePosition:s,onRangePositionChange:c,localeText:l,pickerSlotProps:u,pickerSlots:f,fieldProps:d,anchorRef:h})=>{const p=wc(),g=A.useRef(null),m=A.useRef(null);A.useEffect(()=>{if(t){if(s==="start"){var N;(N=g.current)==null||N.focus()}else if(s==="end"){var U;(U=m.current)==null||U.focus()}}},[s,t]);const v=N=>{N.stopPropagation(),c("start"),!n&&!i&&r.onOpen()},y=N=>{N.stopPropagation(),c("end"),!n&&!i&&r.onOpen()},b=()=>{t&&c("start")},w=()=>{t&&c("end")},E=W({textField:f==null?void 0:f.textField,root:f==null?void 0:f.fieldRoot,separator:f==null?void 0:f.fieldSeparator},d.slots),I=W({},d.slotProps,{textField:N=>{const U=Ku(u==null?void 0:u.textField,N);let B,F;if(N.position==="start"){var T;B=W({inputRef:g,label:(T=l==null?void 0:l.start)!=null?T:p.start,onKeyDown:nE(v),onFocus:b,focused:t?s==="start":void 0},!n&&!d.disabled&&{onClick:v},e==="mobile"&&{readOnly:!0}),h&&(F=W({},U==null?void 0:U.InputProps,{ref:h}))}else{var P;B=W({inputRef:m,label:(P=l==null?void 0:l.end)!=null?P:p.end,onKeyDown:nE(y),onFocus:w,focused:t?s==="end":void 0},!n&&!d.disabled&&{onClick:y},e==="mobile"&&{readOnly:!0}),F=U==null?void 0:U.InputProps}return W({},o!=null&&{id:`${o}-${N.position}`},B,Ku(u==null?void 0:u.textField,N),{InputProps:F})},root:N=>W({},{onBlur:a},Ku(u==null?void 0:u.fieldRoot,N)),separator:u==null?void 0:u.fieldSeparator}),O=ze(d,hRe);return W({},O,{slots:E,slotProps:I})},mRe=({wrapperVariant:e,open:t,actions:r,readOnly:n,inputRef:o,labelId:i,disableOpenPicker:a,label:s,onBlur:c,rangePosition:l,onRangePositionChange:u,singleInputFieldRef:f,pickerSlots:d,pickerSlotProps:h,fieldProps:p,anchorRef:g})=>{const m=A.useRef(null),v=Ur(o,m),y=Ur(p.unstableFieldRef,f);A.useEffect(()=>{var N;t&&((N=m.current)==null||N.focus())},[l,t]);const b=()=>{var N;if(!f.current||m.current!==Bm(document))return;const U=f.current.getSections(),B=(N=f.current)==null?void 0:N.getActiveSectionIndex(),F=B==null||B<U.length/2?"start":"end";F!=null&&F!==l&&u(F)},w=Mt(N=>{var U;setTimeout(b),(U=p.onSelectedSectionsChange)==null||U.call(p,N)}),E=N=>{N.stopPropagation(),!n&&!a&&r.onOpen()},I=W({},p.slots,{textField:d==null?void 0:d.textField,clearButton:d==null?void 0:d.clearButton,clearIcon:d==null?void 0:d.clearIcon}),O=W({},p.slotProps,{textField:h==null?void 0:h.textField,clearButton:d==null?void 0:d.clearButton,clearIcon:d==null?void 0:d.clearIcon});return W({},p,{slots:I,slotProps:O,label:s,unstableFieldRef:y,inputRef:v,onKeyDown:nE(E,p.onKeyDown),onSelectedSectionsChange:w,onBlur:c,InputProps:W({ref:g},p==null?void 0:p.InputProps),focused:t},i!=null&&{id:i},e==="mobile"&&{readOnly:!0},!n&&!p.disabled&&{onClick:E})},CZ=e=>e.fieldType==="multi-input"?pRe(e):mRe(e),gRe=["props"],vRe=HI(),yRe=e=>{var t,r;let{props:n}=e,o=ze(e,gRe);b2("x-date-pickers-pro",vRe);const{slots:i,slotProps:a,className:s,sx:c,format:l,formatDensity:u,timezone:f,label:d,inputRef:h,readOnly:p,disabled:g,autoFocus:m,disableOpenPicker:v,localeText:y,reduceAnimations:b}=n,w=A.useRef(null),E=A.useRef(null),I=A.useRef(null),{rangePosition:O,onRangePositionChange:D,singleInputFieldRef:N}=ID(n),{open:U,actions:B,layoutProps:F,renderCurrentView:T,shouldRestoreFocus:P,fieldProps:_}=$I(W({},o,{props:n,wrapperVariant:"desktop",autoFocusView:!0,additionalViewProps:{rangePosition:O,onRangePositionChange:D}})),C=()=>{jIe(()=>{var K,Q;(K=w.current)!=null&&K.contains(Bm(document))||(Q=I.current)!=null&&Q.contains(Bm(document))||B.onDismiss()})},S=i.field,x=(t=S.fieldType)!=null?t:"multi-input",k=Cr({elementType:S,externalSlotProps:a==null?void 0:a.field,additionalProps:W({},_,{readOnly:p,disabled:g,className:s,sx:c,format:l,formatDensity:u,timezone:f,autoFocus:m&&!n.open,ref:w},x==="single-input"&&{inputRef:h}),ownerState:n}),L=CZ({wrapperVariant:"desktop",fieldType:x,open:U,actions:B,readOnly:p,disableOpenPicker:v,label:d,localeText:y,onBlur:C,rangePosition:O,onRangePositionChange:D,singleInputFieldRef:N,pickerSlotProps:a,pickerSlots:i,fieldProps:k,anchorRef:E}),j=W({},a,{toolbar:W({},a==null?void 0:a.toolbar,{rangePosition:O,onRangePositionChange:D})}),z=(r=i==null?void 0:i.layout)!=null?r:UI;return{renderPicker:()=>xe(A2,{localeText:y,children:[R(S,W({},L)),R(WQ,W({role:"tooltip",placement:"bottom-start",containerRef:I,anchorEl:E.current,onBlur:C},B,{open:U,slots:i,slotProps:a,shouldRestoreFocus:P,reduceAnimations:b,children:R(z,W({},F,a==null?void 0:a.layout,{slots:i,slotProps:j,children:T()}))}))]})}},SZ=A.forwardRef(function(t,r){var n,o;const i=wZ(t,"MuiDesktopDateRangePicker"),a=W({day:xZ},i.viewRenderers),s=W({},i,{viewRenderers:a,calendars:(n=i.calendars)!=null?n:2,views:["day"],openTo:"day",slots:W({field:vZ},i.slots),slotProps:W({},i.slotProps,{field:l=>{var u;return W({},Ku((u=i.slotProps)==null?void 0:u.field,l),LI(i),{ref:r})},toolbar:W({hidden:!0},(o=i.slotProps)==null?void 0:o.toolbar)})}),{renderPicker:c}=yRe({props:s,valueManager:xm,valueType:"date",validator:sx});return c()});SZ.propTypes={autoFocus:ue.bool,calendars:ue.oneOf([1,2,3]),className:ue.string,closeOnSelect:ue.bool,components:ue.object,componentsProps:ue.object,currentMonthCalendarPosition:ue.oneOf([1,2,3]),dayOfWeekFormatter:ue.func,defaultCalendarMonth:ue.any,defaultRangePosition:ue.oneOf(["end","start"]),defaultValue:ue.arrayOf(ue.any),disableAutoMonthSwitching:ue.bool,disabled:ue.bool,disableDragEditing:ue.bool,disableFuture:ue.bool,disableHighlightToday:ue.bool,disableOpenPicker:ue.bool,disablePast:ue.bool,displayWeekNumber:ue.bool,fixedWeekNumber:ue.number,format:ue.string,formatDensity:ue.oneOf(["dense","spacious"]),inputRef:JT,label:ue.node,loading:ue.bool,localeText:ue.object,maxDate:ue.any,minDate:ue.any,onAccept:ue.func,onChange:ue.func,onClose:ue.func,onError:ue.func,onMonthChange:ue.func,onOpen:ue.func,onRangePositionChange:ue.func,onSelectedSectionsChange:ue.func,open:ue.bool,rangePosition:ue.oneOf(["end","start"]),readOnly:ue.bool,reduceAnimations:ue.bool,referenceDate:ue.any,renderLoading:ue.func,selectedSections:ue.oneOfType([ue.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),ue.number,ue.shape({endIndex:ue.number.isRequired,startIndex:ue.number.isRequired})]),shouldDisableDate:ue.func,showDaysOutsideCurrentMonth:ue.bool,slotProps:ue.object,slots:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),timezone:ue.string,value:ue.arrayOf(ue.any),viewRenderers:ue.shape({day:ue.func})};const bRe=["props"],wRe=HI(),xRe=e=>{var t,r,n,o;let{props:i}=e,a=ze(e,bRe);b2("x-date-pickers-pro",wRe);const{slots:s,slotProps:c,className:l,sx:u,format:f,formatDensity:d,timezone:h,label:p,inputRef:g,readOnly:m,disabled:v,disableOpenPicker:y,localeText:b}=i,{rangePosition:w,onRangePositionChange:E,singleInputFieldRef:I}=ID(i),O=dn(),D=wc(),{open:N,actions:U,layoutProps:B,renderCurrentView:F,fieldProps:T}=$I(W({},a,{props:i,wrapperVariant:"mobile",autoFocusView:!0,additionalViewProps:{rangePosition:w,onRangePositionChange:E}})),P=s.field,_=(t=P.fieldType)!=null?t:"multi-input",C=Cr({elementType:P,externalSlotProps:c==null?void 0:c.field,additionalProps:W({},T,{readOnly:m??!0,disabled:v,className:l,sx:u,format:f,formatDensity:d,timezone:h},_==="single-input"&&{inputRef:g}),ownerState:i}),S=(r=c==null||(n=c.toolbar)==null?void 0:n.hidden)!=null?r:!1,x=CZ({wrapperVariant:"mobile",fieldType:_,open:N,actions:U,readOnly:m,labelId:O,disableOpenPicker:y,label:p,localeText:b,rangePosition:w,onRangePositionChange:E,singleInputFieldRef:I,pickerSlots:s,pickerSlotProps:c,fieldProps:C}),k=W({},c,{toolbar:W({},c==null?void 0:c.toolbar,{titleId:O,rangePosition:w,onRangePositionChange:E})}),L=(o=s==null?void 0:s.layout)!=null?o:UI,j=W({},D,b);let z=O;if(S){const Q=[];_==="multi-input"?(j.start&&Q.push(`${O}-start-label`),j.end&&Q.push(`${O}-end-label`)):p!=null&&Q.push(`${O}-label`),z=Q.length>0?Q.join(" "):void 0}const Y=W({},c,{mobilePaper:W({"aria-labelledby":z},c==null?void 0:c.mobilePaper)});return{renderPicker:()=>xe(A2,{localeText:b,children:[R(P,W({},x)),R(zQ,W({},U,{open:N,slots:s,slotProps:Y,children:R(L,W({},B,Y==null?void 0:Y.layout,{slots:s,slotProps:k,children:F()}))}))]})}},_Z=A.forwardRef(function(t,r){var n;const o=wZ(t,"MuiMobileDateRangePicker"),i=W({day:xZ},o.viewRenderers),a=W({},o,{viewRenderers:i,calendars:1,views:["day"],openTo:"day",slots:W({field:vZ},o.slots),slotProps:W({},o.slotProps,{field:c=>{var l;return W({},Ku((l=o.slotProps)==null?void 0:l.field,c),LI(o),{ref:r})},toolbar:W({hidden:!1},(n=o.slotProps)==null?void 0:n.toolbar)})}),{renderPicker:s}=xRe({props:a,valueManager:xm,valueType:"date",validator:sx});return s()});_Z.propTypes={autoFocus:ue.bool,calendars:ue.oneOf([1,2,3]),className:ue.string,closeOnSelect:ue.bool,components:ue.object,componentsProps:ue.object,currentMonthCalendarPosition:ue.oneOf([1,2,3]),dayOfWeekFormatter:ue.func,defaultCalendarMonth:ue.any,defaultRangePosition:ue.oneOf(["end","start"]),defaultValue:ue.arrayOf(ue.any),disableAutoMonthSwitching:ue.bool,disabled:ue.bool,disableDragEditing:ue.bool,disableFuture:ue.bool,disableHighlightToday:ue.bool,disableOpenPicker:ue.bool,disablePast:ue.bool,displayWeekNumber:ue.bool,fixedWeekNumber:ue.number,format:ue.string,formatDensity:ue.oneOf(["dense","spacious"]),inputRef:JT,label:ue.node,loading:ue.bool,localeText:ue.object,maxDate:ue.any,minDate:ue.any,onAccept:ue.func,onChange:ue.func,onClose:ue.func,onError:ue.func,onMonthChange:ue.func,onOpen:ue.func,onRangePositionChange:ue.func,onSelectedSectionsChange:ue.func,open:ue.bool,rangePosition:ue.oneOf(["end","start"]),readOnly:ue.bool,reduceAnimations:ue.bool,referenceDate:ue.any,renderLoading:ue.func,selectedSections:ue.oneOfType([ue.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),ue.number,ue.shape({endIndex:ue.number.isRequired,startIndex:ue.number.isRequired})]),shouldDisableDate:ue.func,showDaysOutsideCurrentMonth:ue.bool,slotProps:ue.object,slots:ue.object,sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),timezone:ue.string,value:ue.arrayOf(ue.any),viewRenderers:ue.shape({day:ue.func})};const CRe=["desktopModeMediaQuery"],SRe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDateRangePicker"}),{desktopModeMediaQuery:o="@media (pointer: fine)"}=n,i=ze(n,CRe);return E2(o,{defaultMatches:!0})?R(SZ,W({ref:r},i)):R(_Z,W({ref:r},i))});var u0=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},u1=typeof window>"u"||"Deno"in globalThis;function Gl(){}function _Re(e,t){return typeof e=="function"?e(t):e}function SR(e){return typeof e=="number"&&e>=0&&e!==1/0}function kZ(e,t){return Math.max(e+(t||0)-Date.now(),0)}function NU(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==AD(a,t.options))return!1}else if(!lx(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function LU(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(Um(t.options.mutationKey)!==Um(i))return!1}else if(!lx(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function AD(e,t){return((t==null?void 0:t.queryKeyHashFn)||Um)(e)}function Um(e){return JSON.stringify(e,(t,r)=>_R(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function lx(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!lx(e[r],t[r])):!1}function PD(e,t){if(e===t)return e;const r=$U(e)&&$U(t);if(r||_R(e)&&_R(t)){const n=r?e:Object.keys(e),o=n.length,i=r?t:Object.keys(t),a=i.length,s=r?[]:{};let c=0;for(let l=0;l<a;l++){const u=r?l:i[l];!r&&e[u]===void 0&&t[u]===void 0&&n.includes(u)?(s[u]=void 0,c++):(s[u]=PD(e[u],t[u]),s[u]===e[u]&&e[u]!==void 0&&c++)}return o===a&&c===o?e:s}return t}function iE(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function $U(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _R(e){if(!BU(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!BU(r)||!r.hasOwnProperty("isPrototypeOf"))}function BU(e){return Object.prototype.toString.call(e)==="[object Object]"}function kRe(e){return new Promise(t=>{setTimeout(t,e)})}function kR(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?PD(e,t):t}function ERe(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function TRe(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var MD=Symbol(),am,ch,_v,qG,IRe=(qG=class extends u0{constructor(){super();ar(this,am,void 0);ar(this,ch,void 0);ar(this,_v,void 0);er(this,_v,t=>{if(!u1&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){Ke(this,ch)||this.setEventListener(Ke(this,_v))}onUnsubscribe(){var t;this.hasListeners()||((t=Ke(this,ch))==null||t.call(this),er(this,ch,void 0))}setEventListener(t){var r;er(this,_v,t),(r=Ke(this,ch))==null||r.call(this),er(this,ch,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){Ke(this,am)!==t&&(er(this,am,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof Ke(this,am)=="boolean"?Ke(this,am):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},am=new WeakMap,ch=new WeakMap,_v=new WeakMap,qG),RD=new IRe,kv,uh,Ev,KG,ARe=(KG=class extends u0{constructor(){super();ar(this,kv,!0);ar(this,uh,void 0);ar(this,Ev,void 0);er(this,Ev,t=>{if(!u1&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){Ke(this,uh)||this.setEventListener(Ke(this,Ev))}onUnsubscribe(){var t;this.hasListeners()||((t=Ke(this,uh))==null||t.call(this),er(this,uh,void 0))}setEventListener(t){var r;er(this,Ev,t),(r=Ke(this,uh))==null||r.call(this),er(this,uh,t(this.setOnline.bind(this)))}setOnline(t){Ke(this,kv)!==t&&(er(this,kv,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return Ke(this,kv)}},kv=new WeakMap,uh=new WeakMap,Ev=new WeakMap,KG),aE=new ARe;function PRe(e){return Math.min(1e3*2**e,3e4)}function OD(e){return(e??"online")==="online"?aE.isOnline():!0}var EZ=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function UA(e){return e instanceof EZ}function TZ(e){let t=!1,r=0,n=!1,o,i,a;const s=new Promise((m,v)=>{i=m,a=v}),c=m=>{var v;n||(h(new EZ(m)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},u=()=>{t=!1},f=()=>!RD.isFocused()||e.networkMode!=="always"&&!aE.isOnline(),d=m=>{var v;n||(n=!0,(v=e.onSuccess)==null||v.call(e,m),o==null||o(),i(m))},h=m=>{var v;n||(n=!0,(v=e.onError)==null||v.call(e,m),o==null||o(),a(m))},p=()=>new Promise(m=>{var v;o=y=>{const b=n||!f();return b&&m(y),b},(v=e.onPause)==null||v.call(e)}).then(()=>{var m;o=void 0,n||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(n)return;let m;try{m=e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var I;if(n)return;const y=e.retry??(u1?0:3),b=e.retryDelay??PRe,w=typeof b=="function"?b(r,v):b,E=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,v);if(t||!E){h(v);return}r++,(I=e.onFail)==null||I.call(e,r,v),kRe(w).then(()=>{if(f())return p()}).then(()=>{t?h(v):g()})})};return OD(e.networkMode)?g():p().then(g),{promise:s,cancel:c,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:l,continueRetry:u}}function MRe(){let e=[],t=0,r=d=>{d()},n=d=>{d()},o=d=>setTimeout(d,0);const i=d=>{o=d},a=d=>{let h;t++;try{h=d()}finally{t--,t||l()}return h},s=d=>{t?e.push(d):o(()=>{r(d)})},c=d=>(...h)=>{s(()=>{d(...h)})},l=()=>{const d=e;e=[],d.length&&o(()=>{n(()=>{d.forEach(h=>{r(h)})})})};return{batch:a,batchCalls:c,schedule:s,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{n=d},setScheduler:i}}var ti=MRe(),sm,YG,IZ=(YG=class{constructor(){ar(this,sm,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),SR(this.gcTime)&&er(this,sm,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(u1?1/0:5*60*1e3))}clearGcTimeout(){Ke(this,sm)&&(clearTimeout(Ke(this,sm)),er(this,sm,void 0))}},sm=new WeakMap,YG),Tv,Iv,jl,ss,Zi,Kx,lm,Lc,Id,XG,RRe=(XG=class extends IZ{constructor(t){super();ar(this,Lc);ar(this,Tv,void 0);ar(this,Iv,void 0);ar(this,jl,void 0);ar(this,ss,void 0);ar(this,Zi,void 0);ar(this,Kx,void 0);ar(this,lm,void 0);er(this,lm,!1),er(this,Kx,t.defaultOptions),this.setOptions(t.options),er(this,Zi,[]),er(this,jl,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,er(this,Tv,t.state||ORe(this.options)),this.state=Ke(this,Tv),this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...Ke(this,Kx),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!Ke(this,Zi).length&&this.state.fetchStatus==="idle"&&Ke(this,jl).remove(this)}setData(t,r){const n=kR(this.state.data,t,this.options);return Pr(this,Lc,Id).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Pr(this,Lc,Id).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=Ke(this,ss))==null?void 0:n.promise;return(o=Ke(this,ss))==null||o.cancel(t),r?r.then(Gl).catch(Gl):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Ke(this,Tv))}isActive(){return Ke(this,Zi).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?Ke(this,Zi).some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!kZ(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=Ke(this,Zi).find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=Ke(this,ss))==null||r.continue()}onOnline(){var r;const t=Ke(this,Zi).find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=Ke(this,ss))==null||r.continue()}addObserver(t){Ke(this,Zi).includes(t)||(Ke(this,Zi).push(t),this.clearGcTimeout(),Ke(this,jl).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){Ke(this,Zi).includes(t)&&(er(this,Zi,Ke(this,Zi).filter(r=>r!==t)),Ke(this,Zi).length||(Ke(this,ss)&&(Ke(this,lm)?Ke(this,ss).cancel({revert:!0}):Ke(this,ss).cancelRetry()),this.scheduleGc()),Ke(this,jl).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return Ke(this,Zi).length}invalidate(){this.state.isInvalidated||Pr(this,Lc,Id).call(this,{type:"invalidate"})}fetch(t,r){var l,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(Ke(this,ss))return Ke(this,ss).continueRetry(),Ke(this,ss).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=Ke(this,Zi).find(h=>h.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,o={queryKey:this.queryKey,meta:this.meta},i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(er(this,lm,!0),n.signal)})};i(o);const a=()=>!this.options.queryFn||this.options.queryFn===MD?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(er(this,lm,!1),this.options.persister?this.options.persister(this.options.queryFn,o,this):this.options.queryFn(o)),s={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),er(this,Iv,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&Pr(this,Lc,Id).call(this,{type:"fetch",meta:(f=s.fetchOptions)==null?void 0:f.meta});const c=d=>{var h,p,g,m;UA(d)&&d.silent||Pr(this,Lc,Id).call(this,{type:"error",error:d}),UA(d)||((p=(h=Ke(this,jl).config).onError)==null||p.call(h,d,this),(m=(g=Ke(this,jl).config).onSettled)==null||m.call(g,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return er(this,ss,TZ({fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:d=>{var h,p,g,m;if(d===void 0){c(new Error(`${this.queryHash} data is undefined`));return}this.setData(d),(p=(h=Ke(this,jl).config).onSuccess)==null||p.call(h,d,this),(m=(g=Ke(this,jl).config).onSettled)==null||m.call(g,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:c,onFail:(d,h)=>{Pr(this,Lc,Id).call(this,{type:"failed",failureCount:d,error:h})},onPause:()=>{Pr(this,Lc,Id).call(this,{type:"pause"})},onContinue:()=>{Pr(this,Lc,Id).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode})),Ke(this,ss).promise}},Tv=new WeakMap,Iv=new WeakMap,jl=new WeakMap,ss=new WeakMap,Zi=new WeakMap,Kx=new WeakMap,lm=new WeakMap,Lc=new WeakSet,Id=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...AZ(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return UA(o)&&o.revert&&Ke(this,Iv)?{...Ke(this,Iv),fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),ti.batch(()=>{Ke(this,Zi).forEach(n=>{n.onQueryUpdate()}),Ke(this,jl).notify({query:this,type:"updated",action:t})})},XG);function AZ(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:OD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ORe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Eu,QG,DRe=(QG=class extends u0{constructor(t={}){super();ar(this,Eu,void 0);this.config=t,er(this,Eu,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??AD(o,r);let a=this.get(i);return a||(a=new RRe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){Ke(this,Eu).has(t.queryHash)||(Ke(this,Eu).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=Ke(this,Eu).get(t.queryHash);r&&(t.destroy(),r===t&&Ke(this,Eu).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ti.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Ke(this,Eu).get(t)}getAll(){return[...Ke(this,Eu).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>NU(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>NU(t,n)):r}notify(t){ti.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){ti.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ti.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Eu=new WeakMap,QG),Tu,Yx,il,Av,Iu,Yf,ZG,FRe=(ZG=class extends IZ{constructor(t){super();ar(this,Iu);ar(this,Tu,void 0);ar(this,Yx,void 0);ar(this,il,void 0);ar(this,Av,void 0);this.mutationId=t.mutationId,er(this,Yx,t.defaultOptions),er(this,il,t.mutationCache),er(this,Tu,[]),this.state=t.state||PZ(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...Ke(this,Yx),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Ke(this,Tu).includes(t)||(Ke(this,Tu).push(t),this.clearGcTimeout(),Ke(this,il).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){er(this,Tu,Ke(this,Tu).filter(r=>r!==t)),this.scheduleGc(),Ke(this,il).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Ke(this,Tu).length||(this.state.status==="pending"?this.scheduleGc():Ke(this,il).remove(this))}continue(){var t;return((t=Ke(this,Av))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,c,l,u,f,d,h,p,g,m,v,y,b,w,E,I,O;const r=()=>(er(this,Av,TZ({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,N)=>{Pr(this,Iu,Yf).call(this,{type:"failed",failureCount:D,error:N})},onPause:()=>{Pr(this,Iu,Yf).call(this,{type:"pause"})},onContinue:()=>{Pr(this,Iu,Yf).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),Ke(this,Av).promise),n=this.state.status==="pending";try{if(!n){Pr(this,Iu,Yf).call(this,{type:"pending",variables:t}),await((i=(o=Ke(this,il).config).onMutate)==null?void 0:i.call(o,t,this));const N=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));N!==this.state.context&&Pr(this,Iu,Yf).call(this,{type:"pending",context:N,variables:t})}const D=await r();return await((l=(c=Ke(this,il).config).onSuccess)==null?void 0:l.call(c,D,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,D,t,this.state.context)),await((h=(d=Ke(this,il).config).onSettled)==null?void 0:h.call(d,D,null,this.state.variables,this.state.context,this)),await((g=(p=this.options).onSettled)==null?void 0:g.call(p,D,null,t,this.state.context)),Pr(this,Iu,Yf).call(this,{type:"success",data:D}),D}catch(D){try{throw await((v=(m=Ke(this,il).config).onError)==null?void 0:v.call(m,D,t,this.state.context,this)),await((b=(y=this.options).onError)==null?void 0:b.call(y,D,t,this.state.context)),await((E=(w=Ke(this,il).config).onSettled)==null?void 0:E.call(w,void 0,D,this.state.variables,this.state.context,this)),await((O=(I=this.options).onSettled)==null?void 0:O.call(I,void 0,D,t,this.state.context)),D}finally{Pr(this,Iu,Yf).call(this,{type:"error",error:D})}}}},Tu=new WeakMap,Yx=new WeakMap,il=new WeakMap,Av=new WeakMap,Iu=new WeakSet,Yf=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!OD(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),ti.batch(()=>{Ke(this,Tu).forEach(n=>{n.onMutationUpdate(t)}),Ke(this,il).notify({mutation:this,type:"updated",action:t})})},ZG);function PZ(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vl,Xx,cm,JG,NRe=(JG=class extends u0{constructor(t={}){super();ar(this,Vl,void 0);ar(this,Xx,void 0);ar(this,cm,void 0);this.config=t,er(this,Vl,[]),er(this,Xx,0)}build(t,r,n){const o=new FRe({mutationCache:this,mutationId:++fS(this,Xx)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){Ke(this,Vl).push(t),this.notify({type:"added",mutation:t})}remove(t){er(this,Vl,Ke(this,Vl).filter(r=>r!==t)),this.notify({type:"removed",mutation:t})}clear(){ti.batch(()=>{Ke(this,Vl).forEach(t=>{this.remove(t)})})}getAll(){return Ke(this,Vl)}find(t){const r={exact:!0,...t};return Ke(this,Vl).find(n=>LU(r,n))}findAll(t={}){return Ke(this,Vl).filter(r=>LU(t,r))}notify(t){ti.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){return er(this,cm,(Ke(this,cm)??Promise.resolve()).then(()=>{const t=Ke(this,Vl).filter(r=>r.state.isPaused);return ti.batch(()=>t.reduce((r,n)=>r.then(()=>n.continue().catch(Gl)),Promise.resolve()))}).then(()=>{er(this,cm,void 0)})),Ke(this,cm)}},Vl=new WeakMap,Xx=new WeakMap,cm=new WeakMap,JG);function ER(e){return{onFetch:(t,r)=>{const n=async()=>{var p,g,m,v,y;const o=t.options,i=(m=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:m.direction,a=((v=t.state.data)==null?void 0:v.pages)||[],s=((y=t.state.data)==null?void 0:y.pageParams)||[],c={pages:[],pageParams:[]};let l=!1;const u=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",()=>{l=!0}),t.signal)})},f=t.options.queryFn&&t.options.queryFn!==MD?t.options.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`)),d=async(b,w,E)=>{if(l)return Promise.reject();if(w==null&&b.pages.length)return Promise.resolve(b);const I={queryKey:t.queryKey,pageParam:w,direction:E?"backward":"forward",meta:t.options.meta};u(I);const O=await f(I),{maxPages:D}=t.options,N=E?TRe:ERe;return{pages:N(b.pages,O,D),pageParams:N(b.pageParams,w,D)}};let h;if(i&&a.length){const b=i==="backward",w=b?MZ:TR,E={pages:a,pageParams:s},I=w(o,E);h=await d(E,I,b)}else{h=await d(c,s[0]??o.initialPageParam);const b=e??a.length;for(let w=1;w<b;w++){const E=TR(o,h);h=await d(h,E)}}return h};t.options.persister?t.fetchFn=()=>{var o,i;return(i=(o=t.options).persister)==null?void 0:i.call(o,n,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=n}}}function TR(e,{pages:t,pageParams:r}){const n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function MZ(e,{pages:t,pageParams:r}){var n;return(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r)}function LRe(e,t){return t?TR(e,t)!=null:!1}function $Re(e,t){return!t||!e.getPreviousPageParam?!1:MZ(e,t)!=null}var _i,dh,fh,Pv,Mv,hh,Rv,Ov,eq,BRe=(eq=class{constructor(e={}){ar(this,_i,void 0);ar(this,dh,void 0);ar(this,fh,void 0);ar(this,Pv,void 0);ar(this,Mv,void 0);ar(this,hh,void 0);ar(this,Rv,void 0);ar(this,Ov,void 0);er(this,_i,e.queryCache||new DRe),er(this,dh,e.mutationCache||new NRe),er(this,fh,e.defaultOptions||{}),er(this,Pv,new Map),er(this,Mv,new Map),er(this,hh,0)}mount(){fS(this,hh)._++,Ke(this,hh)===1&&(er(this,Rv,RD.subscribe(async e=>{e&&(await this.resumePausedMutations(),Ke(this,_i).onFocus())})),er(this,Ov,aE.subscribe(async e=>{e&&(await this.resumePausedMutations(),Ke(this,_i).onOnline())})))}unmount(){var e,t;fS(this,hh)._--,Ke(this,hh)===0&&((e=Ke(this,Rv))==null||e.call(this),er(this,Rv,void 0),(t=Ke(this,Ov))==null||t.call(this),er(this,Ov,void 0))}isFetching(e){return Ke(this,_i).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Ke(this,dh).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Ke(this,_i).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),n=Ke(this,_i).build(this,r);return e.revalidateIfStale&&n.isStaleByTime(r.staleTime)&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=Ke(this,_i).get(n.queryHash),i=o==null?void 0:o.state.data,a=_Re(t,i);if(a!==void 0)return Ke(this,_i).build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return ti.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=Ke(this,_i).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=Ke(this,_i);ti.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=Ke(this,_i),n={type:"active",...e};return ti.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=ti.batch(()=>Ke(this,_i).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Gl).catch(Gl)}invalidateQueries(e={},t={}){return ti.batch(()=>{if(Ke(this,_i).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=ti.batch(()=>Ke(this,_i).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Gl)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Gl)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=Ke(this,_i).build(this,t);return r.isStaleByTime(t.staleTime)?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Gl).catch(Gl)}fetchInfiniteQuery(e){return e.behavior=ER(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Gl).catch(Gl)}resumePausedMutations(){return aE.isOnline()?Ke(this,dh).resumePausedMutations():Promise.resolve()}getQueryCache(){return Ke(this,_i)}getMutationCache(){return Ke(this,dh)}getDefaultOptions(){return Ke(this,fh)}setDefaultOptions(e){er(this,fh,e)}setQueryDefaults(e,t){Ke(this,Pv).set(Um(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Ke(this,Pv).values()];let r={};return t.forEach(n=>{lx(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){Ke(this,Mv).set(Um(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Ke(this,Mv).values()];let r={};return t.forEach(n=>{lx(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Ke(this,fh).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=AD(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===MD&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Ke(this,fh).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Ke(this,_i).clear(),Ke(this,dh).clear()}},_i=new WeakMap,dh=new WeakMap,fh=new WeakMap,Pv=new WeakMap,Mv=new WeakMap,hh=new WeakMap,Rv=new WeakMap,Ov=new WeakMap,eq),Rs,wo,Qx,ls,um,Dv,Au,Zx,Fv,Nv,dm,fm,ph,Lv,hm,Ab,Jx,IR,e2,AR,t2,PR,r2,MR,n2,RR,o2,OR,i2,DR,ET,RZ,tq,zI=(tq=class extends u0{constructor(t,r){super();ar(this,hm);ar(this,Jx);ar(this,e2);ar(this,t2);ar(this,r2);ar(this,n2);ar(this,o2);ar(this,i2);ar(this,ET);ar(this,Rs,void 0);ar(this,wo,void 0);ar(this,Qx,void 0);ar(this,ls,void 0);ar(this,um,void 0);ar(this,Dv,void 0);ar(this,Au,void 0);ar(this,Zx,void 0);ar(this,Fv,void 0);ar(this,Nv,void 0);ar(this,dm,void 0);ar(this,fm,void 0);ar(this,ph,void 0);ar(this,Lv,new Set);this.options=r,er(this,Rs,t),er(this,Au,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Ke(this,wo).addObserver(this),UU(Ke(this,wo),this.options)?Pr(this,hm,Ab).call(this):this.updateResult(),Pr(this,r2,MR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return FR(Ke(this,wo),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return FR(Ke(this,wo),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pr(this,n2,RR).call(this),Pr(this,o2,OR).call(this),Ke(this,wo).removeObserver(this)}setOptions(t,r){const n=this.options,o=Ke(this,wo);if(this.options=Ke(this,Rs).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");Pr(this,i2,DR).call(this),Ke(this,wo).setOptions(this.options),n._defaulted&&!iE(this.options,n)&&Ke(this,Rs).getQueryCache().notify({type:"observerOptionsUpdated",query:Ke(this,wo),observer:this});const i=this.hasListeners();i&&HU(Ke(this,wo),o,this.options,n)&&Pr(this,hm,Ab).call(this),this.updateResult(r),i&&(Ke(this,wo)!==o||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&Pr(this,Jx,IR).call(this);const a=Pr(this,e2,AR).call(this);i&&(Ke(this,wo)!==o||this.options.enabled!==n.enabled||a!==Ke(this,ph))&&Pr(this,t2,PR).call(this,a)}getOptimisticResult(t){const r=Ke(this,Rs).getQueryCache().build(Ke(this,Rs),t),n=this.createResult(r,t);return HRe(this,n)&&(er(this,ls,n),er(this,Dv,this.options),er(this,um,Ke(this,wo).state)),n}getCurrentResult(){return Ke(this,ls)}trackResult(t,r){const n={};return Object.keys(t).forEach(o=>{Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),r==null||r(o),t[o])})}),n}trackProp(t){Ke(this,Lv).add(t)}getCurrentQuery(){return Ke(this,wo)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=Ke(this,Rs).defaultQueryOptions(t),n=Ke(this,Rs).getQueryCache().build(Ke(this,Rs),r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Pr(this,hm,Ab).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Ke(this,ls)))}createResult(t,r){var O;const n=Ke(this,wo),o=this.options,i=Ke(this,ls),a=Ke(this,um),s=Ke(this,Dv),l=t!==n?t.state:Ke(this,Qx),{state:u}=t;let f={...u},d=!1,h;if(r._optimisticResults){const D=this.hasListeners(),N=!D&&UU(t,r),U=D&&HU(t,n,r,o);(N||U)&&(f={...f,...AZ(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:m}=f;if(r.select&&f.data!==void 0)if(i&&f.data===(a==null?void 0:a.data)&&r.select===Ke(this,Zx))h=Ke(this,Fv);else try{er(this,Zx,r.select),h=r.select(f.data),h=kR(i==null?void 0:i.data,h,r),er(this,Fv,h),er(this,Au,null)}catch(D){er(this,Au,D)}else h=f.data;if(r.placeholderData!==void 0&&h===void 0&&m==="pending"){let D;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))D=i.data;else if(D=typeof r.placeholderData=="function"?r.placeholderData((O=Ke(this,Nv))==null?void 0:O.state.data,Ke(this,Nv)):r.placeholderData,r.select&&D!==void 0)try{D=r.select(D),er(this,Au,null)}catch(N){er(this,Au,N)}D!==void 0&&(m="success",h=kR(i==null?void 0:i.data,D,r),d=!0)}Ke(this,Au)&&(p=Ke(this,Au),h=Ke(this,Fv),g=Date.now(),m="error");const v=f.fetchStatus==="fetching",y=m==="pending",b=m==="error",w=y&&v,E=h!==void 0;return{status:m,fetchStatus:f.fetchStatus,isPending:y,isSuccess:m==="success",isError:b,isInitialLoading:w,isLoading:w,data:h,dataUpdatedAt:f.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:b&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:b&&E,isStale:DD(t,r),refetch:this.refetch}}updateResult(t){const r=Ke(this,ls),n=this.createResult(Ke(this,wo),this.options);if(er(this,um,Ke(this,wo).state),er(this,Dv,this.options),Ke(this,um).data!==void 0&&er(this,Nv,Ke(this,wo)),iE(n,r))return;er(this,ls,n);const o={},i=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!Ke(this,Lv).size)return!0;const c=new Set(s??Ke(this,Lv));return this.options.throwOnError&&c.add("error"),Object.keys(Ke(this,ls)).some(l=>{const u=l;return Ke(this,ls)[u]!==r[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),Pr(this,ET,RZ).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pr(this,r2,MR).call(this)}},Rs=new WeakMap,wo=new WeakMap,Qx=new WeakMap,ls=new WeakMap,um=new WeakMap,Dv=new WeakMap,Au=new WeakMap,Zx=new WeakMap,Fv=new WeakMap,Nv=new WeakMap,dm=new WeakMap,fm=new WeakMap,ph=new WeakMap,Lv=new WeakMap,hm=new WeakSet,Ab=function(t){Pr(this,i2,DR).call(this);let r=Ke(this,wo).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Gl)),r},Jx=new WeakSet,IR=function(){if(Pr(this,n2,RR).call(this),u1||Ke(this,ls).isStale||!SR(this.options.staleTime))return;const r=kZ(Ke(this,ls).dataUpdatedAt,this.options.staleTime)+1;er(this,dm,setTimeout(()=>{Ke(this,ls).isStale||this.updateResult()},r))},e2=new WeakSet,AR=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Ke(this,wo)):this.options.refetchInterval)??!1},t2=new WeakSet,PR=function(t){Pr(this,o2,OR).call(this),er(this,ph,t),!(u1||this.options.enabled===!1||!SR(Ke(this,ph))||Ke(this,ph)===0)&&er(this,fm,setInterval(()=>{(this.options.refetchIntervalInBackground||RD.isFocused())&&Pr(this,hm,Ab).call(this)},Ke(this,ph)))},r2=new WeakSet,MR=function(){Pr(this,Jx,IR).call(this),Pr(this,t2,PR).call(this,Pr(this,e2,AR).call(this))},n2=new WeakSet,RR=function(){Ke(this,dm)&&(clearTimeout(Ke(this,dm)),er(this,dm,void 0))},o2=new WeakSet,OR=function(){Ke(this,fm)&&(clearInterval(Ke(this,fm)),er(this,fm,void 0))},i2=new WeakSet,DR=function(){const t=Ke(this,Rs).getQueryCache().build(Ke(this,Rs),this.options);if(t===Ke(this,wo))return;const r=Ke(this,wo);er(this,wo,t),er(this,Qx,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},ET=new WeakSet,RZ=function(t){ti.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(Ke(this,ls))}),Ke(this,Rs).getQueryCache().notify({query:Ke(this,wo),type:"observerResultsUpdated"})})},tq);function URe(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function UU(e,t){return URe(e,t)||e.state.data!==void 0&&FR(e,t,t.refetchOnMount)}function FR(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&DD(e,t)}return!1}function HU(e,t,r,n){return(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&DD(e,r)}function DD(e,t){return t.enabled!==!1&&e.isStaleByTime(t.staleTime)}function HRe(e,t){return!iE(e.getCurrentResult(),t)}function zU(e,t){return e.filter(r=>!t.includes(r))}function zRe(e,t,r){const n=e.slice(0);return n[t]=r,n}var pm,$v,Bv,al,a2,Uv,Hv,ok,s2,NR,l2,LR,c2,$R,u2,BR,rq,jRe=(rq=class extends u0{constructor(t,r,n){super();ar(this,Hv);ar(this,s2);ar(this,l2);ar(this,c2);ar(this,u2);ar(this,pm,void 0);ar(this,$v,void 0);ar(this,Bv,void 0);ar(this,al,void 0);ar(this,a2,void 0);ar(this,Uv,void 0);er(this,pm,t),er(this,Bv,[]),er(this,al,[]),Pr(this,Hv,ok).call(this,[]),this.setQueries(r,n)}onSubscribe(){this.listeners.size===1&&Ke(this,al).forEach(t=>{t.subscribe(r=>{Pr(this,c2,$R).call(this,t,r)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,Ke(this,al).forEach(t=>{t.destroy()})}setQueries(t,r,n){er(this,Bv,t),er(this,a2,r),ti.batch(()=>{const o=Ke(this,al),i=Pr(this,l2,LR).call(this,Ke(this,Bv));i.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions,n));const a=i.map(l=>l.observer),s=a.map(l=>l.getCurrentResult()),c=a.some((l,u)=>l!==o[u]);o.length===a.length&&!c||(er(this,al,a),Pr(this,Hv,ok).call(this,s),this.hasListeners()&&(zU(o,a).forEach(l=>{l.destroy()}),zU(a,o).forEach(l=>{l.subscribe(u=>{Pr(this,c2,$R).call(this,l,u)})}),Pr(this,u2,BR).call(this)))})}getCurrentResult(){return Ke(this,Uv)}getQueries(){return Ke(this,al).map(t=>t.getCurrentQuery())}getObservers(){return Ke(this,al)}getOptimisticResult(t,r){const n=Pr(this,l2,LR).call(this,t),o=n.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[o,i=>Pr(this,s2,NR).call(this,i??o,r),()=>n.map((i,a)=>{const s=o[a];return i.defaultedQueryOptions.notifyOnChangeProps?s:i.observer.trackResult(s,c=>{n.forEach(l=>{l.observer.trackProp(c)})})})]}},pm=new WeakMap,$v=new WeakMap,Bv=new WeakMap,al=new WeakMap,a2=new WeakMap,Uv=new WeakMap,Hv=new WeakSet,ok=function(t){var r;er(this,$v,t),er(this,Uv,Pr(this,s2,NR).call(this,t,(r=Ke(this,a2))==null?void 0:r.combine))},s2=new WeakSet,NR=function(t,r){return r?PD(Ke(this,Uv),r(t)):t},l2=new WeakSet,LR=function(t){const r=Ke(this,al),n=new Map(r.map(f=>[f.options.queryHash,f])),o=t.map(f=>Ke(this,pm).defaultQueryOptions(f)),i=o.flatMap(f=>{const d=n.get(f.queryHash);return d!=null?[{defaultedQueryOptions:f,observer:d}]:[]}),a=new Set(i.map(f=>f.defaultedQueryOptions.queryHash)),s=o.filter(f=>!a.has(f.queryHash)),c=f=>{const d=Ke(this,pm).defaultQueryOptions(f);return Ke(this,al).find(p=>p.options.queryHash===d.queryHash)??new zI(Ke(this,pm),d)},l=s.map(f=>({defaultedQueryOptions:f,observer:c(f)})),u=(f,d)=>o.indexOf(f.defaultedQueryOptions)-o.indexOf(d.defaultedQueryOptions);return i.concat(l).sort(u)},c2=new WeakSet,$R=function(t,r){const n=Ke(this,al).indexOf(t);n!==-1&&(Pr(this,Hv,ok).call(this,zRe(Ke(this,$v),n,r)),Pr(this,u2,BR).call(this))},u2=new WeakSet,BR=function(){ti.batch(()=>{this.listeners.forEach(t=>{t(Ke(this,$v))})})},rq),VRe=class extends zI{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:ER()},t)}getOptimisticResult(e){return e.behavior=ER(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var c,l,u,f;const{state:r}=e,n=super.createResult(e,t),{isFetching:o,isRefetching:i}=n,a=o&&((l=(c=r.fetchMeta)==null?void 0:c.fetchMore)==null?void 0:l.direction)==="forward",s=o&&((f=(u=r.fetchMeta)==null?void 0:u.fetchMore)==null?void 0:f.direction)==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:LRe(t,r.data),hasPreviousPage:$Re(t,r.data),isFetchingNextPage:a,isFetchingPreviousPage:s,isRefetching:i&&!a&&!s}}},mh,gh,Os,Ld,zv,ik,d2,UR,nq,WRe=(nq=class extends u0{constructor(r,n){super();ar(this,zv);ar(this,d2);ar(this,mh,void 0);ar(this,gh,void 0);ar(this,Os,void 0);ar(this,Ld,void 0);er(this,mh,r),this.setOptions(n),this.bindMethods(),Pr(this,zv,ik).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var o;const n=this.options;this.options=Ke(this,mh).defaultMutationOptions(r),iE(this.options,n)||Ke(this,mh).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Ke(this,Os),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Um(n.mutationKey)!==Um(this.options.mutationKey)?this.reset():((o=Ke(this,Os))==null?void 0:o.state.status)==="pending"&&Ke(this,Os).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=Ke(this,Os))==null||r.removeObserver(this)}onMutationUpdate(r){Pr(this,zv,ik).call(this),Pr(this,d2,UR).call(this,r)}getCurrentResult(){return Ke(this,gh)}reset(){var r;(r=Ke(this,Os))==null||r.removeObserver(this),er(this,Os,void 0),Pr(this,zv,ik).call(this),Pr(this,d2,UR).call(this)}mutate(r,n){var o;return er(this,Ld,n),(o=Ke(this,Os))==null||o.removeObserver(this),er(this,Os,Ke(this,mh).getMutationCache().build(Ke(this,mh),this.options)),Ke(this,Os).addObserver(this),Ke(this,Os).execute(r)}},mh=new WeakMap,gh=new WeakMap,Os=new WeakMap,Ld=new WeakMap,zv=new WeakSet,ik=function(){var n;const r=((n=Ke(this,Os))==null?void 0:n.state)??PZ();er(this,gh,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},d2=new WeakSet,UR=function(r){ti.batch(()=>{var n,o,i,a,s,c,l,u;if(Ke(this,Ld)&&this.hasListeners()){const f=Ke(this,gh).variables,d=Ke(this,gh).context;(r==null?void 0:r.type)==="success"?((o=(n=Ke(this,Ld)).onSuccess)==null||o.call(n,r.data,f,d),(a=(i=Ke(this,Ld)).onSettled)==null||a.call(i,r.data,null,f,d)):(r==null?void 0:r.type)==="error"&&((c=(s=Ke(this,Ld)).onError)==null||c.call(s,r.error,f,d),(u=(l=Ke(this,Ld)).onSettled)==null||u.call(l,void 0,r.error,f,d))}this.listeners.forEach(f=>{f(Ke(this,gh))})})},nq),OZ=A.createContext(void 0),B2=e=>{const t=A.useContext(OZ);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},GRe=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R(OZ.Provider,{value:e,children:t})),DZ=A.createContext(!1),FZ=()=>A.useContext(DZ);DZ.Provider;function qRe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var KRe=A.createContext(qRe()),NZ=()=>A.useContext(KRe);function LZ(e,t){return typeof e=="function"?e(...t):!!e}function YRe(){}var $Z=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},BZ=e=>{A.useEffect(()=>{e.clearReset()},[e])},UZ=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&LZ(r,[e.error,n]),HZ=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},XRe=(e,t)=>e.isLoading&&e.isFetching&&!t,HR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,zR=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function qi({queries:e,...t},r){const n=B2(r),o=FZ(),i=NZ(),a=A.useMemo(()=>e.map(p=>{const g=n.defaultQueryOptions(p);return g._optimisticResults=o?"isRestoring":"optimistic",g}),[e,n,o]);a.forEach(p=>{HZ(p),$Z(p,i)}),BZ(i);const[s]=A.useState(()=>new jRe(n,a,t)),[c,l,u]=s.getOptimisticResult(a,t.combine);A.useSyncExternalStore(A.useCallback(p=>o?()=>{}:s.subscribe(ti.batchCalls(p)),[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),A.useEffect(()=>{s.setQueries(a,t,{listeners:!1})},[a,t,s]);const d=c.some((p,g)=>HR(a[g],p))?c.flatMap((p,g)=>{const m=a[g];if(m){const v=new zI(n,m);if(HR(m,p))return zR(m,v,i);XRe(p,o)&&zR(m,v,i)}return[]}):[];if(d.length>0)throw Promise.all(d);const h=c.find((p,g)=>{const m=a[g];return m&&UZ({result:p,errorResetBoundary:i,throwOnError:m.throwOnError,query:n.getQueryCache().get(m.queryHash)})});if(h!=null&&h.error)throw h.error;return l(u())}function zZ(e,t,r){const n=B2(r),o=FZ(),i=NZ(),a=n.defaultQueryOptions(e);a._optimisticResults=o?"isRestoring":"optimistic",HZ(a),$Z(a,i),BZ(i);const[s]=A.useState(()=>new t(n,a)),c=s.getOptimisticResult(a);if(A.useSyncExternalStore(A.useCallback(l=>{const u=o?()=>{}:s.subscribe(ti.batchCalls(l));return s.updateResult(),u},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),A.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),HR(a,c))throw zR(a,s,i);if(UZ({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:n.getQueryCache().get(a.queryHash)}))throw c.error;return a.notifyOnChangeProps?c:s.trackResult(c)}function da(e,t){return zZ(e,zI,t)}function xs(e,t){const r=B2(t),[n]=A.useState(()=>new WRe(r,e));A.useEffect(()=>{n.setOptions(e)},[n,e]);const o=A.useSyncExternalStore(A.useCallback(a=>n.subscribe(ti.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=A.useCallback((a,s)=>{n.mutate(a,s).catch(YRe)},[n]);if(o.error&&LZ(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function jR(e,t){return zZ(e,VRe,t)}function jZ(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=jZ(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function d0(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=jZ(e))&&(n&&(n+=" "),n+=t);return n}let QRe={data:""},ZRe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||QRe,JRe=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,e5e=/\/\*[^]*?\*\/|  +/g,jU=/\n+/g,Up=(e,t)=>{let r="",n="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+a+";":n+=i[1]=="f"?Up(a,i):i+"{"+Up(a,i[1]=="k"?"":t)+"}":typeof a=="object"?n+=Up(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Up.p?Up.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},_d={},VZ=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+VZ(e[r]);return t}return e},t5e=(e,t,r,n,o)=>{let i=VZ(e),a=_d[i]||(_d[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!_d[a]){let c=i!==e?e:(l=>{let u,f,d=[{}];for(;u=JRe.exec(l.replace(e5e,""));)u[4]?d.shift():u[3]?(f=u[3].replace(jU," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(jU," ").trim();return d[0]})(e);_d[a]=Up(o?{["@keyframes "+a]:c}:c,r?"":"."+a)}let s=r&&_d.g?_d.g:null;return r&&(_d.g=_d[a]),((c,l,u,f)=>{f?l.data=l.data.replace(f,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(_d[a],t,n,s),a},r5e=(e,t,r)=>e.reduce((n,o,i)=>{let a=t[i];if(a&&a.call){let s=a(r),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=c?"."+c:s&&typeof s=="object"?s.props?"":Up(s,""):s===!1?"":s}return n+o+(a??"")},"");function FD(e){let t=this||{},r=e.call?e(t.p):e;return t5e(r.unshift?r.raw?r5e(r,[].slice.call(arguments,1),t.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(t.p):o),{}):r,ZRe(t.target),t.g,t.o,t.k)}FD.bind({g:1});FD.bind({k:1});function VU(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WZ(e,t,r){return t&&VU(e.prototype,t),r&&VU(e,r),e}function co(){return co=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},co.apply(this,arguments)}function GZ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function U2(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function WU(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var GU=function(){return""},qZ=sr.createContext({enqueueSnackbar:GU,closeSnackbar:GU}),Np={downXs:"@media (max-width:599.95px)",upSm:"@media (min-width:600px)"},qU=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},ND=function(t){return""+qU(t.vertical)+qU(t.horizontal)},KS=function(t){return!!t||t===0},YS="unmounted",ig="exited",ag="entering",Xy="entered",KU="exiting",LD=function(e){GZ(t,e);function t(n){var o;o=e.call(this,n)||this;var i=n.appear,a;return o.appearStatus=null,n.in?i?(a=ig,o.appearStatus=ag):a=Xy:n.unmountOnExit||n.mountOnEnter?a=YS:a=ig,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===YS?{status:ig}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==ag&&a!==Xy&&(i=ag):(a===ag||a===Xy)&&(i=KU)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i=o,a=o;return o!=null&&typeof o!="number"&&typeof o!="string"&&(a=o.exit,i=o.enter),{exit:a,enter:i}},r.updateStatus=function(o,i){o===void 0&&(o=!1),i!==null?(this.cancelNextCallback(),i===ag?this.performEnter(o):this.performExit()):this.props.unmountOnExit&&this.state.status===ig&&this.setState({status:YS})},r.performEnter=function(o){var i=this,a=this.props.enter,s=o,c=this.getTimeouts();if(!o&&!a){this.safeSetState({status:Xy},function(){i.props.onEntered&&i.props.onEntered(i.node,s)});return}this.props.onEnter&&this.props.onEnter(this.node,s),this.safeSetState({status:ag},function(){i.props.onEntering&&i.props.onEntering(i.node,s),i.onTransitionEnd(c.enter,function(){i.safeSetState({status:Xy},function(){i.props.onEntered&&i.props.onEntered(i.node,s)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts();if(!i){this.safeSetState({status:ig},function(){o.props.onExited&&o.props.onExited(o.node)});return}this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:KU},function(){o.props.onExiting&&o.props.onExiting(o.node),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:ig},function(){o.props.onExited&&o.props.onExited(o.node)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(){a&&(a=!1,i.nextCallback=null,o())},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=o==null&&!this.props.addEndListener;if(!this.node||a){setTimeout(this.nextCallback,0);return}this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===YS)return null;var i=this.props,a=i.children,s=U2(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return a(o,s)},WZ(t,[{key:"node",get:function(){var o,i=(o=this.props.nodeRef)===null||o===void 0?void 0:o.current;if(!i)throw new Error("notistack - Custom snackbar is not refForwarding");return i}}]),t}(sr.Component);function sg(){}LD.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:sg,onEntering:sg,onEntered:sg,onExit:sg,onExiting:sg,onExited:sg};function YU(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function VR(e,t){return A.useMemo(function(){return e==null&&t==null?null:function(r){YU(e,r),YU(t,r)}},[e,t])}function sE(e){var t=e.timeout,r=e.style,n=r===void 0?{}:r,o=e.mode;return{duration:typeof t=="object"?t[o]||0:t,easing:n.transitionTimingFunction,delay:n.transitionDelay}}var WR={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},KZ=function(t){t.scrollTop=t.scrollTop},XU=function(t){return Math.round(t)+"ms"};function Gg(e,t){e===void 0&&(e=["all"]);var r=t||{},n=r.duration,o=n===void 0?300:n,i=r.easing,a=i===void 0?WR.easeInOut:i,s=r.delay,c=s===void 0?0:s,l=Array.isArray(e)?e:[e];return l.map(function(u){var f=typeof o=="string"?o:XU(o),d=typeof c=="string"?c:XU(c);return u+" "+f+" "+a+" "+d}).join(",")}function n5e(e){return e&&e.ownerDocument||document}function YZ(e){var t=n5e(e);return t.defaultView||window}function o5e(e,t){t===void 0&&(t=166);var r;function n(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var c=function(){e.apply(o,a)};clearTimeout(r),r=setTimeout(c,t)}return n.clear=function(){clearTimeout(r)},n}function i5e(e,t){var r=t.getBoundingClientRect(),n=YZ(t),o;if(t.fakeTransform)o=t.fakeTransform;else{var i=n.getComputedStyle(t);o=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var a=0,s=0;if(o&&o!=="none"&&typeof o=="string"){var c=o.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),s=parseInt(c[5],10)}switch(e){case"left":return"translateX("+(n.innerWidth+a-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-a)+"px)";case"up":return"translateY("+(n.innerHeight+s-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-s)+"px)"}}function XS(e,t){if(t){var r=i5e(e,t);r&&(t.style.webkitTransform=r,t.style.transform=r)}}var XZ=A.forwardRef(function(e,t){var r=e.children,n=e.direction,o=n===void 0?"down":n,i=e.in,a=e.style,s=e.timeout,c=s===void 0?0:s,l=e.onEnter,u=e.onEntered,f=e.onExit,d=e.onExited,h=U2(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),p=A.useRef(null),g=VR(r.ref,p),m=VR(g,t),v=function(O,D){XS(o,O),KZ(O),l&&l(O,D)},y=function(O){var D=(a==null?void 0:a.transitionTimingFunction)||WR.easeOut,N=sE({timeout:c,mode:"enter",style:co({},a,{transitionTimingFunction:D})});O.style.webkitTransition=Gg("-webkit-transform",N),O.style.transition=Gg("transform",N),O.style.webkitTransform="none",O.style.transform="none"},b=function(O){var D=(a==null?void 0:a.transitionTimingFunction)||WR.sharp,N=sE({timeout:c,mode:"exit",style:co({},a,{transitionTimingFunction:D})});O.style.webkitTransition=Gg("-webkit-transform",N),O.style.transition=Gg("transform",N),XS(o,O),f&&f(O)},w=function(O){O.style.webkitTransition="",O.style.transition="",d&&d(O)},E=A.useCallback(function(){p.current&&XS(o,p.current)},[o]);return A.useEffect(function(){if(!(i||o==="down"||o==="right")){var I=o5e(function(){p.current&&XS(o,p.current)}),O=YZ(p.current);return O.addEventListener("resize",I),function(){I.clear(),O.removeEventListener("resize",I)}}},[o,i]),A.useEffect(function(){i||E()},[i,E]),A.createElement(LD,Object.assign({appear:!0,nodeRef:p,onEnter:v,onEntered:u,onEntering:y,onExit:b,onExited:w,in:i,timeout:c},h),function(I,O){return A.cloneElement(r,co({ref:m,style:co({visibility:I==="exited"&&!i?"hidden":void 0},a,{},r.props.style)},O))})});XZ.displayName="Slide";var jI=function(t){return sr.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},t))},a5e=function(){return sr.createElement(jI,null,sr.createElement("path",{d:`M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41
        10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},s5e=function(){return sr.createElement(jI,null,sr.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},l5e=function(){return sr.createElement(jI,null,sr.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
        6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
        13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},c5e=function(){return sr.createElement(jI,null,sr.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
        0 22,12A10,10 0 0,0 12,2Z`}))},u5e={default:void 0,success:sr.createElement(a5e,null),warning:sr.createElement(s5e,null),error:sr.createElement(l5e,null),info:sr.createElement(c5e,null)},Cm={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:u5e,anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:XZ,transitionDuration:{enter:225,exit:195}},d5e=function(t,r){var n=function(i){return typeof i=="number"||i===null};return n(t)?t:n(r)?r:Cm.autoHideDuration},f5e=function(t,r){var n=function(i,a){return a.some(function(s){return typeof i===s})};return n(t,["string","number"])?t:n(t,["object"])?co({},Cm.transitionDuration,{},n(r,["object"])&&r,{},t):n(r,["string","number"])?r:n(r,["object"])?co({},Cm.transitionDuration,{},r):Cm.transitionDuration},h5e=function(t,r){return function(n,o){return o===void 0&&(o=!1),o?co({},Cm[n],{},r[n],{},t[n]):n==="autoHideDuration"?d5e(t.autoHideDuration,r.autoHideDuration):n==="transitionDuration"?f5e(t.transitionDuration,r.transitionDuration):t[n]||r[n]||Cm[n]}};function H2(e){return Object.entries(e).reduce(function(t,r){var n,o=r[0],i=r[1];return co({},t,(n={},n[o]=FD(i),n))},{})}var d1={SnackbarContainer:"notistack-SnackbarContainer",Snackbar:"notistack-Snackbar",CollapseWrapper:"notistack-CollapseWrapper",MuiContent:"notistack-MuiContent",MuiContentVariant:function(t){return"notistack-MuiContent-"+t}},QU=H2({root:{height:0},entered:{height:"auto"}}),HA="0px",zA=175,QZ=A.forwardRef(function(e,t){var r=e.children,n=e.in,o=e.onExited,i=A.useRef(null),a=A.useRef(null),s=VR(t,a),c=function(){return i.current?i.current.clientHeight:0},l=function(g){g.style.height=HA},u=function(g){var m=c(),v=sE({timeout:zA,mode:"enter"}),y=v.duration,b=v.easing;g.style.transitionDuration=typeof y=="string"?y:y+"ms",g.style.height=m+"px",g.style.transitionTimingFunction=b||""},f=function(g){g.style.height="auto"},d=function(g){g.style.height=c()+"px"},h=function(g){KZ(g);var m=sE({timeout:zA,mode:"exit"}),v=m.duration,y=m.easing;g.style.transitionDuration=typeof v=="string"?v:v+"ms",g.style.height=HA,g.style.transitionTimingFunction=y||""};return A.createElement(LD,{in:n,unmountOnExit:!0,onEnter:l,onEntered:f,onEntering:u,onExit:d,onExited:o,onExiting:h,nodeRef:a,timeout:zA},function(p,g){return A.createElement("div",Object.assign({ref:s,className:d0(QU.root,p==="entered"&&QU.entered),style:co({pointerEvents:"all",overflow:"hidden",minHeight:HA,transition:Gg("height")},p==="entered"&&{overflow:"visible"},{},p==="exited"&&!n&&{visibility:"hidden"})},g),A.createElement("div",{ref:i,className:d1.CollapseWrapper,style:{display:"flex",width:"100%"}},r))})});QZ.displayName="Collapse";var ZU={right:"left",left:"right",bottom:"up",top:"down"},p5e=function(t){return t.horizontal!=="center"?ZU[t.horizontal]:ZU[t.vertical]},m5e=function(t){return"anchorOrigin"+ND(t)},g5e=function(t){t===void 0&&(t={});var r={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(t).filter(function(n){return!r[n]}).reduce(function(n,o){var i;return co({},n,(i={},i[o]=t[o],i))},{})},v5e=function(){};function aw(e,t){return e.reduce(function(r,n){return n==null?r:function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var c=[].concat(a);t&&c.indexOf(t)===-1&&c.push(t),r.apply(this,c),n.apply(this,c)}},v5e)}var y5e=typeof window<"u"?A.useLayoutEffect:A.useEffect;function JU(e){var t=A.useRef(e);return y5e(function(){t.current=e}),A.useCallback(function(){return t.current.apply(void 0,arguments)},[])}var ZZ=A.forwardRef(function(e,t){var r=e.children,n=e.className,o=e.autoHideDuration,i=e.disableWindowBlurListener,a=i===void 0?!1:i,s=e.onClose,c=e.id,l=e.open,u=e.SnackbarProps,f=u===void 0?{}:u,d=A.useRef(),h=JU(function(){s&&s.apply(void 0,arguments)}),p=JU(function(b){!s||b==null||(d.current&&clearTimeout(d.current),d.current=setTimeout(function(){h(null,"timeout",c)},b))});A.useEffect(function(){return l&&p(o),function(){d.current&&clearTimeout(d.current)}},[l,o,p]);var g=function(){d.current&&clearTimeout(d.current)},m=A.useCallback(function(){o!=null&&p(o*.5)},[o,p]),v=function(w){f.onMouseEnter&&f.onMouseEnter(w),g()},y=function(w){f.onMouseLeave&&f.onMouseLeave(w),m()};return A.useEffect(function(){if(!a&&l)return window.addEventListener("focus",m),window.addEventListener("blur",g),function(){window.removeEventListener("focus",m),window.removeEventListener("blur",g)}},[a,m,l]),A.createElement("div",Object.assign({ref:t},f,{className:d0(d1.Snackbar,n),onMouseEnter:v,onMouseLeave:y}),r)});ZZ.displayName="Snackbar";var jA,b5e=H2({root:(jA={display:"flex",flexWrap:"wrap",flexGrow:1},jA[Np.upSm]={flexGrow:"initial",minWidth:"288px"},jA)}),JZ=A.forwardRef(function(e,t){var r=e.className,n=U2(e,["className"]);return sr.createElement("div",Object.assign({ref:t,className:d0(b5e.root,r)},n))});JZ.displayName="SnackbarContent";var Qy=H2({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:8*2.5+"px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),eH="notistack-snackbar",eJ=A.forwardRef(function(e,t){var r=e.id,n=e.message,o=e.action,i=e.iconVariant,a=e.variant,s=e.hideIconVariant,c=e.style,l=e.className,u=i[a],f=o;return typeof f=="function"&&(f=f(r)),sr.createElement(JZ,{ref:t,role:"alert","aria-describedby":eH,style:c,className:d0(d1.MuiContent,d1.MuiContentVariant(a),Qy.root,Qy[a],l,!s&&u&&Qy.lessPadding)},sr.createElement("div",{id:eH,className:Qy.message},s?null:u,n),f&&sr.createElement("div",{className:Qy.action},f))});eJ.displayName="MaterialDesignContent";var tJ=A.memo(eJ),w5e=H2({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),x5e=function(t){var r=A.useRef(),n=A.useState(!0),o=n[0],i=n[1],a=aw([t.snack.onClose,t.onClose]),s=function(){t.snack.requestClose&&a(null,"instructed",t.snack.id)},c=A.useCallback(function(){r.current=setTimeout(function(){i(function(N){return!N})},125)},[]);A.useEffect(function(){return function(){r.current&&clearTimeout(r.current)}},[]);var l=t.snack,u=t.classes,f=t.Component,d=f===void 0?tJ:f,h=A.useMemo(function(){return g5e(u)},[u]),p=l.open,g=l.SnackbarProps,m=l.TransitionComponent,v=l.TransitionProps,y=l.transitionDuration,b=l.disableWindowBlurListener,w=l.content,E=U2(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),I=co({direction:p5e(E.anchorOrigin),timeout:y},v),O=w;typeof O=="function"&&(O=O(E.id,E.message));var D=["onEnter","onEntered","onExit","onExited"].reduce(function(N,U){var B;return co({},N,(B={},B[U]=aw([t.snack[U],t[U]],E.id),B))},{});return sr.createElement(QZ,{in:o,onExited:D.onExited},sr.createElement(ZZ,{open:p,id:E.id,disableWindowBlurListener:b,autoHideDuration:E.autoHideDuration,className:d0(w5e.wrappedRoot,h.root,h[m5e(E.anchorOrigin)]),SnackbarProps:g,onClose:a},sr.createElement(m,Object.assign({},I,{appear:!0,in:p,onExit:D.onExit,onExited:c,onEnter:D.onEnter,onEntered:aw([D.onEntered,s],E.id)}),O||sr.createElement(d,Object.assign({},E)))))},Zy,VA,QS,ZS,WA,kd={view:{default:20,dense:4},snackbar:{default:6,dense:2}},tH="."+d1.CollapseWrapper,GA=16,JS=H2({root:(Zy={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Gg(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Zy[tH]={padding:kd.snackbar.default+"px 0px",transition:"padding 300ms ease 0ms"},Zy.maxWidth="calc(100% - "+kd.view.default*2+"px)",Zy[Np.downXs]={width:"100%",maxWidth:"calc(100% - "+GA*2+"px)"},Zy),rootDense:(VA={},VA[tH]={padding:kd.snackbar.dense+"px 0px"},VA),top:{top:kd.view.default-kd.snackbar.default+"px",flexDirection:"column"},bottom:{bottom:kd.view.default-kd.snackbar.default+"px",flexDirection:"column-reverse"},left:(QS={left:kd.view.default+"px"},QS[Np.upSm]={alignItems:"flex-start"},QS[Np.downXs]={left:GA+"px"},QS),right:(ZS={right:kd.view.default+"px"},ZS[Np.upSm]={alignItems:"flex-end"},ZS[Np.downXs]={right:GA+"px"},ZS),center:(WA={left:"50%",transform:"translateX(-50%)"},WA[Np.upSm]={alignItems:"center"},WA)}),C5e=function(t){var r=t.classes,n=r===void 0?{}:r,o=t.anchorOrigin,i=t.dense,a=t.children,s=d0(d1.SnackbarContainer,JS[o.vertical],JS[o.horizontal],JS.root,n.containerRoot,n["containerAnchorOrigin"+ND(o)],i&&JS.rootDense);return sr.createElement("div",{className:s},a)},S5e=A.memo(C5e),rH=function(t){var r=typeof t=="string"||A.isValidElement(t);return!r},_5e=function(e){GZ(t,e);function t(n){var o;return o=e.call(this,n)||this,o.enqueueSnackbar=function(i,a){if(a===void 0&&(a={}),i==null)throw new Error("enqueueSnackbar called with invalid argument");var s=rH(i)?i:a,c=rH(i)?i.message:i,l=s.key,u=s.preventDuplicate,f=U2(s,["key","preventDuplicate"]),d=KS(l),h=d?l:new Date().getTime()+Math.random(),p=h5e(f,o.props),g=co({id:h},f,{message:c,open:!0,entered:!1,requestClose:!1,persist:p("persist"),action:p("action"),content:p("content"),variant:p("variant"),anchorOrigin:p("anchorOrigin"),disableWindowBlurListener:p("disableWindowBlurListener"),autoHideDuration:p("autoHideDuration"),hideIconVariant:p("hideIconVariant"),TransitionComponent:p("TransitionComponent"),transitionDuration:p("transitionDuration"),TransitionProps:p("TransitionProps",!0),iconVariant:p("iconVariant",!0),style:p("style",!0),SnackbarProps:p("SnackbarProps",!0),className:d0(o.props.className,f.className)});return g.persist&&(g.autoHideDuration=void 0),o.setState(function(m){if(u===void 0&&o.props.preventDuplicate||u){var v=function(E){return d?E.id===h:E.message===c},y=m.queue.findIndex(v)>-1,b=m.snacks.findIndex(v)>-1;if(y||b)return m}return o.handleDisplaySnack(co({},m,{queue:[].concat(m.queue,[g])}))}),h},o.handleDisplaySnack=function(i){var a=i.snacks;return a.length>=o.maxSnack?o.handleDismissOldest(i):o.processQueue(i)},o.processQueue=function(i){var a=i.queue,s=i.snacks;return a.length>0?co({},i,{snacks:[].concat(s,[a[0]]),queue:a.slice(1,a.length)}):i},o.handleDismissOldest=function(i){if(i.snacks.some(function(u){return!u.open||u.requestClose}))return i;var a=!1,s=!1,c=i.snacks.reduce(function(u,f){return u+(f.open&&f.persist?1:0)},0);c===o.maxSnack&&(s=!0);var l=i.snacks.map(function(u){return!a&&(!u.persist||s)?(a=!0,u.entered?(u.onClose&&u.onClose(null,"maxsnack",u.id),o.props.onClose&&o.props.onClose(null,"maxsnack",u.id),co({},u,{open:!1})):co({},u,{requestClose:!0})):co({},u)});return co({},i,{snacks:l})},o.handleEnteredSnack=function(i,a,s){if(!KS(s))throw new Error("handleEnteredSnack Cannot be called with undefined key");o.setState(function(c){var l=c.snacks;return{snacks:l.map(function(u){return u.id===s?co({},u,{entered:!0}):co({},u)})}})},o.handleCloseSnack=function(i,a,s){o.props.onClose&&o.props.onClose(i,a,s);var c=s===void 0;o.setState(function(l){var u=l.snacks,f=l.queue;return{snacks:u.map(function(d){return!c&&d.id!==s?co({},d):d.entered?co({},d,{open:!1}):co({},d,{requestClose:!0})}),queue:f.filter(function(d){return d.id!==s})}})},o.closeSnackbar=function(i){var a=o.state.snacks.find(function(s){return s.id===i});KS(i)&&a&&a.onClose&&a.onClose(null,"instructed",i),o.handleCloseSnack(null,"instructed",i)},o.handleExitedSnack=function(i,a){if(!KS(a))throw new Error("handleExitedSnack Cannot be called with undefined key");o.setState(function(s){var c=o.processQueue(co({},s,{snacks:s.snacks.filter(function(l){return l.id!==a})}));return c.queue.length===0?c:o.handleDismissOldest(c)})},o.enqueueSnackbar,o.closeSnackbar,o.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:o.enqueueSnackbar.bind(WU(o)),closeSnackbar:o.closeSnackbar.bind(WU(o))}},o}var r=t.prototype;return r.render=function(){var o=this,i=this.state.contextValue,a=this.props,s=a.domRoot,c=a.children,l=a.dense,u=l===void 0?!1:l,f=a.Components,d=f===void 0?{}:f,h=a.classes,p=this.state.snacks.reduce(function(m,v){var y,b=ND(v.anchorOrigin),w=m[b]||[];return co({},m,(y={},y[b]=[].concat(w,[v]),y))},{}),g=Object.keys(p).map(function(m){var v=p[m],y=v[0];return sr.createElement(S5e,{key:m,dense:u,anchorOrigin:y.anchorOrigin,classes:h},v.map(function(b){return sr.createElement(x5e,{key:b.id,snack:b,classes:h,Component:d[b.variant],onClose:o.handleCloseSnack,onEnter:o.props.onEnter,onExit:o.props.onExit,onExited:aw([o.handleExitedSnack,o.props.onExited],b.id),onEntered:aw([o.handleEnteredSnack,o.props.onEntered],b.id)})}))});return sr.createElement(qZ.Provider,{value:i},c,s?ip.createPortal(g,s):g)},WZ(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Cm.maxSnack}}]),t}(A.Component),rJ=function(){return A.useContext(qZ)};/**
 * @remix-run/router v1.13.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Zo(){return Zo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zo.apply(this,arguments)}var ui;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ui||(ui={}));const nH="popstate";function k5e(e){e===void 0&&(e={});function t(n,o){let{pathname:i,search:a,hash:s}=n.location;return cx("",{pathname:i,search:a,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:zm(o)}return T5e(t,r,null,e)}function cn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Hm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function E5e(){return Math.random().toString(36).substr(2,8)}function oH(e,t){return{usr:e.state,key:e.key,idx:t}}function cx(e,t,r,n){return r===void 0&&(r=null),Zo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?wf(t):t,{state:r,key:t&&t.key||n||E5e()})}function zm(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function wf(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function T5e(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,s=ui.Pop,c=null,l=u();l==null&&(l=0,a.replaceState(Zo({},a.state,{idx:l}),""));function u(){return(a.state||{idx:null}).idx}function f(){s=ui.Pop;let m=u(),v=m==null?null:m-l;l=m,c&&c({action:s,location:g.location,delta:v})}function d(m,v){s=ui.Push;let y=cx(g.location,m,v);r&&r(y,m),l=u()+1;let b=oH(y,l),w=g.createHref(y);try{a.pushState(b,"",w)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(w)}i&&c&&c({action:s,location:g.location,delta:1})}function h(m,v){s=ui.Replace;let y=cx(g.location,m,v);r&&r(y,m),l=u();let b=oH(y,l),w=g.createHref(y);a.replaceState(b,"",w),i&&c&&c({action:s,location:g.location,delta:0})}function p(m){let v=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof m=="string"?m:zm(m);return cn(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let g={get action(){return s},get location(){return e(o,a)},listen(m){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(nH,f),c=m,()=>{o.removeEventListener(nH,f),c=null}},createHref(m){return t(o,m)},createURL:p,encodeLocation(m){let v=p(m);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:d,replace:h,go(m){return a.go(m)}};return g}var di;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(di||(di={}));const I5e=new Set(["lazy","caseSensitive","path","id","index","children"]);function A5e(e){return e.index===!0}function GR(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((o,i)=>{let a=[...r,i],s=typeof o.id=="string"?o.id:a.join("-");if(cn(o.index!==!0||!o.children,"Cannot specify children on an index route"),cn(!n[s],'Found a route id collision on id "'+s+`".  Route id's must be globally unique within Data Router usages`),A5e(o)){let c=Zo({},o,t(o),{id:s});return n[s]=c,c}else{let c=Zo({},o,t(o),{id:s,children:void 0});return n[s]=c,o.children&&(c.children=GR(o.children,t,a,n)),c}})}function qg(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?wf(t):t,o=G1(n.pathname||"/",r);if(o==null)return null;let i=nJ(e);M5e(i);let a=null;for(let s=0;a==null&&s<i.length;++s)a=U5e(i[s],j5e(o));return a}function P5e(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function nJ(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(i,a,s)=>{let c={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(cn(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=Yd([n,c.relativePath]),u=r.concat(c);i.children&&i.children.length>0&&(cn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),nJ(i.children,t,u,l)),!(i.path==null&&!i.index)&&t.push({path:l,score:$5e(l,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let c of oJ(i.path))o(i,a,c)}),t}function oJ(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=oJ(n.join("/")),s=[];return s.push(...a.map(c=>c===""?i:[i,c].join("/"))),o&&s.push(...a),s.map(c=>e.startsWith("/")&&c===""?"/":c)}function M5e(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:B5e(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const R5e=/^:\w+$/,O5e=3,D5e=2,F5e=1,N5e=10,L5e=-2,iH=e=>e==="*";function $5e(e,t){let r=e.split("/"),n=r.length;return r.some(iH)&&(n+=L5e),t&&(n+=D5e),r.filter(o=>!iH(o)).reduce((o,i)=>o+(R5e.test(i)?O5e:i===""?F5e:N5e),n)}function B5e(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function U5e(e,t){let{routesMeta:r}=e,n={},o="/",i=[];for(let a=0;a<r.length;++a){let s=r[a],c=a===r.length-1,l=o==="/"?t:t.slice(o.length)||"/",u=H5e({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l);if(!u)return null;Object.assign(n,u.params);let f=s.route;i.push({params:n,pathname:Yd([o,u.pathname]),pathnameBase:q5e(Yd([o,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(o=Yd([o,u.pathnameBase]))}return i}function H5e(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=z5e(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce((l,u,f)=>{let{paramName:d,isOptional:h}=u;if(d==="*"){let g=s[f]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const p=s[f];return h&&!p?l[d]=void 0:l[d]=V5e(p||"",d),l},{}),pathname:i,pathnameBase:a,pattern:e}}function z5e(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Hm(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(a,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function j5e(e){try{return decodeURI(e)}catch(t){return Hm(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function V5e(e,t){try{return decodeURIComponent(e)}catch(r){return Hm(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function G1(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function W5e(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?wf(e):e;return{pathname:r?r.startsWith("/")?r:G5e(r,t):t,search:K5e(n),hash:Y5e(o)}}function G5e(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function qA(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function z2(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function VI(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=wf(e):(o=Zo({},e),cn(!o.pathname||!o.pathname.includes("?"),qA("?","pathname","search",o)),cn(!o.pathname||!o.pathname.includes("#"),qA("#","pathname","hash",o)),cn(!o.search||!o.search.includes("#"),qA("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=r;else if(n){let f=t[t.length-1].replace(/^\//,"").split("/");if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f.pop();o.pathname=d.join("/")}s="/"+f.join("/")}else{let f=t.length-1;if(a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}s=f>=0?t[f]:"/"}let c=W5e(o,s),l=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}const Yd=e=>e.join("/").replace(/\/\/+/g,"/"),q5e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),K5e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Y5e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class $D{constructor(t,r,n,o){o===void 0&&(o=!1),this.status=t,this.statusText=r||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function iJ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const aJ=["post","put","patch","delete"],X5e=new Set(aJ),Q5e=["get",...aJ],Z5e=new Set(Q5e),J5e=new Set([301,302,303,307,308]),e6e=new Set([307,308]),KA={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},t6e={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Jy={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},sJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,r6e=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),lJ="remix-router-transitions";function n6e(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;cn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let Ue=e.detectErrorBoundary;o=Ye=>({hasErrorBoundary:Ue(Ye)})}else o=r6e;let i={},a=GR(e.routes,o,void 0,i),s,c=e.basename||"/",l=Zo({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),u=null,f=new Set,d=null,h=null,p=null,g=e.hydrationData!=null,m=qg(a,e.history.location,c),v=null;if(m==null){let Ue=ql(404,{pathname:e.history.location.pathname}),{matches:Ye,route:tt}=hH(a);m=Ye,v={[tt.id]:Ue}}let y=!m.some(Ue=>Ue.route.lazy)&&(!m.some(Ue=>Ue.route.loader)||e.hydrationData!=null),b,w={historyAction:e.history.action,location:e.history.location,matches:m,initialized:y,navigation:KA,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},E=ui.Pop,I=!1,O,D=!1,N=new Map,U=null,B=!1,F=!1,T=[],P=[],_=new Map,C=0,S=-1,x=new Map,k=new Set,L=new Map,j=new Map,z=new Set,Y=new Map,K=new Map,Q=!1;function q(){if(u=e.history.listen(Ue=>{let{action:Ye,location:tt,delta:st}=Ue;if(Q){Q=!1;return}Hm(K.size===0||st!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let mt=Qe({currentLocation:w.location,nextLocation:tt,historyAction:Ye});if(mt&&st!=null){Q=!0,e.history.go(st*-1),Ne(mt,{state:"blocked",location:tt,proceed(){Ne(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:tt}),e.history.go(st)},reset(){let _t=new Map(w.blockers);_t.set(mt,Jy),V({blockers:_t})}});return}return re(Ye,tt)}),r){p6e(t,N);let Ue=()=>m6e(t,N);t.addEventListener("pagehide",Ue),U=()=>t.removeEventListener("pagehide",Ue)}return w.initialized||re(ui.Pop,w.location),b}function J(){u&&u(),U&&U(),f.clear(),O&&O.abort(),w.fetchers.forEach((Ue,Ye)=>ge(Ye)),w.blockers.forEach((Ue,Ye)=>Ze(Ye))}function G(Ue){return f.add(Ue),()=>f.delete(Ue)}function V(Ue,Ye){Ye===void 0&&(Ye={}),w=Zo({},w,Ue);let tt=[],st=[];l.v7_fetcherPersist&&w.fetchers.forEach((mt,_t)=>{mt.state==="idle"&&(z.has(_t)?st.push(_t):tt.push(_t))}),[...f].forEach(mt=>mt(w,{deletedFetchers:st,unstable_viewTransitionOpts:Ye.viewTransitionOpts,unstable_flushSync:Ye.flushSync===!0})),l.v7_fetcherPersist&&(tt.forEach(mt=>w.fetchers.delete(mt)),st.forEach(mt=>ge(mt)))}function X(Ue,Ye,tt){var st,mt;let{flushSync:_t}=tt===void 0?{}:tt,Pt=w.actionData!=null&&w.navigation.formMethod!=null&&Bc(w.navigation.formMethod)&&w.navigation.state==="loading"&&((st=Ue.state)==null?void 0:st._isRedirect)!==!0,Ut;Ye.actionData?Object.keys(Ye.actionData).length>0?Ut=Ye.actionData:Ut=null:Pt?Ut=w.actionData:Ut=null;let wt=Ye.loaderData?fH(w.loaderData,Ye.loaderData,Ye.matches||[],Ye.errors):w.loaderData,Dt=w.blockers;Dt.size>0&&(Dt=new Map(Dt),Dt.forEach((Me,Ge)=>Dt.set(Ge,Jy)));let qt=I===!0||w.navigation.formMethod!=null&&Bc(w.navigation.formMethod)&&((mt=Ue.state)==null?void 0:mt._isRedirect)!==!0;s&&(a=s,s=void 0),B||E===ui.Pop||(E===ui.Push?e.history.push(Ue,Ue.state):E===ui.Replace&&e.history.replace(Ue,Ue.state));let Tt;if(E===ui.Pop){let Me=N.get(w.location.pathname);Me&&Me.has(Ue.pathname)?Tt={currentLocation:w.location,nextLocation:Ue}:N.has(Ue.pathname)&&(Tt={currentLocation:Ue,nextLocation:w.location})}else if(D){let Me=N.get(w.location.pathname);Me?Me.add(Ue.pathname):(Me=new Set([Ue.pathname]),N.set(w.location.pathname,Me)),Tt={currentLocation:w.location,nextLocation:Ue}}V(Zo({},Ye,{actionData:Ut,loaderData:wt,historyAction:E,location:Ue,initialized:!0,navigation:KA,revalidation:"idle",restoreScrollPosition:Qt(Ue,Ye.matches||w.matches),preventScrollReset:qt,blockers:Dt}),{viewTransitionOpts:Tt,flushSync:_t===!0}),E=ui.Pop,I=!1,D=!1,B=!1,F=!1,T=[],P=[]}async function te(Ue,Ye){if(typeof Ue=="number"){e.history.go(Ue);return}let tt=qR(w.location,w.matches,c,l.v7_prependBasename,Ue,Ye==null?void 0:Ye.fromRouteId,Ye==null?void 0:Ye.relative),{path:st,submission:mt,error:_t}=aH(l.v7_normalizeFormMethod,!1,tt,Ye),Pt=w.location,Ut=cx(w.location,st,Ye&&Ye.state);Ut=Zo({},Ut,e.history.encodeLocation(Ut));let wt=Ye&&Ye.replace!=null?Ye.replace:void 0,Dt=ui.Push;wt===!0?Dt=ui.Replace:wt===!1||mt!=null&&Bc(mt.formMethod)&&mt.formAction===w.location.pathname+w.location.search&&(Dt=ui.Replace);let qt=Ye&&"preventScrollReset"in Ye?Ye.preventScrollReset===!0:void 0,Tt=(Ye&&Ye.unstable_flushSync)===!0,Me=Qe({currentLocation:Pt,nextLocation:Ut,historyAction:Dt});if(Me){Ne(Me,{state:"blocked",location:Ut,proceed(){Ne(Me,{state:"proceeding",proceed:void 0,reset:void 0,location:Ut}),te(Ue,Ye)},reset(){let Ge=new Map(w.blockers);Ge.set(Me,Jy),V({blockers:Ge})}});return}return await re(Dt,Ut,{submission:mt,pendingError:_t,preventScrollReset:qt,replace:Ye&&Ye.replace,enableViewTransition:Ye&&Ye.unstable_viewTransition,flushSync:Tt})}function ee(){if(de(),V({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){re(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}re(E||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function re(Ue,Ye,tt){O&&O.abort(),O=null,E=Ue,B=(tt&&tt.startUninterruptedRevalidation)===!0,At(w.location,w.matches),I=(tt&&tt.preventScrollReset)===!0,D=(tt&&tt.enableViewTransition)===!0;let st=s||a,mt=tt&&tt.overrideNavigation,_t=qg(st,Ye,c),Pt=(tt&&tt.flushSync)===!0;if(!_t){let Ge=ql(404,{pathname:Ye.pathname}),{matches:nt,route:fe}=hH(st);Xe(),X(Ye,{matches:nt,loaderData:{},errors:{[fe.id]:Ge}},{flushSync:Pt});return}if(w.initialized&&!F&&l6e(w.location,Ye)&&!(tt&&tt.submission&&Bc(tt.submission.formMethod))){X(Ye,{matches:_t},{flushSync:Pt});return}O=new AbortController;let Ut=tb(e.history,Ye,O.signal,tt&&tt.submission),wt,Dt;if(tt&&tt.pendingError)Dt={[sw(_t).route.id]:tt.pendingError};else if(tt&&tt.submission&&Bc(tt.submission.formMethod)){let Ge=await se(Ut,Ye,tt.submission,_t,{replace:tt.replace,flushSync:Pt});if(Ge.shortCircuited)return;wt=Ge.pendingActionData,Dt=Ge.pendingActionError,mt=YA(Ye,tt.submission),Pt=!1,Ut=new Request(Ut.url,{signal:Ut.signal})}let{shortCircuited:qt,loaderData:Tt,errors:Me}=await pe(Ut,Ye,_t,mt,tt&&tt.submission,tt&&tt.fetcherSubmission,tt&&tt.replace,Pt,wt,Dt);qt||(O=null,X(Ye,Zo({matches:_t},wt?{actionData:wt}:{},{loaderData:Tt,errors:Me})))}async function se(Ue,Ye,tt,st,mt){mt===void 0&&(mt={}),de();let _t=f6e(Ye,tt);V({navigation:_t},{flushSync:mt.flushSync===!0});let Pt,Ut=YR(st,Ye);if(!Ut.route.action&&!Ut.route.lazy)Pt={type:di.error,error:ql(405,{method:Ue.method,pathname:Ye.pathname,routeId:Ut.route.id})};else if(Pt=await eb("action",Ue,Ut,st,i,o,c),Ue.signal.aborted)return{shortCircuited:!0};if(uv(Pt)){let wt;return mt&&mt.replace!=null?wt=mt.replace:wt=Pt.location===w.location.pathname+w.location.search,await oe(w,Pt,{submission:tt,replace:wt}),{shortCircuited:!0}}if(lw(Pt)){let wt=sw(st,Ut.route.id);return(mt&&mt.replace)!==!0&&(E=ui.Push),{pendingActionData:{},pendingActionError:{[wt.route.id]:Pt.error}}}if(Xp(Pt))throw ql(400,{type:"defer-action"});return{pendingActionData:{[Ut.route.id]:Pt.data}}}async function pe(Ue,Ye,tt,st,mt,_t,Pt,Ut,wt,Dt){let qt=st||YA(Ye,mt),Tt=mt||_t||gH(qt),Me=s||a,[Ge,nt]=sH(e.history,w,tt,Tt,Ye,F,T,P,z,L,k,Me,c,wt,Dt);if(Xe(Le=>!(tt&&tt.some(lt=>lt.route.id===Le))||Ge&&Ge.some(lt=>lt.route.id===Le)),S=++C,Ge.length===0&&nt.length===0){let Le=Oe();return X(Ye,Zo({matches:tt,loaderData:{},errors:Dt||null},wt?{actionData:wt}:{},Le?{fetchers:new Map(w.fetchers)}:{}),{flushSync:Ut}),{shortCircuited:!0}}if(!B){nt.forEach(lt=>{let vt=w.fetchers.get(lt.key),Bt=rb(void 0,vt?vt.data:void 0);w.fetchers.set(lt.key,Bt)});let Le=wt||w.actionData;V(Zo({navigation:qt},Le?Object.keys(Le).length===0?{actionData:null}:{actionData:Le}:{},nt.length>0?{fetchers:new Map(w.fetchers)}:{}),{flushSync:Ut})}nt.forEach(Le=>{_.has(Le.key)&&Fe(Le.key),Le.controller&&_.set(Le.key,Le.controller)});let fe=()=>nt.forEach(Le=>Fe(Le.key));O&&O.signal.addEventListener("abort",fe);let{results:ke,loaderResults:be,fetcherResults:Ce}=await le(w.matches,tt,Ge,nt,Ue);if(Ue.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",fe),nt.forEach(Le=>_.delete(Le.key));let Ee=pH(ke);if(Ee){if(Ee.idx>=Ge.length){let Le=nt[Ee.idx-Ge.length].key;k.add(Le)}return await oe(w,Ee.result,{replace:Pt}),{shortCircuited:!0}}let{loaderData:me,errors:_e}=dH(w,tt,Ge,be,Dt,nt,Ce,Y);Y.forEach((Le,lt)=>{Le.subscribe(vt=>{(vt||Le.done)&&Y.delete(lt)})});let Be=Oe(),De=$e(S),je=Be||De||nt.length>0;return Zo({loaderData:me,errors:_e},je?{fetchers:new Map(w.fetchers)}:{})}function ce(Ue,Ye,tt,st){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");_.has(Ue)&&Fe(Ue);let mt=(st&&st.unstable_flushSync)===!0,_t=s||a,Pt=qR(w.location,w.matches,c,l.v7_prependBasename,tt,Ye,st==null?void 0:st.relative),Ut=qg(_t,Pt,c);if(!Ut){we(Ue,Ye,ql(404,{pathname:Pt}),{flushSync:mt});return}let{path:wt,submission:Dt,error:qt}=aH(l.v7_normalizeFormMethod,!0,Pt,st);if(qt){we(Ue,Ye,qt,{flushSync:mt});return}let Tt=YR(Ut,wt);if(I=(st&&st.preventScrollReset)===!0,Dt&&Bc(Dt.formMethod)){ne(Ue,Ye,wt,Tt,Ut,mt,Dt);return}L.set(Ue,{routeId:Ye,path:wt}),he(Ue,Ye,wt,Tt,Ut,mt,Dt)}async function ne(Ue,Ye,tt,st,mt,_t,Pt){if(de(),L.delete(Ue),!st.route.action&&!st.route.lazy){let vt=ql(405,{method:Pt.formMethod,pathname:tt,routeId:Ye});we(Ue,Ye,vt,{flushSync:_t});return}let Ut=w.fetchers.get(Ue);ve(Ue,h6e(Pt,Ut),{flushSync:_t});let wt=new AbortController,Dt=tb(e.history,tt,wt.signal,Pt);_.set(Ue,wt);let qt=C,Tt=await eb("action",Dt,st,mt,i,o,c);if(Dt.signal.aborted){_.get(Ue)===wt&&_.delete(Ue);return}if(z.has(Ue)){ve(Ue,Xf(void 0));return}if(uv(Tt))if(_.delete(Ue),S>qt){ve(Ue,Xf(void 0));return}else return k.add(Ue),ve(Ue,rb(Pt)),oe(w,Tt,{fetcherSubmission:Pt});if(lw(Tt)){we(Ue,Ye,Tt.error);return}if(Xp(Tt))throw ql(400,{type:"defer-action"});let Me=w.navigation.location||w.location,Ge=tb(e.history,Me,wt.signal),nt=s||a,fe=w.navigation.state!=="idle"?qg(nt,w.navigation.location,c):w.matches;cn(fe,"Didn't find any matches after fetcher action");let ke=++C;x.set(Ue,ke);let be=rb(Pt,Tt.data);w.fetchers.set(Ue,be);let[Ce,Ee]=sH(e.history,w,fe,Pt,Me,F,T,P,z,L,k,nt,c,{[st.route.id]:Tt.data},void 0);Ee.filter(vt=>vt.key!==Ue).forEach(vt=>{let Bt=vt.key,Se=w.fetchers.get(Bt),He=rb(void 0,Se?Se.data:void 0);w.fetchers.set(Bt,He),_.has(Bt)&&Fe(Bt),vt.controller&&_.set(Bt,vt.controller)}),V({fetchers:new Map(w.fetchers)});let me=()=>Ee.forEach(vt=>Fe(vt.key));wt.signal.addEventListener("abort",me);let{results:_e,loaderResults:Be,fetcherResults:De}=await le(w.matches,fe,Ce,Ee,Ge);if(wt.signal.aborted)return;wt.signal.removeEventListener("abort",me),x.delete(Ue),_.delete(Ue),Ee.forEach(vt=>_.delete(vt.key));let je=pH(_e);if(je){if(je.idx>=Ce.length){let vt=Ee[je.idx-Ce.length].key;k.add(vt)}return oe(w,je.result)}let{loaderData:Le,errors:lt}=dH(w,w.matches,Ce,Be,void 0,Ee,De,Y);if(w.fetchers.has(Ue)){let vt=Xf(Tt.data);w.fetchers.set(Ue,vt)}$e(ke),w.navigation.state==="loading"&&ke>S?(cn(E,"Expected pending action"),O&&O.abort(),X(w.navigation.location,{matches:fe,loaderData:Le,errors:lt,fetchers:new Map(w.fetchers)})):(V({errors:lt,loaderData:fH(w.loaderData,Le,fe,lt),fetchers:new Map(w.fetchers)}),F=!1)}async function he(Ue,Ye,tt,st,mt,_t,Pt){let Ut=w.fetchers.get(Ue);ve(Ue,rb(Pt,Ut?Ut.data:void 0),{flushSync:_t});let wt=new AbortController,Dt=tb(e.history,tt,wt.signal);_.set(Ue,wt);let qt=C,Tt=await eb("loader",Dt,st,mt,i,o,c);if(Xp(Tt)&&(Tt=await dJ(Tt,Dt.signal,!0)||Tt),_.get(Ue)===wt&&_.delete(Ue),!Dt.signal.aborted){if(z.has(Ue)){ve(Ue,Xf(void 0));return}if(uv(Tt))if(S>qt){ve(Ue,Xf(void 0));return}else{k.add(Ue),await oe(w,Tt);return}if(lw(Tt)){we(Ue,Ye,Tt.error);return}cn(!Xp(Tt),"Unhandled fetcher deferred data"),ve(Ue,Xf(Tt.data))}}async function oe(Ue,Ye,tt){let{submission:st,fetcherSubmission:mt,replace:_t}=tt===void 0?{}:tt;Ye.revalidate&&(F=!0);let Pt=cx(Ue.location,Ye.location,{_isRedirect:!0});if(cn(Pt,"Expected a location on the redirect navigation"),r){let Me=!1;if(Ye.reloadDocument)Me=!0;else if(sJ.test(Ye.location)){const Ge=e.history.createURL(Ye.location);Me=Ge.origin!==t.location.origin||G1(Ge.pathname,c)==null}if(Me){_t?t.location.replace(Ye.location):t.location.assign(Ye.location);return}}O=null;let Ut=_t===!0?ui.Replace:ui.Push,{formMethod:wt,formAction:Dt,formEncType:qt}=Ue.navigation;!st&&!mt&&wt&&Dt&&qt&&(st=gH(Ue.navigation));let Tt=st||mt;if(e6e.has(Ye.status)&&Tt&&Bc(Tt.formMethod))await re(Ut,Pt,{submission:Zo({},Tt,{formAction:Ye.location}),preventScrollReset:I});else{let Me=YA(Pt,st);await re(Ut,Pt,{overrideNavigation:Me,fetcherSubmission:mt,preventScrollReset:I})}}async function le(Ue,Ye,tt,st,mt){let _t=await Promise.all([...tt.map(wt=>eb("loader",mt,wt,Ye,i,o,c)),...st.map(wt=>wt.matches&&wt.match&&wt.controller?eb("loader",tb(e.history,wt.path,wt.controller.signal),wt.match,wt.matches,i,o,c):{type:di.error,error:ql(404,{pathname:wt.path})})]),Pt=_t.slice(0,tt.length),Ut=_t.slice(tt.length);return await Promise.all([mH(Ue,tt,Pt,Pt.map(()=>mt.signal),!1,w.loaderData),mH(Ue,st.map(wt=>wt.match),Ut,st.map(wt=>wt.controller?wt.controller.signal:null),!0)]),{results:_t,loaderResults:Pt,fetcherResults:Ut}}function de(){F=!0,T.push(...Xe()),L.forEach((Ue,Ye)=>{_.has(Ye)&&(P.push(Ye),Fe(Ye))})}function ve(Ue,Ye,tt){tt===void 0&&(tt={}),w.fetchers.set(Ue,Ye),V({fetchers:new Map(w.fetchers)},{flushSync:(tt&&tt.flushSync)===!0})}function we(Ue,Ye,tt,st){st===void 0&&(st={});let mt=sw(w.matches,Ye);ge(Ue),V({errors:{[mt.route.id]:tt},fetchers:new Map(w.fetchers)},{flushSync:(st&&st.flushSync)===!0})}function ie(Ue){return l.v7_fetcherPersist&&(j.set(Ue,(j.get(Ue)||0)+1),z.has(Ue)&&z.delete(Ue)),w.fetchers.get(Ue)||t6e}function ge(Ue){let Ye=w.fetchers.get(Ue);_.has(Ue)&&!(Ye&&Ye.state==="loading"&&x.has(Ue))&&Fe(Ue),L.delete(Ue),x.delete(Ue),k.delete(Ue),z.delete(Ue),w.fetchers.delete(Ue)}function Pe(Ue){if(l.v7_fetcherPersist){let Ye=(j.get(Ue)||0)-1;Ye<=0?(j.delete(Ue),z.add(Ue)):j.set(Ue,Ye)}else ge(Ue);V({fetchers:new Map(w.fetchers)})}function Fe(Ue){let Ye=_.get(Ue);cn(Ye,"Expected fetch controller: "+Ue),Ye.abort(),_.delete(Ue)}function Ie(Ue){for(let Ye of Ue){let tt=ie(Ye),st=Xf(tt.data);w.fetchers.set(Ye,st)}}function Oe(){let Ue=[],Ye=!1;for(let tt of k){let st=w.fetchers.get(tt);cn(st,"Expected fetcher: "+tt),st.state==="loading"&&(k.delete(tt),Ue.push(tt),Ye=!0)}return Ie(Ue),Ye}function $e(Ue){let Ye=[];for(let[tt,st]of x)if(st<Ue){let mt=w.fetchers.get(tt);cn(mt,"Expected fetcher: "+tt),mt.state==="loading"&&(Fe(tt),x.delete(tt),Ye.push(tt))}return Ie(Ye),Ye.length>0}function et(Ue,Ye){let tt=w.blockers.get(Ue)||Jy;return K.get(Ue)!==Ye&&K.set(Ue,Ye),tt}function Ze(Ue){w.blockers.delete(Ue),K.delete(Ue)}function Ne(Ue,Ye){let tt=w.blockers.get(Ue)||Jy;cn(tt.state==="unblocked"&&Ye.state==="blocked"||tt.state==="blocked"&&Ye.state==="blocked"||tt.state==="blocked"&&Ye.state==="proceeding"||tt.state==="blocked"&&Ye.state==="unblocked"||tt.state==="proceeding"&&Ye.state==="unblocked","Invalid blocker state transition: "+tt.state+" -> "+Ye.state);let st=new Map(w.blockers);st.set(Ue,Ye),V({blockers:st})}function Qe(Ue){let{currentLocation:Ye,nextLocation:tt,historyAction:st}=Ue;if(K.size===0)return;K.size>1&&Hm(!1,"A router only supports one blocker at a time");let mt=Array.from(K.entries()),[_t,Pt]=mt[mt.length-1],Ut=w.blockers.get(_t);if(!(Ut&&Ut.state==="proceeding")&&Pt({currentLocation:Ye,nextLocation:tt,historyAction:st}))return _t}function Xe(Ue){let Ye=[];return Y.forEach((tt,st)=>{(!Ue||Ue(st))&&(tt.cancel(),Ye.push(st),Y.delete(st))}),Ye}function rt(Ue,Ye,tt){if(d=Ue,p=Ye,h=tt||null,!g&&w.navigation===KA){g=!0;let st=Qt(w.location,w.matches);st!=null&&V({restoreScrollPosition:st})}return()=>{d=null,p=null,h=null}}function ht(Ue,Ye){return h&&h(Ue,Ye.map(st=>P5e(st,w.loaderData)))||Ue.key}function At(Ue,Ye){if(d&&p){let tt=ht(Ue,Ye);d[tt]=p()}}function Qt(Ue,Ye){if(d){let tt=ht(Ue,Ye),st=d[tt];if(typeof st=="number")return st}return null}function Nt(Ue){i={},s=GR(Ue,o,void 0,i)}return b={get basename(){return c},get state(){return w},get routes(){return a},get window(){return t},initialize:q,subscribe:G,enableScrollRestoration:rt,navigate:te,fetch:ce,revalidate:ee,createHref:Ue=>e.history.createHref(Ue),encodeLocation:Ue=>e.history.encodeLocation(Ue),getFetcher:ie,deleteFetcher:Pe,dispose:J,getBlocker:et,deleteBlocker:Ze,_internalFetchControllers:_,_internalActiveDeferreds:Y,_internalSetRoutes:Nt},b}function o6e(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function qR(e,t,r,n,o,i,a){let s,c;if(i){s=[];for(let u of t)if(s.push(u),u.route.id===i){c=u;break}}else s=t,c=t[t.length-1];let l=VI(o||".",z2(s).map(u=>u.pathnameBase),G1(e.pathname,r)||e.pathname,a==="path");return o==null&&(l.search=e.search,l.hash=e.hash),(o==null||o===""||o===".")&&c&&c.route.index&&!BD(l.search)&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(l.pathname=l.pathname==="/"?r:Yd([r,l.pathname])),zm(l)}function aH(e,t,r,n){if(!n||!o6e(n))return{path:r};if(n.formMethod&&!d6e(n.formMethod))return{path:r,error:ql(405,{method:n.formMethod})};let o=()=>({path:r,error:ql(400,{type:"invalid-body"})}),i=n.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),s=uJ(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Bc(a))return o();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((h,p)=>{let[g,m]=p;return""+h+g+"="+m+`
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!Bc(a))return o();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return o()}}}cn(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=KR(n.formData),l=n.formData;else if(n.body instanceof FormData)c=KR(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=uH(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=uH(c)}catch{return o()}let u={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Bc(u.formMethod))return{path:r,submission:u};let f=wf(r);return t&&f.search&&BD(f.search)&&c.append("index",""),f.search="?"+c,{path:zm(f),submission:u}}function i6e(e,t){let r=e;if(t){let n=e.findIndex(o=>o.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function sH(e,t,r,n,o,i,a,s,c,l,u,f,d,h,p){let g=p?Object.values(p)[0]:h?Object.values(h)[0]:void 0,m=e.createURL(t.location),v=e.createURL(o),y=p?Object.keys(p)[0]:void 0,w=i6e(r,y).filter((I,O)=>{if(I.route.lazy)return!0;if(I.route.loader==null)return!1;if(a6e(t.loaderData,t.matches[O],I)||a.some(U=>U===I.route.id))return!0;let D=t.matches[O],N=I;return lH(I,Zo({currentUrl:m,currentParams:D.params,nextUrl:v,nextParams:N.params},n,{actionResult:g,defaultShouldRevalidate:i||m.pathname+m.search===v.pathname+v.search||m.search!==v.search||cJ(D,N)}))}),E=[];return l.forEach((I,O)=>{if(!r.some(F=>F.route.id===I.routeId)||c.has(O))return;let D=qg(f,I.path,d);if(!D){E.push({key:O,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(O),U=YR(D,I.path),B=!1;u.has(O)?B=!1:s.includes(O)?B=!0:N&&N.state!=="idle"&&N.data===void 0?B=i:B=lH(U,Zo({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:g,defaultShouldRevalidate:i})),B&&E.push({key:O,routeId:I.routeId,path:I.path,matches:D,match:U,controller:new AbortController})}),[w,E]}function a6e(e,t,r){let n=!t||r.route.id!==t.route.id,o=e[r.route.id]===void 0;return n||o}function cJ(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function lH(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function cH(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let o=r[e.id];cn(o,"No route found in manifest");let i={};for(let a in n){let c=o[a]!==void 0&&a!=="hasErrorBoundary";Hm(!c,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!I5e.has(a)&&(i[a]=n[a])}Object.assign(o,i),Object.assign(o,Zo({},t(o),{lazy:void 0}))}async function eb(e,t,r,n,o,i,a,s){s===void 0&&(s={});let c,l,u,f=p=>{let g,m=new Promise((v,y)=>g=y);return u=()=>g(),t.signal.addEventListener("abort",u),Promise.race([p({request:t,params:r.params,context:s.requestContext}),m])};try{let p=r.route[e];if(r.route.lazy)if(p){let g,m=await Promise.all([f(p).catch(v=>{g=v}),cH(r.route,i,o)]);if(g)throw g;l=m[0]}else if(await cH(r.route,i,o),p=r.route[e],p)l=await f(p);else if(e==="action"){let g=new URL(t.url),m=g.pathname+g.search;throw ql(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:di.data,data:void 0};else if(p)l=await f(p);else{let g=new URL(t.url),m=g.pathname+g.search;throw ql(404,{pathname:m})}cn(l!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(p){c=di.error,l=p}finally{u&&t.signal.removeEventListener("abort",u)}if(u6e(l)){let p=l.status;if(J5e.has(p)){let v=l.headers.get("Location");if(cn(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!sJ.test(v))v=qR(new URL(t.url),n.slice(0,n.indexOf(r)+1),a,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),b=v.startsWith("//")?new URL(y.protocol+v):new URL(v),w=G1(b.pathname,a)!=null;b.origin===y.origin&&w&&(v=b.pathname+b.search+b.hash)}if(s.isStaticRequest)throw l.headers.set("Location",v),l;return{type:di.redirect,status:p,location:v,revalidate:l.headers.get("X-Remix-Revalidate")!==null,reloadDocument:l.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:c===di.error?di.error:di.data,response:l};let g,m=l.headers.get("Content-Type");return m&&/\bapplication\/json\b/.test(m)?g=await l.json():g=await l.text(),c===di.error?{type:c,error:new $D(p,l.statusText,g),headers:l.headers}:{type:di.data,data:g,statusCode:l.status,headers:l.headers}}if(c===di.error)return{type:c,error:l};if(c6e(l)){var d,h;return{type:di.deferred,deferredData:l,statusCode:(d=l.init)==null?void 0:d.status,headers:((h=l.init)==null?void 0:h.headers)&&new Headers(l.init.headers)}}return{type:di.data,data:l}}function tb(e,t,r,n){let o=e.createURL(uJ(t)).toString(),i={signal:r};if(n&&Bc(n.formMethod)){let{formMethod:a,formEncType:s}=n;i.method=a.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=KR(n.formData):i.body=n.formData}return new Request(o,i)}function KR(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function uH(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function s6e(e,t,r,n,o){let i={},a=null,s,c=!1,l={};return r.forEach((u,f)=>{let d=t[f].route.id;if(cn(!uv(u),"Cannot handle redirect results in processLoaderData"),lw(u)){let h=sw(e,d),p=u.error;n&&(p=Object.values(n)[0],n=void 0),a=a||{},a[h.route.id]==null&&(a[h.route.id]=p),i[d]=void 0,c||(c=!0,s=iJ(u.error)?u.error.status:500),u.headers&&(l[d]=u.headers)}else Xp(u)?(o.set(d,u.deferredData),i[d]=u.deferredData.data):i[d]=u.data,u.statusCode!=null&&u.statusCode!==200&&!c&&(s=u.statusCode),u.headers&&(l[d]=u.headers)}),n&&(a=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:a,statusCode:s||200,loaderHeaders:l}}function dH(e,t,r,n,o,i,a,s){let{loaderData:c,errors:l}=s6e(t,r,n,o,s);for(let u=0;u<i.length;u++){let{key:f,match:d,controller:h}=i[u];cn(a!==void 0&&a[u]!==void 0,"Did not find corresponding fetcher result");let p=a[u];if(!(h&&h.signal.aborted))if(lw(p)){let g=sw(e.matches,d==null?void 0:d.route.id);l&&l[g.route.id]||(l=Zo({},l,{[g.route.id]:p.error})),e.fetchers.delete(f)}else if(uv(p))cn(!1,"Unhandled fetcher revalidation redirect");else if(Xp(p))cn(!1,"Unhandled fetcher deferred data");else{let g=Xf(p.data);e.fetchers.set(f,g)}}return{loaderData:c,errors:l}}function fH(e,t,r,n){let o=Zo({},t);for(let i of r){let a=i.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(o[a]=t[a]):e[a]!==void 0&&i.route.loader&&(o[a]=e[a]),n&&n.hasOwnProperty(a))break}return o}function sw(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function hH(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ql(e,t){let{pathname:r,routeId:n,method:o,type:i}=t===void 0?{}:t,a="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(a="Bad Request",o&&r&&n?s="You made a "+o+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",s='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",o&&r&&n?s="You made a "+o.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new $D(e||500,a,new Error(s),!0)}function pH(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(uv(r))return{result:r,idx:t}}}function uJ(e){let t=typeof e=="string"?wf(e):e;return zm(Zo({},t,{hash:""}))}function l6e(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Xp(e){return e.type===di.deferred}function lw(e){return e.type===di.error}function uv(e){return(e&&e.type)===di.redirect}function c6e(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function u6e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function d6e(e){return Z5e.has(e.toLowerCase())}function Bc(e){return X5e.has(e.toLowerCase())}async function mH(e,t,r,n,o,i){for(let a=0;a<r.length;a++){let s=r[a],c=t[a];if(!c)continue;let l=e.find(f=>f.route.id===c.route.id),u=l!=null&&!cJ(l,c)&&(i&&i[c.route.id])!==void 0;if(Xp(s)&&(o||u)){let f=n[a];cn(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await dJ(s,f,o).then(d=>{d&&(r[a]=d||r[a])})}}}async function dJ(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:di.data,data:e.deferredData.unwrappedData}}catch(o){return{type:di.error,error:o}}return{type:di.data,data:e.deferredData.data}}}function BD(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function YR(e,t){let r=typeof t=="string"?wf(t).search:t.search;if(e[e.length-1].route.index&&BD(r||""))return e[e.length-1];let n=z2(e);return n[n.length-1]}function gH(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:i,json:a}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function YA(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function f6e(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function rb(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function h6e(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Xf(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function p6e(e,t){try{let r=e.sessionStorage.getItem(lJ);if(r){let n=JSON.parse(r);for(let[o,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function m6e(e,t){if(t.size>0){let r={};for(let[n,o]of t)r[n]=[...o];try{e.sessionStorage.setItem(lJ,JSON.stringify(r))}catch(n){Hm(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
 * React Router v6.20.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function lE(){return lE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lE.apply(this,arguments)}const WI=A.createContext(null),fJ=A.createContext(null),q1=A.createContext(null),GI=A.createContext(null),ld=A.createContext({outlet:null,matches:[],isDataRoute:!1}),hJ=A.createContext(null);function g6e(e,t){let{relative:r}=t===void 0?{}:t;K1()||cn(!1);let{basename:n,navigator:o}=A.useContext(q1),{hash:i,pathname:a,search:s}=gJ(e,{relative:r}),c=a;return n!=="/"&&(c=a==="/"?n:Yd([n,a])),o.createHref({pathname:c,search:s,hash:i})}function K1(){return A.useContext(GI)!=null}function El(){return K1()||cn(!1),A.useContext(GI).location}function pJ(e){A.useContext(q1).static||A.useLayoutEffect(e)}function ii(){let{isDataRoute:e}=A.useContext(ld);return e?A6e():v6e()}function v6e(){K1()||cn(!1);let e=A.useContext(WI),{basename:t,navigator:r}=A.useContext(q1),{matches:n}=A.useContext(ld),{pathname:o}=El(),i=JSON.stringify(z2(n).map(c=>c.pathnameBase)),a=A.useRef(!1);return pJ(()=>{a.current=!0}),A.useCallback(function(c,l){if(l===void 0&&(l={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=VI(c,JSON.parse(i),o,l.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Yd([t,u.pathname])),(l.replace?r.replace:r.push)(u,l.state,l)},[t,r,i,o,e])}const mJ=A.createContext(null);function y6e(){return A.useContext(mJ)}function b6e(e){let t=A.useContext(ld).outlet;return t&&A.createElement(mJ.Provider,{value:e},t)}function j2(){let{matches:e}=A.useContext(ld),t=e[e.length-1];return t?t.params:{}}function gJ(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=A.useContext(ld),{pathname:o}=El(),i=JSON.stringify(z2(n).map(a=>a.pathnameBase));return A.useMemo(()=>VI(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function w6e(e,t,r){K1()||cn(!1);let{navigator:n}=A.useContext(q1),{matches:o}=A.useContext(ld),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let c=El(),l;if(t){var u;let g=typeof t=="string"?wf(t):t;s==="/"||(u=g.pathname)!=null&&u.startsWith(s)||cn(!1),l=g}else l=c;let f=l.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",h=qg(e,{pathname:d}),p=k6e(h&&h.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:Yd([s,n.encodeLocation?n.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:Yd([s,n.encodeLocation?n.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,r);return t&&p?A.createElement(GI.Provider,{value:{location:lE({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:ui.Pop}},p):p}function x6e(){let e=bJ(),t=iJ(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:o},r):null,i)}const C6e=A.createElement(x6e,null);class S6e extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?A.createElement(ld.Provider,{value:this.props.routeContext},A.createElement(hJ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _6e(e){let{routeContext:t,match:r,children:n}=e,o=A.useContext(WI);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(ld.Provider,{value:t},n)}function k6e(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let i=e,a=(n=r)==null?void 0:n.errors;if(a!=null){let s=i.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id]));s>=0||cn(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,c,l)=>{let u=c.route.id?a==null?void 0:a[c.route.id]:null,f=null;r&&(f=c.route.errorElement||C6e);let d=t.concat(i.slice(0,l+1)),h=()=>{let p;return u?p=f:c.route.Component?p=A.createElement(c.route.Component,null):c.route.element?p=c.route.element:p=s,A.createElement(_6e,{match:c,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:p})};return r&&(c.route.ErrorBoundary||c.route.errorElement||l===0)?A.createElement(S6e,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):h()},null)}var vJ=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vJ||{}),cE=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(cE||{});function E6e(e){let t=A.useContext(WI);return t||cn(!1),t}function T6e(e){let t=A.useContext(fJ);return t||cn(!1),t}function I6e(e){let t=A.useContext(ld);return t||cn(!1),t}function yJ(e){let t=I6e(),r=t.matches[t.matches.length-1];return r.route.id||cn(!1),r.route.id}function bJ(){var e;let t=A.useContext(hJ),r=T6e(cE.UseRouteError),n=yJ(cE.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function A6e(){let{router:e}=E6e(vJ.UseNavigateStable),t=yJ(cE.UseNavigateStable),r=A.useRef(!1);return pJ(()=>{r.current=!0}),A.useCallback(function(o,i){i===void 0&&(i={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,lE({fromRouteId:t},i)))},[e,t])}function jm(e){let{to:t,replace:r,state:n,relative:o}=e;K1()||cn(!1);let{matches:i}=A.useContext(ld),{pathname:a}=El(),s=ii(),c=VI(t,z2(i).map(u=>u.pathnameBase),a,o==="path"),l=JSON.stringify(c);return A.useEffect(()=>s(JSON.parse(l),{replace:r,state:n,relative:o}),[s,l,o,r,n]),null}function wJ(e){return b6e(e.context)}function li(e){cn(!1)}function P6e(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ui.Pop,navigator:i,static:a=!1}=e;K1()&&cn(!1);let s=t.replace(/^\/*/,"/"),c=A.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof n=="string"&&(n=wf(n));let{pathname:l="/",search:u="",hash:f="",state:d=null,key:h="default"}=n,p=A.useMemo(()=>{let g=G1(l,s);return g==null?null:{location:{pathname:g,search:u,hash:f,state:d,key:h},navigationType:o}},[s,l,u,f,d,h,o]);return p==null?null:A.createElement(q1.Provider,{value:c},A.createElement(GI.Provider,{children:r,value:p}))}new Promise(()=>{});function XR(e,t){t===void 0&&(t=[]);let r=[];return A.Children.forEach(e,(n,o)=>{if(!A.isValidElement(n))return;let i=[...t,o];if(n.type===A.Fragment){r.push.apply(r,XR(n.props.children,i));return}n.type!==li&&cn(!1),!n.props.index||!n.props.children||cn(!1);let a={id:n.props.id||i.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,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=XR(n.props.children,i)),r.push(a)}),r}function M6e(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:A.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:A.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
 * React Router DOM v6.20.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function ux(){return ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ux.apply(this,arguments)}function R6e(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function O6e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function D6e(e,t){return e.button===0&&(!t||t==="_self")&&!O6e(e)}function QR(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}function F6e(e,t){let r=QR(e);return t&&t.forEach((n,o)=>{r.has(o)||t.getAll(o).forEach(i=>{r.append(o,i)})}),r}const N6e=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"];function L6e(e,t){return n6e({basename:t==null?void 0:t.basename,future:ux({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:k5e({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||$6e(),routes:e,mapRouteProperties:M6e,window:t==null?void 0:t.window}).initialize()}function $6e(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=ux({},t,{errors:B6e(t.errors)})),t}function B6e(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new $D(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let i=new Error(o.message);i.stack="",r[n]=i}}else r[n]=o;return r}const U6e=A.createContext({isTransitioning:!1}),H6e=A.createContext(new Map),z6e="startTransition",vH=jv[z6e],j6e="flushSync",yH=L0e[j6e];function V6e(e){vH?vH(e):e()}function nb(e){yH?yH(e):e()}class W6e{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function G6e(e){let{fallbackElement:t,router:r,future:n}=e,[o,i]=A.useState(r.state),[a,s]=A.useState(),[c,l]=A.useState({isTransitioning:!1}),[u,f]=A.useState(),[d,h]=A.useState(),[p,g]=A.useState(),m=A.useRef(new Map),{v7_startTransition:v}=n||{},y=A.useCallback(O=>{v?V6e(O):O()},[v]),b=A.useCallback((O,D)=>{let{deletedFetchers:N,unstable_flushSync:U,unstable_viewTransitionOpts:B}=D;N.forEach(T=>m.current.delete(T)),O.fetchers.forEach((T,P)=>{T.data!==void 0&&m.current.set(P,T.data)});let F=r.window==null||typeof r.window.document.startViewTransition!="function";if(!B||F){U?nb(()=>i(O)):y(()=>i(O));return}if(U){nb(()=>{d&&(u&&u.resolve(),d.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:B.currentLocation,nextLocation:B.nextLocation})});let T=r.window.document.startViewTransition(()=>{nb(()=>i(O))});T.finished.finally(()=>{nb(()=>{f(void 0),h(void 0),s(void 0),l({isTransitioning:!1})})}),nb(()=>h(T));return}d?(u&&u.resolve(),d.skipTransition(),g({state:O,currentLocation:B.currentLocation,nextLocation:B.nextLocation})):(s(O),l({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}))},[r.window,d,u,m,y]);A.useLayoutEffect(()=>r.subscribe(b),[r,b]),A.useEffect(()=>{c.isTransitioning&&!c.flushSync&&f(new W6e)},[c]),A.useEffect(()=>{if(u&&a&&r.window){let O=a,D=u.promise,N=r.window.document.startViewTransition(async()=>{y(()=>i(O)),await D});N.finished.finally(()=>{f(void 0),h(void 0),s(void 0),l({isTransitioning:!1})}),h(N)}},[y,a,u,r.window]),A.useEffect(()=>{u&&a&&o.location.key===a.location.key&&u.resolve()},[u,d,o.location,a]),A.useEffect(()=>{!c.isTransitioning&&p&&(s(p.state),l({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),g(void 0))},[c.isTransitioning,p]);let w=A.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:O=>r.navigate(O),push:(O,D,N)=>r.navigate(O,{state:D,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(O,D,N)=>r.navigate(O,{replace:!0,state:D,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[r]),E=r.basename||"/",I=A.useMemo(()=>({router:r,navigator:w,static:!1,basename:E}),[r,w,E]);return A.createElement(A.Fragment,null,A.createElement(WI.Provider,{value:I},A.createElement(fJ.Provider,{value:o},A.createElement(H6e.Provider,{value:m.current},A.createElement(U6e.Provider,{value:c},A.createElement(P6e,{basename:E,location:o.location,navigationType:o.historyAction,navigator:w},o.initialized?A.createElement(q6e,{routes:r.routes,state:o}):t))))),null)}function q6e(e){let{routes:t,state:r}=e;return w6e(t,void 0,r)}const K6e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Y6e=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vm=A.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:i,replace:a,state:s,target:c,to:l,preventScrollReset:u,unstable_viewTransition:f}=t,d=R6e(t,N6e),{basename:h}=A.useContext(q1),p,g=!1;if(typeof l=="string"&&Y6e.test(l)&&(p=l,K6e))try{let b=new URL(window.location.href),w=l.startsWith("//")?new URL(b.protocol+l):new URL(l),E=G1(w.pathname,h);w.origin===b.origin&&E!=null?l=E+w.search+w.hash:g=!0}catch{}let m=g6e(l,{relative:o}),v=X6e(l,{replace:a,state:s,target:c,preventScrollReset:u,relative:o,unstable_viewTransition:f});function y(b){n&&n(b),b.defaultPrevented||v(b)}return A.createElement("a",ux({},d,{href:p||m,onClick:g||i?n:y,ref:r,target:c}))});var bH;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(bH||(bH={}));var wH;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wH||(wH={}));function X6e(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,c=ii(),l=El(),u=gJ(e,{relative:a});return A.useCallback(f=>{if(D6e(f,r)){f.preventDefault();let d=n!==void 0?n:zm(l)===zm(u);c(e,{replace:d,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:s})}},[l,c,u,n,o,r,e,i,a,s])}function V2(e){let t=A.useRef(QR(e)),r=A.useRef(!1),n=El(),o=A.useMemo(()=>F6e(n.search,r.current?null:t.current),[n.search]),i=ii(),a=A.useCallback((s,c)=>{const l=QR(typeof s=="function"?s(o):s);r.current=!0,i("?"+l,c)},[i,o]);return[o,a]}function W2(e){return Wt}const Q6e=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],Z6e=["component","slots","slotProps"],J6e=["component"];function eOe(e,t){const{className:r,elementType:n,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s}=t,c=ze(t,Q6e),{component:l,slots:u={[e]:void 0},slotProps:f={[e]:void 0}}=i,d=ze(i,Z6e),h=u[e]||n,p=Ku(f[e],o),g=zX(W({className:r},c,{externalForwardedProps:e==="root"?d:void 0,externalSlotProps:p})),{props:{component:m},internalRef:v}=g,y=ze(g.props,J6e),b=Ur(v,p==null?void 0:p.ref,t.ref),w=a?a(y):{},E=W({},o,w),I=e==="root"?m||l:m,O=Vg(h,W({},e==="root"&&!l&&!u[e]&&s,e!=="root"&&!u[e]&&s,y,I&&{as:I},{ref:b}),E);return Object.keys(w).forEach(D=>{delete O[D]}),[h,O]}const tOe=Sr(R("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function rOe(e){return Gt("MuiListSubheader",e)}Vt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const nOe=["className","color","component","disableGutters","disableSticky","inset"],oOe=e=>{const{classes:t,color:r,disableGutters:n,inset:o,disableSticky:i}=e,a={root:["root",r!=="default"&&`color${ut(r)}`,!n&&"gutters",o&&"inset",!i&&"sticky"]};return pt(a,rOe,t)},iOe=We("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="default"&&t[`color${ut(r.color)}`],!r.disableGutters&&t.gutters,r.inset&&t.inset,!r.disableSticky&&t.sticky]}})(({theme:e,ownerState:t})=>W({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},t.color==="primary"&&{color:(e.vars||e).palette.primary.main},t.color==="inherit"&&{color:"inherit"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.inset&&{paddingLeft:72},!t.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),xJ=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:c=!1,inset:l=!1}=n,u=ze(n,nOe),f=W({},n,{color:i,component:a,disableGutters:s,disableSticky:c,inset:l}),d=oOe(f);return R(iOe,W({as:a,className:it(d.root,o),ref:r,ownerState:f},u))});xJ.muiSkipListHighlight=!0;const aOe=xJ;function sOe(e){return Gt("MuiAutocomplete",e)}const lOe=Vt("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),pn=lOe;var xH,CH;const cOe=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],uOe=["ref"],dOe=W2(),fOe=e=>{const{classes:t,disablePortal:r,expanded:n,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:c,popupOpen:l,size:u}=e,f={root:["root",n&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",c&&"inputFocused"],tag:["tag",`tagSize${ut(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",l&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return pt(f,sOe,t)},hOe=We("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{fullWidth:n,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=r;return[{[`& .${pn.tag}`]:t.tag},{[`& .${pn.tag}`]:t[`tagSize${ut(s)}`]},{[`& .${pn.inputRoot}`]:t.inputRoot},{[`& .${pn.input}`]:t.input},{[`& .${pn.input}`]:a&&t.inputFocused},t.root,n&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${pn.focused} .${pn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${pn.clearIndicator}`]:{visibility:"visible"}},[`& .${pn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${pn.inputRoot}`]:{flexWrap:"wrap",[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:26+4},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:52+4},[`& .${pn.input}`]:{width:0,minWidth:30}},[`& .${oh.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${oh.root}.${cl.sizeSmall}`]:{[`& .${oh.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Su.root}`]:{padding:9,[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${pn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${pn.endAdornment}`]:{right:9}},[`& .${Su.root}.${cl.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${pn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ul.root}`]:{paddingTop:19,paddingLeft:8,[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${ul.input}`]:{padding:"7px 4px"},[`& .${pn.endAdornment}`]:{right:9}},[`& .${ul.root}.${cl.sizeSmall}`]:{paddingBottom:1,[`& .${ul.input}`]:{padding:"2.5px 4px"}},[`& .${cl.hiddenLabel}`]:{paddingTop:8},[`& .${ul.root}.${cl.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${pn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ul.root}.${cl.hiddenLabel}.${cl.sizeSmall}`]:{[`& .${pn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${pn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${pn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${pn.input}`]:{opacity:1}}}]}),pOe=We("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),mOe=We(ri,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),gOe=We(ri,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>W({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),vOe=We(bf,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${pn.option}`]:t.option},t.popper,r.disablePortal&&t.popperDisablePortal]}})(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]})),yOe=We(Es,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>W({},e.typography.body1,{overflow:"auto"})),bOe=We("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),wOe=We("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),xOe=We("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${pn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${pn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${pn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${pn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${pn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Vr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),COe=We(aOe,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),SOe=We("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${pn.option}`]:{paddingLeft:24}}),_Oe=A.forwardRef(function(t,r){var n,o,i,a;const s=dOe({props:t,name:"MuiAutocomplete"}),{autoComplete:c=!1,autoHighlight:l=!1,autoSelect:u=!1,blurOnSelect:f=!1,ChipProps:d,className:h,clearIcon:p=xH||(xH=R(tOe,{fontSize:"small"})),clearOnBlur:g=!s.freeSolo,clearOnEscape:m=!1,clearText:v="Clear",closeText:y="Close",componentsProps:b={},defaultValue:w=s.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:I=!1,disabled:O=!1,disabledItemsFocusable:D=!1,disableListWrap:N=!1,disablePortal:U=!1,filterSelectedOptions:B=!1,forcePopupIcon:F="auto",freeSolo:T=!1,fullWidth:P=!1,getLimitTagsText:_=De=>`+${De}`,getOptionLabel:C,groupBy:S,handleHomeEndKeys:x=!s.freeSolo,includeInputInList:k=!1,limitTags:L=-1,ListboxComponent:j="ul",ListboxProps:z,loading:Y=!1,loadingText:K="Loading…",multiple:Q=!1,noOptionsText:q="No options",openOnFocus:J=!1,openText:G="Open",PaperComponent:V=Es,PopperComponent:X=bf,popupIcon:te=CH||(CH=R(NQ,{})),readOnly:ee=!1,renderGroup:re,renderInput:se,renderOption:pe,renderTags:ce,selectOnFocus:ne=!s.freeSolo,size:he="medium",slotProps:oe={}}=s,le=ze(s,cOe),{getRootProps:de,getInputProps:ve,getInputLabelProps:we,getPopupIndicatorProps:ie,getClearProps:ge,getTagProps:Pe,getListboxProps:Fe,getOptionProps:Ie,value:Oe,dirty:$e,expanded:et,id:Ze,popupOpen:Ne,focused:Qe,focusedTag:Xe,anchorEl:rt,setAnchorEl:ht,inputValue:At,groupedOptions:Qt}=CEe(W({},s,{componentName:"Autocomplete"})),Nt=!E&&!O&&$e&&!ee,Ue=(!T||F===!0)&&F!==!1,{onMouseDown:Ye}=ve(),{ref:tt}=z??{},st=Fe(),{ref:mt}=st,_t=ze(st,uOe),Pt=Ur(mt,tt),wt=C||(De=>{var je;return(je=De.label)!=null?je:De}),Dt=W({},s,{disablePortal:U,expanded:et,focused:Qe,fullWidth:P,getOptionLabel:wt,hasClearIcon:Nt,hasPopupIcon:Ue,inputFocused:Xe===-1,popupOpen:Ne,size:he}),qt=fOe(Dt);let Tt;if(Q&&Oe.length>0){const De=je=>W({className:qt.tag,disabled:O},Pe(je));ce?Tt=ce(Oe,De,Dt):Tt=Oe.map((je,Le)=>R(bo,W({label:wt(je),size:he},De({index:Le}),d)))}if(L>-1&&Array.isArray(Tt)){const De=Tt.length-L;!Qe&&De>0&&(Tt=Tt.splice(0,L),Tt.push(R("span",{className:qt.tag,children:_(De)},Tt.length)))}const Ge=re||(De=>xe("li",{children:[R(COe,{className:qt.groupLabel,ownerState:Dt,component:"div",children:De.group}),R(SOe,{className:qt.groupUl,ownerState:Dt,children:De.children})]},De.key)),fe=pe||((De,je)=>A.createElement("li",W({},De,{key:De.key}),wt(je))),ke=(De,je)=>{const Le=Ie({option:De,index:je});return fe(W({},Le,{className:qt.option}),De,{selected:Le["aria-selected"],index:je,inputValue:At},Dt)},be=(n=oe.clearIndicator)!=null?n:b.clearIndicator,Ce=(o=oe.paper)!=null?o:b.paper,Ee=(i=oe.popper)!=null?i:b.popper,me=(a=oe.popupIndicator)!=null?a:b.popupIndicator,_e=De=>R(vOe,W({as:X,disablePortal:U,style:{width:rt?rt.clientWidth:null},ownerState:Dt,role:"presentation",anchorEl:rt,open:Ne},Ee,{className:it(qt.popper,Ee==null?void 0:Ee.className),children:R(yOe,W({ownerState:Dt,as:V},Ce,{className:it(qt.paper,Ce==null?void 0:Ce.className),children:De}))}));let Be=null;return!Y&&Qt.length>0?Be=_e(R(xOe,W({as:j,className:qt.listbox,ownerState:Dt},_t,z,{ref:Pt,children:Qt.map((De,je)=>S?Ge({key:De.key,group:De.group,children:De.options.map((Le,lt)=>ke(Le,De.index+lt))}):ke(De,je))}))):Y&&Qt.length===0?Be=_e(R(bOe,{className:qt.loading,ownerState:Dt,children:K})):Qt.length===0&&!T&&!Y&&(Be=_e(R(wOe,{className:qt.noOptions,ownerState:Dt,role:"presentation",onMouseDown:De=>{De.preventDefault()},children:q}))),xe(A.Fragment,{children:[R(hOe,W({ref:r,className:it(qt.root,h),ownerState:Dt},de(le),{children:se({id:Ze,disabled:O,fullWidth:!0,size:he==="small"?"small":void 0,InputLabelProps:we(),InputProps:W({ref:ht,className:qt.inputRoot,startAdornment:Tt,onClick:De=>{De.target===De.currentTarget&&Ye(De)}},(Nt||Ue)&&{endAdornment:xe(pOe,{className:qt.endAdornment,ownerState:Dt,children:[Nt?R(mOe,W({},ge(),{"aria-label":v,title:v,ownerState:Dt},be,{className:it(qt.clearIndicator,be==null?void 0:be.className),children:p})):null,Ue?R(gOe,W({},ie(),{disabled:O,"aria-label":Ne?y:G,title:Ne?y:G,ownerState:Dt},me,{className:it(qt.popupIndicator,me==null?void 0:me.className),children:te})):null]})}),inputProps:W({className:qt.input,disabled:O,readOnly:ee},ve())})})),rt?Be:null]})}),Bh=_Oe,kOe=Sr(R("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function EOe(e){return Gt("MuiAvatar",e)}Vt("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const TOe=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],IOe=W2(),AOe=e=>{const{classes:t,variant:r,colorDefault:n}=e;return pt({root:["root",r,n&&"colorDefault"],img:["img"],fallback:["fallback"]},EOe,t)},POe=We("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],r.colorDefault&&t.colorDefault]}})(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:W({color:(e.vars||e).palette.background.default},e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:W({backgroundColor:e.palette.grey[400]},e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})))}]})),MOe=We("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),ROe=We(kOe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function OOe({crossOrigin:e,referrerPolicy:t,src:r,srcSet:n}){const[o,i]=A.useState(!1);return A.useEffect(()=>{if(!r&&!n)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=r,n&&(s.srcset=n),()=>{a=!1}},[e,t,r,n]),o}const DOe=A.forwardRef(function(t,r){const n=IOe({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:c={},slotProps:l={},imgProps:u,sizes:f,src:d,srcSet:h,variant:p="circular"}=n,g=ze(n,TOe);let m=null;const v=OOe(W({},u,{src:d,srcSet:h})),y=d||h,b=y&&v!=="error",w=W({},n,{colorDefault:!b,component:s,variant:p}),E=AOe(w),[I,O]=eOe("img",{className:E.img,elementType:MOe,externalForwardedProps:{slots:c,slotProps:{img:W({},u,l.img)}},additionalProps:{alt:o,src:d,srcSet:h,sizes:f},ownerState:w});return b?m=R(I,W({},O)):i||i===0?m=i:y&&o?m=o[0]:m=R(ROe,{ownerState:w,className:E.fallback}),R(POe,W({as:s,ownerState:w,className:it(E.root,a),ref:r},g,{children:m}))}),UD=DOe;function FOe(e){return Gt("MuiBadge",e)}const NOe=Vt("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),jf=NOe,LOe=["anchorOrigin","className","classes","component","components","componentsProps","children","overlap","color","invisible","max","badgeContent","slots","slotProps","showZero","variant"],XA=10,QA=4,$Oe=W2(),BOe=e=>{const{color:t,anchorOrigin:r,invisible:n,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,n&&"invisible",`anchorOrigin${ut(r.vertical)}${ut(r.horizontal)}`,`anchorOrigin${ut(r.vertical)}${ut(r.horizontal)}${ut(o)}`,`overlap${ut(o)}`,t!=="default"&&`color${ut(t)}`]};return pt(s,FOe,a)},UOe=We("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),HOe=We("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.badge,t[r.variant],t[`anchorOrigin${ut(r.anchorOrigin.vertical)}${ut(r.anchorOrigin.horizontal)}${ut(r.overlap)}`],r.color!=="default"&&t[`color${ut(r.color)}`],r.invisible&&t.invisible]}})(({theme:e})=>{var t;return{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:XA*2,lineHeight:1,padding:"0 6px",height:XA*2,borderRadius:XA,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n,o;return((n=e.vars)!=null?n:e).palette[r].main&&((o=e.vars)!=null?o:e).palette[r].contrastText}).map(r=>({props:{color:r},style:{backgroundColor:(e.vars||e).palette[r].main,color:(e.vars||e).palette[r].contrastText}})),{props:{variant:"dot"},style:{borderRadius:QA,height:QA*2,minWidth:QA*2,padding:0}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="top"&&r.anchorOrigin.horizontal==="right"&&r.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="bottom"&&r.anchorOrigin.horizontal==="right"&&r.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="top"&&r.anchorOrigin.horizontal==="left"&&r.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="bottom"&&r.anchorOrigin.horizontal==="left"&&r.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="top"&&r.anchorOrigin.horizontal==="right"&&r.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="bottom"&&r.anchorOrigin.horizontal==="right"&&r.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="top"&&r.anchorOrigin.horizontal==="left"&&r.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:r})=>r.anchorOrigin.vertical==="bottom"&&r.anchorOrigin.horizontal==="left"&&r.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${jf.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]}}),zOe=A.forwardRef(function(t,r){var n,o,i,a,s,c;const l=$Oe({props:t,name:"MuiBadge"}),{anchorOrigin:u={vertical:"top",horizontal:"right"},className:f,component:d,components:h={},componentsProps:p={},children:g,overlap:m="rectangular",color:v="default",invisible:y=!1,max:b=99,badgeContent:w,slots:E,slotProps:I,showZero:O=!1,variant:D="standard"}=l,N=ze(l,LOe),{badgeContent:U,invisible:B,max:F,displayValue:T}=I_e({max:b,invisible:y,badgeContent:w,showZero:O}),P=vO({anchorOrigin:u,color:v,overlap:m,variant:D,badgeContent:w}),_=B||U==null&&D!=="dot",{color:C=v,overlap:S=m,anchorOrigin:x=u,variant:k=D}=_?P:l,L=k!=="dot"?T:void 0,j=W({},l,{badgeContent:U,invisible:_,max:F,displayValue:L,showZero:O,anchorOrigin:x,color:C,overlap:S,variant:k}),z=BOe(j),Y=(n=(o=E==null?void 0:E.root)!=null?o:h.Root)!=null?n:UOe,K=(i=(a=E==null?void 0:E.badge)!=null?a:h.Badge)!=null?i:HOe,Q=(s=I==null?void 0:I.root)!=null?s:p.root,q=(c=I==null?void 0:I.badge)!=null?c:p.badge,J=Cr({elementType:Y,externalSlotProps:Q,externalForwardedProps:N,additionalProps:{ref:r,as:d},ownerState:j,className:it(Q==null?void 0:Q.className,z.root,f)}),G=Cr({elementType:K,externalSlotProps:q,ownerState:j,className:it(z.badge,q==null?void 0:q.className)});return xe(Y,W({},J,{children:[g,R(K,W({},G,{children:L}))]}))}),qI=zOe,jOe=Vt("MuiBox",["root"]),VOe=jOe,WOe=GO(),GOe=IX({themeId:x2,defaultTheme:WOe,defaultClassName:VOe.root,generateClassName:tI.generate}),nr=GOe;function qOe(e){return Gt("MuiButtonGroup",e)}const KOe=Vt("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),xa=KOe,YOe=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],XOe=(e,t)=>{const{ownerState:r}=e;return[{[`& .${xa.grouped}`]:t.grouped},{[`& .${xa.grouped}`]:t[`grouped${ut(r.orientation)}`]},{[`& .${xa.grouped}`]:t[`grouped${ut(r.variant)}`]},{[`& .${xa.grouped}`]:t[`grouped${ut(r.variant)}${ut(r.orientation)}`]},{[`& .${xa.grouped}`]:t[`grouped${ut(r.variant)}${ut(r.color)}`]},{[`& .${xa.firstButton}`]:t.firstButton},{[`& .${xa.lastButton}`]:t.lastButton},{[`& .${xa.middleButton}`]:t.middleButton},t.root,t[r.variant],r.disableElevation===!0&&t.disableElevation,r.fullWidth&&t.fullWidth,r.orientation==="vertical"&&t.vertical]},QOe=e=>{const{classes:t,color:r,disabled:n,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,c={root:["root",s,a==="vertical"&&"vertical",i&&"fullWidth",o&&"disableElevation"],grouped:["grouped",`grouped${ut(a)}`,`grouped${ut(s)}`,`grouped${ut(s)}${ut(a)}`,`grouped${ut(s)}${ut(r)}`,n&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return pt(c,qOe,t)},ZOe=We("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:XOe})(({theme:e,ownerState:t})=>W({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[2]},t.disableElevation&&{boxShadow:"none"},t.fullWidth&&{width:"100%"},t.orientation==="vertical"&&{flexDirection:"column"},{[`& .${xa.grouped}`]:W({minWidth:40,"&:hover":W({},t.variant==="contained"&&{boxShadow:"none"})},t.variant==="contained"&&{boxShadow:"none"}),[`& .${xa.firstButton},& .${xa.middleButton}`]:W({},t.orientation==="horizontal"&&{borderTopRightRadius:0,borderBottomRightRadius:0},t.orientation==="vertical"&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},t.variant==="text"&&t.orientation==="horizontal"&&{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${xa.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.orientation==="vertical"&&{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${xa.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="text"&&t.color!=="inherit"&&{borderColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:Vr(e.palette[t.color].main,.5)},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"transparent"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"transparent"},t.variant==="contained"&&t.orientation==="horizontal"&&{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${xa.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.orientation==="vertical"&&{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${xa.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}},t.variant==="contained"&&t.color!=="inherit"&&{borderColor:(e.vars||e).palette[t.color].dark},{"&:hover":W({},t.variant==="outlined"&&t.orientation==="horizontal"&&{borderRightColor:"currentColor"},t.variant==="outlined"&&t.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),[`& .${xa.lastButton},& .${xa.middleButton}`]:W({},t.orientation==="horizontal"&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t.orientation==="vertical"&&{borderTopRightRadius:0,borderTopLeftRadius:0},t.variant==="outlined"&&t.orientation==="horizontal"&&{marginLeft:-1},t.variant==="outlined"&&t.orientation==="vertical"&&{marginTop:-1})})),JOe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:c=!1,disableElevation:l=!1,disableFocusRipple:u=!1,disableRipple:f=!1,fullWidth:d=!1,orientation:h="horizontal",size:p="medium",variant:g="outlined"}=n,m=ze(n,YOe),v=W({},n,{color:a,component:s,disabled:c,disableElevation:l,disableFocusRipple:u,disableRipple:f,fullWidth:d,orientation:h,size:p,variant:g}),y=QOe(v),b=A.useMemo(()=>({className:y.grouped,color:a,disabled:c,disableElevation:l,disableFocusRipple:u,disableRipple:f,fullWidth:d,size:p,variant:g}),[a,c,l,u,f,d,p,g,y.grouped]),w=_ge(o),E=w.length,I=O=>{const D=O===0,N=O===E-1;return D&&N?"":D?y.firstButton:N?y.lastButton:y.middleButton};return R(ZOe,W({as:s,role:"group",className:it(y.root,i),ref:r,ownerState:v},m,{children:R(KQ.Provider,{value:b,children:w.map((O,D)=>R(YQ.Provider,{value:I(D),children:O},D))})}))}),eDe=JOe;function tDe(e){return Gt("MuiCard",e)}Vt("MuiCard",["root"]);const rDe=["className","raised"],nDe=e=>{const{classes:t}=e;return pt({root:["root"]},tDe,t)},oDe=We(Es,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({overflow:"hidden"})),iDe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiCard"}),{className:o,raised:i=!1}=n,a=ze(n,rDe),s=W({},n,{raised:i}),c=nDe(s);return R(oDe,W({className:it(c.root,o),elevation:i?8:void 0,ref:r,ownerState:s},a))}),f1=iDe;function aDe(e){return Gt("MuiCardContent",e)}Vt("MuiCardContent",["root"]);const sDe=["className","component"],lDe=e=>{const{classes:t}=e;return pt({root:["root"]},aDe,t)},cDe=We("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})(()=>({padding:16,"&:last-child":{paddingBottom:24}})),uDe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiCardContent"}),{className:o,component:i="div"}=n,a=ze(n,sDe),s=W({},n,{component:i}),c=lDe(s);return R(cDe,W({as:i,className:it(c.root,o),ownerState:s,ref:r},a))}),dx=uDe;function dDe(e){return Gt("PrivateSwitchBase",e)}Vt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const fDe=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],hDe=e=>{const{classes:t,checked:r,disabled:n,edge:o}=e,i={root:["root",r&&"checked",n&&"disabled",o&&`edge${ut(o)}`],input:["input"]};return pt(i,dDe,t)},pDe=We(au)(({ownerState:e})=>W({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),mDe=We("input",{shouldForwardProp:Ja})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),gDe=A.forwardRef(function(t,r){const{autoFocus:n,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:c,disableFocusRipple:l=!1,edge:u=!1,icon:f,id:d,inputProps:h,inputRef:p,name:g,onBlur:m,onChange:v,onFocus:y,readOnly:b,required:w=!1,tabIndex:E,type:I,value:O}=t,D=ze(t,fDe),[N,U]=sa({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),B=yf(),F=k=>{y&&y(k),B&&B.onFocus&&B.onFocus(k)},T=k=>{m&&m(k),B&&B.onBlur&&B.onBlur(k)},P=k=>{if(k.nativeEvent.defaultPrevented)return;const L=k.target.checked;U(L),v&&v(k,L)};let _=c;B&&typeof _>"u"&&(_=B.disabled);const C=I==="checkbox"||I==="radio",S=W({},t,{checked:N,disabled:_,disableFocusRipple:l,edge:u}),x=hDe(S);return xe(pDe,W({component:"span",className:it(x.root,a),centerRipple:!0,focusRipple:!l,disabled:_,tabIndex:null,role:void 0,onFocus:F,onBlur:T,ownerState:S,ref:r},D,{children:[R(mDe,W({autoFocus:n,checked:o,defaultChecked:s,className:x.input,disabled:_,id:C?d:void 0,name:g,onChange:P,readOnly:b,ref:p,required:w,ownerState:S,tabIndex:E,type:I},I==="checkbox"&&O===void 0?{}:{value:O},h)),N?i:f]}))}),CJ=gDe,vDe=Sr(R("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),yDe=Sr(R("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),bDe=Sr(R("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function wDe(e){return Gt("MuiCheckbox",e)}const xDe=Vt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),ZA=xDe,CDe=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],SDe=e=>{const{classes:t,indeterminate:r,color:n,size:o}=e,i={root:["root",r&&"indeterminate",`color${ut(n)}`,`size${ut(o)}`]},a=pt(i,wDe,t);return W({},t,a)},_De=We(CJ,{shouldForwardProp:e=>Ja(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${ut(r.size)}`],r.color!=="default"&&t[`color${ut(r.color)}`]]}})(({theme:e,ownerState:t})=>W({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${ZA.checked}, &.${ZA.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${ZA.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),kDe=R(yDe,{}),EDe=R(vDe,{}),TDe=R(bDe,{}),IDe=A.forwardRef(function(t,r){var n,o;const i=Wt({props:t,name:"MuiCheckbox"}),{checkedIcon:a=kDe,color:s="primary",icon:c=EDe,indeterminate:l=!1,indeterminateIcon:u=TDe,inputProps:f,size:d="medium",className:h}=i,p=ze(i,CDe),g=l?u:c,m=l?u:a,v=W({},i,{color:s,indeterminate:l,size:d}),y=SDe(v);return R(_De,W({type:"checkbox",inputProps:W({"data-indeterminate":l},f),icon:A.cloneElement(g,{fontSize:(n=g.props.fontSize)!=null?n:d}),checkedIcon:A.cloneElement(m,{fontSize:(o=m.props.fontSize)!=null?o:d}),ownerState:v,ref:r,className:it(y.root,h)},p,{classes:y}))}),Tl=IDe;function ADe(e){return Gt("MuiCircularProgress",e)}Vt("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const PDe=["className","color","disableShrink","size","style","thickness","value","variant"];let KI=e=>e,SH,_H,kH,EH;const Vf=44,MDe=sp(SH||(SH=KI`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),RDe=sp(_H||(_H=KI`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),ODe=e=>{const{classes:t,variant:r,color:n,disableShrink:o}=e,i={root:["root",r,`color${ut(n)}`],svg:["svg"],circle:["circle",`circle${ut(r)}`,o&&"circleDisableShrink"]};return pt(i,ADe,t)},DDe=We("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${ut(r.color)}`]]}})(({ownerState:e,theme:t})=>W({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&e1(kH||(kH=KI`
      animation: ${0} 1.4s linear infinite;
    `),MDe)),FDe=We("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),NDe=We("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${ut(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>W({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&e1(EH||(EH=KI`
      animation: ${0} 1.4s ease-in-out infinite;
    `),RDe)),LDe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:f="indeterminate"}=n,d=ze(n,PDe),h=W({},n,{color:i,disableShrink:a,size:s,thickness:l,value:u,variant:f}),p=ODe(h),g={},m={},v={};if(f==="determinate"){const y=2*Math.PI*((Vf-l)/2);g.strokeDasharray=y.toFixed(3),v["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*y).toFixed(3)}px`,m.transform="rotate(-90deg)"}return R(DDe,W({className:it(p.root,o),style:W({width:s,height:s},m,c),ownerState:h,ref:r,role:"progressbar"},v,d,{children:R(FDe,{className:p.svg,ownerState:h,viewBox:`${Vf/2} ${Vf/2} ${Vf} ${Vf}`,children:R(NDe,{className:p.circle,style:g,ownerState:h,cx:Vf,cy:Vf,r:(Vf-l)/2,fill:"none",strokeWidth:l})})}))}),Ri=LDe,$De=(e,t)=>W({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),BDe=e=>W({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),UDe=(e,t=!1)=>{var r;const n={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([a,s])=>{var c;n[e.getColorSchemeSelector(a).replace(/\s*&/,"")]={colorScheme:(c=s.palette)==null?void 0:c.mode}});let o=W({html:$De(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:W({margin:0},BDe(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},n);const i=(r=e.components)==null||(r=r.MuiCssBaseline)==null?void 0:r.styleOverrides;return i&&(o=[o,i]),o};function HDe(e){const t=Wt({props:e,name:"MuiCssBaseline"}),{children:r,enableColorScheme:n=!1}=t;return xe(A.Fragment,{children:[R(EQ,{styles:o=>UDe(o,n)}),r]})}const zDe=["className","id"],jDe=e=>{const{classes:t}=e;return pt({root:["root"]},r4e,t)},VDe=We(jt,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),WDe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDialogTitle"}),{className:o,id:i}=n,a=ze(n,zDe),s=n,c=jDe(s),{titleId:l=i}=A.useContext(HQ);return R(VDe,W({component:"h2",className:it(c.root,o),ownerState:s,ref:r,variant:"h6",id:i??l},a))}),GDe=WDe,qDe=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function KDe(e,t,r){const n=t.getBoundingClientRect(),o=r&&r.getBoundingClientRect(),i=Gs(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const l=i.getComputedStyle(t);a=l.getPropertyValue("-webkit-transform")||l.getPropertyValue("transform")}let s=0,c=0;if(a&&a!=="none"&&typeof a=="string"){const l=a.split("(")[1].split(")")[0].split(",");s=parseInt(l[4],10),c=parseInt(l[5],10)}return e==="left"?o?`translateX(${o.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:e==="right"?o?`translateX(-${n.right-o.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:e==="up"?o?`translateY(${o.bottom+c-n.top}px)`:`translateY(${i.innerHeight+c-n.top}px)`:o?`translateY(-${n.top-o.top+n.height-c}px)`:`translateY(-${n.top+n.height-c}px)`}function YDe(e){return typeof e=="function"?e():e}function e_(e,t,r){const n=YDe(r),o=KDe(e,t,n);o&&(t.style.webkitTransform=o,t.style.transform=o)}const XDe=A.forwardRef(function(t,r){const n=An(),o={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:c,container:l,direction:u="down",easing:f=o,in:d,onEnter:h,onEntered:p,onEntering:g,onExit:m,onExited:v,onExiting:y,style:b,timeout:w=i,TransitionComponent:E=TI}=t,I=ze(t,qDe),O=A.useRef(null),D=Ur(c.ref,O,r),N=x=>k=>{x&&(k===void 0?x(O.current):x(O.current,k))},U=N((x,k)=>{e_(u,x,l),mD(x),h&&h(x,k)}),B=N((x,k)=>{const L=a1({timeout:w,style:b,easing:f},{mode:"enter"});x.style.webkitTransition=n.transitions.create("-webkit-transform",W({},L)),x.style.transition=n.transitions.create("transform",W({},L)),x.style.webkitTransform="none",x.style.transform="none",g&&g(x,k)}),F=N(p),T=N(y),P=N(x=>{const k=a1({timeout:w,style:b,easing:f},{mode:"exit"});x.style.webkitTransition=n.transitions.create("-webkit-transform",k),x.style.transition=n.transitions.create("transform",k),e_(u,x,l),m&&m(x)}),_=N(x=>{x.style.webkitTransition="",x.style.transition="",v&&v(x)}),C=x=>{a&&a(O.current,x)},S=A.useCallback(()=>{O.current&&e_(u,O.current,l)},[u,l]);return A.useEffect(()=>{if(d||u==="down"||u==="right")return;const x=ap(()=>{O.current&&e_(u,O.current,l)}),k=Gs(O.current);return k.addEventListener("resize",x),()=>{x.clear(),k.removeEventListener("resize",x)}},[u,d,l]),A.useEffect(()=>{d||S()},[d,S]),R(E,W({nodeRef:O,onEnter:U,onEntered:F,onEntering:B,onExit:P,onExited:_,onExiting:T,addEndListener:C,appear:s,in:d,timeout:w},I,{children:(x,k)=>A.cloneElement(c,W({ref:D,style:W({visibility:x==="exited"&&!d?"hidden":void 0},b,c.props.style)},k))}))}),SJ=XDe;function QDe(e){return Gt("MuiDrawer",e)}Vt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const ZDe=["BackdropProps"],JDe=["anchor","BackdropProps","children","className","elevation","hideBackdrop","ModalProps","onClose","open","PaperProps","SlideProps","TransitionComponent","transitionDuration","variant"],_J=(e,t)=>{const{ownerState:r}=e;return[t.root,(r.variant==="permanent"||r.variant==="persistent")&&t.docked,t.modal]},e8e=e=>{const{classes:t,anchor:r,variant:n}=e,o={root:["root"],docked:[(n==="permanent"||n==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ut(r)}`,n!=="temporary"&&`paperAnchorDocked${ut(r)}`]};return pt(o,QDe,t)},t8e=We(gD,{name:"MuiDrawer",slot:"Root",overridesResolver:_J})(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer})),TH=We("div",{shouldForwardProp:Ja,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:_J})({flex:"0 0 auto"}),r8e=We(Es,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.paper,t[`paperAnchor${ut(r.anchor)}`],r.variant!=="temporary"&&t[`paperAnchorDocked${ut(r.anchor)}`]]}})(({theme:e,ownerState:t})=>W({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},t.anchor==="left"&&{left:0},t.anchor==="top"&&{top:0,left:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="right"&&{right:0},t.anchor==="bottom"&&{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},t.anchor==="left"&&t.variant!=="temporary"&&{borderRight:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="top"&&t.variant!=="temporary"&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="right"&&t.variant!=="temporary"&&{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},t.anchor==="bottom"&&t.variant!=="temporary"&&{borderTop:`1px solid ${(e.vars||e).palette.divider}`})),kJ={left:"right",right:"left",top:"down",bottom:"up"};function n8e(e){return["left","right"].indexOf(e)!==-1}function o8e({direction:e},t){return e==="rtl"&&n8e(t)?kJ[t]:t}const i8e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiDrawer"}),o=An(),i=l0(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:c,children:l,className:u,elevation:f=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:h}={},onClose:p,open:g=!1,PaperProps:m={},SlideProps:v,TransitionComponent:y=SJ,transitionDuration:b=a,variant:w="temporary"}=n,E=ze(n.ModalProps,ZDe),I=ze(n,JDe),O=A.useRef(!1);A.useEffect(()=>{O.current=!0},[]);const D=o8e({direction:i?"rtl":"ltr"},s),U=W({},n,{anchor:s,elevation:f,open:g,variant:w},I),B=e8e(U),F=R(r8e,W({elevation:w==="temporary"?f:0,square:!0},m,{className:it(B.paper,m.className),ownerState:U,children:l}));if(w==="permanent")return R(TH,W({className:it(B.root,B.docked,u),ownerState:U,ref:r},I,{children:F}));const T=R(y,W({in:g,direction:kJ[D],timeout:b,appear:O.current},v,{children:F}));return w==="persistent"?R(TH,W({className:it(B.root,B.docked,u),ownerState:U,ref:r},I,{children:T})):R(t8e,W({BackdropProps:W({},c,h,{transitionDuration:b}),className:it(B.root,B.modal,u),open:g,ownerState:U,onClose:p,hideBackdrop:d,ref:r},I,E,{children:T}))}),a8e=i8e;function s8e(e){return Gt("MuiFormControlLabel",e)}const l8e=Vt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Pb=l8e,c8e=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],u8e=e=>{const{classes:t,disabled:r,labelPlacement:n,error:o,required:i}=e,a={root:["root",r&&"disabled",`labelPlacement${ut(n)}`,o&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",o&&"error"]};return pt(a,s8e,t)},d8e=We("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Pb.label}`]:t.label},t.root,t[`labelPlacement${ut(r.labelPlacement)}`]]}})(({theme:e,ownerState:t})=>W({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${Pb.disabled}`]:{cursor:"default"}},t.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},t.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},t.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${Pb.label}`]:{[`&.${Pb.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),f8e=We("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(({theme:e})=>({[`&.${Pb.error}`]:{color:(e.vars||e).palette.error.main}})),h8e=A.forwardRef(function(t,r){var n,o;const i=Wt({props:t,name:"MuiFormControlLabel"}),{className:a,componentsProps:s={},control:c,disabled:l,disableTypography:u,label:f,labelPlacement:d="end",required:h,slotProps:p={}}=i,g=ze(i,c8e),m=yf(),v=(n=l??c.props.disabled)!=null?n:m==null?void 0:m.disabled,y=h??c.props.required,b={disabled:v,required:y};["checked","name","onChange","value","inputRef"].forEach(N=>{typeof c.props[N]>"u"&&typeof i[N]<"u"&&(b[N]=i[N])});const w=c0({props:i,muiFormControl:m,states:["error"]}),E=W({},i,{disabled:v,labelPlacement:d,required:y,error:w.error}),I=u8e(E),O=(o=p.typography)!=null?o:s.typography;let D=f;return D!=null&&D.type!==jt&&!u&&(D=R(jt,W({component:"span"},O,{className:it(I.label,O==null?void 0:O.className),children:D}))),xe(d8e,W({className:it(I.root,a),ownerState:E,ref:r},g,{children:[A.cloneElement(c,b),y?xe(Jt,{display:"block",children:[D,xe(f8e,{ownerState:E,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):D]}))}),dp=h8e,p8e=A.createContext(),IH=p8e;function m8e(e){return Gt("MuiGrid",e)}const g8e=[0,1,2,3,4,5,6,7,8,9,10],v8e=["column-reverse","column","row-reverse","row"],y8e=["nowrap","wrap-reverse","wrap"],ob=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],fx=Vt("MuiGrid",["root","container","item","zeroMinWidth",...g8e.map(e=>`spacing-xs-${e}`),...v8e.map(e=>`direction-xs-${e}`),...y8e.map(e=>`wrap-xs-${e}`),...ob.map(e=>`grid-xs-${e}`),...ob.map(e=>`grid-sm-${e}`),...ob.map(e=>`grid-md-${e}`),...ob.map(e=>`grid-lg-${e}`),...ob.map(e=>`grid-xl-${e}`)]),b8e=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function dv(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function w8e({theme:e,ownerState:t}){let r;return e.breakpoints.keys.reduce((n,o)=>{let i={};if(t[o]&&(r=t[o]),!r)return n;if(r===!0)i={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(r==="auto")i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=bm({values:t.columns,breakpoints:e.breakpoints.values}),s=typeof a=="object"?a[o]:a;if(s==null)return n;const c=`${Math.round(r/s*1e8)/1e6}%`;let l={};if(t.container&&t.item&&t.columnSpacing!==0){const u=e.spacing(t.columnSpacing);if(u!=="0px"){const f=`calc(${c} + ${dv(u)})`;l={flexBasis:f,maxWidth:f}}}i=W({flexBasis:c,flexGrow:0,maxWidth:c},l)}return e.breakpoints.values[o]===0?Object.assign(n,i):n[e.breakpoints.up(o)]=i,n},{})}function x8e({theme:e,ownerState:t}){const r=bm({values:t.direction,breakpoints:e.breakpoints.values});return Ks({theme:e},r,n=>{const o={flexDirection:n};return n.indexOf("column")===0&&(o[`& > .${fx.item}`]={maxWidth:"none"}),o})}function EJ({breakpoints:e,values:t}){let r="";Object.keys(t).forEach(o=>{r===""&&t[o]!==0&&(r=o)});const n=Object.keys(e).sort((o,i)=>e[o]-e[i]);return n.slice(0,n.indexOf(r))}function C8e({theme:e,ownerState:t}){const{container:r,rowSpacing:n}=t;let o={};if(r&&n!==0){const i=bm({values:n,breakpoints:e.breakpoints.values});let a;typeof i=="object"&&(a=EJ({breakpoints:e.breakpoints.values,values:i})),o=Ks({theme:e},i,(s,c)=>{var l;const u=e.spacing(s);return u!=="0px"?{marginTop:`-${dv(u)}`,[`& > .${fx.item}`]:{paddingTop:dv(u)}}:(l=a)!=null&&l.includes(c)?{}:{marginTop:0,[`& > .${fx.item}`]:{paddingTop:0}}})}return o}function S8e({theme:e,ownerState:t}){const{container:r,columnSpacing:n}=t;let o={};if(r&&n!==0){const i=bm({values:n,breakpoints:e.breakpoints.values});let a;typeof i=="object"&&(a=EJ({breakpoints:e.breakpoints.values,values:i})),o=Ks({theme:e},i,(s,c)=>{var l;const u=e.spacing(s);return u!=="0px"?{width:`calc(100% + ${dv(u)})`,marginLeft:`-${dv(u)}`,[`& > .${fx.item}`]:{paddingLeft:dv(u)}}:(l=a)!=null&&l.includes(c)?{}:{width:"100%",marginLeft:0,[`& > .${fx.item}`]:{paddingLeft:0}}})}return o}function _8e(e,t,r={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[r[`spacing-xs-${String(e)}`]];const n=[];return t.forEach(o=>{const i=e[o];Number(i)>0&&n.push(r[`spacing-${o}-${String(i)}`])}),n}const k8e=We("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e,{container:n,direction:o,item:i,spacing:a,wrap:s,zeroMinWidth:c,breakpoints:l}=r;let u=[];n&&(u=_8e(a,l,t));const f=[];return l.forEach(d=>{const h=r[d];h&&f.push(t[`grid-${d}-${String(h)}`])}),[t.root,n&&t.container,i&&t.item,c&&t.zeroMinWidth,...u,o!=="row"&&t[`direction-xs-${String(o)}`],s!=="wrap"&&t[`wrap-xs-${String(s)}`],...f]}})(({ownerState:e})=>W({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},e.wrap!=="wrap"&&{flexWrap:e.wrap}),x8e,C8e,S8e,w8e);function E8e(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const r=[];return t.forEach(n=>{const o=e[n];if(Number(o)>0){const i=`spacing-${n}-${String(o)}`;r.push(i)}}),r}const T8e=e=>{const{classes:t,container:r,direction:n,item:o,spacing:i,wrap:a,zeroMinWidth:s,breakpoints:c}=e;let l=[];r&&(l=E8e(i,c));const u=[];c.forEach(d=>{const h=e[d];h&&u.push(`grid-${d}-${String(h)}`)});const f={root:["root",r&&"container",o&&"item",s&&"zeroMinWidth",...l,n!=="row"&&`direction-xs-${String(n)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...u]};return pt(f,m8e,t)},I8e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiGrid"}),{breakpoints:o}=An(),i=L1(n),{className:a,columns:s,columnSpacing:c,component:l="div",container:u=!1,direction:f="row",item:d=!1,rowSpacing:h,spacing:p=0,wrap:g="wrap",zeroMinWidth:m=!1}=i,v=ze(i,b8e),y=h||p,b=c||p,w=A.useContext(IH),E=u?s||12:w,I={},O=W({},v);o.keys.forEach(U=>{v[U]!=null&&(I[U]=v[U],delete O[U])});const D=W({},i,{columns:E,container:u,direction:f,item:d,rowSpacing:y,columnSpacing:b,wrap:g,zeroMinWidth:m,spacing:p},I,{breakpoints:o.keys}),N=T8e(D);return R(IH.Provider,{value:E,children:R(k8e,W({ownerState:D,className:it(N.root,a),as:l,ref:r},O))})}),Ot=I8e,A8e=Fxe({createStyledComponent:We("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>Wt({props:e,name:"MuiGrid2"})}),P8e=A8e,M8e=["initialWidth","width"],bh=["xs","sm","md","lg","xl"],R8e=(e,t,r=!0)=>r?bh.indexOf(e)<=bh.indexOf(t):bh.indexOf(e)<bh.indexOf(t),O8e=(e,t,r=!1)=>r?bh.indexOf(t)<=bh.indexOf(e):bh.indexOf(t)<bh.indexOf(e),D8e=(e={})=>t=>{const{withTheme:r=!1,noSSR:n=!1,initialWidth:o}=e;function i(a){const s=An(),c=a.theme||s,l=LO({theme:c,name:"MuiWithWidth",props:a}),{initialWidth:u,width:f}=l,d=ze(l,M8e),[h,p]=A.useState(!1);en(()=>{p(!0)},[]);const m=c.breakpoints.keys.slice().reverse().reduce((y,b)=>{const w=E2(c.breakpoints.up(b));return!y&&w?b:y},null),v=W({width:f||(h||n?m:void 0)||u||o},r?{theme:c}:{},d);return v.width===void 0?null:R(t,W({},v))}return i},F8e=D8e;function N8e(e){const{children:t,only:r,width:n}=e,o=An();let i=!0;if(r)if(Array.isArray(r))for(let a=0;a<r.length;a+=1){const s=r[a];if(n===s){i=!1;break}}else r&&n===r&&(i=!1);if(i)for(let a=0;a<o.breakpoints.keys.length;a+=1){const s=o.breakpoints.keys[a],c=e[`${s}Up`],l=e[`${s}Down`];if(c&&R8e(s,n)||l&&O8e(s,n)){i=!1;break}}return i?R(A.Fragment,{children:t}):null}const L8e=F8e()(N8e);function $8e(e){return Gt("PrivateHiddenCss",e)}Vt("PrivateHiddenCss",["root","xlDown","xlUp","onlyXl","lgDown","lgUp","onlyLg","mdDown","mdUp","onlyMd","smDown","smUp","onlySm","xsDown","xsUp","onlyXs"]);const B8e=["children","className","only"],U8e=e=>{const{classes:t,breakpoints:r}=e,n={root:["root",...r.map(({breakpoint:o,dir:i})=>i==="only"?`${i}${ut(o)}`:`${o}${ut(i)}`)]};return pt(n,$8e,t)},H8e=We("div",{name:"PrivateHiddenCss",slot:"Root"})(({theme:e,ownerState:t})=>{const r={display:"none"};return W({},t.breakpoints.map(({breakpoint:n,dir:o})=>o==="only"?{[e.breakpoints.only(n)]:r}:o==="up"?{[e.breakpoints.up(n)]:r}:{[e.breakpoints.down(n)]:r}).reduce((n,o)=>(Object.keys(o).forEach(i=>{n[i]=o[i]}),n),{}))});function z8e(e){const{children:t,className:r,only:n}=e,o=ze(e,B8e),i=An(),a=[];for(let l=0;l<i.breakpoints.keys.length;l+=1){const u=i.breakpoints.keys[l],f=o[`${u}Up`],d=o[`${u}Down`];f&&a.push({breakpoint:u,dir:"up"}),d&&a.push({breakpoint:u,dir:"down"})}n&&(Array.isArray(n)?n:[n]).forEach(u=>{a.push({breakpoint:u,dir:"only"})});const s=W({},e,{breakpoints:a}),c=U8e(s);return R(H8e,{className:it(c.root,r),ownerState:s,children:t})}const j8e=["implementation","lgDown","lgUp","mdDown","mdUp","smDown","smUp","xlDown","xlUp","xsDown","xsUp"];function AH(e){const{implementation:t="js",lgDown:r=!1,lgUp:n=!1,mdDown:o=!1,mdUp:i=!1,smDown:a=!1,smUp:s=!1,xlDown:c=!1,xlUp:l=!1,xsDown:u=!1,xsUp:f=!1}=e,d=ze(e,j8e);return t==="js"?R(L8e,W({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:s,xlDown:c,xlUp:l,xsDown:u,xsUp:f},d)):R(z8e,W({lgDown:r,lgUp:n,mdDown:o,mdUp:i,smDown:a,smUp:s,xlDown:c,xlUp:l,xsDown:u,xsUp:f},d))}function V8e(e){return Gt("MuiLink",e)}const W8e=Vt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),G8e=W8e,TJ={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},q8e=e=>TJ[e]||e,K8e=({theme:e,ownerState:t})=>{const r=q8e(t.color),n=t1(e,`palette.${r}`,!1)||t.color,o=t1(e,`palette.${r}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Vr(n,.4)},Y8e=K8e,X8e=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],Q8e=e=>{const{classes:t,component:r,focusVisible:n,underline:o}=e,i={root:["root",`underline${ut(o)}`,r==="button"&&"button",n&&"focusVisible"]};return pt(i,V8e,t)},Z8e=We(jt,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`underline${ut(r.underline)}`],r.component==="button"&&t.button]}})(({theme:e,ownerState:t})=>W({},t.underline==="none"&&{textDecoration:"none"},t.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},t.underline==="always"&&W({textDecoration:"underline"},t.color!=="inherit"&&{textDecorationColor:Y8e({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),t.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${G8e.focusVisible}`]:{outline:"auto"}})),J8e=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiLink"}),{className:o,color:i="primary",component:a="a",onBlur:s,onFocus:c,TypographyClasses:l,underline:u="always",variant:f="inherit",sx:d}=n,h=ze(n,X8e),{isFocusVisibleRef:p,onBlur:g,onFocus:m,ref:v}=y2(),[y,b]=A.useState(!1),w=Ur(r,v),E=N=>{g(N),p.current===!1&&b(!1),s&&s(N)},I=N=>{m(N),p.current===!0&&b(!0),c&&c(N)},O=W({},n,{color:i,component:a,focusVisible:y,underline:u,variant:f}),D=Q8e(O);return R(Z8e,W({color:i,className:it(D.root,o),classes:l,component:a,onBlur:E,onFocus:I,ref:w,ownerState:O,variant:f,sx:[...Object.keys(TJ).includes(i)?[]:[{color:i}],...Array.isArray(d)?d:[d]]},h))}),Uh=J8e,eFe=Sr(R("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),tFe=Sr(R("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),rFe=e=>!e||!Jc(e),nFe=rFe;function oFe(e){return Gt("MuiSlider",e)}const iFe=Vt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),oc=iFe,aFe=e=>{const{open:t}=e;return{offset:it(t&&oc.valueLabelOpen),circle:oc.valueLabelCircle,label:oc.valueLabelLabel}};function sFe(e){const{children:t,className:r,value:n}=e,o=aFe(e);return t?A.cloneElement(t,{className:it(t.props.className)},xe(A.Fragment,{children:[t.props.children,R("span",{className:it(o.offset,r),"aria-hidden":!0,children:R("span",{className:o.circle,children:R("span",{className:o.label,children:n})})})]})):null}const lFe=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],cFe=W2();function PH(e){return e}const uFe=We("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${ut(r.color)}`],r.size!=="medium"&&t[`size${ut(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${oc.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${oc.dragging}`]:{[`& .${oc.thumb}, & .${oc.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r},style:{color:(e.vars||e).palette[r].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),dFe=We("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),fFe=We("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r,track:"inverted"},style:W({},e.vars?{backgroundColor:e.vars.palette.Slider[`${r}Track`],borderColor:e.vars.palette.Slider[`${r}Track`]}:W({backgroundColor:rx(e.palette[r].main,.62),borderColor:rx(e.palette[r].main,.62)},e.applyStyles("dark",{backgroundColor:tx(e.palette[r].main,.5)}),e.applyStyles("dark",{borderColor:tx(e.palette[r].main,.5)})))}))]}}),hFe=We("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${ut(r.color)}`],r.size!=="medium"&&t[`thumbSize${ut(r.size)}`]]}})(({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${oc.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(r=>{var n;return((n=e.vars)!=null?n:e).palette[r].main}).map(r=>({props:{color:r},style:{[`&:hover, &.${oc.focusVisible}`]:W({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[r].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Vr(e.palette[r].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${oc.active}`]:W({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[r].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${Vr(e.palette[r].main,.16)}`})}})),{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}}]}}),pFe=We(sFe,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>W({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${oc.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${oc.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),mFe=We("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>EI(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]})),gFe=We("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>EI(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>W({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),vFe=e=>{const{disabled:t,dragging:r,marked:n,orientation:o,track:i,classes:a,color:s,size:c}=e,l={root:["root",t&&"disabled",r&&"dragging",n&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${ut(s)}`,c&&`size${ut(c)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&`thumbSize${ut(c)}`,s&&`thumbColor${ut(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return pt(l,oFe,a)},yFe=({children:e})=>e,bFe=A.forwardRef(function(t,r){var n,o,i,a,s,c,l,u,f,d,h,p,g,m,v,y,b,w,E,I,O,D,N,U;const B=cFe({props:t,name:"MuiSlider"}),F=l0(),{"aria-label":T,"aria-valuetext":P,"aria-labelledby":_,component:C="span",components:S={},componentsProps:x={},color:k="primary",classes:L,className:j,disableSwap:z=!1,disabled:Y=!1,getAriaLabel:K,getAriaValueText:Q,marks:q=!1,max:J=100,min:G=0,orientation:V="horizontal",shiftStep:X=10,size:te="medium",step:ee=1,scale:re=PH,slotProps:se,slots:pe,track:ce="normal",valueLabelDisplay:ne="off",valueLabelFormat:he=PH}=B,oe=ze(B,lFe),le=W({},B,{isRtl:F,max:J,min:G,classes:L,disabled:Y,disableSwap:z,orientation:V,marks:q,color:k,size:te,step:ee,shiftStep:X,scale:re,track:ce,valueLabelDisplay:ne,valueLabelFormat:he}),{axisProps:de,getRootProps:ve,getHiddenInputProps:we,getThumbProps:ie,open:ge,active:Pe,axis:Fe,focusedThumbIndex:Ie,range:Oe,dragging:$e,marks:et,values:Ze,trackOffset:Ne,trackLeap:Qe,getThumbStyle:Xe}=mEe(W({},le,{rootRef:r}));le.marked=et.length>0&&et.some(me=>me.label),le.dragging=$e,le.focusedThumbIndex=Ie;const rt=vFe(le),ht=(n=(o=pe==null?void 0:pe.root)!=null?o:S.Root)!=null?n:uFe,At=(i=(a=pe==null?void 0:pe.rail)!=null?a:S.Rail)!=null?i:dFe,Qt=(s=(c=pe==null?void 0:pe.track)!=null?c:S.Track)!=null?s:fFe,Nt=(l=(u=pe==null?void 0:pe.thumb)!=null?u:S.Thumb)!=null?l:hFe,Ue=(f=(d=pe==null?void 0:pe.valueLabel)!=null?d:S.ValueLabel)!=null?f:pFe,Ye=(h=(p=pe==null?void 0:pe.mark)!=null?p:S.Mark)!=null?h:mFe,tt=(g=(m=pe==null?void 0:pe.markLabel)!=null?m:S.MarkLabel)!=null?g:gFe,st=(v=(y=pe==null?void 0:pe.input)!=null?y:S.Input)!=null?v:"input",mt=(b=se==null?void 0:se.root)!=null?b:x.root,_t=(w=se==null?void 0:se.rail)!=null?w:x.rail,Pt=(E=se==null?void 0:se.track)!=null?E:x.track,Ut=(I=se==null?void 0:se.thumb)!=null?I:x.thumb,wt=(O=se==null?void 0:se.valueLabel)!=null?O:x.valueLabel,Dt=(D=se==null?void 0:se.mark)!=null?D:x.mark,qt=(N=se==null?void 0:se.markLabel)!=null?N:x.markLabel,Tt=(U=se==null?void 0:se.input)!=null?U:x.input,Me=Cr({elementType:ht,getSlotProps:ve,externalSlotProps:mt,externalForwardedProps:oe,additionalProps:W({},nFe(ht)&&{as:C}),ownerState:W({},le,mt==null?void 0:mt.ownerState),className:[rt.root,j]}),Ge=Cr({elementType:At,externalSlotProps:_t,ownerState:le,className:rt.rail}),nt=Cr({elementType:Qt,externalSlotProps:Pt,additionalProps:{style:W({},de[Fe].offset(Ne),de[Fe].leap(Qe))},ownerState:W({},le,Pt==null?void 0:Pt.ownerState),className:rt.track}),fe=Cr({elementType:Nt,getSlotProps:ie,externalSlotProps:Ut,ownerState:W({},le,Ut==null?void 0:Ut.ownerState),className:rt.thumb}),ke=Cr({elementType:Ue,externalSlotProps:wt,ownerState:W({},le,wt==null?void 0:wt.ownerState),className:rt.valueLabel}),be=Cr({elementType:Ye,externalSlotProps:Dt,ownerState:le,className:rt.mark}),Ce=Cr({elementType:tt,externalSlotProps:qt,ownerState:le,className:rt.markLabel}),Ee=Cr({elementType:st,getSlotProps:we,externalSlotProps:Tt,ownerState:le});return xe(ht,W({},Me,{children:[R(At,W({},Ge)),R(Qt,W({},nt)),et.filter(me=>me.value>=G&&me.value<=J).map((me,_e)=>{const Be=tE(me.value,G,J),De=de[Fe].offset(Be);let je;return ce===!1?je=Ze.indexOf(me.value)!==-1:je=ce==="normal"&&(Oe?me.value>=Ze[0]&&me.value<=Ze[Ze.length-1]:me.value<=Ze[0])||ce==="inverted"&&(Oe?me.value<=Ze[0]||me.value>=Ze[Ze.length-1]:me.value>=Ze[0]),xe(A.Fragment,{children:[R(Ye,W({"data-index":_e},be,!Jc(Ye)&&{markActive:je},{style:W({},De,be.style),className:it(be.className,je&&rt.markActive)})),me.label!=null?R(tt,W({"aria-hidden":!0,"data-index":_e},Ce,!Jc(tt)&&{markLabelActive:je},{style:W({},De,Ce.style),className:it(rt.markLabel,Ce.className,je&&rt.markLabelActive),children:me.label})):null]},_e)}),Ze.map((me,_e)=>{const Be=tE(me,G,J),De=de[Fe].offset(Be),je=ne==="off"?yFe:Ue;return R(je,W({},!Jc(je)&&{valueLabelFormat:he,valueLabelDisplay:ne,value:typeof he=="function"?he(re(me),_e):he,index:_e,open:ge===_e||Pe===_e||ne==="on",disabled:Y},ke,{children:R(Nt,W({"data-index":_e},fe,{className:it(rt.thumb,fe.className,Pe===_e&&rt.active,Ie===_e&&rt.focusVisible),style:W({},De,Xe(_e),fe.style),children:R(st,W({"data-index":_e,"aria-label":K?K(_e):T,"aria-valuenow":re(me),"aria-labelledby":_,"aria-valuetext":Q?Q(re(me),_e):P,value:Ze[_e]},Ee))}))}),_e)})]}))}),wFe=bFe;function xFe(e){return Gt("MuiTooltip",e)}const CFe=Vt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Uu=CFe,SFe=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function _Fe(e){return Math.round(e*1e5)/1e5}const kFe=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:o,placement:i}=e,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",o&&"touch",`tooltipPlacement${ut(i.split("-")[0])}`],arrow:["arrow"]};return pt(a,xFe,t)},EFe=We(bf,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>W({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Uu.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Uu.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Uu.arrow}`]:W({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Uu.arrow}`]:W({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),TFe=We("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${ut(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>W({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Vr(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${_Fe(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Uu.popper}[data-popper-placement*="left"] &`]:W({transformOrigin:"right center"},t.isRtl?W({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):W({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Uu.popper}[data-popper-placement*="right"] &`]:W({transformOrigin:"left center"},t.isRtl?W({marginRight:"14px"},t.touch&&{marginRight:"24px"}):W({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Uu.popper}[data-popper-placement*="top"] &`]:W({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Uu.popper}[data-popper-placement*="bottom"] &`]:W({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),IFe=We("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Vr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let t_=!1;const MH=new gO;let ib={x:0,y:0};function r_(e,t){return(r,...n)=>{t&&t(r,...n),e(r,...n)}}const AFe=A.forwardRef(function(t,r){var n,o,i,a,s,c,l,u,f,d,h,p,g,m,v,y,b,w,E;const I=Wt({props:t,name:"MuiTooltip"}),{arrow:O=!1,children:D,components:N={},componentsProps:U={},describeChild:B=!1,disableFocusListener:F=!1,disableHoverListener:T=!1,disableInteractive:P=!1,disableTouchListener:_=!1,enterDelay:C=100,enterNextDelay:S=0,enterTouchDelay:x=700,followCursor:k=!1,id:L,leaveDelay:j=0,leaveTouchDelay:z=1500,onClose:Y,onOpen:K,open:Q,placement:q="bottom",PopperComponent:J,PopperProps:G={},slotProps:V={},slots:X={},title:te,TransitionComponent:ee=s1,TransitionProps:re}=I,se=ze(I,SFe),pe=A.isValidElement(D)?D:R("span",{children:D}),ce=An(),ne=l0(),[he,oe]=A.useState(),[le,de]=A.useState(null),ve=A.useRef(!1),we=P||k,ie=jg(),ge=jg(),Pe=jg(),Fe=jg(),[Ie,Oe]=sa({controlled:Q,default:!1,name:"Tooltip",state:"open"});let $e=Ie;const et=dn(L),Ze=A.useRef(),Ne=Mt(()=>{Ze.current!==void 0&&(document.body.style.WebkitUserSelect=Ze.current,Ze.current=void 0),Fe.clear()});A.useEffect(()=>Ne,[Ne]);const Qe=Le=>{MH.clear(),t_=!0,Oe(!0),K&&!$e&&K(Le)},Xe=Mt(Le=>{MH.start(800+j,()=>{t_=!1}),Oe(!1),Y&&$e&&Y(Le),ie.start(ce.transitions.duration.shortest,()=>{ve.current=!1})}),rt=Le=>{ve.current&&Le.type!=="touchstart"||(he&&he.removeAttribute("title"),ge.clear(),Pe.clear(),C||t_&&S?ge.start(t_?S:C,()=>{Qe(Le)}):Qe(Le))},ht=Le=>{ge.clear(),Pe.start(j,()=>{Xe(Le)})},{isFocusVisibleRef:At,onBlur:Qt,onFocus:Nt,ref:Ue}=y2(),[,Ye]=A.useState(!1),tt=Le=>{Qt(Le),At.current===!1&&(Ye(!1),ht(Le))},st=Le=>{he||oe(Le.currentTarget),Nt(Le),At.current===!0&&(Ye(!0),rt(Le))},mt=Le=>{ve.current=!0;const lt=pe.props;lt.onTouchStart&&lt.onTouchStart(Le)},_t=Le=>{mt(Le),Pe.clear(),ie.clear(),Ne(),Ze.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Fe.start(x,()=>{document.body.style.WebkitUserSelect=Ze.current,rt(Le)})},Pt=Le=>{pe.props.onTouchEnd&&pe.props.onTouchEnd(Le),Ne(),Pe.start(z,()=>{Xe(Le)})};A.useEffect(()=>{if(!$e)return;function Le(lt){(lt.key==="Escape"||lt.key==="Esc")&&Xe(lt)}return document.addEventListener("keydown",Le),()=>{document.removeEventListener("keydown",Le)}},[Xe,$e]);const Ut=Ur(pe.ref,Ue,oe,r);!te&&te!==0&&($e=!1);const wt=A.useRef(),Dt=Le=>{const lt=pe.props;lt.onMouseMove&&lt.onMouseMove(Le),ib={x:Le.clientX,y:Le.clientY},wt.current&&wt.current.update()},qt={},Tt=typeof te=="string";B?(qt.title=!$e&&Tt&&!T?te:null,qt["aria-describedby"]=$e?et:null):(qt["aria-label"]=Tt?te:null,qt["aria-labelledby"]=$e&&!Tt?et:null);const Me=W({},qt,se,pe.props,{className:it(se.className,pe.props.className),onTouchStart:mt,ref:Ut},k?{onMouseMove:Dt}:{}),Ge={};_||(Me.onTouchStart=_t,Me.onTouchEnd=Pt),T||(Me.onMouseOver=r_(rt,Me.onMouseOver),Me.onMouseLeave=r_(ht,Me.onMouseLeave),we||(Ge.onMouseOver=rt,Ge.onMouseLeave=ht)),F||(Me.onFocus=r_(st,Me.onFocus),Me.onBlur=r_(tt,Me.onBlur),we||(Ge.onFocus=st,Ge.onBlur=tt));const nt=A.useMemo(()=>{var Le;let lt=[{name:"arrow",enabled:!!le,options:{element:le,padding:4}}];return(Le=G.popperOptions)!=null&&Le.modifiers&&(lt=lt.concat(G.popperOptions.modifiers)),W({},G.popperOptions,{modifiers:lt})},[le,G]),fe=W({},I,{isRtl:ne,arrow:O,disableInteractive:we,placement:q,PopperComponentProp:J,touch:ve.current}),ke=kFe(fe),be=(n=(o=X.popper)!=null?o:N.Popper)!=null?n:EFe,Ce=(i=(a=(s=X.transition)!=null?s:N.Transition)!=null?a:ee)!=null?i:s1,Ee=(c=(l=X.tooltip)!=null?l:N.Tooltip)!=null?c:TFe,me=(u=(f=X.arrow)!=null?f:N.Arrow)!=null?u:IFe,_e=Vg(be,W({},G,(d=V.popper)!=null?d:U.popper,{className:it(ke.popper,G==null?void 0:G.className,(h=(p=V.popper)!=null?p:U.popper)==null?void 0:h.className)}),fe),Be=Vg(Ce,W({},re,(g=V.transition)!=null?g:U.transition),fe),De=Vg(Ee,W({},(m=V.tooltip)!=null?m:U.tooltip,{className:it(ke.tooltip,(v=(y=V.tooltip)!=null?y:U.tooltip)==null?void 0:v.className)}),fe),je=Vg(me,W({},(b=V.arrow)!=null?b:U.arrow,{className:it(ke.arrow,(w=(E=V.arrow)!=null?E:U.arrow)==null?void 0:w.className)}),fe);return xe(A.Fragment,{children:[A.cloneElement(pe,Me),R(be,W({as:J??bf,placement:q,anchorEl:k?{getBoundingClientRect:()=>({top:ib.y,left:ib.x,right:ib.x,bottom:ib.y,width:0,height:0})}:he,popperRef:wt,open:he?$e:!1,id:et,transition:!0},Ge,_e,{popperOptions:nt,children:({TransitionProps:Le})=>R(Ce,W({timeout:ce.transitions.duration.shorter},Le,Be,{children:xe(Ee,W({},De,{children:[te,O?R(me,W({},je,{ref:de})):null]}))}))}))]})}),HD=AFe,PFe=A.createContext({}),YI=PFe,MFe=A.createContext({}),zD=MFe;function RFe(e){return Gt("MuiStep",e)}Vt("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const OFe=["active","children","className","component","completed","disabled","expanded","index","last"],DFe=e=>{const{classes:t,orientation:r,alternativeLabel:n,completed:o}=e;return pt({root:["root",r,n&&"alternativeLabel",o&&"completed"]},RFe,t)},FFe=We("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})(({ownerState:e})=>W({},e.orientation==="horizontal"&&{paddingLeft:8,paddingRight:8},e.alternativeLabel&&{flex:1,position:"relative"})),NFe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:c,disabled:l,expanded:u=!1,index:f,last:d}=n,h=ze(n,OFe),{activeStep:p,connector:g,alternativeLabel:m,orientation:v,nonLinear:y}=A.useContext(YI);let[b=!1,w=!1,E=!1]=[o,c,l];p===f?b=o!==void 0?o:!0:!y&&p>f?w=c!==void 0?c:!0:!y&&p<f&&(E=l!==void 0?l:!0);const I=A.useMemo(()=>({index:f,last:d,expanded:u,icon:f+1,active:b,completed:w,disabled:E}),[f,d,u,b,w,E]),O=W({},n,{active:b,orientation:v,alternativeLabel:m,completed:w,disabled:E,expanded:u,component:s}),D=DFe(O),N=xe(FFe,W({as:s,className:it(D.root,a),ref:r,ownerState:O},h,{children:[g&&m&&f!==0?g:null,i]}));return R(zD.Provider,{value:I,children:g&&!m&&f!==0?xe(A.Fragment,{children:[g,N]}):N})}),LFe=NFe,$Fe=Sr(R("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),BFe=Sr(R("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function UFe(e){return Gt("MuiStepIcon",e)}const HFe=Vt("MuiStepIcon",["root","active","completed","error","text"]),JA=HFe;var RH;const zFe=["active","className","completed","error","icon"],jFe=e=>{const{classes:t,active:r,completed:n,error:o}=e;return pt({root:["root",r&&"active",n&&"completed",o&&"error"],text:["text"]},UFe,t)},eP=We(fR,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${JA.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${JA.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${JA.error}`]:{color:(e.vars||e).palette.error.main}})),VFe=We("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily})),WFe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:c}=n,l=ze(n,zFe),u=W({},n,{active:o,completed:a,error:s}),f=jFe(u);if(typeof c=="number"||typeof c=="string"){const d=it(i,f.root);return s?R(eP,W({as:BFe,className:d,ref:r,ownerState:u},l)):a?R(eP,W({as:$Fe,className:d,ref:r,ownerState:u},l)):xe(eP,W({className:d,ref:r,ownerState:u},l,{children:[RH||(RH=R("circle",{cx:"12",cy:"12",r:"12"})),R(VFe,{className:f.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:c})]}))}return c}),GFe=WFe;function qFe(e){return Gt("MuiStepLabel",e)}const KFe=Vt("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),wh=KFe,YFe=["children","className","componentsProps","error","icon","optional","slotProps","StepIconComponent","StepIconProps"],XFe=e=>{const{classes:t,orientation:r,active:n,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return pt({root:["root",r,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",n&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",n&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},qFe,t)},QFe=We("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation]]}})(({ownerState:e})=>W({display:"flex",alignItems:"center",[`&.${wh.alternativeLabel}`]:{flexDirection:"column"},[`&.${wh.disabled}`]:{cursor:"default"}},e.orientation==="vertical"&&{textAlign:"left",padding:"8px 0"})),ZFe=We("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(({theme:e})=>W({},e.typography.body2,{display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${wh.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${wh.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${wh.alternativeLabel}`]:{marginTop:16},[`&.${wh.error}`]:{color:(e.vars||e).palette.error.main}})),JFe=We("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})(()=>({flexShrink:0,display:"flex",paddingRight:8,[`&.${wh.alternativeLabel}`]:{paddingRight:0}})),eNe=We("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${wh.alternativeLabel}`]:{textAlign:"center"}})),IJ=A.forwardRef(function(t,r){var n;const o=Wt({props:t,name:"MuiStepLabel"}),{children:i,className:a,componentsProps:s={},error:c=!1,icon:l,optional:u,slotProps:f={},StepIconComponent:d,StepIconProps:h}=o,p=ze(o,YFe),{alternativeLabel:g,orientation:m}=A.useContext(YI),{active:v,disabled:y,completed:b,icon:w}=A.useContext(zD),E=l||w;let I=d;E&&!I&&(I=GFe);const O=W({},o,{active:v,alternativeLabel:g,completed:b,disabled:y,error:c,orientation:m}),D=XFe(O),N=(n=f.label)!=null?n:s.label;return xe(QFe,W({className:it(D.root,a),ref:r,ownerState:O},p,{children:[E||I?R(JFe,{className:D.iconContainer,ownerState:O,children:R(I,W({completed:b,active:v,error:c,icon:E},h))}):null,xe(eNe,{className:D.labelContainer,ownerState:O,children:[i?R(ZFe,W({ownerState:O},N,{className:it(D.label,N==null?void 0:N.className),children:i})):null,u]})]}))});IJ.muiName="StepLabel";const tNe=IJ;function rNe(e){return Gt("MuiStepConnector",e)}Vt("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const nNe=["className"],oNe=e=>{const{classes:t,orientation:r,alternativeLabel:n,active:o,completed:i,disabled:a}=e,s={root:["root",r,n&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${ut(r)}`]};return pt(s,rNe,t)},iNe=We("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel,r.completed&&t.completed]}})(({ownerState:e})=>W({flex:"1 1 auto"},e.orientation==="vertical"&&{marginLeft:12},e.alternativeLabel&&{position:"absolute",top:8+4,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"})),aNe=We("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.line,t[`line${ut(r.orientation)}`]]}})(({ownerState:e,theme:t})=>{const r=t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600];return W({display:"block",borderColor:t.vars?t.vars.palette.StepConnector.border:r},e.orientation==="horizontal"&&{borderTopStyle:"solid",borderTopWidth:1},e.orientation==="vertical"&&{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24})}),sNe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiStepConnector"}),{className:o}=n,i=ze(n,nNe),{alternativeLabel:a,orientation:s="horizontal"}=A.useContext(YI),{active:c,disabled:l,completed:u}=A.useContext(zD),f=W({},n,{alternativeLabel:a,orientation:s,active:c,completed:u,disabled:l}),d=oNe(f);return R(iNe,W({className:it(d.root,o),ref:r,ownerState:f},i,{children:R(aNe,{className:d.line,ownerState:f})}))}),lNe=sNe;function cNe(e){return Gt("MuiStepper",e)}Vt("MuiStepper",["root","horizontal","vertical","alternativeLabel"]);const uNe=["activeStep","alternativeLabel","children","className","component","connector","nonLinear","orientation"],dNe=e=>{const{orientation:t,alternativeLabel:r,classes:n}=e;return pt({root:["root",t,r&&"alternativeLabel"]},cNe,n)},fNe=We("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.orientation],r.alternativeLabel&&t.alternativeLabel]}})(({ownerState:e})=>W({display:"flex"},e.orientation==="horizontal"&&{flexDirection:"row",alignItems:"center"},e.orientation==="vertical"&&{flexDirection:"column"},e.alternativeLabel&&{alignItems:"flex-start"})),hNe=R(lNe,{}),pNe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:c="div",connector:l=hNe,nonLinear:u=!1,orientation:f="horizontal"}=n,d=ze(n,uNe),h=W({},n,{alternativeLabel:i,orientation:f,component:c}),p=dNe(h),g=A.Children.toArray(a).filter(Boolean),m=g.map((y,b)=>A.cloneElement(y,W({index:b,last:b+1===g.length},y.props))),v=A.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:l,nonLinear:u,orientation:f}),[o,i,l,u,f]);return R(YI.Provider,{value:v,children:R(fNe,W({as:c,ownerState:h,className:it(p.root,s),ref:r},d,{children:m}))})}),mNe=pNe;function gNe(e){return Gt("MuiSwitch",e)}const vNe=Vt("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Ba=vNe,yNe=["className","color","edge","size","sx"],bNe=W2(),wNe=e=>{const{classes:t,edge:r,size:n,color:o,checked:i,disabled:a}=e,s={root:["root",r&&`edge${ut(r)}`,`size${ut(n)}`],switchBase:["switchBase",`color${ut(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=pt(s,gNe,t);return W({},t,c)},xNe=We("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.edge&&t[`edge${ut(r.edge)}`],t[`size${ut(r.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Ba.thumb}`]:{width:16,height:16},[`& .${Ba.switchBase}`]:{padding:4,[`&.${Ba.checked}`]:{transform:"translateX(16px)"}}}}]}),CNe=We(CJ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.switchBase,{[`& .${Ba.input}`]:t.input},r.color!=="default"&&t[`color${ut(r.color)}`]]}})(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Ba.checked}`]:{transform:"translateX(20px)"},[`&.${Ba.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Ba.checked} + .${Ba.track}`]:{opacity:.5},[`&.${Ba.disabled} + .${Ba.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${Ba.input}`]:{left:"-100%",width:"300%"}}),({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(([,t])=>t.main&&t.light).map(([t])=>({props:{color:t},style:{[`&.${Ba.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Vr(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ba.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?rx(e.palette[t].main,.62):tx(e.palette[t].main,.55)}`}},[`&.${Ba.checked} + .${Ba.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]})),SNe=We("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`})),_Ne=We("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),kNe=A.forwardRef(function(t,r){const n=bNe({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:c}=n,l=ze(n,yNe),u=W({},n,{color:i,edge:a,size:s}),f=wNe(u),d=R(_Ne,{className:f.thumb,ownerState:u});return xe(xNe,{className:it(f.root,o),sx:c,ownerState:u,children:[R(CNe,W({type:"checkbox",icon:d,checkedIcon:d,ref:r,ownerState:u},l,{classes:W({},f,{root:f.switchBase})})),R(SNe,{className:f.track,ownerState:u})]})}),ENe=kNe,TNe=A.createContext(),INe=TNe,ANe=A.createContext(),PNe=ANe;function MNe(e){return Gt("MuiTableCell",e)}const RNe=Vt("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),ONe=RNe,DNe=["align","className","component","padding","scope","size","sortDirection","variant"],FNe=e=>{const{classes:t,variant:r,align:n,padding:o,size:i,stickyHeader:a}=e,s={root:["root",r,a&&"stickyHeader",n!=="inherit"&&`align${ut(n)}`,o!=="normal"&&`padding${ut(o)}`,`size${ut(i)}`]};return pt(s,MNe,t)},NNe=We("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${ut(r.size)}`],r.padding!=="normal"&&t[`padding${ut(r.padding)}`],r.align!=="inherit"&&t[`align${ut(r.align)}`],r.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>W({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
    ${e.palette.mode==="light"?rx(Vr(e.palette.divider,1),.88):tx(Vr(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${ONe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),LNe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:c,size:l,sortDirection:u,variant:f}=n,d=ze(n,DNe),h=A.useContext(INe),p=A.useContext(PNe),g=p&&p.variant==="head";let m;a?m=a:m=g?"th":"td";let v=c;m==="td"?v=void 0:!v&&g&&(v="col");const y=f||p&&p.variant,b=W({},n,{align:o,component:m,padding:s||(h&&h.padding?h.padding:"normal"),size:l||(h&&h.size?h.size:"medium"),sortDirection:u,stickyHeader:y==="head"&&h&&h.stickyHeader,variant:y}),w=FNe(b);let E=null;return u&&(E=u==="asc"?"ascending":"descending"),R(NNe,W({as:m,ref:r,className:it(w.root,i),"aria-sort":E,scope:v,ownerState:b},d))}),ZR=LNe;function $Ne(e){return Gt("MuiToolbar",e)}Vt("MuiToolbar",["root","gutters","regular","dense"]);const BNe=["className","component","disableGutters","variant"],UNe=e=>{const{classes:t,disableGutters:r,variant:n}=e;return pt({root:["root",!r&&"gutters",n]},$Ne,t)},HNe=We("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disableGutters&&t.gutters,t[r.variant]]}})(({theme:e,ownerState:t})=>W({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),zNe=A.forwardRef(function(t,r){const n=Wt({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular"}=n,c=ze(n,BNe),l=W({},n,{component:i,disableGutters:a,variant:s}),u=UNe(l);return R(HNe,W({as:i,className:it(u.root,o),ref:r,ownerState:l},c))}),jNe=zNe,VNe=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],WNe=A.forwardRef(function(t,r){var n,o,i,a,s,c,l,u;const{backIconButtonProps:f,count:d,disabled:h=!1,getItemAriaLabel:p,nextIconButtonProps:g,onPageChange:m,page:v,rowsPerPage:y,showFirstButton:b,showLastButton:w,slots:E={},slotProps:I={}}=t,O=ze(t,VNe),D=l0(),N=V=>{m(V,0)},U=V=>{m(V,v-1)},B=V=>{m(V,v+1)},F=V=>{m(V,Math.max(0,Math.ceil(d/y)-1))},T=(n=E.firstButton)!=null?n:ri,P=(o=E.lastButton)!=null?o:ri,_=(i=E.nextButton)!=null?i:ri,C=(a=E.previousButton)!=null?a:ri,S=(s=E.firstButtonIcon)!=null?s:eFe,x=(c=E.lastButtonIcon)!=null?c:tFe,k=(l=E.nextButtonIcon)!=null?l:hZ,L=(u=E.previousButtonIcon)!=null?u:fZ,j=D?P:T,z=D?_:C,Y=D?C:_,K=D?T:P,Q=D?I.lastButton:I.firstButton,q=D?I.nextButton:I.previousButton,J=D?I.previousButton:I.nextButton,G=D?I.firstButton:I.lastButton;return xe("div",W({ref:r},O,{children:[b&&R(j,W({onClick:N,disabled:h||v===0,"aria-label":p("first",v),title:p("first",v)},Q,{children:D?R(x,W({},I.lastButtonIcon)):R(S,W({},I.firstButtonIcon))})),R(z,W({onClick:U,disabled:h||v===0,color:"inherit","aria-label":p("previous",v),title:p("previous",v)},q??f,{children:D?R(k,W({},I.nextButtonIcon)):R(L,W({},I.previousButtonIcon))})),R(Y,W({onClick:B,disabled:h||(d!==-1?v>=Math.ceil(d/y)-1:!1),color:"inherit","aria-label":p("next",v),title:p("next",v)},J??g,{children:D?R(L,W({},I.previousButtonIcon)):R(k,W({},I.nextButtonIcon))})),w&&R(K,W({onClick:F,disabled:h||v>=Math.ceil(d/y)-1,"aria-label":p("last",v),title:p("last",v)},G,{children:D?R(S,W({},I.firstButtonIcon)):R(x,W({},I.lastButtonIcon))}))]}))}),GNe=WNe;function qNe(e){return Gt("MuiTablePagination",e)}const KNe=Vt("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),Sm=KNe;var OH;const YNe=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],XNe=We(ZR,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),QNe=We(jNe,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>W({[`& .${Sm.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Sm.actions}`]:{flexShrink:0,marginLeft:20}})),ZNe=We("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),JNe=We("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(({theme:e})=>W({},e.typography.body2,{flexShrink:0})),e9e=We(L2,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>W({[`& .${Sm.selectIcon}`]:t.selectIcon,[`& .${Sm.select}`]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${Sm.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),t9e=We(go,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),r9e=We("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(({theme:e})=>W({},e.typography.body2,{flexShrink:0}));function n9e({from:e,to:t,count:r}){return`${e}–${t} of ${r!==-1?r:`more than ${t}`}`}function o9e(e){return`Go to ${e} page`}const i9e=e=>{const{classes:t}=e;return pt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},qNe,t)},a9e=A.forwardRef(function(t,r){var n;const o=Wt({props:t,name:"MuiTablePagination"}),{ActionsComponent:i=GNe,backIconButtonProps:a,className:s,colSpan:c,component:l=ZR,count:u,disabled:f=!1,getItemAriaLabel:d=o9e,labelDisplayedRows:h=n9e,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:g,onPageChange:m,onRowsPerPageChange:v,page:y,rowsPerPage:b,rowsPerPageOptions:w=[10,25,50,100],SelectProps:E={},showFirstButton:I=!1,showLastButton:O=!1,slotProps:D={},slots:N={}}=o,U=ze(o,YNe),B=o,F=i9e(B),T=(n=D==null?void 0:D.select)!=null?n:E,P=T.native?"option":t9e;let _;(l===ZR||l==="td")&&(_=c||1e3);const C=dn(T.id),S=dn(T.labelId),x=()=>u===-1?(y+1)*b:b===-1?u:Math.min(u,(y+1)*b);return R(XNe,W({colSpan:_,ref:r,as:l,ownerState:B,className:it(F.root,s)},U,{children:xe(QNe,{className:F.toolbar,children:[R(ZNe,{className:F.spacer}),w.length>1&&R(JNe,{className:F.selectLabel,id:S,children:p}),w.length>1&&R(e9e,W({variant:"standard"},!T.variant&&{input:OH||(OH=R(V1,{}))},{value:b,onChange:v,id:C,labelId:S},T,{classes:W({},T.classes,{root:it(F.input,F.selectRoot,(T.classes||{}).root),select:it(F.select,(T.classes||{}).select),icon:it(F.selectIcon,(T.classes||{}).icon)}),disabled:f,children:w.map(k=>A.createElement(P,W({},!Jc(P)&&{ownerState:B},{className:F.menuItem,key:k.label?k.label:k,value:k.value?k.value:k}),k.label?k.label:k))})),R(r9e,{className:F.displayedRows,children:h({from:u===0?0:y*b+1,to:x(),count:u===-1?-1:u,page:y})}),R(i,{className:F.actions,backIconButtonProps:a,count:u,nextIconButtonProps:g,onPageChange:m,page:y,rowsPerPage:b,showFirstButton:I,showLastButton:O,slotProps:D.actions,slots:N.actions,getItemAriaLabel:d,disabled:f})]})}))}),s9e=a9e,AJ=A.createContext(null);function on(){return A.useContext(AJ)}const l9e=()=>{const[e]=V2(),t=e.get("jwt"),r=(e.get("dest")??"/").replace(/^([^\/].*)$/,"/$1"),{ssoAuthLogin:n,isAuthenticated:o}=on(),[i,a]=A.useState(!t);A.useEffect(()=>{s()},[]);async function s(){try{const c=await n(t);!c&&a(!c)}catch{a(!0)}}return o()?R(jm,{to:r,replace:!0}):xe(Jt,{spacing:2,margin:20,children:[!i&&R(nr,{display:"flex",justifyContent:"center",children:R(Ri,{})}),R(jt,{variant:"h6",textAlign:"center",children:i?"We do not recognize that user.":"Wait a minute, we are verifying the credentials."})]})},ab={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info",DEFAULT:"default"},bt={ALREADY_EMAIL_IN_USE:"This email address is already in use.",ALREADY_USERNAME_IN_USE:"This username is already in use.",DEACTIVATE_SUCCESS:"Deactivate successfully.",CHANGE_PASSWORD_ERROR:"Password change unsuccessful, Please verify your information and try again.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed successfully.S",CONTACT_REQUEST_SUCCESS:"Contact request sent successfully.",CREATE_SUCCESS:"Create successfully.",DELETE_SUCCESS:"Delete successfully.",DISABLE_SUCCESS:"Disable successfully.",ENABLE_SUCCESS:"Enable successfully.",ERROR:"Something went wrong. Please try again later.",FORM_FIELDS_ERROR:"Some form fields need your attention.",FORGOT_PASSWORD_ERROR:"Unable to send password reset email, Please verify your information and try again.",ORG_SWITCHED:"Organization switched successfully.",PASSWORD_RESET_EMAIL_SENT:"Password reset email sent successfully.",REACTIVATE_SUCCESS:"Reactivate successfully.",SIGNUP_SUCCESS:"Welcome to Nimble Energy!",UPDATE_SUCCESS:"Update successfully.",UPLOAD_FILES_SUCCESS:"Files uploaded successfully.",UPLOAD_FILES_ERROR:"Something went wrong while uploading files.",VALIDATION_ERRORS:"There were some validation errors, please verify that the required fields are filled out correctly and any input meets the specified criteria."};let PJ;const c9e=()=>(PJ=rJ(),null),u9e=e=>{const{closeSnackbar:t}=rJ();return R(Ft,{variant:"text",onClick:()=>{t(e)},children:"Dismiss"})},St={toast(e,t=ab.DEFAULT){PJ.enqueueSnackbar(e,{variant:t,action:u9e})},error(e){this.toast(e,ab.ERROR)},info(e){this.toast(e,ab.INFO)},success(e){this.toast(e,ab.SUCCESS)},warning(e){this.toast(e,ab.WARNING)}},sb=Go(tJ)(({theme:e})=>({"&.notistack-MuiContent-success":{backgroundColor:e.palette.success.main},"&.notistack-MuiContent-error":{backgroundColor:e.palette.error.main},"&.notistack-MuiContent-warning":{backgroundColor:e.palette.warning.main},"&.notistack-MuiContent-info":{backgroundColor:e.palette.info.main},"&.notistack-MuiContent-root":{backgroundColor:e.palette.primary.main}})),d9e={success:sb,error:sb,warning:sb,info:sb,default:sb};var Pi=(e=>(e.SystemAdministrator="System Administrator",e.Administrator="Administrator",e.User="User",e))(Pi||{});const G2=Sr(R("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"CheckCircleOutline"),f9e=Sr(R("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),h9e=Sr(R("path",{d:"M7 9H2V7h5v2zm0 3H2v2h5v-2zm13.59 7-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L22 17.59 20.59 19zM17 11c0-1.65-1.35-3-3-3s-3 1.35-3 3 1.35 3 3 3 3-1.35 3-3zM2 19h10v-2H2v2z"}),"ManageSearch"),q2=Sr(R("path",{d:"M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"RemoveCircleOutline");var xf=(e=>(e[e.Experimental=0]="Experimental",e))(xf||{}),Y1=(e=>(e.smartMeters="Smart Meters",e.billAutomation="Bill Automation",e.customDashboards="Custom Dashboards",e))(Y1||{});const MJ=A.createContext(void 0);function lu(){const e=A.useContext(MJ);if(e===void 0)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join(`
`));return e}const DH={};function jD(e,t){const r=A.useRef(DH);return r.current===DH&&(r.current=e(t)),r}const p9e=[];function VD(e){A.useEffect(e,p9e)}const cd=(e,t="warning")=>{let r=!1;const n=Array.isArray(e)?e.join(`
`):e;return()=>{r||(r=!0,t==="error"?console.error(n):console.warn(n))}},m9e=Object.is;function RJ(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=0,n=0;for(const o in e)if(r+=1,!m9e(e[o],t[o])||!(o in t))return!1;for(const o in t)n+=1;return r===n}cd(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);function g9e(e){return e.acceptsApiRef}function FH(e,t){return g9e(t)?t(e):t(e.current.state)}const v9e=Object.is,WD=RJ,y9e=()=>({state:null,equals:null,selector:null}),$t=(e,t,r=v9e)=>{const n=jD(y9e),o=n.current.selector!==null,[i,a]=A.useState(o?null:FH(e,t));return n.current.state=i,n.current.equals=r,n.current.selector=t,VD(()=>e.current.store.subscribe(()=>{const s=FH(e,n.current.selector);n.current.equals(n.current.state,s)||(n.current.state=s,a(s))})),i};function Rr(e){return Gt("MuiDataGrid",e)}const qe=Vt("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),OJ=A.createContext(void 0),dr=()=>{const e=A.useContext(OJ);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};var uE="NOT_FOUND";function b9e(e){var t;return{get:function(n){return t&&e(t.key,n)?t.value:uE},put:function(n,o){t={key:n,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function w9e(e,t){var r=[];function n(s){var c=r.findIndex(function(u){return t(s,u.key)});if(c>-1){var l=r[c];return c>0&&(r.splice(c,1),r.unshift(l)),l.value}return uE}function o(s,c){n(s)===uE&&(r.unshift({key:s,value:c}),r.length>e&&r.pop())}function i(){return r}function a(){r=[]}return{get:n,put:o,getEntries:i,clear:a}}var x9e=function(t,r){return t===r};function C9e(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var o=r.length,i=0;i<o;i++)if(!e(r[i],n[i]))return!1;return!0}}function XI(e,t){var r=typeof t=="object"?t:{equalityCheck:t},n=r.equalityCheck,o=n===void 0?x9e:n,i=r.maxSize,a=i===void 0?1:i,s=r.resultEqualityCheck,c=C9e(o),l=a===1?b9e(c):w9e(a,c);function u(){var f=l.get(arguments);if(f===uE){if(f=e.apply(null,arguments),s){var d=l.getEntries(),h=d.find(function(p){return s(p.value,f)});h&&(f=h.value)}l.put(arguments,f)}return f}return u.clearCache=function(){return l.clear()},u}function S9e(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(n){return typeof n=="function"})){var r=t.map(function(n){return typeof n=="function"?"function "+(n.name||"unnamed")+"()":typeof n}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+r+"]")}return t}function _9e(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=function(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];var l=0,u,f={memoizeOptions:void 0},d=s.pop();if(typeof d=="object"&&(f=d,d=s.pop()),typeof d!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof d+"]");var h=f,p=h.memoizeOptions,g=p===void 0?r:p,m=Array.isArray(g)?g:[g],v=S9e(s),y=e.apply(void 0,[function(){return l++,d.apply(null,arguments)}].concat(m)),b=e(function(){for(var E=[],I=v.length,O=0;O<I;O++)E.push(v[O].apply(null,arguments));return u=y.apply(null,E),u});return Object.assign(b,{resultFunc:d,memoizedResultFunc:y,dependencies:v,lastResult:function(){return u},recomputations:function(){return l},resetRecomputations:function(){return l=0}}),b};return o}var k9e=_9e(XI);const E9e={cache:new WeakMap};cd(["MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.","To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g. `mySelector(state, apiRef.current.instanceId)`."]);function _g(e){return"current"in e&&"instanceId"in e.current}const kg={id:"default"},Xr=(e,t,r,n,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&r&&n&&o&&i)s=(c,l)=>{const u=_g(c),f=l??(u?c.current.instanceId:kg),d=u?c.current.state:c,h=e(d,f),p=t(d,f),g=r(d,f),m=n(d,f),v=o(d,f);return i(h,p,g,m,v)};else if(e&&t&&r&&n&&o)s=(c,l)=>{const u=_g(c),f=l??(u?c.current.instanceId:kg),d=u?c.current.state:c,h=e(d,f),p=t(d,f),g=r(d,f),m=n(d,f);return o(h,p,g,m)};else if(e&&t&&r&&n)s=(c,l)=>{const u=_g(c),f=l??(u?c.current.instanceId:kg),d=u?c.current.state:c,h=e(d,f),p=t(d,f),g=r(d,f);return n(h,p,g)};else if(e&&t&&r)s=(c,l)=>{const u=_g(c),f=l??(u?c.current.instanceId:kg),d=u?c.current.state:c,h=e(d,f),p=t(d,f);return r(h,p)};else if(e&&t)s=(c,l)=>{const u=_g(c),f=l??(u?c.current.instanceId:kg),d=u?c.current.state:c,h=e(d,f);return t(h)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},ko=(...e)=>{const t=(...r)=>{var n,o;const[i,a]=r,s=_g(i),c=s?i.current.instanceId:a??kg,l=s?i.current.state:i,{cache:u}=E9e;if(u.get(c)&&(n=u.get(c))!=null&&n.get(e)){var f;return(f=u.get(c))==null?void 0:f.get(e)(l,c)}const d=k9e(...e);return u.get(c)||u.set(c,new Map),(o=u.get(c))==null||o.set(e,d),d(l,c)};return t.acceptsApiRef=!0,t},Hh=e=>e.columns,tu=Xr(Hh,e=>e.orderedFields),fp=Xr(Hh,e=>e.lookup),Xu=ko(tu,fp,(e,t)=>e.map(r=>t[r])),ic=Xr(Hh,e=>e.columnVisibilityModel),Mi=ko(Xu,ic,(e,t)=>e.filter(r=>t[r.field]!==!1)),Xh=ko(Mi,e=>e.map(t=>t.field)),Wm=ko(Mi,e=>{const t=[];let r=0;for(let n=0;n<e.length;n+=1)t.push(r),r+=e[n].computedWidth;return t}),K2=Xr(Mi,Wm,(e,t)=>{const r=e.length;return r===0?0:t[r-1]+e[r-1].computedWidth}),DJ=ko(Xu,e=>e.filter(t=>t.filterable)),T9e=ko(Xu,e=>e.reduce((t,r)=>(r.filterable&&(t[r.field]=r),t),{})),QI=e=>e.columnGrouping,I9e=ko(QI,e=>{var t;return(t=e==null?void 0:e.unwrappedGroupingModel)!=null?t:{}}),FJ=ko(QI,e=>{var t;return(t=e==null?void 0:e.lookup)!=null?t:{}}),A9e=ko(QI,e=>{var t;return(t=e==null?void 0:e.headerStructure)!=null?t:[]}),Y2=Xr(QI,e=>{var t;return(t=e==null?void 0:e.maxDepth)!=null?t:0}),cu=e=>e.rows,ZI=Xr(cu,e=>e.totalRowCount),P9e=Xr(cu,e=>e.loading),M9e=Xr(cu,e=>e.totalTopLevelRowCount),xh=Xr(cu,e=>e.dataRowIdToModelLookup),dE=Xr(cu,e=>e.dataRowIdToIdLookup),dl=Xr(cu,e=>e.tree),R9e=Xr(cu,e=>e.groupingName),NH=Xr(cu,e=>e.treeDepths),X1=ko(cu,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,r])=>r>0).map(([r])=>Number(r)).sort((r,n)=>n-r)[0]+1}),Mb=Xr(cu,e=>e.dataRowIds),O9e=Xr(cu,e=>e==null?void 0:e.additionalRowGroups),f0=ko(O9e,e=>{var t,r;const n=e==null?void 0:e.pinnedRows;return{bottom:n==null||(t=n.bottom)==null?void 0:t.map(o=>{var i;return{id:o.id,model:(i=o.model)!=null?i:{}}}),top:n==null||(r=n.top)==null?void 0:r.map(o=>{var i;return{id:o.id,model:(i=o.model)!=null?i:{}}})}}),D9e=Xr(f0,e=>{var t,r;return((e==null||(t=e.top)==null?void 0:t.length)||0)+((e==null||(r=e.bottom)==null?void 0:r.length)||0)}),NJ=()=>{var e;const t=lu(),r=dr(),n=$t(t,Mi),o=$t(t,ZI),i=$t(t,Y2),a=$t(t,D9e);let s="grid";return(e=r.experimentalFeatures)!=null&&e.ariaV7&&r.treeData&&(s="treegrid"),{role:s,"aria-colcount":n.length,"aria-rowcount":i+1+a+o,"aria-multiselectable":!r.disableMultipleRowSelection}},F9e=e=>{const{classes:t}=e;return pt({root:["main"]},Rr,t)},N9e=Go("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})(()=>({position:"relative",flexGrow:1,display:"flex",flexDirection:"column",overflow:"hidden"})),L9e=A.forwardRef((e,t)=>{var r;const n=dr(),o=F9e(n),i=(r=n.experimentalFeatures)!=null&&r.ariaV7?NJ:null,a=typeof i=="function"?i():null;return R(N9e,W({ref:t,className:o.root,ownerState:n},a,{children:e.children}))}),LJ=e=>e.sorting,GD=Xr(LJ,e=>e.sortedRows),qD=ko(GD,xh,(e,t)=>e.map(r=>{var n;return{id:r,model:(n=t[r])!=null?n:{}}})),us=Xr(LJ,e=>e.sortModel),$9e=ko(us,e=>e.reduce((r,n,o)=>(r[n.field]={sortDirection:n.sort,sortIndex:e.length>1?o+1:void 0},r),{})),KD=e=>e.filter,Bi=Xr(KD,e=>e.filterModel);Xr(Bi,e=>e.quickFilterValues);const B9e=e=>e.visibleRowsLookup,$J=Xr(KD,e=>e.filteredRowsLookup),U9e=Xr(KD,e=>e.filteredDescendantCountLookup),Cf=ko(B9e,qD,(e,t)=>t.filter(r=>e[r.id]!==!1)),cw=ko(Cf,e=>e.map(t=>t.id)),BJ=ko($J,qD,(e,t)=>t.filter(r=>e[r.id]!==!1)),H9e=ko(BJ,e=>e.map(t=>t.id)),UJ=ko(Cf,dl,X1,(e,t,r)=>r<2?e:e.filter(n=>{var o;return((o=t[n.id])==null?void 0:o.depth)===0})),HJ=Xr(Cf,e=>e.length),JI=Xr(UJ,e=>e.length),zJ=ko(Bi,fp,(e,t)=>{var r;return(r=e.items)==null?void 0:r.filter(n=>{var o,i;if(!n.field)return!1;const a=t[n.field];if(!(a!=null&&a.filterOperators)||(a==null||(o=a.filterOperators)==null?void 0:o.length)===0)return!1;const s=a.filterOperators.find(c=>c.value===n.operator);return s?!s.InputComponent||n.value!=null&&((i=n.value)==null?void 0:i.toString())!=="":!1})}),z9e=ko(zJ,e=>e.reduce((r,n)=>(r[n.field]?r[n.field].push(n):r[n.field]=[n],r),{})),e4=e=>e.focus,ll=Xr(e4,e=>e.cell),j9e=Xr(e4,e=>e.columnHeader),V9e=Xr(e4,e=>e.columnHeaderFilter),fE=Xr(e4,e=>e.columnGroupHeader),t4=e=>e.tabIndex,hE=Xr(t4,e=>e.cell),jJ=Xr(t4,e=>e.columnHeader),W9e=Xr(t4,e=>e.columnHeaderFilter),G9e=Xr(t4,e=>e.columnGroupHeader),YD=e=>e.density,q9e=Xr(YD,e=>e.value),h0=Xr(YD,e=>e.factor),JR=e=>e.columnMenu;function K9e(e){const{VirtualScrollerComponent:t,ColumnHeadersProps:r,children:n}=e,o=lu(),i=dr(),a=A.useRef(null),s=$t(o,Mi),c=$t(o,z9e),l=$t(o,$9e),u=$t(o,Wm),f=$t(o,jJ),d=$t(o,hE),h=$t(o,G9e),p=$t(o,j9e),g=$t(o,fE),m=$t(o,h0),v=$t(o,Y2),y=$t(o,JR),b=$t(o,ic),w=$t(o,A9e),E=!(h===null&&f===null&&d===null);en(()=>{o.current.computeSizeAndPublishResizeEvent();const U=a.current;if(typeof ResizeObserver>"u")return()=>{};let B;const F=new ResizeObserver(()=>{B=requestAnimationFrame(()=>{o.current.computeSizeAndPublishResizeEvent()})});return U&&F.observe(U),()=>{B&&window.cancelAnimationFrame(B),U&&F.unobserve(U)}},[o]);const I=A.useRef(null),O=A.useRef(null),D=A.useRef(null);o.current.register("private",{columnHeadersContainerElementRef:O,columnHeadersElementRef:I,virtualScrollerRef:D,mainElementRef:a});const N=!!o.current.getRootDimensions();return xe(L9e,{ref:a,children:[R(i.slots.columnHeaders,W({ref:O,innerRef:I,visibleColumns:s,filterColumnLookup:c,sortColumnLookup:l,columnPositions:u,columnHeaderTabIndexState:f,columnGroupHeaderTabIndexState:h,columnHeaderFocus:p,columnGroupHeaderFocus:g,densityFactor:m,headerGroupingMaxDepth:v,columnMenuState:y,columnVisibility:b,columnGroupsHeaderStructure:w,hasOtherElementInTabSequence:E},r)),N&&R(t,{ref:D}),n]})}function Y9e(){var e;const t=dr();return t.hideFooter?null:R(t.slots.footer,W({},(e=t.slotProps)==null?void 0:e.footer))}const VJ=A.createContext(void 0);function Gr(){const e=A.useContext(VJ);if(e===void 0)throw new Error(["MUI: Could not find the data grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join(`
`));return e}const ro="auto-generated-group-node-root",fv=Symbol("mui.id_autogenerated"),WJ=()=>({type:"group",id:ro,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function X9e(e,t,r="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI: The data grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",r,JSON.stringify(t)].join(`
`))}const h1=(e,t,r)=>{const n=t?t(e):e.id;return X9e(n,e,r),n},ak=({rows:e,getRowId:t,loading:r,rowCount:n})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s<e.length;s+=1){const c=e[s],l=h1(c,t);i[l]=c,a[l]=l,o.rows.push(l)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:r,rowCountPropBeforePartialUpdates:n,updates:o,dataRowIdToIdLookup:a,dataRowIdToModelLookup:i}},GJ=({tree:e,rowCountProp:t=0})=>{const r=e[ro];return Math.max(t,r.children.length+(r.footerId==null?0:1))},qJ=({apiRef:e,rowCountProp:t=0,loadingProp:r,previousTree:n,previousTreeDepths:o})=>{const i=e.current.caches.rows,{tree:a,treeDepths:s,dataRowIds:c,groupingName:l}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:n,previousTreeDepths:o,updates:i.updates,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIdToModelLookup:i.dataRowIdToModelLookup}),u=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:a,treeDepths:s,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},W({},u,{totalRowCount:Math.max(t,u.dataRowIds.length),totalTopLevelRowCount:GJ({tree:u.tree,rowCountProp:t}),groupingName:l,loading:r})},hx=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,r4=(e,t,r)=>{const n=e[t];if(n.type!=="group")return[];const o=[];for(let i=0;i<n.children.length;i+=1){const a=n.children[i];(!r||!hx(e[a]))&&o.push(a),o.push(...r4(e,a,r))}return!r&&n.footerId!=null&&o.push(n.footerId),o},Q9e=({previousCache:e,getRowId:t,updates:r})=>{var n,o,i;if(e.updates.type==="full")throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const a=new Map;r.forEach(d=>{const h=h1(d,t,"A row was provided without id when calling updateRows():");a.has(h)?a.set(h,W({},a.get(h),d)):a.set(h,d)});const s={type:"partial",actions:{insert:[...(n=e.updates.actions.insert)!=null?n:[]],modify:[...(o=e.updates.actions.modify)!=null?o:[]],remove:[...(i=e.updates.actions.remove)!=null?i:[]]},idToActionLookup:W({},e.updates.idToActionLookup)},c=W({},e.dataRowIdToModelLookup),l=W({},e.dataRowIdToIdLookup),u={insert:{},modify:{},remove:{}};a.forEach((d,h)=>{const p=s.idToActionLookup[h];if(d._action==="delete"){if(p==="remove"||!c[h])return;p!=null&&(u[p][h]=!0),s.actions.remove.push(h),delete c[h],delete l[h];return}const g=c[h];if(g){p==="remove"?(u.remove[h]=!0,s.actions.modify.push(h)):p==null&&s.actions.modify.push(h),c[h]=W({},g,d);return}p==="remove"?(u.remove[h]=!0,s.actions.insert.push(h)):p==null&&s.actions.insert.push(h),c[h]=d,l[h]=h});const f=Object.keys(u);for(let d=0;d<f.length;d+=1){const h=f[d],p=u[h];Object.keys(p).length>0&&(s.actions[h]=s.actions[h].filter(g=>!p[g]))}return{dataRowIdToModelLookup:c,dataRowIdToIdLookup:l,updates:s,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function XD(e){var t,r;const n=f0(e),o=(n==null||(t=n.top)==null?void 0:t.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,i=(n==null||(r=n.bottom)==null?void 0:r.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:o,bottom:i}}function KJ(e,t){const r=h0(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*r)}px)`}const Z9e=Go("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4})),J9e=Go("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),e7e=e=>{const{classes:t}=e;return pt({root:["overlayWrapper"],inner:["overlayWrapperInner"]},Rr,t)};function t7e(e){var t,r;const n=Gr(),o=dr(),[i,a]=A.useState(()=>{var u,f;return(u=(f=n.current.getRootDimensions())==null?void 0:f.viewportInnerSize)!=null?u:null}),s=A.useCallback(()=>{var u,f;a((u=(f=n.current.getRootDimensions())==null?void 0:f.viewportInnerSize)!=null?u:null)},[n]);en(()=>n.current.subscribeEvent("viewportInnerSizeChange",s),[n,s]);let c=(t=i==null?void 0:i.height)!=null?t:0;o.autoHeight&&c===0&&(c=KJ(n,o.rowHeight));const l=e7e(W({},e,{classes:o.classes}));return i?R(Z9e,{className:it(l.root),overlayType:e.overlayType,children:R(J9e,W({className:it(l.inner),style:{height:c,width:(r=i==null?void 0:i.width)!=null?r:0}},e))}):null}function r7e(){const e=Gr(),t=dr(),r=$t(e,ZI),n=$t(e,HJ),o=$t(e,P9e),i=!o&&r===0,a=!o&&r>0&&n===0;let s=null,c="";if(i){var l;s=R(t.slots.noRowsOverlay,W({},(l=t.slotProps)==null?void 0:l.noRowsOverlay)),c="noRowsOverlay"}if(a){var u;s=R(t.slots.noResultsOverlay,W({},(u=t.slotProps)==null?void 0:u.noResultsOverlay)),c="noResultsOverlay"}if(o){var f;s=R(t.slots.loadingOverlay,W({},(f=t.slotProps)==null?void 0:f.loadingOverlay)),c="loadingOverlay"}return s===null?null:R(t7e,{overlayType:c,children:s})}function n4(e){return A.memo(e,RJ)}let tP;function n7e(){return tP===void 0&&document.createElement("div").focus({get preventScroll(){return tP=!0,!1}}),tP}var nd=function(e){return e.Cell="cell",e.Row="row",e}(nd||{}),eo=function(e){return e.Edit="edit",e.View="view",e}(eo||{}),gn=function(e){return e.Edit="edit",e.View="view",e}(gn||{}),Va=function(e){return e.And="and",e.Or="or",e}(Va||{}),Ad=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(Ad||{}),Fc=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Fc||{}),Qf=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Qf||{}),_u=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(_u||{});function YJ(e){return e.field!==void 0}function o7e(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function pE(e,t){return e.closest(`.${t}`)}function QD(e){return e.replace(/["\\]/g,"\\$&")}function i7e(e,t){return e.querySelector(`[role="columnheader"][data-field="${QD(t)}"]`)}function XJ(e){return`.${qe.row}[data-id="${QD(String(e))}"]`}function a7e(e,t){return e.querySelector(XJ(t))}function s7e(e,{id:t,field:r}){const n=XJ(t),o=`.${qe.cell}[data-field="${QD(r)}"]`,i=`${n} ${o}`;return e.querySelector(i)}function Q1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function jr(e,t,r){const n=A.useRef(!0);A.useEffect(()=>{n.current=!1,e.current.register(r,t)},[e,r,t]),n.current&&e.current.register(r,t)}class Kg extends Error{}function l7e(e,t){const{getRowId:r}=t,n=A.useCallback(p=>({field:p,colDef:e.current.getColumn(p)}),[e]),o=A.useCallback(p=>{const g=e.current.getRow(p);if(!g)throw new Kg(`No row with id #${p} found`);return{id:p,columns:e.current.getAllColumns(),row:g}},[e]),i=A.useCallback((p,g)=>{const m=e.current.getRow(p),v=e.current.getRowNode(p);if(!m||!v)throw new Kg(`No row with id #${p} found`);const y=ll(e),b=hE(e);return{id:p,field:g,row:m,rowNode:v,value:m[g],colDef:e.current.getColumn(g),cellMode:e.current.getCellMode(p,g),api:e.current,hasFocus:y!==null&&y.field===g&&y.id===p,tabIndex:b&&b.field===g&&b.id===p?0:-1}},[e]),a=A.useCallback((p,g)=>{const m=e.current.getColumn(g),v=e.current.getCellValue(p,g),y=e.current.getRow(p),b=e.current.getRowNode(p);if(!y||!b)throw new Kg(`No row with id #${p} found`);const w=ll(e),E=hE(e),I={id:p,field:g,row:y,rowNode:b,colDef:m,cellMode:e.current.getCellMode(p,g),hasFocus:w!==null&&w.field===g&&w.id===p,tabIndex:E&&E.field===g&&E.id===p?0:-1,value:v,formattedValue:v,isEditable:!1};return m&&m.valueFormatter&&(I.formattedValue=m.valueFormatter({id:p,field:I.field,value:I.value,api:e.current})),I.isEditable=m&&e.current.isCellEditable(I),I},[e]),s=A.useCallback((p,g)=>{const m=e.current.getColumn(g);if(!m||!m.valueGetter){const v=e.current.getRow(p);if(!v)throw new Kg(`No row with id #${p} found`);return v[g]}return m.valueGetter(i(p,g))},[e,i]),c=A.useCallback((p,g)=>{var m;const v=fv in p?p[fv]:(m=r==null?void 0:r(p))!=null?m:p.id,y=g.field;return!g||!g.valueGetter?p[y]:g.valueGetter(i(v,y))},[i,r]),l=A.useCallback((p,g)=>{var m;const v=c(p,g);if(!g||!g.valueFormatter)return v;const y=(m=r?r(p):p.id)!=null?m:p[fv],b=g.field;return g.valueFormatter({id:y,field:b,value:v,api:e.current})},[e,r,c]),u=A.useCallback(p=>e.current.rootElementRef.current?i7e(e.current.rootElementRef.current,p):null,[e]),f=A.useCallback(p=>e.current.rootElementRef.current?a7e(e.current.rootElementRef.current,p):null,[e]),d=A.useCallback((p,g)=>e.current.rootElementRef.current?s7e(e.current.rootElementRef.current,{id:p,field:g}):null,[e]);jr(e,{getCellValue:s,getCellParams:a,getCellElement:d,getRowValue:c,getRowFormattedValue:l,getRowParams:o,getRowElement:f,getColumnHeaderParams:n,getColumnHeaderElement:u},"public")}const c7e=["changeReason","unstable_updateValueOnRender"],u7e=["column","rowId","editCellState","align","children","colIndex","height","width","className","showRightBorder","extendRowFullWidth","row","colSpan","disableDragEvents","isNotVisible","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],d7e=["changeReason","unstable_updateValueOnRender"],mE={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:eo.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},f7e=e=>{const{align:t,showRightBorder:r,isEditable:n,isSelected:o,isSelectionMode:i,classes:a}=e,s={root:["cell",`cell--text${ut(t)}`,n&&"cell--editable",o&&"selected",r&&"cell--withRightBorder",i&&!n&&"cell--selectionMode","withBorderColor"],content:["cellContent"]};return pt(s,Rr,a)},h7e=A.forwardRef((e,t)=>{const{column:r,rowId:n,editCellState:o}=e,i=Gr(),a=dr(),s=r.field,c=$t(i,()=>{try{const N=i.current.getCellParams(n,s);return N.api=i.current,N}catch(D){if(D instanceof Kg)return mE;throw D}},WD),l=$t(i,()=>i.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:n,field:s}));if(c===mE)return null;const{cellMode:u,hasFocus:f,isEditable:d,value:h,formattedValue:p}=c,g=r.type==="actions",m=(u==="view"||!d)&&!g?c.tabIndex:-1,{classes:v,getCellClassName:y}=a,b=i.current.unstable_applyPipeProcessors("cellClassName",[],{id:n,field:s});r.cellClassName&&b.push(typeof r.cellClassName=="function"?r.cellClassName(c):r.cellClassName),y&&b.push(y(c));let w;if(o==null&&r.renderCell&&(w=r.renderCell(c),b.push(qe["cell--withRenderer"]),b.push(v==null?void 0:v["cell--withRenderer"])),o!=null&&r.renderEditCell){const D=i.current.getRowWithUpdatedValues(n,r.field),N=ze(o,c7e),U=W({},c,{row:D},N);w=r.renderEditCell(U),b.push(qe["cell--editing"]),b.push(v==null?void 0:v["cell--editing"])}const{slots:E}=a,I=E.cell,O=W({},e,{ref:t,field:s,formattedValue:p,hasFocus:f,isEditable:d,isSelected:l,value:h,cellMode:u,children:w,tabIndex:m,className:it(b)});return A.createElement(I,O)}),p7e=n4(h7e),m7e=A.forwardRef((e,t)=>{var r,n,o,i;const{column:a,rowId:s,editCellState:c,align:l,colIndex:u,height:f,width:d,className:h,showRightBorder:p,colSpan:g,disableDragEvents:m,isNotVisible:v,onClick:y,onDoubleClick:b,onMouseDown:w,onMouseUp:E,onMouseOver:I,onKeyDown:O,onKeyUp:D,onDragEnter:N,onDragOver:U}=e,B=ze(e,u7e),F=Gr(),T=dr(),P=a.field,_=$t(F,()=>{try{const we=F.current.getCellParams(s,P);return we.api=F.current,we}catch(ve){if(ve instanceof Kg)return mE;throw ve}},WD),C=$t(F,()=>F.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:s,field:P})),{cellMode:S,hasFocus:x,isEditable:k,value:L,formattedValue:j}=_,z=a.type==="actions"&&((r=(n=a).getActions)==null?void 0:r.call(n,F.current.getRowParams(s)).some(ve=>!ve.props.disabled)),Y=(S==="view"||!k)&&!z?_.tabIndex:-1,{classes:K,getCellClassName:Q}=T,q=F.current.unstable_applyPipeProcessors("cellClassName",[],{id:s,field:P});a.cellClassName&&q.push(typeof a.cellClassName=="function"?a.cellClassName(_):a.cellClassName),Q&&q.push(Q(_));const J=j??L,G=A.useRef(null),V=Ur(t,G),X=A.useRef(null),te=(o=T.unstable_cellSelection)!=null?o:!1,ee={align:l,showRightBorder:p,isEditable:k,classes:T.classes,isSelected:C,isSelectionMode:te},re=f7e(ee),se=A.useCallback(ve=>we=>{const ie=F.current.getCellParams(s,P||"");F.current.publishEvent(ve,ie,we),E&&E(we)},[F,P,E,s]),pe=A.useCallback(ve=>we=>{const ie=F.current.getCellParams(s,P||"");F.current.publishEvent(ve,ie,we),w&&w(we)},[F,P,w,s]),ce=A.useCallback((ve,we)=>ie=>{if(!F.current.getRow(s))return;const ge=F.current.getCellParams(s,P||"");F.current.publishEvent(ve,ge,ie),we&&we(ie)},[F,P,s]),ne=A.useMemo(()=>v?{padding:0,opacity:0,width:0,border:0}:{minWidth:d,maxWidth:d,minHeight:f,maxHeight:f==="auto"?"none":f},[d,f,v]);if(A.useEffect(()=>{if(!x||S===eo.Edit)return;const ve=In(F.current.rootElementRef.current);if(G.current&&!G.current.contains(ve.activeElement)){const we=G.current.querySelector('[tabindex="0"]'),ie=X.current||we||G.current;if(n7e())ie.focus({preventScroll:!0});else{const ge=F.current.getScrollPosition();ie.focus(),F.current.scroll(ge)}}},[x,S,F]),_===mE)return null;let he=B.onFocus,oe;if(c==null&&a.renderCell&&(oe=a.renderCell(_),q.push(qe["cell--withRenderer"]),q.push(K==null?void 0:K["cell--withRenderer"])),c!=null&&a.renderEditCell){const ve=F.current.getRowWithUpdatedValues(s,a.field),we=ze(c,d7e),ie=W({},_,{row:ve},we);oe=a.renderEditCell(ie),q.push(qe["cell--editing"]),q.push(K==null?void 0:K["cell--editing"])}if(oe===void 0){const ve=J==null?void 0:J.toString();oe=R("div",{className:re.content,title:ve,role:"presentation",children:ve})}A.isValidElement(oe)&&z&&(oe=A.cloneElement(oe,{focusElementRef:X}));const le=m?null:{onDragEnter:ce("cellDragEnter",N),onDragOver:ce("cellDragOver",U)},de=(i=T.experimentalFeatures)==null?void 0:i.ariaV7;return R("div",W({ref:V,className:it(h,q,re.root),role:de?"gridcell":"cell","data-field":P,"data-colindex":u,"aria-colindex":u+1,"aria-colspan":g,style:ne,tabIndex:Y,onClick:ce("cellClick",y),onDoubleClick:ce("cellDoubleClick",b),onMouseOver:ce("cellMouseOver",I),onMouseDown:pe("cellMouseDown"),onMouseUp:se("cellMouseUp"),onKeyDown:ce("cellKeyDown",O),onKeyUp:ce("cellKeyUp",D)},le,B,{onFocus:he,children:oe}))}),e5=n4(m7e),g7e=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex"],v7e=e=>{const{classes:t}=e;return pt({root:["booleanCell"]},Rr,t)};function y7e(e){const{value:t}=e,r=ze(e,g7e),n=Gr(),o=dr(),i={classes:o.classes},a=v7e(i),s=A.useMemo(()=>t?o.slots.booleanCellTrueIcon:o.slots.booleanCellFalseIcon,[o.slots.booleanCellFalseIcon,o.slots.booleanCellTrueIcon,t]);return R(s,W({fontSize:"small",className:a.root,titleAccess:n.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const b7e=A.memo(y7e),w7e=e=>hx(e.rowNode)?"":R(b7e,W({},e)),x7e=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],C7e=e=>{const{classes:t}=e;return pt({root:["editBooleanCell"]},Rr,t)};function S7e(e){var t;const{id:r,value:n,field:o,className:i,hasFocus:a,onValueChange:s}=e,c=ze(e,x7e),l=Gr(),u=A.useRef(null),f=dn(),[d,h]=A.useState(n),p=dr(),g={classes:p.classes},m=C7e(g),v=A.useCallback(async y=>{const b=y.target.checked;s&&await s(y,b),h(b),await l.current.setEditCellValue({id:r,field:o,value:b},y)},[l,o,r,s]);return A.useEffect(()=>{h(n)},[n]),en(()=>{a&&u.current.focus()},[a]),R("label",W({htmlFor:f,className:it(m.root,i)},c,{children:R(p.slots.baseCheckbox,W({id:f,inputRef:u,checked:!!d,onChange:v,size:"small"},(t=p.slotProps)==null?void 0:t.baseCheckbox))}))}const _7e=e=>R(S7e,W({},e)),k7e=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],E7e=We(V1)({fontSize:"inherit"}),T7e=e=>{const{classes:t}=e;return pt({root:["editInputCell"]},Rr,t)};function I7e(e){const{id:t,value:r,field:n,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,c=ze(e,k7e),l=o.type==="dateTime",u=Gr(),f=A.useRef(),d=A.useMemo(()=>{let w;r==null?w=null:r instanceof Date?w=r:w=new Date((r??"").toString());let E;return w==null||Number.isNaN(w.getTime())?E="":E=new Date(w.getTime()-w.getTimezoneOffset()*60*1e3).toISOString().substr(0,l?16:10),{parsed:w,formatted:E}},[r,l]),[h,p]=A.useState(d),m={classes:dr().classes},v=T7e(m),y=A.useCallback(w=>{if(w==="")return null;const[E,I]=w.split("T"),[O,D,N]=E.split("-"),U=new Date;if(U.setFullYear(Number(O),Number(D)-1,Number(N)),U.setHours(0,0,0,0),I){const[B,F]=I.split(":");U.setHours(Number(B),Number(F),0,0)}return U},[]),b=A.useCallback(async w=>{const E=w.target.value,I=y(E);s&&await s(w,I),p({parsed:I,formatted:E}),u.current.setEditCellValue({id:t,field:n,value:I},w)},[u,n,t,s,y]);return A.useEffect(()=>{p(w=>{var E,I;return d.parsed!==w.parsed&&((E=d.parsed)==null?void 0:E.getTime())!==((I=w.parsed)==null?void 0:I.getTime())?d:w})},[d]),en(()=>{i&&f.current.focus()},[i]),R(E7e,W({inputRef:f,fullWidth:!0,className:v.root,type:l?"datetime-local":"date",inputProps:W({max:l?"9999-12-31T23:59":"9999-12-31"},a),value:h.formatted,onChange:b},c))}const QJ=e=>R(I7e,W({},e)),A7e=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],P7e=e=>{const{classes:t}=e;return pt({root:["editInputCell"]},Rr,t)},M7e=We(V1,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>W({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),R7e=A.forwardRef((e,t)=>{const r=dr(),{id:n,value:o,field:i,colDef:a,hasFocus:s,debounceMs:c=200,isProcessingProps:l,onValueChange:u}=e,f=ze(e,A7e),d=Gr(),h=A.useRef(),[p,g]=A.useState(o),m=P7e(r),v=A.useCallback(async b=>{const w=b.target.value;u&&await u(b,w);const E=d.current.getColumn(i);let I=w;E.valueParser&&(I=E.valueParser(w,d.current.getCellParams(n,i))),g(I),d.current.setEditCellValue({id:n,field:i,value:I,debounceMs:c,unstable_skipValueParser:!0},b)},[d,c,i,n,u]),y=d.current.unstable_getEditCellMeta(n,i);return A.useEffect(()=>{(y==null?void 0:y.changeReason)!=="debouncedSetEditCellValue"&&g(o)},[y,o]),en(()=>{s&&h.current.focus()},[s]),R(M7e,W({ref:t,inputRef:h,className:m.root,ownerState:r,fullWidth:!0,type:a.type==="number"?a.type:"text",value:p??"",onChange:v,endAdornment:l?R(r.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},f))}),O7e=e=>R(R7e,W({},e)),gE=e=>e==="Escape",D7e=e=>e==="Enter",ZD=e=>e==="Tab",ZJ=e=>e===" ",F7e=e=>e.indexOf("Arrow")===0,N7e=e=>e==="Home"||e==="End",L7e=e=>e.indexOf("Page")===0;function JJ(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const px=e=>N7e(e)||F7e(e)||L7e(e)||ZJ(e),$7e=e=>!!e.key,eee=e=>ZD(e)||gE(e);function _m(e){return(e==null?void 0:e.type)==="singleSelect"}function t5(e,t,r){if(t===void 0)return;const n=t.find(o=>{const i=r(o);return String(i)===String(e)});return r(n)}const B7e=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen","getOptionLabel","getOptionValue"],U7e=["MenuProps"];function H7e(e){return!!e.key}function z7e(e){var t,r,n;const o=dr(),{id:i,value:a,field:s,row:c,colDef:l,hasFocus:u,error:f,onValueChange:d,initialOpen:h=o.editMode===nd.Cell,getOptionLabel:p,getOptionValue:g}=e,m=ze(e,B7e),v=Gr(),y=A.useRef(),b=A.useRef(),[w,E]=A.useState(h),O=(r=(((t=o.slotProps)==null?void 0:t.baseSelect)||{}).native)!=null?r:!1,D=((n=o.slotProps)==null?void 0:n.baseSelect)||{},{MenuProps:N}=D,U=ze(D,U7e);if(en(()=>{if(u){var S;(S=b.current)==null||S.focus()}},[u]),!_m(l))return null;let B;if(typeof(l==null?void 0:l.valueOptions)=="function"?B=l==null?void 0:l.valueOptions({id:i,row:c,field:s}):B=l==null?void 0:l.valueOptions,!B)return null;const F=g||l.getOptionValue,T=p||l.getOptionLabel,P=async S=>{if(!_m(l)||!B)return;E(!1);const x=S.target,k=t5(x.value,B,F);d&&await d(S,k),await v.current.setEditCellValue({id:i,field:s,value:k},S)},_=(S,x)=>{if(o.editMode===nd.Row){E(!1);return}if(x==="backdropClick"||gE(S.key)){const k=v.current.getCellParams(i,s);v.current.publishEvent("cellEditStop",W({},k,{reason:gE(S.key)?Fc.escapeKeyDown:Fc.cellFocusOut}))}},C=S=>{H7e(S)&&S.key==="Enter"||E(!0)};return!B||!l?null:R(o.slots.baseSelect,W({ref:y,inputRef:b,value:a,onChange:P,open:w,onOpen:C,MenuProps:W({onClose:_},N),error:f,native:O,fullWidth:!0},m,U,{children:B.map(S=>{var x;const k=F(S);return A.createElement(o.slots.baseSelectOption,W({},((x=o.slotProps)==null?void 0:x.baseSelectOption)||{},{native:O,key:k,value:k}),T(S))})}))}const j7e=e=>R(z7e,W({},e)),V7e=["open","target","onClose","children","position","className","onExited"],W7e=e=>{const{classes:t}=e;return pt({root:["menu"]},Rr,t)},G7e=We(bf,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${qe.menuList}`]:{outline:0}})),q7e={"bottom-start":"top left","bottom-end":"top right"};function o4(e){var t;const{open:r,target:n,onClose:o,children:i,position:a,className:s,onExited:c}=e,l=ze(e,V7e),u=Gr(),f=dr(),d=W7e(f),h=A.useRef(null);en(()=>{if(r)h.current=document.activeElement instanceof HTMLElement?document.activeElement:null;else{var m,v;(m=h.current)==null||(v=m.focus)==null||v.call(m),h.current=null}},[r]),A.useEffect(()=>{const m=r?"menuOpen":"menuClose";u.current.publishEvent(m,{target:n})},[u,r,n]);const p=m=>v=>{m&&m(),c&&c(v)},g=m=>{m.target&&(n===m.target||n!=null&&n.contains(m.target))||o(m)};return R(G7e,W({as:f.slots.basePopper,className:it(s,d.root),ownerState:f,open:r,anchorEl:n,transition:!0,placement:a},l,(t=f.slotProps)==null?void 0:t.basePopper,{children:({TransitionProps:m,placement:v})=>R(oD,{onClickAway:g,mouseEvent:"onMouseDown",children:R(s1,W({},m,{style:{transformOrigin:q7e[v]},onExited:p(m==null?void 0:m.onExited),children:R(Es,{children:i})}))})}))}const K7e=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],Y7e=e=>typeof e.getActions=="function";function X7e(e){var t;const{colDef:r,id:n,hasFocus:o,tabIndex:i,position:a="bottom-end",focusElementRef:s}=e,c=ze(e,K7e),[l,u]=A.useState(-1),[f,d]=A.useState(!1),h=Gr(),p=A.useRef(null),g=A.useRef(null),m=A.useRef(!1),v=A.useRef({}),y=An(),b=dn(),w=dn(),E=dr();if(!Y7e(r))throw new Error("MUI: Missing the `getActions` property in the `GridColDef`.");const I=r.getActions(h.current.getRowParams(n)),O=I.filter(C=>!C.props.showInMenu),D=I.filter(C=>C.props.showInMenu),N=O.length+(D.length?1:0);A.useLayoutEffect(()=>{o||Object.entries(v.current).forEach(([C,S])=>{S==null||S.stop({},()=>{delete v.current[C]})})},[o]),A.useEffect(()=>{if(l<0||!p.current||l>=p.current.children.length)return;p.current.children[l].focus({preventScroll:!0})},[l]),A.useEffect(()=>{o||(u(-1),m.current=!1)},[o]),A.useImperativeHandle(s,()=>({focus(){if(!m.current){const C=I.findIndex(S=>!S.props.disabled);u(C)}}}),[I]),A.useEffect(()=>{l>=N&&u(N-1)},[l,N]);const U=()=>{d(!0),u(N-1),m.current=!0},B=()=>{d(!1)},F=C=>S=>{v.current[C]=S},T=(C,S)=>x=>{u(C),m.current=!0,S&&S(x)},P=C=>{if(N<=1)return;const S=(k,L)=>{var j;if(k<0||k>I.length)return k;const z=y.direction==="rtl"?-1:1,Y=(L==="left"?-1:1)*z;return(j=I[k+Y])!=null&&j.props.disabled?S(k+Y,L):k+Y};let x=l;C.key==="ArrowRight"?x=S(l,"right"):C.key==="ArrowLeft"&&(x=S(l,"left")),!(x<0||x>=N)&&x!==l&&(C.preventDefault(),C.stopPropagation(),u(x))},_=C=>{C.key==="Tab"&&C.preventDefault(),["Tab","Enter","Escape"].includes(C.key)&&B()};return xe("div",W({role:"menu",ref:p,tabIndex:-1,className:qe.actionsCell,onKeyDown:P},c,{children:[O.map((C,S)=>A.cloneElement(C,{key:S,touchRippleRef:F(S),onClick:T(S,C.props.onClick),tabIndex:l===S?i:-1})),D.length>0&&w&&R(E.slots.baseIconButton,W({ref:g,id:w,"aria-label":h.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?b:void 0,role:"menuitem",size:"small",onClick:U,touchRippleRef:F(w),tabIndex:l===O.length?i:-1},(t=E.slotProps)==null?void 0:t.baseIconButton,{children:R(E.slots.moreActionsIcon,{fontSize:"small"})})),D.length>0&&R(o4,{open:f,target:g.current,position:a,onClose:B,onClick:B,children:R(j1,{id:b,className:qe.menuList,onKeyDown:_,"aria-labelledby":w,variant:"menu",autoFocusItem:!0,children:D.map((C,S)=>A.cloneElement(C,{key:S}))})})]}))}const Q7e=e=>R(X7e,W({},e)),Z7e=["label","icon","showInMenu","onClick"],yr=A.forwardRef((e,t)=>{const{label:r,icon:n,showInMenu:o,onClick:i}=e,a=ze(e,Z7e),s=dr(),c=u=>{i&&i(u)};if(!o){var l;return R(s.slots.baseIconButton,W({ref:t,size:"small",role:"menuitem","aria-label":r},a,{onClick:c},(l=s.slotProps)==null?void 0:l.baseIconButton,{children:A.cloneElement(n,{fontSize:"small"})}))}return xe(go,W({ref:t},a,{onClick:i,children:[n&&R(gl,{children:n}),r]}))}),J7e=["field","align","width","contentWidth"],eLe=e=>{const{align:t,classes:r}=e,n={root:["cell","cellSkeleton",`cell--text${ut(t)}`,"withBorderColor"]};return pt(n,Rr,r)};function tLe(e){const{align:t,width:r,contentWidth:n}=e,o=ze(e,J7e),a={classes:dr().classes,align:t},s=eLe(a);return R("div",W({className:s.root,style:{width:r}},o,{children:R(IPe,{width:`${n}%`})}))}function rLe(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?yxe(to(e.palette.divider,1),.88):vxe(to(e.palette.divider,1),.68)}const LH={[`.${qe.columnSeparator}, .${qe["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},$H={[`& .${qe.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${qe.menuIcon}`]:{width:"auto",visibility:"visible"}},nLe=We("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${qe.autoHeight}`]:t.autoHeight},{[`&.${qe.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${qe["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${qe["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${qe["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${qe.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${qe["root--disableUserSelection"]} .${qe.cell}`]:t["root--disableUserSelection"]},{[`&.${qe.autosizing}`]:t.autosizing},{[`& .${qe.editBooleanCell}`]:t.editBooleanCell},{[`& .${qe["cell--editing"]}`]:t["cell--editing"]},{[`& .${qe["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${qe["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${qe["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${qe["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${qe.cell}`]:t.cell},{[`& .${qe["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${qe["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${qe["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${qe["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${qe["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${qe.cellContent}`]:t.cellContent},{[`& .${qe.cellCheckbox}`]:t.cellCheckbox},{[`& .${qe.cellSkeleton}`]:t.cellSkeleton},{[`& .${qe.checkboxInput}`]:t.checkboxInput},{[`& .${qe["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${qe["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${qe["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${qe["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${qe["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${qe["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${qe["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${qe["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${qe["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${qe.columnHeader}`]:t.columnHeader},{[`& .${qe.headerFilterRow}`]:t.headerFilterRow},{[`& .${qe.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${qe.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${qe.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${qe["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${qe["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${qe.columnSeparator}`]:t.columnSeparator},{[`& .${qe.filterIcon}`]:t.filterIcon},{[`& .${qe.iconSeparator}`]:t.iconSeparator},{[`& .${qe.menuIcon}`]:t.menuIcon},{[`& .${qe.menuIconButton}`]:t.menuIconButton},{[`& .${qe.menuOpen}`]:t.menuOpen},{[`& .${qe.menuList}`]:t.menuList},{[`& .${qe["row--editable"]}`]:t["row--editable"]},{[`& .${qe["row--editing"]}`]:t["row--editing"]},{[`& .${qe["row--dragging"]}`]:t["row--dragging"]},{[`& .${qe.row}`]:t.row},{[`& .${qe.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${qe.rowReorderCell}`]:t.rowReorderCell},{[`& .${qe["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${qe.sortIcon}`]:t.sortIcon},{[`& .${qe.withBorderColor}`]:t.withBorderColor},{[`& .${qe.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${qe.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${qe.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${qe["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{const t=rLe(e),r=e.shape.borderRadius;return W({"--unstable_DataGrid-radius":typeof r=="number"?`${r}px`:r,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:to(e.palette.background.default,e.palette.action.disabledOpacity),"--DataGrid-cellOffsetMultiplier":2,flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:t,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflowAnchor:"none",[`&.${qe.autoHeight}`]:{height:"auto",[`& .${qe["row--lastVisible"]} .${qe.cell}`]:{borderBottomColor:"transparent"}},[`&.${qe.autosizing}`]:{[`& .${qe.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},[`& .${qe.cell} > *`]:{overflow:"visible !important",whiteSpace:"nowrap"}},[`& .${qe["virtualScrollerContent--overflowed"]} .${qe["row--lastVisible"]} .${qe.cell}`]:{borderBottomColor:"transparent"},[`& .${qe.columnHeader}, & .${qe.cell}`]:{WebkitTapHighlightColor:"transparent",lineHeight:null,padding:"0 10px",boxSizing:"border-box"},[`& .${qe.columnHeader}:focus-within, & .${qe.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:to(e.palette.primary.main,.5)} 1px`,outlineWidth:1,outlineOffset:-1},[`& .${qe.columnHeader}:focus, & .${qe.cell}:focus`]:{outline:`solid ${e.palette.primary.main} 1px`},[`& .${qe.columnHeaderCheckbox}, & .${qe.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${qe.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${qe["columnHeader--sorted"]} .${qe.iconButtonContainer}, & .${qe["columnHeader--filtered"]} .${qe.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${qe.columnHeader}:not(.${qe["columnHeader--sorted"]}) .${qe.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${qe.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden",position:"relative"},[`& .${qe.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${qe["columnHeader--filledGroup"]} .${qe.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${qe["columnHeader--filledGroup"]}.${qe["columnHeader--showColumnBorder"]} .${qe.columnHeaderTitleContainer}`]:{borderBottom:"none"},[`& .${qe["columnHeader--filledGroup"]}.${qe["columnHeader--showColumnBorder"]}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${qe.headerFilterRow}`]:{borderTop:`1px solid ${t}`},[`& .${qe.sortIcon}, & .${qe.filterIcon}`]:{fontSize:"inherit"},[`& .${qe["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${qe["columnHeader--alignCenter"]} .${qe.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${qe["columnHeader--alignRight"]} .${qe.columnHeaderDraggableContainer}, & .${qe["columnHeader--alignRight"]} .${qe.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${qe["columnHeader--alignCenter"]} .${qe.menuIcon}, & .${qe["columnHeader--alignRight"]} .${qe.menuIcon}`]:{marginRight:"auto",marginLeft:-6},[`& .${qe["columnHeader--alignRight"]} .${qe.menuIcon}, & .${qe["columnHeader--alignRight"]} .${qe.menuIcon}`]:{marginRight:"auto",marginLeft:-10},[`& .${qe["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${qe.columnSeparator}`]:{visibility:"hidden",position:"absolute",zIndex:100,display:"flex",flexDirection:"column",justifyContent:"center",color:t},"@media (hover: hover)":{[`& .${qe.columnHeaders}:hover`]:LH,[`& .${qe.columnHeader}:hover`]:$H,[`& .${qe.columnHeader}:not(.${qe["columnHeader--sorted"]}):hover .${qe.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${qe.columnHeaders}`]:LH,[`& .${qe.columnHeader}`]:$H},[`& .${qe["columnSeparator--sideLeft"]}`]:{left:-12},[`& .${qe["columnSeparator--sideRight"]}`]:{right:-12},[`& .${qe["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none","&:hover":{color:(e.vars||e).palette.text.primary,"@media (hover: none)":{color:t}},[`&.${qe["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.text.primary},"& svg":{pointerEvents:"none"}},[`& .${qe.iconSeparator}`]:{color:"inherit"},[`& .${qe.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-10,display:"flex",alignItems:"center"},[`.${qe.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${qe.row}`]:{display:"flex",width:"fit-content",breakInside:"avoid","&:hover, &.Mui-hovered":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:to(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(
                ${e.vars.palette.action.selectedOpacity} + 
                ${e.vars.palette.action.hoverOpacity}
              ))`:to(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:to(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${qe.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:to(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:to(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:to(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${qe["root--disableUserSelection"]} .${qe.cell}`]:{userSelect:"none"},[`& .${qe.row}:not(.${qe["row--dynamicHeight"]}) > .${qe.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${qe.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${qe.cell}.${qe["cell--selectionMode"]}`]:{cursor:"default"},[`& .${qe.cell}.${qe["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${qe["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${qe["row--editing"]} .${qe.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${qe.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${qe.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${qe.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${qe.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${qe.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${qe["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${qe.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${qe.withBorderColor}`]:{borderColor:t},[`& .${qe["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${qe["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${qe["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${qe["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${qe["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${qe.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${qe.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${qe["columnHeader--dragging"]}, & .${qe["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${qe["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${qe.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${qe.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${qe.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${qe.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${qe.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}),oLe=["children","className"],iLe=e=>{const{autoHeight:t,density:r,classes:n}=e,o={root:["root",t&&"autoHeight",`root--density${ut(r)}`,"withBorderColor"]};return pt(o,Rr,n)},aLe=A.forwardRef(function(t,r){var n;const o=dr(),{children:i,className:a}=t,s=ze(t,oLe),c=lu(),l=$t(c,q9e),u=A.useRef(null),f=Ur(u,r),d=(n=o.experimentalFeatures)!=null&&n.ariaV7?null:NJ,h=typeof d=="function"?d():null,p=W({},o,{density:l}),g=iLe(p);c.current.register("public",{rootElementRef:u});const[m,v]=A.useState(!1);return en(()=>{v(!0)},[]),m?R(nLe,W({ref:f,className:it(a,g.root),ownerState:p},h,s,{children:i})):null}),sLe=["className"],lLe=e=>{const{classes:t}=e;return pt({root:["footerContainer","withBorderColor"]},Rr,t)},cLe=Go("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),uLe=A.forwardRef(function(t,r){const{className:n}=t,o=ze(t,sLe),i=dr(),a=lLe(i);return R(cLe,W({ref:r,className:it(a.root,n),ownerState:i},o))}),dLe=["className"],fLe=e=>{const{classes:t}=e;return pt({root:["overlay"]},Rr,t)},hLe=Go("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),JD=A.forwardRef(function(t,r){const{className:n}=t,o=ze(t,dLe),i=dr(),a=fLe(i);return R(hLe,W({ref:r,className:it(a.root,n),ownerState:i},o))}),pLe=["className","children"],mLe=e=>{const{classes:t}=e;return pt({root:["toolbarContainer"]},Rr,t)},gLe=Go("div",{name:"MuiDataGrid",slot:"ToolbarContainer",overridesResolver:(e,t)=>t.toolbarContainer})(({theme:e})=>({display:"flex",alignItems:"center",flexWrap:"wrap",gap:e.spacing(1),padding:e.spacing(.5,.5,0)})),tee=A.forwardRef(function(t,r){const{className:n,children:o}=t,i=ze(t,pLe),a=dr(),s=mLe(a);return o?R(gLe,W({ref:r,className:it(n,s.root),ownerState:a},i,{children:o})):null}),vLe=["className"],yLe=e=>{const{classes:t}=e;return pt({root:["iconButtonContainer"]},Rr,t)},bLe=Go("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),ree=A.forwardRef(function(t,r){const{className:n}=t,o=ze(t,vLe),i=dr(),a=yLe(i);return R(bLe,W({ref:r,className:it(a.root,n),ownerState:i},o))}),wLe=e=>{const{classes:t}=e;return pt({icon:["sortIcon"]},Rr,t)};function xLe(e,t,r,n){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=n),o?R(o,W({fontSize:"small",className:r},i)):null}function CLe(e){var t;const{direction:r,index:n,sortingOrder:o}=e,i=Gr(),a=dr(),s=W({},e,{classes:a.classes}),c=wLe(s),l=xLe(a.slots,r,c.icon,o);if(!l)return null;const u=R(a.slots.baseIconButton,W({tabIndex:-1,"aria-label":i.current.getLocaleText("columnHeaderSortIconLabel"),title:i.current.getLocaleText("columnHeaderSortIconLabel"),size:"small"},(t=a.slotProps)==null?void 0:t.baseIconButton,{children:l}));return xe(ree,{children:[n!=null&&R(qI,{badgeContent:n,color:"default",children:u}),n==null&&u]})}const SLe=A.memo(CLe),_Le=e=>{const{classes:t,open:r}=e;return pt({root:["menuIcon",r&&"menuOpen"],button:["menuIconButton"]},Rr,t)},kLe=A.memo(e=>{var t,r;const{colDef:n,open:o,columnMenuId:i,columnMenuButtonId:a,iconButtonRef:s}=e,c=Gr(),l=dr(),u=W({},e,{classes:l.classes}),f=_Le(u),d=A.useCallback(h=>{h.preventDefault(),h.stopPropagation(),c.current.toggleColumnMenu(n.field)},[c,n.field]);return R("div",{className:f.root,children:R(l.slots.baseTooltip,W({title:c.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(t=l.slotProps)==null?void 0:t.baseTooltip,{children:R(l.slots.baseIconButton,W({ref:s,tabIndex:-1,className:f.button,"aria-label":c.current.getLocaleText("columnMenuLabel"),size:"small",onClick:d,"aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?i:void 0,id:a},(r=l.slotProps)==null?void 0:r.baseIconButton,{children:R(l.slots.columnMenuIcon,{fontSize:"small"})}))}))})});function ELe({columnMenuId:e,columnMenuButtonId:t,ContentComponent:r,contentComponentProps:n,field:o,open:i,target:a,onExited:s}){const c=Gr(),l=c.current.getColumn(o),u=Mt(f=>{f&&(f.stopPropagation(),a!=null&&a.contains(f.target))||c.current.hideColumnMenu()});return!a||!l?null:R(o4,{placement:`bottom-${l.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:R(r,W({colDef:l,hideMenu:u,open:i,id:e,labelledby:t},n))})}const TLe=["className"],ILe=e=>{const{classes:t}=e;return pt({root:["columnHeaderTitle"]},Rr,t)},ALe=Go("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)"}),PLe=A.forwardRef(function(t,r){const{className:n}=t,o=ze(t,TLe),i=dr(),a=ILe(i);return R(ALe,W({ref:r,className:it(a.root,n),ownerState:i},o))});function MLe(e){var t;const{label:r,description:n}=e,o=dr(),i=A.useRef(null),[a,s]=A.useState(""),c=A.useCallback(()=>{if(!n&&i!=null&&i.current){const l=o7e(i.current);s(l?r:"")}},[n,r]);return R(o.slots.baseTooltip,W({title:n||a},(t=o.slotProps)==null?void 0:t.baseTooltip,{children:R(PLe,{onMouseOver:c,ref:i,children:r})}))}const RLe=["resizable","resizing","height","side"];var e8=function(e){return e.Left="left",e.Right="right",e}(e8||{});const OLe=e=>{const{resizable:t,resizing:r,classes:n,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",r&&"columnSeparator--resizing",o&&`columnSeparator--side${ut(o)}`],icon:["iconSeparator"]};return pt(i,Rr,n)};function DLe(e){const{height:t,side:r=e8.Right}=e,n=ze(e,RLe),o=dr(),i=W({},e,{side:r,classes:o.classes}),a=OLe(i),s=A.useCallback(c=>{c.preventDefault(),c.stopPropagation()},[]);return R("div",W({className:a.root,style:{minHeight:t,opacity:o.showColumnVerticalBorder?0:1}},n,{onClick:s,children:R(o.slots.columnResizeIcon,{className:a.icon})}))}const FLe=A.memo(DLe),NLe=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps"],nee=A.forwardRef(function(t,r){const{classes:n,columnMenuOpen:o,colIndex:i,height:a,isResizing:s,sortDirection:c,hasFocus:l,tabIndex:u,separatorSide:f,isDraggable:d,headerComponent:h,description:p,width:g,columnMenuIconButton:m=null,columnMenu:v=null,columnTitleIconButtons:y=null,headerClassName:b,label:w,resizable:E,draggableContainerProps:I,columnHeaderSeparatorProps:O}=t,D=ze(t,NLe),N=lu(),U=dr(),B=A.useRef(null),[F,T]=A.useState(o),P=Ur(B,r);let _="none";return c!=null&&(_=c==="asc"?"ascending":"descending"),A.useEffect(()=>{F||T(o)},[F,o]),A.useLayoutEffect(()=>{const C=N.current.state.columnMenu;if(l&&!C.open){const x=B.current.querySelector('[tabindex="0"]')||B.current;x==null||x.focus(),N.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[N,l]),xe("div",W({ref:P,className:it(n.root,b),style:{height:a,width:g,minWidth:g,maxWidth:g},role:"columnheader",tabIndex:u,"aria-colindex":i+1,"aria-sort":_,"aria-label":h==null?w:void 0},D,{children:[xe("div",W({className:n.draggableContainer,draggable:d,role:"presentation"},I,{children:[xe("div",{className:n.titleContainer,role:"presentation",children:[R("div",{className:n.titleContainerContent,children:h!==void 0?h:R(MLe,{label:w,description:p,columnWidth:g})}),y]}),m]})),R(FLe,W({resizable:!U.disableColumnResize&&!!E,resizing:s,height:a,side:f},O)),v]}))}),LLe=e=>{const{colDef:t,classes:r,isDragging:n,sortDirection:o,showRightBorder:i,filterItemsCounter:a}=e,s=o!=null,c=a!=null&&a>0,l=t.type==="number",u={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",n&&"columnHeader--moving",s&&"columnHeader--sorted",c&&"columnHeader--filtered",l&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return pt(u,Rr,r)};function $Le(e){var t,r,n,o;const{colDef:i,columnMenuOpen:a,colIndex:s,headerHeight:c,isResizing:l,sortDirection:u,sortIndex:f,filterItemsCounter:d,hasFocus:h,tabIndex:p,disableReorder:g,separatorSide:m}=e,v=lu(),y=dr(),b=A.useRef(null),w=dn(),E=dn(),I=A.useRef(null),[O,D]=A.useState(a),N=A.useMemo(()=>!y.disableColumnReorder&&!g&&!i.disableReorder,[y.disableColumnReorder,g,i.disableReorder]);let U;i.renderHeader&&(U=i.renderHeader(v.current.getColumnHeaderParams(i.field)));const B=W({},e,{classes:y.classes,showRightBorder:y.showColumnVerticalBorder}),F=LLe(B),T=A.useCallback(K=>Q=>{Q1(Q)||v.current.publishEvent(K,v.current.getColumnHeaderParams(i.field),Q)},[v,i.field]),P=A.useMemo(()=>({onClick:T("columnHeaderClick"),onDoubleClick:T("columnHeaderDoubleClick"),onMouseOver:T("columnHeaderOver"),onMouseOut:T("columnHeaderOut"),onMouseEnter:T("columnHeaderEnter"),onMouseLeave:T("columnHeaderLeave"),onKeyDown:T("columnHeaderKeyDown"),onFocus:T("columnHeaderFocus"),onBlur:T("columnHeaderBlur")}),[T]),_=A.useMemo(()=>N?{onDragStart:T("columnHeaderDragStart"),onDragEnter:T("columnHeaderDragEnter"),onDragOver:T("columnHeaderDragOver"),onDragEnd:T("columnHeaderDragEnd")}:{},[N,T]),C=A.useMemo(()=>({onMouseDown:T("columnSeparatorMouseDown"),onDoubleClick:T("columnSeparatorDoubleClick")}),[T]);A.useEffect(()=>{O||D(a)},[O,a]);const S=A.useCallback(()=>{D(!1)},[]),x=!y.disableColumnMenu&&!i.disableColumnMenu&&R(kLe,{colDef:i,columnMenuId:w,columnMenuButtonId:E,open:O,iconButtonRef:I}),k=R(ELe,{columnMenuId:w,columnMenuButtonId:E,field:i.field,open:a,target:I.current,ContentComponent:y.slots.columnMenu,contentComponentProps:(t=y.slotProps)==null?void 0:t.columnMenu,onExited:S}),L=(r=i.sortingOrder)!=null?r:y.sortingOrder,j=xe(A.Fragment,{children:[!y.disableColumnFilter&&R(y.slots.columnHeaderFilterIconButton,W({field:i.field,counter:d},(n=y.slotProps)==null?void 0:n.columnHeaderFilterIconButton)),i.sortable&&!i.hideSortIcons&&R(SLe,{direction:u,index:f,sortingOrder:L})]});A.useLayoutEffect(()=>{const K=v.current.state.columnMenu;if(h&&!K.open){const q=b.current.querySelector('[tabindex="0"]')||b.current;q==null||q.focus(),v.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[v,h]);const z=typeof i.headerClassName=="function"?i.headerClassName({field:i.field,colDef:i}):i.headerClassName,Y=(o=i.headerName)!=null?o:i.field;return R(nee,W({ref:b,classes:F,columnMenuOpen:a,colIndex:s,height:c,isResizing:l,sortDirection:u,hasFocus:h,tabIndex:p,separatorSide:m,isDraggable:N,headerComponent:U,description:i.description,elementId:i.field,width:i.computedWidth,columnMenuIconButton:x,columnTitleIconButtons:j,headerClassName:z,label:Y,resizable:!y.disableColumnResize&&!!i.resizable,"data-field":i.field,columnMenu:k,draggableContainerProps:_,columnHeaderSeparatorProps:C},P))}const mx=()=>({items:[],logicOperator:Va.And,quickFilterValues:[],quickFilterLogicOperator:Va.And}),BH=1e3;class BLe{constructor(t=BH){this.timeouts=new Map,this.cleanupTimeout=BH,this.cleanupTimeout=t}register(t,r,n){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof r=="function"&&r(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,o)}unregister(t){const r=this.timeouts.get(t.cleanupToken);r&&(this.timeouts.delete(t.cleanupToken),clearTimeout(r))}reset(){this.timeouts&&(this.timeouts.forEach((t,r)=>{this.unregister({cleanupToken:r})}),this.timeouts=void 0)}}class ULe{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,r,n){this.registry.register(t,r,n)}unregister(t){this.registry.unregister(t)}reset(){}}var Qu=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e}(Qu||{});class HLe{}function zLe(e){let t=0;return function(n,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new ULe:new BLe);const[s]=A.useState(new HLe),c=A.useRef(null),l=A.useRef();l.current=i;const u=A.useRef(null);if(!c.current&&l.current){const f=(d,h,p)=>{if(!h.defaultMuiPrevented){var g;(g=l.current)==null||g.call(l,d,h,p)}};c.current=n.current.subscribeEvent(o,f,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var d;(d=c.current)==null||d.call(c),c.current=null,u.current=null},u.current)}else!l.current&&c.current&&(c.current(),c.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));A.useEffect(()=>{if(!c.current&&l.current){const f=(d,h,p)=>{if(!h.defaultMuiPrevented){var g;(g=l.current)==null||g.call(l,d,h,p)}};c.current=n.current.subscribeEvent(o,f,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var f;(f=c.current)==null||f.call(c),c.current=null}},[n,o,a])}}const jLe={registry:null},Xt=zLe(jLe),VLe={isFirst:!0};function Gn(e,t,r){Xt(e,t,r,VLe)}function Oi(e,t){const r=A.useRef(null);if(r.current)return r.current;const n=e.current.getLogger(t);return r.current=n,n}function WLe(e){return typeof e=="number"&&!Number.isNaN(e)}function oee(e){return typeof e=="function"}function t8(e){return typeof e=="object"&&e!==null}function GLe(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function sk(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const uf=(e,t,r)=>Math.max(t,Math.min(r,e));function zh(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(!zh(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;for(let i=0;i<o.length;i+=1){const a=o[i];if(!zh(a[1],t.get(a[0])))return!1}return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;const o=Array.from(e.entries());for(let i=0;i<o.length;i+=1)if(!t.has(o[i][0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i+=1)if(e[i]!==t[i])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=r.length;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=0;o<n;o+=1){const i=r[o];if(!zh(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function qLe(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function KLe(e,t,r){const n=qLe(e);return()=>t+(r-t)*n()}function iee(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const aee=(e,t,r,n,o)=>{const i=Oi(e,"useNativeEventListener"),[a,s]=A.useState(!1),c=A.useRef(n),l=A.useCallback(u=>c.current&&c.current(u),[]);A.useEffect(()=>{c.current=n},[n]),A.useEffect(()=>{let u;if(oee(t)?u=t():u=t&&t.current?t.current:null,u&&r&&!a){i.debug(`Binding native ${r} event`),u.addEventListener(r,l,o);const f=u;s(!0);const d=()=>{i.debug(`Clearing native ${r} event`),f.removeEventListener(r,l,o)};e.current.subscribeEvent("unmount",d)}},[t,l,r,a,i,o,e])},Z1=e=>{const t=A.useRef(!0);t.current&&(t.current=!1,e())},YLe=100,XLe=e=>e?0:100,see=(e,t)=>t>0&&e>0?Math.ceil(e/t):0;cd(["MUI: the 'rowCount' prop is undefined while using paginationMode='server'","For more detail, see http://mui.com/components/data-grid/pagination/#basic-implementation"],"error");const lee=e=>({page:0,pageSize:e?0:100}),QLe=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),cee=(e,t)=>{if(t===Qu.DataGrid&&e>YLe)throw new Error(["MUI: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`))},uee=e=>e.pagination,Ql=Xr(uee,e=>e.paginationModel),ZLe=Xr(Ql,e=>e.page),JLe=Xr(Ql,e=>e.pageSize);Xr(Ql,JI,(e,t)=>see(t,e.pageSize));const r8=ko(Ql,dl,X1,Cf,UJ,(e,t,r,n,o)=>{const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(r<2)return{firstRowIndex:a,lastRowIndex:s};const c=o[a],l=s-a+1,u=n.findIndex(p=>p.id===c.id);let f=u,d=0;for(;f<n.length&&d<=l;){var h;const p=n[f],g=(h=t[p.id])==null?void 0:h.depth;g===void 0?f+=1:((d<l||g>0)&&(f+=1),g===0&&(d+=1))}return{firstRowIndex:u,lastRowIndex:f-1}}),e$e=ko(Cf,r8,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),dee=ko(cw,r8,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),p1=e=>e.preferencePanel;var df=function(e){return e.filters="filters",e.columns="columns",e}(df||{});const Gm=e=>e.rowsMeta,Kl=e=>e.rowSelection,t$e=Xr(Kl,e=>e.length),r$e=ko(Kl,xh,(e,t)=>new Map(e.map(r=>[r,t[r]]))),vE=ko(Kl,e=>e.reduce((t,r)=>(t[r]=r,t),{})),n$e=cd(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),fee=(e,t)=>t&&e.length>1?(n$e(),[e[0]]):e,UH=(e,t)=>r=>W({},r,{sorting:W({},r.sorting,{sortModel:fee(e,t)})}),o$e=e=>e==="desc",i$e=(e,t)=>{const r=t.current.getColumn(e.field);if(!r)return null;const n=o$e(e.sort)?(...i)=>-1*r.sortComparator(...i):r.sortComparator;return{getSortCellParams:i=>({id:i,field:r.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,r.field),api:t.current}),comparator:n}},a$e=(e,t,r)=>e.reduce((n,o,i)=>{if(n!==0)return n;const a=t.params[i],s=r.params[i];return n=o.comparator(a.value,s.value,a,s),n},0),s$e=(e,t)=>{const r=e.map(n=>i$e(n,t)).filter(n=>!!n);return r.length===0?null:n=>n.map(o=>({node:o,params:r.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>a$e(r,o,i)).map(o=>o.node.id)},HH=(e,t)=>{const r=e.indexOf(t);return!t||r===-1||r+1===e.length?e[0]:e[r+1]},n8=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,l$e=new Intl.Collator,c$e=(e,t)=>{const r=n8(e,t);return r!==null?r:typeof e=="string"?l$e.compare(e.toString(),t.toString()):e-t},hee=(e,t)=>{const r=n8(e,t);return r!==null?r:Number(e)-Number(t)},pee=(e,t)=>{const r=n8(e,t);return r!==null?r:e>t?1:e<t?-1:0},mee=e=>e.headerFiltering,gee=Xr(mee,e=>e.editing),o8=Xr(mee,e=>e.menuOpen),u$e=(e,t)=>{const r={enabled:!t.disableVirtualization,enabledForColumns:!0};return W({},e,{virtualization:r})};function d$e(e,t){const r=i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabled:i})}))};jr(e,{unstable_setVirtualization:r,unstable_setColumnVirtualization:i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabledForColumns:i})}))}},"public"),A.useEffect(()=>{r(!t.disableVirtualization)},[t.disableVirtualization])}const vee=e=>e.virtualization,f$e=Xr(vee,e=>e.enabled),i8=Xr(vee,e=>e.enabledForColumns),h$e=e=>{const{classes:t}=e;return pt({icon:["filterIcon"]},Rr,t)};function p$e(e){var t,r;const{counter:n,field:o,onClick:i}=e,a=Gr(),s=dr(),c=W({},e,{classes:s.classes}),l=h$e(c),u=$t(a,p1),f=dn(),d=dn(),h=A.useCallback(m=>{m.preventDefault(),m.stopPropagation();const{open:v,openedPanelValue:y}=p1(a.current.state);v&&y===df.filters?a.current.hideFilterPanel():a.current.showFilterPanel(void 0,d,f),i&&i(a.current.getColumnHeaderParams(o),m)},[a,o,i,d,f]);if(!n)return null;const p=u.open&&u.labelId===f,g=R(s.slots.baseIconButton,W({id:f,onClick:h,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?d:void 0},(t=s.slotProps)==null?void 0:t.baseIconButton,{children:R(s.slots.columnFilteredIcon,{className:l.icon,fontSize:"small"})}));return R(s.slots.baseTooltip,W({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(n),enterDelay:1e3},(r=s.slotProps)==null?void 0:r.baseTooltip,{children:xe(ree,{children:[n>1&&R(qI,{badgeContent:n,color:"default",children:g}),n===1&&g]})}))}const m$e=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],g$e=e=>{const{classes:t}=e;return pt({root:["checkboxInput"]},Rr,t)},v$e=A.forwardRef(function(t,r){var n;const{field:o,id:i,value:a,rowNode:s,hasFocus:c,tabIndex:l}=t,u=ze(t,m$e),f=Gr(),d=dr(),h={classes:d.classes},p=g$e(h),g=A.useRef(null),m=A.useRef(null),v=Ur(g,r),y=f.current.getCellElement(i,o),b=O=>{const D={value:O.target.checked,id:i};f.current.publishEvent("rowSelectionCheckboxChange",D,O)};A.useLayoutEffect(()=>{l===0&&y&&(y.tabIndex=-1)},[y,l]),A.useEffect(()=>{if(c){var O;const D=(O=g.current)==null?void 0:O.querySelector("input");D==null||D.focus({preventScroll:!0})}else m.current&&m.current.stop({})},[c]);const w=A.useCallback(O=>{ZJ(O.key)&&O.stopPropagation()},[]);if(s.type==="footer"||s.type==="pinnedRow")return null;const E=f.current.isRowSelectable(i),I=f.current.getLocaleText(a?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow");return R(d.slots.baseCheckbox,W({ref:v,tabIndex:l,checked:a,onChange:b,className:p.root,inputProps:{"aria-label":I},onKeyDown:w,disabled:!E,touchRippleRef:m},(n=d.slotProps)==null?void 0:n.baseCheckbox,u))}),y$e=v$e,b$e=["field","colDef"],w$e=e=>{const{classes:t}=e;return pt({root:["checkboxInput"]},Rr,t)},x$e=A.forwardRef(function(t,r){var n;const o=ze(t,b$e),[,i]=A.useState(!1),a=Gr(),s=dr(),c={classes:s.classes},l=w$e(c),u=$t(a,jJ),f=$t(a,Kl),d=$t(a,cw),h=$t(a,dee),p=A.useMemo(()=>typeof s.isRowSelectable!="function"?f:f.filter(D=>a.current.getRow(D)?s.isRowSelectable(a.current.getRowParams(D)):!1),[a,s.isRowSelectable,f]),g=A.useMemo(()=>(!s.pagination||!s.checkboxSelectionVisibleOnly?d:h).reduce((N,U)=>(N[U]=!0,N),{}),[s.pagination,s.checkboxSelectionVisibleOnly,h,d]),m=A.useMemo(()=>p.filter(D=>g[D]).length,[p,g]),v=m>0&&m<Object.keys(g).length,y=m>0,b=D=>{const N={value:D.target.checked};a.current.publishEvent("headerSelectionCheckboxChange",N)},w=u!==null&&u.field===t.field?0:-1;A.useLayoutEffect(()=>{const D=a.current.getColumnHeaderElement(t.field);w===0&&D&&(D.tabIndex=-1)},[w,a,t.field]);const E=A.useCallback(D=>{D.key===" "&&a.current.publishEvent("headerSelectionCheckboxChange",{value:!y})},[a,y]),I=A.useCallback(()=>{i(D=>!D)},[]);A.useEffect(()=>a.current.subscribeEvent("rowSelectionChange",I),[a,I]);const O=a.current.getLocaleText(y?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows");return R(s.slots.baseCheckbox,W({ref:r,indeterminate:v,checked:y,onChange:b,className:l.root,inputProps:{"aria-label":O},tabIndex:w,onKeyDown:E},(n=s.slotProps)==null?void 0:n.baseCheckbox,o))}),zH=Sr(R("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),jH=Sr(R("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),VH=Sr(R("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),WH=Sr(R("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),C$e=Sr(R("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),GH=Sr(R("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),S$e=Sr(R("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");Sr(R("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");Sr(R("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const _$e=Sr(R("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),k$e=Sr(R("path",{d:"M11 19V5h2v14z"}),"Separator"),E$e=Sr(R("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),T$e=Sr(R("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),I$e=Sr(R("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),A$e=Sr(R("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),rP=Sr(R("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),qH=Sr(R("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),P$e=Sr(R("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),M$e=Sr(R("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),KH=Sr(R("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),R$e=Sr(R("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),O$e=Sr(R("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),D$e=Sr(R("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),F$e=Sr(R("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),N$e=Sr(R("g",{children:R("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),L$e=Sr(R("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");Sr(R("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const $$e=Sr(R("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),B$e=["hideMenu","colDef","id","labelledby","className","children","open"],U$e=We(j1)(()=>({minWidth:248})),H$e=A.forwardRef(function(t,r){const{hideMenu:n,id:o,labelledby:i,className:a,children:s,open:c}=t,l=ze(t,B$e),u=A.useCallback(f=>{ZD(f.key)&&f.preventDefault(),eee(f.key)&&n(f)},[n]);return R(U$e,W({id:o,ref:r,className:it(qe.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:c},l,{children:s}))}),z$e=["displayOrder"],j$e=e=>{const t=lu(),{defaultSlots:r,defaultSlotProps:n,slots:o={},slotProps:i={},hideMenu:a,colDef:s,addDividers:c=!0}=e,l=A.useMemo(()=>W({},r,o),[r,o]),u=A.useMemo(()=>{if(!i||Object.keys(i).length===0)return n;const h=W({},i);return Object.entries(n).forEach(([p,g])=>{h[p]=W({},g,i[p]||{})}),h},[n,i]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),d=A.useMemo(()=>{const h=Object.keys(r);return Object.keys(o).filter(p=>!h.includes(p))},[o,r]);return A.useMemo(()=>{const g=Array.from(new Set([...f,...d])).filter(m=>l[m]!=null).sort((m,v)=>{const y=u[m],b=u[v],w=Number.isFinite(y==null?void 0:y.displayOrder)?y.displayOrder:100,E=Number.isFinite(b==null?void 0:b.displayOrder)?b.displayOrder:100;return w-E});return g.reduce((m,v,y)=>{let b={colDef:s,onClick:a};const w=u[v];if(w){const E=ze(w,z$e);b=W({},b,E)}return c&&y!==g.length-1?[...m,[l[v],b],[yo,{}]]:[...m,[l[v],b]]},[])},[c,s,f,a,l,u,d])};function V$e(e){const{colDef:t,onClick:r}=e,n=Gr(),o=dr(),s=Mi(n).filter(l=>l.disableColumnMenu!==!0).length===1,c=A.useCallback(l=>{s||(n.current.setColumnVisibility(t.field,!1),r(l))},[n,t.field,r,s]);return o.disableColumnSelector||t.hideable===!1?null:xe(go,{onClick:c,disabled:s,children:[R(gl,{children:R(o.slots.columnMenuHideIcon,{fontSize:"small"})}),R(ps,{children:n.current.getLocaleText("columnMenuHideColumn")})]})}function W$e(e){const{onClick:t}=e,r=Gr(),n=dr(),o=A.useCallback(i=>{t(i),r.current.showPreferences(df.columns)},[r,t]);return n.disableColumnSelector?null:xe(go,{onClick:o,children:[R(gl,{children:R(n.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),R(ps,{children:r.current.getLocaleText("columnMenuManageColumns")})]})}function G$e(e){return xe(A.Fragment,{children:[R(V$e,W({},e)),R(W$e,W({},e))]})}function q$e(e){const{colDef:t,onClick:r}=e,n=Gr(),o=dr(),i=A.useCallback(a=>{r(a),n.current.showFilterPanel(t.field)},[n,t.field,r]);return o.disableColumnFilter||!t.filterable?null:xe(go,{onClick:i,children:[R(gl,{children:R(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),R(ps,{children:n.current.getLocaleText("columnMenuFilter")})]})}function K$e(e){var t;const{colDef:r,onClick:n}=e,o=Gr(),i=$t(o,us),a=dr(),s=A.useMemo(()=>{if(!r)return null;const f=i.find(d=>d.field===r.field);return f==null?void 0:f.sort},[r,i]),c=(t=r.sortingOrder)!=null?t:a.sortingOrder,l=A.useCallback(f=>{n(f);const d=f.currentTarget.getAttribute("data-value")||null;o.current.sortColumn(r,d===s?null:d)},[o,r,n,s]);if(!r||!r.sortable||!c.some(f=>!!f))return null;const u=f=>{const d=o.current.getLocaleText(f);return typeof d=="function"?d(r):d};return xe(A.Fragment,{children:[c.includes("asc")&&s!=="asc"?xe(go,{onClick:l,"data-value":"asc",children:[R(gl,{children:R(a.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),R(ps,{children:u("columnMenuSortAsc")})]}):null,c.includes("desc")&&s!=="desc"?xe(go,{onClick:l,"data-value":"desc",children:[R(gl,{children:R(a.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),R(ps,{children:u("columnMenuSortDesc")})]}):null,c.includes(null)&&s!=null?xe(go,{onClick:l,children:[R(gl,{}),R(ps,{children:o.current.getLocaleText("columnMenuUnsort")})]}):null]})}const Y$e=["defaultSlots","defaultSlotProps","slots","slotProps"],yee={columnMenuSortItem:K$e,columnMenuFilterItem:q$e,columnMenuColumnsItem:G$e},bee={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},wee=A.forwardRef(function(t,r){const{defaultSlots:n,defaultSlotProps:o,slots:i,slotProps:a}=t,s=ze(t,Y$e),c=j$e(W({},s,{defaultSlots:n,defaultSlotProps:o,slots:i,slotProps:a}));return R(H$e,W({ref:r},s,{children:c.map(([l,u],f)=>R(l,W({},u),f))}))}),X$e=A.forwardRef(function(t,r){return R(wee,W({},t,{ref:r,defaultSlots:yee,defaultSlotProps:bee}))}),Q$e=["className"],Z$e=e=>{const{classes:t}=e;return pt({root:["panelContent"]},Rr,t)},J$e=Go("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function xee(e){const{className:t}=e,r=ze(e,Q$e),n=dr(),o=Z$e(n);return R(J$e,W({className:it(t,o.root),ownerState:n},r))}const eBe=["className"],tBe=e=>{const{classes:t}=e;return pt({root:["panelFooter"]},Rr,t)},rBe=Go("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function Cee(e){const{className:t}=e,r=ze(e,eBe),n=dr(),o=tBe(n);return R(rBe,W({className:it(t,o.root),ownerState:n},r))}const nBe=["className"],oBe=e=>{const{classes:t}=e;return pt({root:["panelHeader"]},Rr,t)},iBe=Go("div",{name:"MuiDataGrid",slot:"PanelHeader",overridesResolver:(e,t)=>t.panelHeader})(({theme:e})=>({padding:e.spacing(1)}));function aBe(e){const{className:t}=e,r=ze(e,nBe),n=dr(),o=oBe(n);return R(iBe,W({className:it(t,o.root),ownerState:n},r))}const sBe=["className","slotProps"],lBe=e=>{const{classes:t}=e;return pt({root:["panelWrapper"]},Rr,t)},cBe=We("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),uBe=()=>!0,See=A.forwardRef(function(t,r){const{className:n,slotProps:o={}}=t,i=ze(t,sBe),a=dr(),s=lBe(a);return R(iD,W({open:!0,disableEnforceFocus:!0,isEnabled:uBe},o.TrapFocus,{children:R(cBe,W({ref:r,tabIndex:-1,className:it(n,s.root),ownerState:a},i))}))}),dBe=!1,fBe=["sort","searchPredicate","autoFocusSearchField","disableHideAllButton","disableShowAllButton","getTogglableColumns"],hBe=e=>{const{classes:t}=e;return pt({root:["columnsPanel"],columnsPanelRow:["columnsPanelRow"]},Rr,t)},pBe=We("div",{name:"MuiDataGrid",slot:"ColumnsPanel",overridesResolver:(e,t)=>t.columnsPanel})({padding:"8px 0px 8px 8px"}),mBe=We("div",{name:"MuiDataGrid",slot:"ColumnsPanelRow",overridesResolver:(e,t)=>t.columnsPanelRow})(({theme:e})=>({display:"flex",justifyContent:"space-between",padding:"1px 8px 1px 7px",[`& .${Ba.root}`]:{marginRight:e.spacing(.5)}})),gBe=We(ri)({justifyContent:"flex-end"}),YH=new Intl.Collator,vBe=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1;function yBe(e){var t,r,n;const o=Gr(),i=A.useRef(null),a=$t(o,Xu),s=$t(o,ic),c=dr(),[l,u]=A.useState(""),f=hBe(c),{sort:d,searchPredicate:h=vBe,autoFocusSearchField:p=!0,disableHideAllButton:g=!1,disableShowAllButton:m=!1,getTogglableColumns:v}=e,y=ze(e,fBe),b=A.useMemo(()=>{switch(d){case"asc":return[...a].sort((B,F)=>YH.compare(B.headerName||B.field,F.headerName||F.field));case"desc":return[...a].sort((B,F)=>-YH.compare(B.headerName||B.field,F.headerName||F.field));default:return a}},[a,d]),w=B=>{const{name:F}=B.target;o.current.setColumnVisibility(F,s[F]===!1)},E=A.useCallback(B=>{const F=ic(o),T=W({},F),P=v?v(a):null;return a.forEach(_=>{_.hideable&&(P==null||P.includes(_.field))&&(B?delete T[_.field]:T[_.field]=!1)}),o.current.setColumnVisibilityModel(T)},[o,a,v]),I=A.useCallback(B=>{u(B.target.value)},[]),O=A.useMemo(()=>{const B=v?v(b):null,F=B?b.filter(({field:T})=>B.includes(T)):b;return l?F.filter(T=>h(T,l.toLowerCase())):F},[b,l,h,v]),D=A.useRef(null);A.useEffect(()=>{p?i.current.focus():D.current&&typeof D.current.focus=="function"&&D.current.focus()},[p]);let N=!1;const U=B=>N===!1&&B.hideable!==!1?(N=!0,!0):!1;return xe(See,W({},y,{children:[R(aBe,{children:R(c.slots.baseTextField,W({label:o.current.getLocaleText("columnsPanelTextFieldLabel"),placeholder:o.current.getLocaleText("columnsPanelTextFieldPlaceholder"),inputRef:i,value:l,onChange:I,variant:"standard",fullWidth:!0},(t=c.slotProps)==null?void 0:t.baseTextField))}),R(xee,{children:R(pBe,{className:f.root,ownerState:c,children:O.map(B=>{var F;return xe(mBe,{className:f.columnsPanelRow,ownerState:c,children:[R(dp,{control:R(c.slots.baseSwitch,W({disabled:B.hideable===!1,checked:s[B.field]!==!1,onClick:w,name:B.field,size:"small",inputRef:U(B)?D:void 0},(F=c.slotProps)==null?void 0:F.baseSwitch)),label:B.headerName||B.field}),!c.disableColumnReorder&&dBe&&R(gBe,{draggable:!0,"aria-label":o.current.getLocaleText("columnsPanelDragIconLabel"),title:o.current.getLocaleText("columnsPanelDragIconLabel"),size:"small",disabled:!0,children:R(c.slots.columnReorderIcon,{})})]},B.field)})})}),m&&g?null:xe(Cee,{children:[g?R("span",{}):R(c.slots.baseButton,W({onClick:()=>E(!1)},(r=c.slotProps)==null?void 0:r.baseButton,{disabled:g,children:o.current.getLocaleText("columnsPanelHideAllButton")})),m?null:R(c.slots.baseButton,W({onClick:()=>E(!0)},(n=c.slotProps)==null?void 0:n.baseButton,{disabled:m,children:o.current.getLocaleText("columnsPanelShowAllButton")}))]})]}))}const bBe=["children","className","classes"],wBe=Vt("MuiDataGrid",["panel","paper"]),xBe=We(bf,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),CBe=We(Es,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex"})),SBe=A.forwardRef((e,t)=>{const{children:r,className:n}=e,o=ze(e,bBe),i=Gr(),a=dr(),s=wBe,[c,l]=A.useState(!1),u=A.useCallback(()=>{i.current.hidePreferences()},[i]),f=A.useCallback(g=>{gE(g.key)&&i.current.hidePreferences()},[i]),d=A.useMemo(()=>[{name:"flip",enabled:!1},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{l(!0)},effect:()=>()=>{l(!1)}}],[]),[h,p]=A.useState(null);return A.useEffect(()=>{var g;const m=(g=i.current.rootElementRef)==null||(g=g.current)==null?void 0:g.querySelector(`.${qe.columnHeaders}`);m&&p(m)},[i]),h?R(xBe,W({ref:t,placement:"bottom-start",className:it(n,s.panel),ownerState:a,anchorEl:h,modifiers:d},o,{children:R(oD,{mouseEvent:"onMouseUp",onClickAway:u,children:R(CBe,{className:s.paper,ownerState:a,elevation:8,onKeyDown:f,children:c&&r})})})):null}),_Be=A.forwardRef(function(t,r){var n,o,i;const a=Gr(),s=$t(a,Xu),c=dr(),l=$t(a,p1),u=a.current.unstable_applyPipeProcessors("preferencePanel",null,(n=l.openedPanelValue)!=null?n:df.filters);return R(c.slots.panel,W({ref:r,as:c.slots.basePopper,open:s.length>0&&l.open,id:l.panelId,"aria-labelledby":l.labelId},(o=c.slotProps)==null?void 0:o.panel,t,(i=c.slotProps)==null?void 0:i.basePopper,{children:u}))}),kBe=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","multiFilterOperator","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","children"],EBe=["InputComponentProps"],TBe=e=>{const{classes:t}=e;return pt({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},Rr,t)},IBe=We("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),ABe=We("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),PBe=We("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),MBe=We("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),RBe=We("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:120}),OBe=We("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),DBe=e=>{switch(e){case Va.And:return"filterPanelOperatorAnd";case Va.Or:return"filterPanelOperatorOr";default:throw new Error("MUI: Invalid `logicOperator` property in the `GridFilterPanel`.")}},lb=e=>e.headerName||e.field,XH=new Intl.Collator,FBe=A.forwardRef(function(t,r){var n,o,i,a,s,c,l,u,f,d;const{item:h,hasMultipleFilters:p,deleteFilter:g,applyFilterChanges:m,multiFilterOperator:v,showMultiFilterOperators:y,disableMultiFilterOperator:b,applyMultiFilterOperatorChanges:w,focusElementRef:E,logicOperators:I=[Va.And,Va.Or],columnsSort:O,filterColumns:D,deleteIconProps:N={},logicOperatorInputProps:U={},operatorInputProps:B={},columnInputProps:F={},valueInputProps:T={}}=t,P=ze(t,kBe),_=Gr(),C=$t(_,DJ),S=$t(_,Bi),x=dn(),k=dn(),L=dn(),j=dn(),z=dr(),Y=TBe(z),K=A.useRef(null),Q=A.useRef(null),q=p&&I.length>0,J=((n=z.slotProps)==null?void 0:n.baseFormControl)||{},V=(i=(((o=z.slotProps)==null?void 0:o.baseSelect)||{}).native)!=null?i:!0,X=((a=z.slotProps)==null?void 0:a.baseInputLabel)||{},te=((s=z.slotProps)==null?void 0:s.baseSelectOption)||{},{InputComponentProps:ee}=T,re=ze(T,EBe),se=A.useMemo(()=>{if(D===void 0||typeof D!="function")return C;const ve=D({field:h.field,columns:C,currentFilters:(S==null?void 0:S.items)||[]});return C.filter(we=>ve.includes(we.field))},[D,S==null?void 0:S.items,C,h.field]),pe=A.useMemo(()=>{switch(O){case"asc":return se.sort((ve,we)=>XH.compare(lb(ve),lb(we)));case"desc":return se.sort((ve,we)=>-XH.compare(lb(ve),lb(we)));default:return se}},[se,O]),ce=h.field?_.current.getColumn(h.field):null,ne=A.useMemo(()=>{var ve;return!h.operator||!ce?null:(ve=ce.filterOperators)==null?void 0:ve.find(we=>we.value===h.operator)},[h,ce]),he=A.useCallback(ve=>{const we=ve.target.value,ie=_.current.getColumn(we);if(ie.field===ce.field)return;const ge=ie.filterOperators.find(Fe=>Fe.value===h.operator)||ie.filterOperators[0],Pe=!ge.InputComponent||ge.InputComponent!==(ne==null?void 0:ne.InputComponent)||ie.type!==ce.type;m(W({},h,{field:we,operator:ge.value,value:Pe?void 0:h.value}))},[_,m,h,ce,ne]),oe=A.useCallback(ve=>{const we=ve.target.value,ie=ce==null?void 0:ce.filterOperators.find(Pe=>Pe.value===we),ge=!(ie!=null&&ie.InputComponent)||(ie==null?void 0:ie.InputComponent)!==(ne==null?void 0:ne.InputComponent);m(W({},h,{operator:we,value:ge?void 0:h.value}))},[m,h,ce,ne]),le=A.useCallback(ve=>{const we=ve.target.value===Va.And.toString()?Va.And:Va.Or;w(we)},[w]),de=()=>{z.disableMultipleColumnsFiltering?h.value===void 0?g(h):m(W({},h,{value:void 0})):g(h)};return A.useImperativeHandle(E,()=>({focus:()=>{if(ne!=null&&ne.InputComponent){var ve;K==null||(ve=K.current)==null||ve.focus()}else Q.current.focus()}}),[ne]),xe(IBe,W({ref:r,className:Y.root,"data-id":h.id,ownerState:z},P,{children:[R(ABe,W({variant:"standard",as:z.slots.baseFormControl},J,N,{className:it(Y.deleteIcon,J.className,N.className),ownerState:z,children:R(z.slots.baseIconButton,W({"aria-label":_.current.getLocaleText("filterPanelDeleteIconLabel"),title:_.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:de,size:"small"},(c=z.slotProps)==null?void 0:c.baseIconButton,{children:R(z.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),R(PBe,W({variant:"standard",as:z.slots.baseFormControl},J,U,{sx:W({display:q?"flex":"none",visibility:y?"visible":"hidden"},J.sx||{},U.sx||{}),className:it(Y.logicOperatorInput,J.className,U.className),ownerState:z,children:R(z.slots.baseSelect,W({inputProps:{"aria-label":_.current.getLocaleText("filterPanelLogicOperator")},value:v,onChange:le,disabled:!!b||I.length===1,native:V},(l=z.slotProps)==null?void 0:l.baseSelect,{children:I.map(ve=>A.createElement(z.slots.baseSelectOption,W({},te,{native:V,key:ve.toString(),value:ve.toString()}),_.current.getLocaleText(DBe(ve))))}))})),xe(MBe,W({variant:"standard",as:z.slots.baseFormControl},J,F,{className:it(Y.columnInput,J.className,F.className),ownerState:z,children:[R(z.slots.baseInputLabel,W({},X,{htmlFor:x,id:k,children:_.current.getLocaleText("filterPanelColumns")})),R(z.slots.baseSelect,W({labelId:k,id:x,label:_.current.getLocaleText("filterPanelColumns"),value:h.field||"",onChange:he,native:V},(u=z.slotProps)==null?void 0:u.baseSelect,{children:pe.map(ve=>A.createElement(z.slots.baseSelectOption,W({},te,{native:V,key:ve.field,value:ve.field}),lb(ve)))}))]})),xe(RBe,W({variant:"standard",as:z.slots.baseFormControl},J,B,{className:it(Y.operatorInput,J.className,B.className),ownerState:z,children:[R(z.slots.baseInputLabel,W({},X,{htmlFor:L,id:j,children:_.current.getLocaleText("filterPanelOperator")})),R(z.slots.baseSelect,W({labelId:j,label:_.current.getLocaleText("filterPanelOperator"),id:L,value:h.operator,onChange:oe,native:V,inputRef:Q},(f=z.slotProps)==null?void 0:f.baseSelect,{children:ce==null||(d=ce.filterOperators)==null?void 0:d.map(ve=>A.createElement(z.slots.baseSelectOption,W({},te,{native:V,key:ve.value,value:ve.value}),ve.label||_.current.getLocaleText(`filterOperator${ut(ve.value)}`)))}))]})),R(OBe,W({variant:"standard",as:z.slots.baseFormControl},J,re,{className:it(Y.valueInput,J.className,re.className),ownerState:z,children:ne!=null&&ne.InputComponent?R(ne.InputComponent,W({apiRef:_,item:h,applyValue:m,focusElementRef:K},ne.InputComponentProps,ee)):null}))]}))});class a8{constructor(){this.currentId=0,this.clear=()=>{this.currentId!==0&&(clearTimeout(this.currentId),this.currentId=0)},this.disposeEffect=()=>this.clear}static create(){return new a8}start(t,r){this.clear(),this.currentId=setTimeout(r,t)}}function X2(){const e=jD(a8.create).current;return VD(e.disposeEffect),e}const NBe=["item","applyValue","type","apiRef","focusElementRef","tabIndex","disabled","isFilterActive","clearButton","InputProps"];function Ou(e){var t,r;const{item:n,applyValue:o,type:i,apiRef:a,focusElementRef:s,tabIndex:c,disabled:l,clearButton:u,InputProps:f}=e,d=ze(e,NBe),h=X2(),[p,g]=A.useState((t=n.value)!=null?t:""),[m,v]=A.useState(!1),y=dn(),b=dr(),w=A.useCallback(E=>{const{value:I}=E.target;g(String(I)),v(!0),h.start(b.filterDebounceMs,()=>{const O=W({},n,{value:I,fromInput:y});o(O),v(!1)})},[y,o,n,b.filterDebounceMs,h]);return A.useEffect(()=>{if(n.fromInput!==y||n.value===void 0){var I;g(String((I=n.value)!=null?I:""))}},[y,n]),R(b.slots.baseTextField,W({id:y,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:w,variant:"standard",type:i||"text",InputProps:W({},m||u?{endAdornment:m?R(b.slots.loadIcon,{fontSize:"small",color:"action"}):u}:{},{disabled:l},f,{inputProps:W({tabIndex:c},f==null?void 0:f.inputProps)}),InputLabelProps:{shrink:!0},inputRef:s},d,(r=b.slotProps)==null?void 0:r.baseTextField))}const LBe=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function lg(e){var t,r;const{item:n,applyValue:o,type:i,apiRef:a,focusElementRef:s,InputProps:c,clearButton:l,tabIndex:u,disabled:f}=e,d=ze(e,LBe),h=X2(),[p,g]=A.useState((t=n.value)!=null?t:""),[m,v]=A.useState(!1),y=dn(),b=dr(),w=A.useCallback(E=>{const I=E.target.value;g(String(I)),v(!0),h.start(b.filterDebounceMs,()=>{o(W({},n,{value:I})),v(!1)})},[o,n,b.filterDebounceMs,h]);return A.useEffect(()=>{var E;const I=(E=n.value)!=null?E:"";g(String(I))},[n.value]),R(b.slots.baseTextField,W({fullWidth:!0,id:y,label:a.current.getLocaleText("filterPanelInputLabel"),placeholder:a.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:w,variant:"standard",type:i||"text",InputLabelProps:{shrink:!0},inputRef:s,InputProps:W({},m||l?{endAdornment:m?R(b.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:f},c,{inputProps:W({max:i==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:u},c==null?void 0:c.inputProps)})},d,(r=b.slotProps)==null?void 0:r.baseTextField))}const $Be=["item","applyValue","type","apiRef","focusElementRef","getOptionLabel","getOptionValue","placeholder","tabIndex","label","isFilterActive","clearButton","InputLabelProps"],BBe=({column:{valueOptions:e,field:t},OptionComponent:r,getOptionLabel:n,getOptionValue:o,isSelectNative:i,baseSelectOptionProps:a})=>(typeof e=="function"?["",...e({field:t})]:["",...e||[]]).map(c=>{const l=o(c),u=n(c);return A.createElement(r,W({},a,{native:i,key:l,value:l}),u)}),UBe=We("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function QH(e){var t,r,n,o,i,a,s,c;const{item:l,applyValue:u,type:f,apiRef:d,focusElementRef:h,getOptionLabel:p,getOptionValue:g,placeholder:m,tabIndex:v,label:y,clearButton:b}=e,w=ze(e,$Be),[E,I]=A.useState((t=l.value)!=null?t:""),O=dn(),D=dn(),N=dr(),U=(r=(n=N.slotProps)==null||(n=n.baseSelect)==null?void 0:n.native)!=null?r:!0;let B=null;if(l.field){const S=d.current.getColumn(l.field);_m(S)&&(B=S)}const F=g||((o=B)==null?void 0:o.getOptionValue),T=p||((i=B)==null?void 0:i.getOptionLabel),P=A.useMemo(()=>{if(B)return typeof B.valueOptions=="function"?B.valueOptions({field:B.field}):B.valueOptions},[B]),_=A.useCallback(S=>{let x=S.target.value;x=t5(x,P,F),I(String(x)),u(W({},l,{value:x}))},[P,F,u,l]);if(A.useEffect(()=>{var S;let x;if(P!==void 0){if(x=t5(l.value,P,F),x!==l.value){u(W({},l,{value:x}));return}}else x=l.value;x=(S=x)!=null?S:"",I(String(x))},[l,P,u,F]),!_m(B)||!_m(B))return null;const C=y??d.current.getLocaleText("filterPanelInputLabel");return xe(UBe,{children:[xe(N.slots.baseFormControl,{children:[R(N.slots.baseInputLabel,W({},(a=N.slotProps)==null?void 0:a.baseInputLabel,{id:D,htmlFor:O,shrink:!0,variant:"standard",children:C})),R(N.slots.baseSelect,W({id:O,label:C,labelId:D,value:E,onChange:_,variant:"standard",type:f||"text",inputProps:{tabIndex:v,ref:h,placeholder:m??d.current.getLocaleText("filterPanelInputPlaceholder")},native:U},w,(s=N.slotProps)==null?void 0:s.baseSelect,{children:BBe({column:B,OptionComponent:N.slots.baseSelectOption,getOptionLabel:T,getOptionValue:F,isSelectNative:U,baseSelectOptionProps:(c=N.slotProps)==null?void 0:c.baseSelectOption})}))]}),b]})}const HBe=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","InputLabelProps"],zBe=We("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function jBe(e){var t,r,n,o;const{item:i,applyValue:a,apiRef:s,focusElementRef:c,clearButton:l,tabIndex:u,label:f}=e,d=ze(e,HBe),[h,p]=A.useState(i.value||""),g=dr(),m=dn(),v=dn(),y=((t=g.slotProps)==null?void 0:t.baseSelect)||{},b=(r=y.native)!=null?r:!0,w=((n=g.slotProps)==null?void 0:n.baseSelectOption)||{},E=A.useCallback(O=>{const D=O.target.value;p(D),a(W({},i,{value:D}))},[a,i]);A.useEffect(()=>{p(i.value||"")},[i.value]);const I=f??s.current.getLocaleText("filterPanelInputLabel");return xe(zBe,{children:[xe(g.slots.baseFormControl,{fullWidth:!0,children:[R(g.slots.baseInputLabel,W({},(o=g.slotProps)==null?void 0:o.baseInputLabel,{id:m,shrink:!0,variant:"standard",children:I})),xe(g.slots.baseSelect,W({labelId:m,id:v,label:I,value:h,onChange:E,variant:"standard",native:b,displayEmpty:!0,inputProps:{ref:c,tabIndex:u}},d,y,{children:[R(g.slots.baseSelectOption,W({},w,{native:b,value:"",children:s.current.getLocaleText("filterValueAny")})),R(g.slots.baseSelectOption,W({},w,{native:b,value:"true",children:s.current.getLocaleText("filterValueTrue")})),R(g.slots.baseSelectOption,W({},w,{native:b,value:"false",children:s.current.getLocaleText("filterValueFalse")}))]}))]}),l]})}const VBe=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],r5=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),WBe=A.forwardRef(function(t,r){var n,o;const i=Gr(),a=dr(),s=$t(i,Bi),c=$t(i,DJ),l=A.useRef(null),u=A.useRef(null),{logicOperators:f=[Va.And,Va.Or],columnsSort:d,filterFormProps:h,getColumnForNewFilter:p,disableAddFilterButton:g=!1,disableRemoveAllButton:m=!1}=t,v=ze(t,VBe),y=i.current.upsertFilterItem,b=A.useCallback(B=>{i.current.setFilterLogicOperator(B)},[i]),w=A.useCallback(()=>{let B;if(p&&typeof p=="function"){const F=p({currentFilters:(s==null?void 0:s.items)||[],columns:c});if(F===null)return null;B=c.find(({field:T})=>T===F)}else B=c.find(F=>{var T;return(T=F.filterOperators)==null?void 0:T.length});return B?r5(B):null},[s==null?void 0:s.items,c,p]),E=A.useCallback(()=>{if(p===void 0||typeof p!="function")return w();const B=s.items.length?s.items:[w()].filter(Boolean),F=p({currentFilters:B,columns:c});if(F===null)return null;const T=c.find(({field:P})=>P===F);return T?r5(T):null},[s.items,c,p,w]),I=A.useMemo(()=>s.items.length?s.items:(u.current||(u.current=w()),u.current?[u.current]:[]),[s.items,w]),O=I.length>1,D=()=>{const B=E();B&&i.current.upsertFilterItems([...I,B])},N=A.useCallback(B=>{const F=I.length===1;i.current.deleteFilterItem(B),F&&i.current.hideFilterPanel()},[i,I.length]),U=()=>{I.length===1&&I[0].value===void 0&&(i.current.deleteFilterItem(I[0]),i.current.hideFilterPanel()),i.current.setFilterModel(W({},s,{items:[]}))};return A.useEffect(()=>{f.length>0&&s.logicOperator&&!f.includes(s.logicOperator)&&b(f[0])},[f,b,s.logicOperator]),A.useEffect(()=>{I.length>0&&l.current.focus()},[I.length]),xe(See,W({ref:r},v,{children:[R(xee,{children:I.map((B,F)=>R(FBe,W({item:B,applyFilterChanges:y,deleteFilter:N,hasMultipleFilters:O,showMultiFilterOperators:F>0,multiFilterOperator:s.logicOperator,disableMultiFilterOperator:F!==1,applyMultiFilterOperatorChanges:b,focusElementRef:F===I.length-1?l:null,logicOperators:f,columnsSort:d},h),B.id==null?F:B.id))}),!a.disableMultipleColumnsFiltering&&!(g&&m)?xe(Cee,{children:[g?R("span",{}):R(a.slots.baseButton,W({onClick:D,startIcon:R(a.slots.filterPanelAddIcon,{})},(n=a.slotProps)==null?void 0:n.baseButton,{children:i.current.getLocaleText("filterPanelAddFilter")})),m?null:R(a.slots.baseButton,W({onClick:U,startIcon:R(a.slots.filterPanelRemoveAllIcon,{})},(o=a.slotProps)==null?void 0:o.baseButton,{children:i.current.getLocaleText("filterPanelRemoveAll")}))]}):null]}))}),GBe=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"];function _ee(e){const{item:t,applyValue:r,type:n,apiRef:o,focusElementRef:i,color:a,error:s,helperText:c,size:l,variant:u}=e,f=ze(e,GBe),d={color:a,error:s,helperText:c,size:l,variant:u},[h,p]=A.useState(t.value||[]),g=dn(),m=dr();A.useEffect(()=>{var y;const b=(y=t.value)!=null?y:[];p(b.map(String))},[t.value]);const v=A.useCallback((y,b)=>{p(b.map(String)),r(W({},t,{value:[...b]}))},[r,t]);return R(Bh,W({multiple:!0,freeSolo:!0,options:[],filterOptions:(y,b)=>{const{inputValue:w}=b;return w==null||w===""?[]:[w]},id:g,value:h,onChange:v,renderTags:(y,b)=>y.map((w,E)=>R(m.slots.baseChip,W({variant:"outlined",size:"small",label:w},b({index:E})))),renderInput:y=>{var b;return R(m.slots.baseTextField,W({},y,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},y.InputLabelProps,{shrink:!0}),inputRef:i,type:n||"text"},d,(b=m.slotProps)==null?void 0:b.baseTextField))}},f))}const qBe=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant","getOptionLabel","getOptionValue"],KBe=kQ();function YBe(e){var t,r;const{item:n,applyValue:o,apiRef:i,focusElementRef:a,color:s,error:c,helperText:l,size:u,variant:f="standard",getOptionLabel:d,getOptionValue:h}=e,p=ze(e,qBe),g={color:s,error:c,helperText:l,size:u,variant:f},m=dn(),v=dr();let y=null;if(n.field){const U=i.current.getColumn(n.field);_m(U)&&(y=U)}const b=h||((t=y)==null?void 0:t.getOptionValue),w=d||((r=y)==null?void 0:r.getOptionLabel),E=A.useCallback((U,B)=>b(U)===b(B),[b]),I=A.useMemo(()=>{var U;return(U=y)!=null&&U.valueOptions?typeof y.valueOptions=="function"?y.valueOptions({field:y.field}):y.valueOptions:[]},[y]),O=A.useMemo(()=>I==null?void 0:I.map(b),[I,b]),D=A.useMemo(()=>Array.isArray(n.value)?I!==void 0?n.value.map(B=>O==null?void 0:O.findIndex(F=>F===B)).filter(B=>B>=0).map(B=>I[B]):n.value:[],[n.value,I,O]);A.useEffect(()=>{(!Array.isArray(n.value)||D.length!==n.value.length)&&o(W({},n,{value:D.map(b)}))},[n,D,o,b]);const N=A.useCallback((U,B)=>{o(W({},n,{value:B.map(b)}))},[o,n,b]);return R(Bh,W({multiple:!0,options:I,isOptionEqualToValue:E,filterOptions:KBe,id:m,value:D,onChange:N,getOptionLabel:w,renderTags:(U,B)=>U.map((F,T)=>R(v.slots.baseChip,W({variant:"outlined",size:"small",label:w(F)},B({index:T})))),renderInput:U=>{var B;return R(v.slots.baseTextField,W({},U,{label:i.current.getLocaleText("filterPanelInputLabel"),placeholder:i.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},U.InputLabelProps,{shrink:!0}),inputRef:a,type:"singleSelect"},g,(B=v.slotProps)==null?void 0:B.baseTextField))}},p))}const XBe=["componentsProps"],QBe=e=>{const{classes:t}=e;return pt({root:["toolbarFilterList"]},Rr,t)},ZBe=We("ul",{name:"MuiDataGrid",slot:"ToolbarFilterList",overridesResolver:(e,t)=>t.toolbarFilterList})(({theme:e})=>({margin:e.spacing(1,1,.5),padding:e.spacing(0,1)})),JBe=A.forwardRef(function(t,r){var n,o;const{componentsProps:i={}}=t,a=ze(t,XBe),s=i.button||{},c=Gr(),l=dr(),u=$t(c,zJ),f=$t(c,fp),d=$t(c,p1),h=QBe(l),p=dn(),g=dn(),m=A.useMemo(()=>{if(d.open)return c.current.getLocaleText("toolbarFiltersTooltipHide");if(u.length===0)return c.current.getLocaleText("toolbarFiltersTooltipShow");const b=E=>f[E.field].filterOperators.find(I=>I.value===E.operator).label||c.current.getLocaleText(`filterOperator${ut(E.operator)}`).toString(),w=E=>{const{getValueAsString:I}=f[E.field].filterOperators.find(O=>O.value===E.operator);return I?I(E.value):E.value};return xe("div",{children:[c.current.getLocaleText("toolbarFiltersTooltipActive")(u.length),R(ZBe,{className:h.root,ownerState:l,children:u.map((E,I)=>W({},f[E.field]&&R("li",{children:`${f[E.field].headerName||E.field}
                  ${b(E)}
                  ${E.value!=null?w(E):""}`},I)))})]})},[c,l,d.open,u,f,h]),v=b=>{var w;const{open:E,openedPanelValue:I}=d;E&&I===df.filters?c.current.hidePreferences():c.current.showPreferences(df.filters,g,p),(w=s.onClick)==null||w.call(s,b)};if(l.disableColumnFilter)return null;const y=d.open&&d.panelId===g;return R(l.slots.baseTooltip,W({title:m,enterDelay:1e3},a,(n=l.slotProps)==null?void 0:n.baseTooltip,{children:R(l.slots.baseButton,W({ref:r,id:p,size:"small","aria-label":c.current.getLocaleText("toolbarFiltersLabel"),"aria-controls":y?g:void 0,"aria-expanded":y,"aria-haspopup":!0,startIcon:R(qI,{badgeContent:u.length,color:"primary",children:R(l.slots.openFilterButtonIcon,{})})},s,{onClick:v},(o=l.slotProps)==null?void 0:o.baseButton,{children:c.current.getLocaleText("toolbarFilters")}))}))}),eUe=["children","onClick"],tUe=A.forwardRef(function(t,r){var n;const{children:o,onClick:i}=t,a=ze(t,eUe),s=Gr(),c=dr(),l=dn(),u=dn(),[f,d]=A.useState(!1),h=A.useRef(null),p=Ur(r,h),g=y=>{d(b=>!b),i==null||i(y)},m=()=>d(!1),v=y=>{ZD(y.key)&&y.preventDefault(),eee(y.key)&&m()};return o==null?null:xe(A.Fragment,{children:[R(c.slots.baseButton,W({ref:p,size:"small",startIcon:R(c.slots.exportIcon,{}),"aria-expanded":f,"aria-label":s.current.getLocaleText("toolbarExportLabel"),"aria-haspopup":"menu","aria-controls":f?u:void 0,id:l},a,{onClick:g},(n=c.slotProps)==null?void 0:n.baseButton,{children:s.current.getLocaleText("toolbarExport")})),R(o4,{open:f,target:h.current,onClose:m,position:"bottom-start",children:R(j1,{id:u,className:qe.menuList,"aria-labelledby":l,onKeyDown:v,autoFocusItem:f,children:A.Children.map(o,y=>A.isValidElement(y)?A.cloneElement(y,{hideMenu:m}):y)})})]})}),rUe=["hideMenu","options"],nUe=["hideMenu","options"],oUe=["csvOptions","printOptions","excelOptions"];function iUe(e){const t=Gr(),{hideMenu:r,options:n}=e,o=ze(e,rUe);return R(go,W({onClick:()=>{t.current.exportDataAsCsv(n),r==null||r()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function aUe(e){const t=Gr(),{hideMenu:r,options:n}=e,o=ze(e,nUe);return R(go,W({onClick:()=>{t.current.exportDataAsPrint(n),r==null||r()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const sUe=A.forwardRef(function(t,r){const{csvOptions:n={},printOptions:o={},excelOptions:i}=t,a=ze(t,oUe),c=Gr().current.unstable_applyPipeProcessors("exportMenu",[],{excelOptions:i,csvOptions:n,printOptions:o}).sort((l,u)=>l.componentName>u.componentName?1:-1);return c.length===0?null:R(tUe,W({},a,{ref:r,children:c.map((l,u)=>A.cloneElement(l.component,{key:u}))}))}),lUe=["className","selectedRowCount"],cUe=e=>{const{classes:t}=e;return pt({root:["selectedRowCount"]},Rr,t)},uUe=Go("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),dUe=A.forwardRef(function(t,r){const{className:n,selectedRowCount:o}=t,i=ze(t,lUe),a=Gr(),s=dr(),c=cUe(s),l=a.current.getLocaleText("footerRowSelected")(o);return R(uUe,W({ref:r,className:it(c.root,n),ownerState:s},i,{children:l}))}),fUe=A.forwardRef(function(t,r){var n,o;const i=Gr(),a=dr(),s=$t(i,M9e),c=$t(i,t$e),l=$t(i,JI),u=!a.hideFooterSelectedRowCount&&c>0?R(dUe,{selectedRowCount:c}):R("div",{}),f=!a.hideFooterRowCount&&!a.pagination?R(a.slots.footerRowCount,W({},(n=a.slotProps)==null?void 0:n.footerRowCount,{rowCount:s,visibleRowCount:l})):null,d=a.pagination&&!a.hideFooterPagination&&a.slots.pagination&&R(a.slots.pagination,W({},(o=a.slotProps)==null?void 0:o.pagination));return xe(uLe,W({ref:r},t,{children:[u,f,d]}))});function hUe(){var e,t;const r=dr();return xe(A.Fragment,{children:[R(r.slots.preferencesPanel,W({},(e=r.slotProps)==null?void 0:e.preferencesPanel)),r.slots.toolbar&&R(r.slots.toolbar,W({},(t=r.slotProps)==null?void 0:t.toolbar))]})}const pUe=A.forwardRef(function(t,r){return R(JD,W({ref:r},t,{children:R(Ri,{})}))}),mUe=A.forwardRef(function(t,r){const o=Gr().current.getLocaleText("noRowsLabel");return R(JD,W({ref:r},t,{children:o}))}),gUe=We(s9e)(({theme:e})=>({[`& .${Sm.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${Sm.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),vUe=A.forwardRef(function(t,r){const n=Gr(),o=dr(),i=$t(n,Ql),a=$t(n,JI),s=A.useMemo(()=>{var h,p;return(h=(p=o.rowCount)!=null?p:a)!=null?h:0},[o.rowCount,a]),c=A.useMemo(()=>Math.floor(s/(i.pageSize||1)),[s,i.pageSize]),l=A.useCallback(h=>{const p=Number(h.target.value);n.current.setPageSize(p)},[n]),u=A.useCallback((h,p)=>{n.current.setPage(p)},[n]),d=(h=>{for(let p=0;p<o.pageSizeOptions.length;p+=1){const g=o.pageSizeOptions[p];if(typeof g=="number"){if(g===h)return!0}else if(g.value===h)return!0}return!1})(i.pageSize)?o.pageSizeOptions:[];return R(gUe,W({ref:r,component:"div",count:s,page:i.page<=c?i.page:c,rowsPerPageOptions:d,rowsPerPage:i.pageSize,onPageChange:u,onRowsPerPageChange:l},n.current.getLocaleText("MuiTablePagination"),t))}),yUe=["className","rowCount","visibleRowCount"],bUe=e=>{const{classes:t}=e;return pt({root:["rowCount"]},Rr,t)},wUe=Go("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),xUe=A.forwardRef(function(t,r){const{className:n,rowCount:o,visibleRowCount:i}=t,a=ze(t,yUe),s=Gr(),c=dr(),l=bUe(c);if(o===0)return null;const u=i<o?s.current.getLocaleText("footerTotalVisibleRows")(i,o):o.toLocaleString();return xe(wUe,W({ref:r,className:it(l.root,n),ownerState:c},a,{children:[s.current.getLocaleText("footerTotalRows")," ",u]}))}),yE=(e,t)=>{let r,n;return t.pagination&&t.paginationMode==="client"?(n=r8(e),r=e$e(e)):(r=Cf(e),r.length===0?n=null:n={firstRowIndex:0,lastRowIndex:r.length-1}),{rows:r,range:n}},Sf=(e,t)=>{const r=yE(e,t);return A.useMemo(()=>({rows:r.rows,range:r.range}),[r.rows,r.range])},n5={current:null};function Q2(e){return e.isInternal=!0,e}function bE(e){return e!==void 0&&e.isInternal===!0}function CUe(e){return Q2((t,r)=>{const n=e(t,r);return n&&(o=>n(o.value,o.row,r,n5.current))})}function Z2(e){return e.map(t=>W({},t,{getApplyFilterFn:CUe(t.getApplyFilterFnV7),getApplyFilterFnV7:Q2(t.getApplyFilterFnV7)}))}function kee(e){return Q2((t,r,n)=>{const o=e(t,r,n);return o&&(i=>o(i.value,i.row,r,n))})}function Eee(e){return{current:e.current.getPublicApi()}}const SUe=typeof window>"u"?globalThis:window,Tee=SUe[atob("ZXZhbA==")];let o5;try{o5=Tee("true")}catch{o5=!1}const i5=(e,t)=>{const r=W({},e);if(r.id==null&&(r.id=Math.round(Math.random()*1e5)),r.operator==null){const n=fp(t)[r.field];r.operator=n&&n.filterOperators[0].value}return r},_Ue=cd(["MUI: The `filterModel` can only contain a single item when the `disableMultipleColumnsFiltering` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),kUe=cd("MUI: The `id` field is required on `filterModel.items` when you use multiple filters.","error"),EUe=cd("MUI: The `operator` field is required on `filterModel.items`, one or more of your filtering item has no `operator` provided.","error"),Iee=(e,t,r)=>{const n=e.items.length>1;let o;n&&t?(_Ue(),o=[e.items[0]]):o=e.items;const i=n&&o.some(s=>s.id==null),a=o.some(s=>s.operator==null);return i&&kUe(),a&&EUe(),a||i?W({},e,{items:o.map(s=>i5(s,r))}):e.items!==o?W({},e,{items:o}):e},ZH=(e,t,r)=>n=>W({},n,{filterModel:Iee(e,t,r)}),Ch=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,Aee=(e,t)=>{if(!e.field||!e.operator)return null;const r=t.current.getColumn(e.field);if(!r)return null;let n;if(r.valueParser){var o;const h=r.valueParser;n=Array.isArray(e.value)?(o=e.value)==null?void 0:o.map(p=>h(p)):h(e.value)}else n=e.value;const{ignoreDiacritics:i}=t.current.rootProps;i&&(n=Ch(n));const a=W({},e,{value:n}),s=r.filterOperators;if(!(s!=null&&s.length))throw new Error(`MUI: No filter operators found for column '${r.field}'.`);const c=s.find(h=>h.value===a.operator);if(!c)throw new Error(`MUI: No filter operator found for column '${r.field}' and operator value '${a.operator}'.`);const l=!bE(c.getApplyFilterFn),u=!bE(c.getApplyFilterFnV7),f=Eee(t);if(c.getApplyFilterFnV7&&!(l&&!u)){const h=c.getApplyFilterFnV7(a,r);return typeof h!="function"?null:{v7:!0,item:a,fn:p=>{let g=t.current.getRowValue(p,r);return i&&(g=Ch(g)),h(g,p,r,f)}}}const d=c.getApplyFilterFn(a,r);return typeof d!="function"?null:{v7:!1,item:a,fn:h=>{const p=t.current.getCellParams(h,a.field);n5.current=f,i&&(p.value=Ch(p.value));const g=d(p);return n5.current=null,g}}};let JH=1;const TUe=(e,t,r)=>{const{items:n}=e,o=n.map(c=>Aee(c,t)).filter(c=>!!c);if(o.length===0)return null;if(!o5||r)return(c,l)=>{const u={};for(let f=0;f<o.length;f+=1){const d=o[f];(!l||l(d.item.field))&&(u[d.item.id]=d.v7?d.fn(c):d.fn(t.current.getRowId(c)))}return u};const i=`(function filterItem$$(getRowId, appliers, row, shouldApplyFilter) {
      ${o.map((c,l)=>`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(c.item.field)});`).join(`
`)}

      const result$$ = {
      ${o.map((c,l)=>`${JSON.stringify(String(c.item.id))}:
          !shouldApply${l} ?
            false :
            ${c.v7?`appliers[${l}].fn(row)`:`appliers[${l}].fn(getRowId(row))`},
      `).join(`
`)}};

      return result$$;
    })`,a=Tee(i.replaceAll("$$",String(JH))),s=(c,l)=>a(t.current.getRowId,o,c,l);return JH+=1,s},IUe=(e,t)=>{var r,n,o;const i=(r=(n=e.quickFilterValues)==null?void 0:n.filter(Boolean))!=null?r:[];if(i.length===0)return null;const s=((o=e.quickFilterExcludeHiddenColumns)!=null?o:!1)?Xh(t):tu(t),c=[],{ignoreDiacritics:l}=t.current.rootProps,u=Eee(t);return s.forEach(f=>{const d=t.current.getColumn(f),h=d==null?void 0:d.getApplyQuickFilterFn,p=d==null?void 0:d.getApplyQuickFilterFnV7,g=!bE(h),m=!bE(p);p&&!(g&&!m)?c.push({column:d,appliers:i.map(v=>{const y=l?Ch(v):v;return{v7:!0,fn:p(y,d,u)}})}):h&&c.push({column:d,appliers:i.map(v=>{const y=l?Ch(v):v;return{v7:!1,fn:h(y,d,u)}})})}),function(d,h){const p={},g={};e:for(let v=0;v<i.length;v+=1){const y=i[v];for(let b=0;b<c.length;b+=1){const{column:w,appliers:E}=c[b],{field:I}=w;if(h&&!h(I))continue;const O=E[v];let D=t.current.getRowValue(d,w);if(O.fn!==null)if(O.v7){if(l&&(D=Ch(D)),O.fn(D,d,w,u)){p[y]=!0;continue e}}else{var m;const N=(m=g[I])!=null?m:t.current.getCellParams(t.current.getRowId(d),I);if(l&&(N.value=Ch(N.value)),g[I]=N,O.fn(N)){p[y]=!0;continue e}}}p[y]=!1}return p}},AUe=(e,t,r)=>{const n=TUe(e,t,r),o=IUe(e,t);return function(a,s,c){var l,u;c.passingFilterItems=(l=n==null?void 0:n(a,s))!=null?l:null,c.passingQuickFilterValues=(u=o==null?void 0:o(a,s))!=null?u:null}},ez=e=>e!=null,PUe=(e,t,r)=>(e.cleanedFilterItems||(e.cleanedFilterItems=r.filter(n=>Aee(n,t)!==null)),e.cleanedFilterItems),Pee=(e,t,r,n,o)=>{const i=PUe(o,n,r.items),a=e.filter(ez),s=t.filter(ez);if(a.length>0){var c;const u=d=>a.some(h=>h[d.id]);if(((c=r.logicOperator)!=null?c:mx().logicOperator)===Va.And){if(!i.every(u))return!1}else if(!i.some(u))return!1}if(s.length>0&&r.quickFilterValues!=null){var l;const u=d=>s.some(h=>h[d]);if(((l=r.quickFilterLogicOperator)!=null?l:mx().quickFilterLogicOperator)===Va.And){if(!r.quickFilterValues.every(u))return!1}else if(!r.quickFilterValues.some(u))return!1}return!0},tz=Q2(e=>{if(!e)return null;const t=new RegExp(sk(e),"i");return(r,n,o,i)=>{let a=i.current.getRowFormattedValue(n,o);return i.current.ignoreDiacritics&&(a=Ch(a)),a!=null?t.test(a.toString()):!1}}),s8=(e=!1)=>Z2([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(sk(r),"i");return o=>o!=null?n.test(String(o)):!1},InputComponent:Ou},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.compare(r,o.toString())===0:!1},InputComponent:Ou},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`^${sk(r)}.*$`,"i");return o=>o!=null?n.test(o.toString()):!1},InputComponent:Ou},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const r=e?t.value:t.value.trim(),n=new RegExp(`.*${sk(r)}$`,"i");return o=>o!=null?n.test(o.toString()):!1},InputComponent:Ou},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t===""||t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!==""&&t!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const r=e?t.value:t.value.map(o=>o.trim()),n=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?r.some(i=>n.compare(i,o.toString()||"")===0):!1},InputComponent:_ee}]),Ws={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:c$e,type:"string",align:"left",filterOperators:s8(),renderEditCell:O7e,getApplyQuickFilterFn:kee(tz),getApplyQuickFilterFnV7:tz},MUe=()=>Z2([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t=e.value==="true";return r=>!!r===t},InputComponent:jBe}]);function RUe({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")}const OUe=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},Mee=W({},Ws,{type:"boolean",align:"center",headerAlign:"center",renderCell:w7e,renderEditCell:_7e,sortComparator:hee,valueFormatter:RUe,filterOperators:MUe(),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>OUe(e)}),Md="__check__",p0=W({},Mee,{field:Md,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>vE(e.api.state,e.api.instanceId)[e.id]!==void 0,renderHeader:e=>R(x$e,W({},e)),renderCell:e=>R(y$e,W({},e))}),i4="actions",DUe=W({},Ws,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:Q7e,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0}),l8="__detail_panel_toggle__",oa=e=>e.editRows,FUe=["selected","hovered","rowId","row","index","style","position","rowHeight","className","visibleColumns","renderedColumns","containerWidth","firstColumnToRender","lastColumnToRender","isLastVisible","focusedCellColumnIndexNotInRange","isNotVisible","focusedCell","tabbableCell","onClick","onDoubleClick","onMouseEnter","onMouseLeave","onMouseOut","onMouseOver"],NUe=e=>{const{editable:t,editing:r,selected:n,isLastVisible:o,rowHeight:i,classes:a}=e;return pt({root:["row",n&&"selected",t&&"row--editable",r&&"row--editing",o&&"row--lastVisible",i==="auto"&&"row--dynamicHeight"]},Rr,a)};function LUe({width:e}){if(!e)return null;const t={width:e};return R("div",{className:`${qe.cell} ${qe.withBorderColor}`,style:t})}const $Ue=A.forwardRef(function(t,r){const{selected:n,hovered:o,rowId:i,row:a,index:s,style:c,position:l,rowHeight:u,className:f,visibleColumns:d,renderedColumns:h,containerWidth:p,firstColumnToRender:g,isLastVisible:m=!1,focusedCellColumnIndexNotInRange:v,isNotVisible:y,focusedCell:b,onClick:w,onDoubleClick:E,onMouseEnter:I,onMouseLeave:O,onMouseOut:D,onMouseOver:N}=t,U=ze(t,FUe),B=Gr(),F=A.useRef(null),T=dr(),P=Sf(B,T),_=$t(B,K2),C=$t(B,us),S=$t(B,X1),x=$t(B,Y2),k=$t(B,oa),L=Ur(F,r),j=s+x+2,z={selected:n,hovered:o,isLastVisible:m,classes:T.classes,editing:B.current.getRowMode(i)===gn.Edit,editable:T.editMode===nd.Row,rowHeight:u},Y=NUe(z);A.useLayoutEffect(()=>{u==="auto"&&F.current&&typeof ResizeObserver>"u"&&B.current.unstable_storeRowHeightMeasurement(i,F.current.clientHeight,l)},[B,u,i,l]),A.useLayoutEffect(()=>{if(P.range){const Pe=B.current.getRowIndexRelativeToVisibleRows(i);Pe!=null&&B.current.unstable_setLastMeasuredRowIndex(Pe)}const we=F.current;if(!we||u!=="auto"||typeof ResizeObserver>"u")return;const ge=new ResizeObserver(Pe=>{const[Fe]=Pe,Ie=Fe.borderBoxSize&&Fe.borderBoxSize.length>0?Fe.borderBoxSize[0].blockSize:Fe.contentRect.height;B.current.unstable_storeRowHeightMeasurement(i,Ie,l)});return ge.observe(we),()=>ge.disconnect()},[B,P.range,s,u,i,l]);const K=A.useCallback((we,ie)=>ge=>{Q1(ge)||B.current.getRow(i)&&(B.current.publishEvent(we,B.current.getRowParams(i),ge),ie&&ie(ge))},[B,i]),Q=A.useCallback(we=>{const ie=pE(we.target,qe.cell),ge=ie==null?void 0:ie.getAttribute("data-field");if(ge){if(ge===p0.field||ge===l8||ge==="__reorder__"||B.current.getCellMode(i,ge)===eo.Edit)return;const Pe=B.current.getColumn(ge);if((Pe==null?void 0:Pe.type)===i4)return}K("rowClick",w)(we)},[B,w,K,i]),{slots:q,slotProps:J,disableColumnReorder:G}=T,V=q.cell===e5?e5:p7e,X=T.rowReordering,te=(we,ie)=>{var ge,Pe;const Fe=G&&we.disableReorder||!X&&!!C.length&&S>1&&Object.keys(k).length>0,Ie=(ge=(Pe=k[i])==null?void 0:Pe[we.field])!=null?ge:null;let Oe=!1;return v!==void 0&&d[v].field===we.field&&(Oe=!0),R(V,W({column:we,width:ie.width,rowId:i,height:u,showRightBorder:ie.showRightBorder,align:we.align||"left",colIndex:ie.indexRelativeToAllColumns,colSpan:ie.colSpan,disableDragEvents:Fe,editCellState:Ie,isNotVisible:Oe},J==null?void 0:J.cell),we.field)},ee=$t(B,()=>W({},B.current.unstable_getRowInternalSizes(i)),WD);let re=u;if(re==="auto"&&ee){let we=0;const ie=Object.entries(ee).reduce((ge,[Pe,Fe])=>/^base[A-Z]/.test(Pe)?(we+=1,Fe>ge?Fe:ge):ge,0);ie>0&&we>1&&(re=ie)}const se=A.useMemo(()=>{if(y)return{opacity:0,width:0,height:0};const we=W({},c,{maxHeight:u==="auto"?"none":u,minHeight:re});if(ee!=null&&ee.spacingTop){const ie=T.rowSpacingType==="border"?"borderTopWidth":"marginTop";we[ie]=ee.spacingTop}if(ee!=null&&ee.spacingBottom){const ie=T.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let ge=we[ie];typeof ge!="number"&&(ge=parseInt(ge||"0",10)),ge+=ee.spacingBottom,we[ie]=ge}return we},[y,u,c,re,ee,T.rowSpacingType]),pe=B.current.unstable_applyPipeProcessors("rowClassName",[],i);if(typeof T.getRowClassName=="function"){var ce;const we=s-(((ce=P.range)==null?void 0:ce.firstRowIndex)||0),ie=W({},B.current.getRowParams(i),{isFirstVisible:we===0,isLastVisible:we===P.rows.length-1,indexRelativeToCurrentPage:we});pe.push(T.getRowClassName(ie))}const ne=KLe(1e4,20,80),he=B.current.getRowNode(i);if(!he)return null;const oe=he.type,le=[];for(let we=0;we<h.length;we+=1){const ie=h[we];let ge=g+we;v!==void 0&&b&&(d[v].field===ie.field?ge=v:ge-=1);const Pe=B.current.unstable_getCellColSpanInfo(i,ge);if(Pe&&!Pe.spannedByColSpan)if(oe!=="skeletonRow"){const{colSpan:Fe,width:Ie}=Pe.cellProps,Oe={width:Ie,colSpan:Fe,showRightBorder:T.showCellVerticalBorder,indexRelativeToAllColumns:ge};le.push(te(ie,Oe))}else{const{width:Fe}=Pe.cellProps,Ie=Math.round(ne());le.push(R(q.skeletonCell,{width:Fe,contentWidth:Ie,field:ie.field,align:ie.align},ie.field))}}const de=p-_,ve=a?{onClick:Q,onDoubleClick:K("rowDoubleClick",E),onMouseEnter:K("rowMouseEnter",I),onMouseLeave:K("rowMouseLeave",O),onMouseOut:K("rowMouseOut",D),onMouseOver:K("rowMouseOver",N)}:null;return xe("div",W({ref:L,"data-id":i,"data-rowindex":s,role:"row",className:it(...pe,Y.root,f,o&&"Mui-hovered"),"aria-rowindex":j,"aria-selected":n,style:se},ve,U,{children:[le,de>0&&R(LUe,{width:de})]}))}),BUe=n4($Ue),UUe={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel:"Reorder column",columnsPanelShowAllButton:"Show all",columnsPanelHideAllButton:"Hide all",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorEquals:"equals",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorEquals:"Equals",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function HUe({privateApiRef:e,props:t,children:r}){const n=A.useRef(e.current.getPublicApi());return R(OJ.Provider,{value:t,children:R(MJ.Provider,{value:e,children:R(VJ.Provider,{value:n,children:r})})})}const zUe=/(\d+)-(\d+)-(\d+)/,jUe=/(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;function cg(e,t,r,n){if(!e.value)return null;const[o,i,a,s,c]=e.value.match(r?jUe:zUe).slice(1).map(Number),l=new Date(o,i-1,a,s||0,c||0).getTime();return u=>{if(!u)return!1;if(n)return t(u.getTime(),l);const d=new Date(u).setHours(r?u.getHours():0,r?u.getMinutes():0,0,0);return t(d,l)}}const c8=e=>Z2([{value:"is",getApplyFilterFnV7:t=>cg(t,(r,n)=>r===n,e),InputComponent:lg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFnV7:t=>cg(t,(r,n)=>r!==n,e),InputComponent:lg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFnV7:t=>cg(t,(r,n)=>r>n,e),InputComponent:lg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFnV7:t=>cg(t,(r,n)=>r>=n,e),InputComponent:lg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFnV7:t=>cg(t,(r,n)=>r<n,e,!e),InputComponent:lg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrBefore",getApplyFilterFnV7:t=>cg(t,(r,n)=>r<=n,e),InputComponent:lg,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!=null,requiresFilterValue:!1}]);function Ree({value:e,columnType:t,rowId:r,field:n}){if(!(e instanceof Date))throw new Error([`MUI: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${r}, field: "${n}".`].join(`
`))}function VUe({value:e,field:t,id:r}){return e?(Ree({value:e,columnType:"date",rowId:r,field:t}),e.toLocaleDateString()):""}function WUe({value:e,field:t,id:r}){return e?(Ree({value:e,columnType:"dateTime",rowId:r,field:t}),e.toLocaleString()):""}const GUe=W({},Ws,{type:"date",sortComparator:pee,valueFormatter:VUe,filterOperators:c8(),renderEditCell:QJ,pastedValueParser:e=>new Date(e)}),qUe=W({},Ws,{type:"dateTime",sortComparator:pee,valueFormatter:WUe,filterOperators:c8(!0),renderEditCell:QJ,pastedValueParser:e=>new Date(e)}),th=e=>e==null?null:Number(e),rz=Q2(e=>e==null||Number.isNaN(e)||e===""?null:t=>th(t)===th(e)),KUe=()=>Z2([{value:"=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>th(t)===e.value,InputComponent:Ou,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>th(t)!==e.value,InputComponent:Ou,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:th(t)>e.value,InputComponent:Ou,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:th(t)>=e.value,InputComponent:Ou,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:th(t)<e.value,InputComponent:Ou,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:th(t)<=e.value,InputComponent:Ou,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:_ee,InputComponentProps:{type:"number"}}]),YUe=W({},Ws,{type:"number",align:"right",headerAlign:"right",sortComparator:hee,valueParser:e=>e===""?null:Number(e),valueFormatter:({value:e})=>WLe(e)?e.toLocaleString():e||"",filterOperators:KUe(),getApplyQuickFilterFn:kee(rz),getApplyQuickFilterFnV7:rz}),ug=e=>e==null||!t8(e)?e:e.value,XUe=()=>Z2([{value:"is",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>ug(t)===ug(e.value),InputComponent:QH},{value:"not",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>ug(t)!==ug(e.value),InputComponent:QH},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(ug);return r=>t.includes(ug(r))},InputComponent:YBe}]),QUe=e=>typeof e[0]=="object",ZUe=e=>t8(e)?e.value:e,JUe=e=>t8(e)?e.label:String(e),eHe=W({},Ws,{type:"singleSelect",getOptionLabel:JUe,getOptionValue:ZUe,valueFormatter(e){const{id:t,field:r,value:n,api:o}=e,i=e.api.getColumn(r);if(!_m(i))return"";let a;if(typeof i.valueOptions=="function"?a=i.valueOptions({id:t,row:t?o.getRow(t):null,field:r}):a=i.valueOptions,n==null)return"";if(!a)return n;if(!QUe(a))return i.getOptionLabel(n);const s=a.find(c=>i.getOptionValue(c)===n);return s?i.getOptionLabel(s):""},renderEditCell:j7e,filterOperators:XUe(),pastedValueParser:(e,t)=>{const r=t.colDef,n=r.valueOptions,o=typeof n=="function"?n({field:r.field}):n||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),Oee="__default__",tHe=()=>({string:Ws,number:YUe,date:GUe,dateTime:qUe,boolean:Mee,singleSelect:eHe,[i4]:DUe,[Oee]:Ws}),rHe=()=>A.useRef({}),nHe=GLe()&&window.localStorage.getItem("DEBUG")!=null,Rb=()=>{},oHe={debug:Rb,info:Rb,warn:Rb,error:Rb},nz=["debug","info","warn","error"];function oz(e,t,r=console){const n=nz.indexOf(t);if(n===-1)throw new Error(`MUI: Log level ${t} not recognized.`);return nz.reduce((i,a,s)=>(s>=n?i[a]=(...c)=>{const[l,...u]=c;r[a](`MUI: ${e} - ${l}`,...u)}:i[a]=Rb,i),{})}const iHe=(e,t)=>{const r=A.useCallback(n=>nHe?oz(n,"debug",t.logger):t.logLevel?oz(n,t.logLevel.toString(),t.logger):oHe,[t.logLevel,t.logger]);jr(e,{getLogger:r},"private")};class u8{static create(t){return new u8(t)}constructor(t){this.value=void 0,this.listeners=void 0,this.subscribe=r=>(this.listeners.add(r),()=>{this.listeners.delete(r)}),this.getSnapshot=()=>this.value,this.update=r=>{this.value=r,this.listeners.forEach(n=>n(r))},this.value=t,this.listeners=new Set}}class aHe{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,r,n={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),n.isFirst?o.highPriority.set(r,!0):o.regular.set(r,!0)}removeListener(t,r){this.events[t]&&(this.events[t].regular.delete(r),this.events[t].highPriority.delete(r))}removeAllListeners(){this.events={}}emit(t,...r){const n=this.events[t];if(!n)return;const o=Array.from(n.highPriority.keys()),i=Array.from(n.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];n.highPriority.has(s)&&s.apply(this,r)}for(let a=0;a<i.length;a+=1){const s=i[a];n.regular.has(s)&&s.apply(this,r)}}once(t,r){const n=this;this.on(t,function o(...i){n.removeListener(t,o),r.apply(n,i)})}}const Dee=Symbol("mui.api_private"),sHe=e=>e.isPropagationStopped!==void 0;let iz=0;function lHe(e){var t;const r=(t=e.current)==null?void 0:t[Dee];if(r)return r;const n={},o={state:n,store:u8.create(n),instanceId:{id:iz}};return iz+=1,o.getPublicApi=()=>e.current,o.register=(i,a)=>{Object.keys(a).forEach(s=>{const c=a[s],l=o[s];if((l==null?void 0:l.spying)===!0?l.target=c:o[s]=c,i==="public"){const u=e.current,f=u[s];(f==null?void 0:f.spying)===!0?f.target=c:u[s]=c}})},o.register("private",{caches:{},eventManager:new aHe}),o}function cHe(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[Dee]:e.current}}function uHe(e,t){const r=A.useRef(),n=A.useRef();n.current||(n.current=lHe(r)),r.current||(r.current=cHe(n));const o=A.useCallback((...a)=>{const[s,c,l={}]=a;if(l.defaultMuiPrevented=!1,sHe(l)&&l.isPropagationStopped())return;const u=t.signature===Qu.DataGridPro?{api:n.current.getPublicApi()}:{};n.current.eventManager.emit(s,c,l,u)},[n,t.signature]),i=A.useCallback((a,s,c)=>{n.current.eventManager.on(a,s,c);const l=n.current;return()=>{l.eventManager.removeListener(a,s)}},[n]);return jr(n,{subscribeEvent:i,publishEvent:o},"public"),A.useImperativeHandle(e,()=>r.current,[r]),A.useEffect(()=>{const a=n.current;return()=>{a.publishEvent("unmount")}},[n]),n}const dHe=(e,t)=>{const r=A.useCallback(n=>{if(t.localeText[n]==null)throw new Error(`Missing translation for key ${n}.`);return t.localeText[n]},[t.localeText]);e.current.register("public",{getLocaleText:r})},fHe=e=>{const t=A.useRef({}),r=A.useRef(!1),n=A.useCallback(u=>{r.current||!u||(r.current=!0,Object.values(u.appliers).forEach(f=>{f()}),r.current=!1)},[]),o=A.useCallback((u,f,d)=>{t.current[u]||(t.current[u]={processors:new Map,appliers:{}});const h=t.current[u];return h.processors.get(f)!==d&&(h.processors.set(f,d),n(h)),()=>{t.current[u].processors.set(f,null)}},[n]),i=A.useCallback((u,f,d)=>(t.current[u]||(t.current[u]={processors:new Map,appliers:{}}),t.current[u].appliers[f]=d,()=>{const h=t.current[u].appliers,p=ze(h,[f].map(Nm));t.current[u].appliers=p}),[]),a=A.useCallback(u=>{const f=t.current[u];n(f)},[n]),s=A.useCallback((...u)=>{const[f,d,h]=u;return t.current[f]?Array.from(t.current[f].processors.values()).reduce((g,m)=>m?m(g,h):g,d):d},[]),c={registerPipeProcessor:o,registerPipeApplier:i,requestPipeProcessorsApplication:a},l={unstable_applyPipeProcessors:s};jr(e,c,"private"),jr(e,l,"public")},$n=(e,t,r)=>{const n=A.useRef(),o=A.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=A.useCallback(()=>{n.current=e.current.registerPipeProcessor(t,o.current,r)},[e,r,t]);Z1(()=>{i()});const a=A.useRef(!0);A.useEffect(()=>(a.current?a.current=!1:i(),()=>{n.current&&(n.current(),n.current=null)}),[i])},d8=(e,t,r)=>{const n=A.useRef(),o=A.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=A.useCallback(()=>{n.current=e.current.registerPipeApplier(t,o.current,r)},[e,r,t]);Z1(()=>{i()});const a=A.useRef(!0);A.useEffect(()=>(a.current?a.current=!1:i(),()=>{n.current&&(n.current(),n.current=null)}),[i])},Sh=(e,t,r,n)=>{const o=A.useCallback(()=>{e.current.registerStrategyProcessor(t,r,n)},[e,n,r,t]);Z1(()=>{o()});const i=A.useRef(!0);A.useEffect(()=>{i.current?i.current=!1:o()},[o])},qm="none",az={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},hHe=e=>{const t=A.useRef(new Map),r=A.useRef({}),n=A.useCallback((c,l,u)=>{const f=()=>{const p=r.current[l],g=ze(p,[c].map(Nm));r.current[l]=g};r.current[l]||(r.current[l]={});const d=r.current[l],h=d[c];return d[c]=u,!h||h===u||c===e.current.getActiveStrategy(az[l])&&e.current.publishEvent("activeStrategyProcessorChange",l),f},[e]),o=A.useCallback((c,l)=>{const u=e.current.getActiveStrategy(az[c]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const f=r.current[c];if(!f||!f[u])throw new Error(`No processor found for processor "${c}" on strategy "${u}"`);const d=f[u];return d(l)},[e]),i=A.useCallback(c=>{var l;const f=Array.from(t.current.entries()).find(([,d])=>d.group!==c?!1:d.isAvailable());return(l=f==null?void 0:f[0])!=null?l:qm},[]),a=A.useCallback((c,l,u)=>{t.current.set(l,{group:c,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);jr(e,{registerStrategyProcessor:n,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},pHe=(e,t)=>{const r=A.useRef({}),[,n]=A.useState(),o=A.useCallback(u=>{r.current[u.stateId]=u},[]),i=A.useCallback((u,f)=>{let d;if(oee(u)?d=u(e.current.state):d=u,e.current.state===d)return!1;let h=!1;const p=[];if(Object.keys(r.current).forEach(g=>{const m=r.current[g],v=m.stateSelector(e.current.state,e.current.instanceId),y=m.stateSelector(d,e.current.instanceId);y!==v&&(p.push({stateId:m.stateId,hasPropChanged:y!==m.propModel}),m.propModel!==void 0&&y!==m.propModel&&(h=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(g=>g.stateId).join(", ")} in the same transaction.`);if(h||(e.current.state=d,e.current.publishEvent&&e.current.publishEvent("stateChange",d),e.current.store.update(d)),p.length===1){const{stateId:g,hasPropChanged:m}=p[0],v=r.current[g],y=v.stateSelector(d,e.current.instanceId);if(v.propOnChange&&m){const b=t.signature===Qu.DataGridPro?{api:e.current,reason:f}:{reason:f};v.propOnChange(y,b)}h||e.current.publishEvent(v.changeEvent,y,{reason:f})}return!h},[e,t.signature]),a=A.useCallback((u,f,d)=>e.current.setState(h=>W({},h,{[u]:f(h[u])}),d),[e]),s=A.useCallback(()=>n(()=>e.current.state),[e]),c={setState:i,forceUpdate:s},l={updateControlState:a,registerControlState:o};jr(e,c,"public"),jr(e,l,"private")},mHe=(e,t)=>{const r=uHe(e,t);return iHe(r,t),pHe(r,t),fHe(r),hHe(r),dHe(r,t),r.current.register("private",{rootProps:t}),r},Ci=(e,t,r)=>{const n=A.useRef(!1);n.current||(t.current.state=e(t.current.state,r,t),n.current=!0)};function a5(e,t){return typeof e=="string"&&[t,`
`,"\r",'"'].some(r=>e.includes(r))?`"${e.replace(/"/g,'""')}"`:e}const Fee=(e,t)=>{const{delimiterCharacter:r,ignoreValueFormatter:n}=t;let o;if(n){var i;const s=e.colDef.type;if(s==="number")o=String(e.value);else if(s==="date"||s==="dateTime"){var a;o=(a=e.value)==null?void 0:a.toISOString()}else typeof((i=e.value)==null?void 0:i.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return a5(o,r)};cd(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class s5{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.delimiterCharacter),t==null?this.rowString+="":typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.delimiterCharacter):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const gHe=({id:e,columns:t,getCellParams:r,delimiterCharacter:n,ignoreValueFormatter:o})=>{const i=new s5({delimiterCharacter:n});return t.forEach(a=>{const s=r(e,a.field);i.addValue(Fee(s,{delimiterCharacter:n,ignoreValueFormatter:o}))}),i.getRowString()};function vHe(e){const{columns:t,rowIds:r,delimiterCharacter:n,includeHeaders:o,includeColumnGroupsHeaders:i,ignoreValueFormatter:a,apiRef:s}=e,c=r.reduce((h,p)=>`${h}${gHe({id:p,columns:t,getCellParams:s.current.getCellParams,delimiterCharacter:n,ignoreValueFormatter:a})}\r
`,"").trim();if(!o)return c;const l=t.filter(h=>h.field!==p0.field),u=[];if(i){const h=s.current.unstable_getAllGroupDetails();let p=0;const g=l.reduce((m,v)=>{const y=s.current.unstable_getColumnGroupPath(v.field);return m[v.field]=y,p=Math.max(p,y.length),m},{});for(let m=0;m<p;m+=1){const v=new s5({delimiterCharacter:n,sanitizeCellValue:a5});u.push(v),l.forEach(y=>{const b=(g[y.field]||[])[m],w=h[b];v.addValue(w?w.headerName||w.groupId:"")})}}const f=new s5({delimiterCharacter:n,sanitizeCellValue:a5});return l.forEach(h=>{f.addValue(h.headerName||h.field)}),u.push(f),`${`${u.map(h=>h.getRowString()).join(`\r
`)}\r
`}${c}`.trim()}function sz(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const r=document.createRange();r.selectNode(t);const n=window.getSelection();n.removeAllRanges(),n.addRange(r);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function yHe(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{sz(e)}):sz(e)}function bHe(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const wHe=(e,t)=>{const r=t.unstable_ignoreValueFormatterDuringExport,n=(typeof r=="object"?r==null?void 0:r.clipboardExport:r)||!1,o=t.clipboardCopyCellDelimiter,i=A.useCallback(a=>{if(!((a.ctrlKey||a.metaKey)&&a.key==="c")||bHe(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o});else{const l=ll(e);if(l){const u=e.current.getCellParams(l.id,l.field);s=Fee(u,{delimiterCharacter:o,ignoreValueFormatter:n})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(yHe(s),e.current.publishEvent("clipboardCopy",s))},[e,n,o]);aee(e,e.current.rootElementRef,"keydown",i),Gn(e,"clipboardCopy",t.onClipboardCopy)},xHe=e=>W({},e,{columnMenu:{open:!1}}),CHe=e=>{const t=Oi(e,"useGridColumnMenu"),r=A.useCallback(a=>{e.current.setState(c=>c.columnMenu.open&&c.columnMenu.field===a?c:(t.debug("Opening Column Menu"),W({},c,{columnMenu:{open:!0,field:a}})))&&(e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),n=A.useCallback(()=>{const a=JR(e.current.state);if(a.field){const c=fp(e),l=ic(e),u=tu(e);let f=a.field;if(c[f]||(f=u[0]),l[f]===!1){const d=u.filter(p=>p===f?!0:l[p]!==!1),h=d.indexOf(f);f=d[h+1]||d[h-1]}e.current.setColumnHeaderFocus(f)}e.current.setState(c=>!c.columnMenu.open&&c.columnMenu.field===void 0?c:(t.debug("Hiding Column Menu"),W({},c,{columnMenu:W({},c.columnMenu,{open:!1,field:void 0})})))&&e.current.forceUpdate()},[e,t]),o=A.useCallback(a=>{t.debug("Toggle Column Menu");const s=JR(e.current.state);!s.open||s.field!==a?r(a):n()},[e,t,r,n]);jr(e,{showColumnMenu:r,hideColumnMenu:n,toggleColumnMenu:o},"public"),Xt(e,"columnResizeStart",n),Xt(e,"virtualScrollerWheel",e.current.hideColumnMenu),Xt(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},Nee=["maxWidth","minWidth","width","flex"];function SHe({initialFreeSpace:e,totalFlexUnits:t,flexColumns:r}){const n=new Set(r.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===n.size)return;const a={min:{},max:{}};let s=e,c=t,l=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,c-=o.all[u].flex});for(let u=0;u<r.length;u+=1){const f=r[u];if(o.all[f.field]&&o.all[f.field].frozen===!0)continue;let h=s/c*f.flex;h<f.minWidth?(l+=f.minWidth-h,h=f.minWidth,a.min[f.field]=!0):h>f.maxWidth&&(l+=f.maxWidth-h,h=f.maxWidth,a.max[f.field]=!0),o.all[f.field]={frozen:!1,computedWidth:h,flex:f.flex}}l<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):l>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):r.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const l5=(e,t)=>{const r={};let n=0,o=0;const i=[];e.orderedFields.forEach(s=>{const c=W({},e.lookup[s]);if(e.columnVisibilityModel[s]===!1)c.computedWidth=0;else{let l;c.flex&&c.flex>0?(n+=c.flex,l=0,i.push(c)):l=uf(c.width||Ws.width,c.minWidth||Ws.minWidth,c.maxWidth||Ws.maxWidth),o+=l,c.computedWidth=l}r[s]=c});const a=Math.max(t-o,0);if(n>0&&t>0){const s=SHe({initialFreeSpace:a,totalFlexUnits:n,flexColumns:i});Object.keys(s).forEach(c=>{r[c].computedWidth=s[c].computedWidth})}return W({},e,{lookup:r})},_He=(e,t)=>{if(!t)return e;const{orderedFields:r=[],dimensions:n={}}=t,o=Object.keys(n);if(o.length===0&&r.length===0)return e;const i={},a=[];for(let u=0;u<r.length;u+=1){const f=r[u];e.lookup[f]&&(i[f]=!0,a.push(f))}const s=a.length===0?e.orderedFields:[...a,...e.orderedFields.filter(u=>!i[u])],c=W({},e.lookup);for(let u=0;u<o.length;u+=1){const f=o[u],d=W({},c[f],{hasBeenResized:!0});Object.entries(n[f]).forEach(([h,p])=>{d[h]=p===-1?1/0:p}),c[f]=d}return W({},e,{orderedFields:s,lookup:c})};function lz(e,t){let r=e[Oee];return t&&e[t]&&(r=e[t]),r}const Eg=({apiRef:e,columnsToUpsert:t,initialState:r,columnTypes:n,columnVisibilityModel:o=ic(e),keepOnlyColumnsToUpsert:i=!1})=>{var a,s,c;const l=!e.current.state.columns;let u;if(l)u={orderedFields:[],lookup:{},columnVisibilityModel:o};else{const p=Hh(e.current.state);u={orderedFields:i?[]:[...p.orderedFields],lookup:W({},p.lookup),columnVisibilityModel:o}}let f={};i&&!l&&(f=Object.keys(u.lookup).reduce((p,g)=>W({},p,{[g]:!1}),{})),t.forEach(p=>{const{field:g}=p;f[g]=!0;let m=u.lookup[g];m==null?(m=W({},lz(n,p.type),{field:g,hasBeenResized:!1}),u.orderedFields.push(g)):i&&u.orderedFields.push(g),m&&m.type!==p.type&&(m=W({},lz(n,p.type),{field:g}));let v=m.hasBeenResized;Nee.forEach(y=>{p[y]!==void 0&&(v=!0,p[y]===-1&&(p[y]=1/0))}),u.lookup[g]=W({},m,p,{hasBeenResized:v})}),i&&!l&&Object.keys(u.lookup).forEach(p=>{f[p]||delete u.lookup[p]});const d=e.current.unstable_applyPipeProcessors("hydrateColumns",u),h=_He(d,r);return l5(h,(a=(s=(c=e.current).getRootDimensions)==null||(s=s.call(c))==null?void 0:s.viewportInnerSize.width)!=null?a:0)},cz=e=>t=>W({},t,{columns:e});function c5({firstColumnToRender:e,apiRef:t,firstRowToRender:r,lastRowToRender:n,visibleRows:o}){let i=e;for(let a=r;a<n;a+=1)if(o[a]){const c=o[a].id,l=t.current.unstable_getCellColSpanInfo(c,e);l&&l.spannedByColSpan&&(i=l.leftVisibleCellIndex)}return i}function kHe({firstColumnIndex:e,minColumnIndex:t,columnBuffer:r,firstRowToRender:n,lastRowToRender:o,apiRef:i,visibleRows:a}){const s=Math.max(e-r,t);return c5({firstColumnToRender:s,apiRef:i,firstRowToRender:n,lastRowToRender:o,visibleRows:a})}function J2(e,t){const r=h0(e),n=Y2(e);return Math.floor(t*r)*((n??0)+1)}const Lee=tHe(),EHe=(e,t,r)=>{var n,o,i,a;const s=Eg({apiRef:r,columnTypes:Lee,columnsToUpsert:t.columns,initialState:(n=t.initialState)==null?void 0:n.columns,columnVisibilityModel:(o=(i=t.columnVisibilityModel)!=null?i:(a=t.initialState)==null||(a=a.columns)==null?void 0:a.columnVisibilityModel)!=null?o:{},keepOnlyColumnsToUpsert:!0});return W({},e,{columns:s})};function THe(e,t){var r,n;const o=Oi(e,"useGridColumns"),i=Lee,a=A.useRef(t.columns),s=A.useRef(i);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:ic,changeEvent:"columnVisibilityModelChange"});const c=A.useCallback(P=>{o.debug("Updating columns state."),e.current.setState(cz(P)),e.current.forceUpdate(),e.current.publishEvent("columnsChange",P.orderedFields)},[o,e]),l=A.useCallback(P=>fp(e)[P],[e]),u=A.useCallback(()=>Xu(e),[e]),f=A.useCallback(()=>Mi(e),[e]),d=A.useCallback((P,_=!0)=>(_?Mi(e):Xu(e)).findIndex(S=>S.field===P),[e]),h=A.useCallback(P=>{const _=d(P);return Wm(e)[_]},[e,d]),p=A.useCallback(P=>{ic(e)!==P&&(e.current.setState(C=>W({},C,{columns:Eg({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:P,keepOnlyColumnsToUpsert:!1})})),e.current.forceUpdate())},[e,i]),g=A.useCallback(P=>{const _=Eg({apiRef:e,columnTypes:i,columnsToUpsert:P,initialState:void 0,keepOnlyColumnsToUpsert:!1});c(_)},[e,c,i]),m=A.useCallback((P,_)=>{var C;const S=ic(e),x=(C=S[P])!=null?C:!0;if(_!==x){const k=W({},S,{[P]:_});e.current.setColumnVisibilityModel(k)}},[e]),v=A.useCallback(P=>tu(e).findIndex(C=>C===P),[e]),y=A.useCallback((P,_)=>{const C=tu(e),S=v(P);if(S===_)return;o.debug(`Moving column ${P} to index ${_}`);const x=[...C],k=x.splice(S,1)[0];x.splice(_,0,k),c(W({},Hh(e.current.state),{orderedFields:x}));const L={column:e.current.getColumn(P),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(P),oldIndex:S};e.current.publishEvent("columnIndexChange",L)},[e,o,c,v]),b=A.useCallback((P,_)=>{var C,S;o.debug(`Updating column ${P} width to ${_}`);const x=Hh(e.current.state),k=x.lookup[P],L=W({},k,{width:_,hasBeenResized:!0});c(l5(W({},x,{lookup:W({},x.lookup,{[P]:L})}),(C=(S=e.current.getRootDimensions())==null?void 0:S.viewportInnerSize.width)!=null?C:0)),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(P),colDef:L,width:_})},[e,o,c]),w={getColumn:l,getAllColumns:u,getColumnIndex:d,getColumnPosition:h,getVisibleColumns:f,getColumnIndexRelativeToVisibleColumns:v,updateColumns:g,setColumnVisibilityModel:p,setColumnVisibility:m,setColumnWidth:b},E={setColumnIndex:y};jr(e,w,"public"),jr(e,E,t.signature===Qu.DataGrid?"private":"public");const I=A.useCallback((P,_)=>{var C,S;const x={},k=ic(e);(!_.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys((C=(S=t.initialState)==null||(S=S.columns)==null?void 0:S.columnVisibilityModel)!=null?C:{}).length>0||Object.keys(k).length>0)&&(x.columnVisibilityModel=k),x.orderedFields=tu(e);const j=Xu(e),z={};return j.forEach(Y=>{if(Y.hasBeenResized){const K={};Nee.forEach(Q=>{let q=Y[Q];q===1/0&&(q=-1),K[Q]=q}),z[Y.field]=K}}),Object.keys(z).length>0&&(x.dimensions=z),W({},P,{columns:x})},[e,t.columnVisibilityModel,(r=t.initialState)==null?void 0:r.columns]),O=A.useCallback((P,_)=>{var C;const S=(C=_.stateToRestore.columns)==null?void 0:C.columnVisibilityModel,x=_.stateToRestore.columns;if(S==null&&x==null)return P;const k=Eg({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:x,columnVisibilityModel:S,keepOnlyColumnsToUpsert:!1});return e.current.setState(cz(k)),x!=null&&e.current.publishEvent("columnsChange",k.orderedFields),P},[e,i]),D=A.useCallback((P,_)=>{if(_===df.columns){var C;const S=t.slots.columnsPanel;return R(S,W({},(C=t.slotProps)==null?void 0:C.columnsPanel))}return P},[t.slots.columnsPanel,(n=t.slotProps)==null?void 0:n.columnsPanel]),N=A.useCallback(P=>t.disableColumnSelector?P:[...P,"columnMenuColumnsItem"],[t.disableColumnSelector]);$n(e,"columnMenu",N),$n(e,"exportState",I),$n(e,"restoreState",O),$n(e,"preferencePanel",D);const U=A.useRef(null);Xt(e,"viewportInnerSizeChange",P=>{U.current!==P.width&&(U.current=P.width,c(l5(Hh(e.current.state),P.width)))});const F=A.useCallback(()=>{o.info("Columns pipe processing have changed, regenerating the columns");const P=Eg({apiRef:e,columnTypes:i,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});c(P)},[e,o,c,i]);d8(e,"hydrateColumns",F);const T=A.useRef(!0);A.useEffect(()=>{if(T.current){T.current=!1;return}if(o.info(`GridColumns have changed, new length ${t.columns.length}`),a.current===t.columns&&s.current===i)return;const P=Eg({apiRef:e,columnTypes:i,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});a.current=t.columns,s.current=i,c(P)},[o,e,c,t.columns,i]),A.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,o,t.columnVisibilityModel])}const IHe=.7,AHe=1.3,$ee={compact:IHe,comfortable:AHe,standard:1},PHe=(e,t)=>W({},e,{density:{value:t.density,factor:$ee[t.density]}}),MHe=(e,t)=>{const r=Oi(e,"useDensity"),n=A.useCallback(i=>{r.debug(`Set grid density to ${i}`),e.current.setState(a=>{const s=YD(a),c={value:i,factor:$ee[i]};return zh(s,c)?a:W({},a,{density:c})}),e.current.forceUpdate()},[r,e]);A.useEffect(()=>{e.current.setDensity(t.density)},[e,t.density]),jr(e,{setDensity:n},"public")};function RHe(e,t="csv",r=document.title||"untitled"){const n=`${r}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=n,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI: exportAs not supported")}const Bee=({apiRef:e,options:t})=>{const r=Xu(e);return t.fields?t.fields.reduce((o,i)=>{const a=r.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?r:Mi(e)).filter(o=>!o.disableExport)},OHe=({apiRef:e})=>{var t,r;const n=H9e(e),o=dl(e),i=e.current.getSelectedRows(),a=n.filter(u=>o[u].type!=="footer"),s=f0(e),c=(s==null||(t=s.top)==null?void 0:t.map(u=>u.id))||[],l=(s==null||(r=s.bottom)==null?void 0:r.map(u=>u.id))||[];return a.unshift(...c),a.push(...l),i.size>0?a.filter(u=>i.has(u)):a},DHe=(e,t)=>{const r=Oi(e,"useGridCsvExport"),n=t.unstable_ignoreValueFormatterDuringExport,o=(typeof n=="object"?n==null?void 0:n.csvExport:n)||!1,i=A.useCallback((l={})=>{var u,f,d;r.debug("Get data as CSV");const h=Bee({apiRef:e,options:l}),g=((u=l.getRowsToExport)!=null?u:OHe)({apiRef:e});return vHe({columns:h,rowIds:g,delimiterCharacter:l.delimiter||",",includeHeaders:(f=l.includeHeaders)!=null?f:!0,includeColumnGroupsHeaders:(d=l.includeColumnGroupsHeaders)!=null?d:!0,ignoreValueFormatter:o,apiRef:e})},[r,e,o]),a=A.useCallback(l=>{r.debug("Export data as CSV");const u=i(l),f=new Blob([l!=null&&l.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});RHe(f,"csv",l==null?void 0:l.fileName)},[r,i]);jr(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const c=A.useCallback((l,u)=>{var f;return(f=u.csvOptions)!=null&&f.disableToolbarButton?l:[...l,{component:R(iUe,{options:u.csvOptions}),componentName:"csvExport"}]},[]);$n(e,"exportMenu",c)},FHe=(e,t)=>{var r,n;const o=W({},lee(t.autoPageSize),(r=t.paginationModel)!=null?r:(n=t.initialState)==null||(n=n.pagination)==null?void 0:n.paginationModel);return cee(o.pageSize,t.signature),W({},e,{pagination:{paginationModel:o}})},lk=(e,t,r)=>n=>{var o;let i=n.paginationModel;const a=(o=r==null?void 0:r.pageSize)!=null?o:i.pageSize,s=see(e,a);r&&((r==null?void 0:r.page)!==i.page||(r==null?void 0:r.pageSize)!==i.pageSize)&&(i=r);const c=QLe(i.page,s);return c!==i.page&&(i=W({},i,{page:c})),cee(i.pageSize,t),{paginationModel:i}},NHe=(e,t)=>{var r;const n=Oi(e,"useGridPagination"),o=$t(e,JI),i=$t(e,h0),a=Math.floor(t.rowHeight*i);e.current.registerControlState({stateId:"pagination",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Ql,changeEvent:"paginationModelChange"});const s=A.useCallback(g=>{const m=Ql(e);g!==m.page&&(n.debug(`Setting page to ${g}`),e.current.setPaginationModel({page:g,pageSize:m.pageSize}))},[e,n]),c=A.useCallback(g=>{const m=Ql(e);g!==m.pageSize&&(n.debug(`Setting page size to ${g}`),e.current.setPaginationModel({pageSize:g,page:m.page}))},[e,n]),l=A.useCallback(g=>{var m;const v=Ql(e);g!==v&&(n.debug("Setting 'paginationModel' to",g),e.current.updateControlState("pagination",lk((m=t.rowCount)!=null?m:o,t.signature,g),"setPaginationModel"),e.current.forceUpdate())},[e,n,t.rowCount,t.signature,o]);jr(e,{setPage:s,setPageSize:c,setPaginationModel:l},"public");const f=A.useCallback((g,m)=>{var v;const y=Ql(e);return!m.exportOnlyDirtyModels||t.paginationModel!=null||((v=t.initialState)==null||(v=v.pagination)==null?void 0:v.paginationModel)!=null||y.page!==0&&y.pageSize!==XLe(t.autoPageSize)?W({},g,{pagination:W({},g.pagination,{paginationModel:y})}):g},[e,t.paginationModel,(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.paginationModel,t.autoPageSize]),d=A.useCallback((g,m)=>{var v,y,b;const w=(v=m.stateToRestore.pagination)!=null&&v.paginationModel?W({},lee(t.autoPageSize),(y=m.stateToRestore.pagination)==null?void 0:y.paginationModel):Ql(e);return e.current.updateControlState("pagination",lk((b=t.rowCount)!=null?b:o,t.signature,w),"stateRestorePreProcessing"),g},[e,t.autoPageSize,t.rowCount,t.signature,o]);$n(e,"exportState",f),$n(e,"restoreState",d);const h=()=>{var g;const m=Ql(e);(g=e.current.virtualScrollerRef)!=null&&g.current&&e.current.scrollToIndexes({rowIndex:m.page*m.pageSize}),e.current.forceUpdate()},p=A.useCallback(()=>{const g=e.current.getRootDimensions();if(!t.autoPageSize||!g)return;const m=XD(e),v=Math.floor((g.viewportInnerSize.height-m.top-m.bottom)/a);e.current.setPageSize(v)},[e,t.autoPageSize,a]);Xt(e,"viewportInnerSizeChange",p),Xt(e,"paginationModelChange",h),A.useEffect(()=>{},[t.rowCount,t.paginationMode]),A.useEffect(()=>{var g;e.current.updateControlState("pagination",lk((g=t.rowCount)!=null?g:o,t.signature,t.paginationModel))},[e,t.paginationModel,t.rowCount,t.paginationMode,o,t.signature]),A.useEffect(()=>{p()},[p])};function LHe(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function $He(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const BHe=(e,t)=>{const r=Oi(e,"useGridPrintExport"),n=A.useRef(null),o=A.useRef(null),i=A.useRef({}),a=A.useRef([]);A.useEffect(()=>{n.current=In(e.current.rootElementRef.current)},[e]);const s=A.useCallback((p,g,m)=>new Promise(v=>{const y=Bee({apiRef:e,options:{fields:p,allColumns:g}}).map(E=>E.field),b=Xu(e),w={};b.forEach(E=>{w[E.field]=y.includes(E.field)}),m&&(w[p0.field]=!0),e.current.setColumnVisibilityModel(w),v()}),[e]),c=A.useCallback(p=>{const m=p({apiRef:e}).map(v=>e.current.getRow(v));e.current.setRows(m)},[e]),l=A.useCallback((p,g)=>{var m,v;const y=W({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},g),b=p.contentDocument;if(!b)return;const w=Gm(e.current.state),E=e.current.rootElementRef.current,I=E.cloneNode(!0),O=I.querySelector(`.${qe.main}`);O.style.overflow="visible",I.style.contain="size";const N=I.querySelector(`.${qe.columnHeaders}`).querySelector(`.${qe.columnHeadersInner}`);N.style.width="100%";let U=((m=E.querySelector(`.${qe.toolbarContainer}`))==null?void 0:m.offsetHeight)||0,B=((v=E.querySelector(`.${qe.footerContainer}`))==null?void 0:v.offsetHeight)||0;if(y.hideToolbar){var F;(F=I.querySelector(`.${qe.toolbarContainer}`))==null||F.remove(),U=0}if(y.hideFooter){var T;(T=I.querySelector(`.${qe.footerContainer}`))==null||T.remove(),B=0}const P=w.currentPageTotalHeight+J2(e,t.columnHeaderHeight)+U+B;if(I.style.height=`${P}px`,I.style.boxSizing="content-box",g!=null&&g.getRowsToExport){const x=I.querySelector(`.${qe.footerContainer}`);x.style.position="absolute",x.style.width="100%",x.style.top=`${P-B}px`}const _=document.createElement("div");_.appendChild(I),b.body.innerHTML=_.innerHTML;const C=typeof y.pageStyle=="function"?y.pageStyle():y.pageStyle;if(typeof C=="string"){const x=b.createElement("style");x.appendChild(b.createTextNode(C)),b.head.appendChild(x)}y.bodyClassName&&b.body.classList.add(...y.bodyClassName.split(" "));const S=[];if(y.copyStyles){const x=E.getRootNode(),L=(x.constructor.name==="ShadowRoot"?x:n.current).querySelectorAll("style, link[rel='stylesheet']");for(let j=0;j<L.length;j+=1){const z=L[j];if(z.tagName==="STYLE"){const Y=b.createElement(z.tagName),K=z.sheet;if(K){let Q="";for(let q=0;q<K.cssRules.length;q+=1)typeof K.cssRules[q].cssText=="string"&&(Q+=`${K.cssRules[q].cssText}\r
`);Y.appendChild(b.createTextNode(Q)),b.head.appendChild(Y)}}else if(z.getAttribute("href")){const Y=b.createElement(z.tagName);for(let K=0;K<z.attributes.length;K+=1){const Q=z.attributes[K];Q&&Y.setAttribute(Q.nodeName,Q.nodeValue||"")}S.push(new Promise(K=>{Y.addEventListener("load",()=>K())})),b.head.appendChild(Y)}}}Promise.all(S).then(()=>{p.contentWindow.print()})},[e,n,t.columnHeaderHeight]),u=A.useCallback(p=>{var g;n.current.body.removeChild(p),e.current.restoreState(o.current||{}),(g=o.current)!=null&&(g=g.columns)!=null&&g.columnVisibilityModel||e.current.setColumnVisibilityModel(i.current),e.current.unstable_setVirtualization(!0),e.current.setRows(a.current),o.current=null,i.current={},a.current=[]},[e]),d={exportDataAsPrint:A.useCallback(async p=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");if(o.current=e.current.exportState(),i.current=ic(e),a.current=e.current.getSortedRows(),t.pagination){const m=HJ(e),v={page:0,pageSize:m};e.current.updateControlState("pagination",lk(m,"DataGridPro",v)),e.current.forceUpdate()}await s(p==null?void 0:p.fields,p==null?void 0:p.allColumns,p==null?void 0:p.includeCheckboxes),p!=null&&p.getRowsToExport&&c(p.getRowsToExport),e.current.unstable_setVirtualization(!1),await LHe();const g=$He(p==null?void 0:p.fileName);g.onload=()=>{l(g,p),g.contentWindow.matchMedia("print").addEventListener("change",v=>{v.matches===!1&&u(g)})},n.current.body.appendChild(g)},[t,r,e,l,u,s,c])};jr(e,d,"public");const h=A.useCallback((p,g)=>{var m;return(m=g.printOptions)!=null&&m.disableToolbarButton?p:[...p,{component:R(aUe,{options:g.printOptions}),componentName:"printExport"}]},[]);$n(e,"exportMenu",h)},UHe=(e,t,r)=>{var n,o,i;const a=(n=(o=t.filterModel)!=null?o:(i=t.initialState)==null||(i=i.filter)==null?void 0:i.filterModel)!=null?n:mx();return W({},e,{filter:{filterModel:Iee(a,t.disableMultipleColumnsFiltering,r),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},HHe=e=>e.filteredRowsLookup;function uz(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function zHe(){return XI(Object.values)}const jHe=(e,t)=>{var r,n;const o=Oi(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Bi,changeEvent:"filterModelChange"});const i=A.useCallback(()=>{e.current.setState(U=>{const B=Bi(U,e.current.instanceId),F=t.filterMode==="client"?AUe(B,e,t.disableEval):null,T=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:F,filterModel:B??mx()}),P=W({},U,{filter:W({},U.filter,T)}),_=uz(e,P);return W({},P,{visibleRowsLookup:_})}),e.current.publishEvent("filteredRowsSet")},[e,t.filterMode,t.disableEval]),a=A.useCallback((U,B)=>B==null||B.filterable===!1||t.disableColumnFilter?U:[...U,"columnMenuFilterItem"],[t.disableColumnFilter]),s=A.useCallback(()=>{i(),e.current.forceUpdate()},[e,i]),c=A.useCallback(U=>{const B=Bi(e),F=[...B.items],T=F.findIndex(P=>P.id===U.id);T===-1?F.push(U):F[T]=U,e.current.setFilterModel(W({},B,{items:F}),"upsertFilterItem")},[e]),l=A.useCallback(U=>{const B=Bi(e),F=[...B.items];U.forEach(T=>{const P=U.findIndex(_=>_.id===T.id);P===-1?F.push(T):F[P]=T}),e.current.setFilterModel(W({},B,{items:U}),"upsertFilterItems")},[e]),u=A.useCallback(U=>{const B=Bi(e),F=B.items.filter(T=>T.id!==U.id);F.length!==B.items.length&&e.current.setFilterModel(W({},B,{items:F}),"deleteFilterItem")},[e]),f=A.useCallback((U,B,F)=>{if(o.debug("Displaying filter panel"),U){const T=Bi(e),P=T.items.filter(x=>{var k;if(x.value!==void 0)return!(Array.isArray(x.value)&&x.value.length===0);const j=(k=e.current.getColumn(x.field).filterOperators)==null?void 0:k.find(Y=>Y.value===x.operator);return!(typeof(j==null?void 0:j.requiresFilterValue)>"u"?!0:j==null?void 0:j.requiresFilterValue)});let _;const C=P.find(x=>x.field===U),S=e.current.getColumn(U);C?_=P:t.disableMultipleColumnsFiltering?_=[i5({field:U,operator:S.filterOperators[0].value},e)]:_=[...P,i5({field:U,operator:S.filterOperators[0].value},e)],e.current.setFilterModel(W({},T,{items:_}))}e.current.showPreferences(df.filters,B,F)},[e,o,t.disableMultipleColumnsFiltering]),d=A.useCallback(()=>{o.debug("Hiding filter panel"),e.current.hidePreferences()},[e,o]),h=A.useCallback(U=>{const B=Bi(e);B.logicOperator!==U&&e.current.setFilterModel(W({},B,{logicOperator:U}),"changeLogicOperator")},[e]),p=A.useCallback(U=>{const B=Bi(e);zh(B.quickFilterValues,U)||e.current.setFilterModel(W({},B,{quickFilterValues:[...U]}))},[e]),g=A.useCallback((U,B)=>{Bi(e)!==U&&(o.debug("Setting filter model"),e.current.updateControlState("filter",ZH(U,t.disableMultipleColumnsFiltering,e),B),e.current.unstable_applyFilters())},[e,o,t.disableMultipleColumnsFiltering]),m={setFilterLogicOperator:h,unstable_applyFilters:s,deleteFilterItem:u,upsertFilterItem:c,upsertFilterItems:l,setFilterModel:g,showFilterPanel:f,hideFilterPanel:d,setQuickFilterValues:p,ignoreDiacritics:t.ignoreDiacritics};jr(e,m,"public");const v=A.useCallback((U,B)=>{var F;const T=Bi(e);return!B.exportOnlyDirtyModels||t.filterModel!=null||((F=t.initialState)==null||(F=F.filter)==null?void 0:F.filterModel)!=null||!zh(T,mx())?W({},U,{filter:{filterModel:T}}):U},[e,t.filterModel,(r=t.initialState)==null||(r=r.filter)==null?void 0:r.filterModel]),y=A.useCallback((U,B)=>{var F;const T=(F=B.stateToRestore.filter)==null?void 0:F.filterModel;return T==null?U:(e.current.updateControlState("filter",ZH(T,t.disableMultipleColumnsFiltering,e),"restoreState"),W({},U,{callbacks:[...U.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),b=A.useCallback((U,B)=>{if(B===df.filters){var F;const T=t.slots.filterPanel;return R(T,W({},(F=t.slotProps)==null?void 0:F.filterPanel))}return U},[t.slots.filterPanel,(n=t.slotProps)==null?void 0:n.filterPanel]),{getRowId:w}=t,E=jD(zHe),I=A.useCallback(U=>{if(t.filterMode!=="client"||!U.isRowMatchingFilters)return{filteredRowsLookup:{},filteredDescendantCountLookup:{}};const B=xh(e),F={},{isRowMatchingFilters:T}=U,P={},_={passingFilterItems:null,passingQuickFilterValues:null},C=E.current(e.current.state.rows.dataRowIdToModelLookup);for(let k=0;k<C.length;k+=1){const L=C[k],j=w?w(L):L.id;T(L,void 0,_);const z=Pee([_.passingFilterItems],[_.passingQuickFilterValues],U.filterModel,e,P);F[j]=z}const S="auto-generated-group-footer-root";return B[S]&&(F[S]=!0),{filteredRowsLookup:F,filteredDescendantCountLookup:{}}},[e,t.filterMode,w,E]);$n(e,"columnMenu",a),$n(e,"exportState",v),$n(e,"restoreState",y),$n(e,"preferencePanel",b),Sh(e,qm,"filtering",I),Sh(e,qm,"visibleRowsLookupCreation",HHe);const O=A.useCallback(()=>{o.debug("onColUpdated - GridColumns changed, applying filters");const U=Bi(e),B=T9e(e),F=U.items.filter(T=>T.field&&B[T.field]);F.length<U.items.length&&e.current.setFilterModel(W({},U,{items:F}))},[e,o]),D=A.useCallback(U=>{U==="filtering"&&e.current.unstable_applyFilters()},[e]),N=A.useCallback(()=>{e.current.setState(U=>W({},U,{visibleRowsLookup:uz(e,U)})),e.current.forceUpdate()},[e]);Xt(e,"rowsSet",i),Xt(e,"columnsChange",O),Xt(e,"activeStrategyProcessorChange",D),Xt(e,"rowExpansionChange",N),Xt(e,"columnVisibilityModelChange",()=>{const U=Bi(e);U.quickFilterValues&&U.quickFilterExcludeHiddenColumns&&e.current.unstable_applyFilters()}),Z1(()=>{e.current.unstable_applyFilters()}),en(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,o,t.filterModel])},VHe=e=>W({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),WHe=(e,t)=>{const r=Oi(e,"useGridFocus"),n=A.useRef(null),o=A.useCallback((O,D)=>{O&&e.current.getRow(O.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(O.id,O.field),D)},[e]),i=A.useCallback((O,D)=>{const N=ll(e);(N==null?void 0:N.id)===O&&(N==null?void 0:N.field)===D||(e.current.setState(U=>(r.debug(`Focusing on cell with id=${O} and field=${D}`),W({},U,{tabIndex:{cell:{id:O,field:D},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:O,field:D},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(O)&&(N&&o(N,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(O,D))))},[e,r,o]),a=A.useCallback((O,D={})=>{const N=ll(e);o(N,D),e.current.setState(U=>(r.debug(`Focusing on column header with colIndex=${O}`),W({},U,{tabIndex:{columnHeader:{field:O},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:O},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,r,o]),s=A.useCallback((O,D={})=>{const N=ll(e);o(N,D),e.current.setState(U=>(r.debug(`Focusing on column header filter with colIndex=${O}`),W({},U,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:O},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:O},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,r,o]),c=A.useCallback((O,D,N={})=>{const U=ll(e);U&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(U.id,U.field),N),e.current.setState(B=>W({},B,{tabIndex:{columnGroupHeader:{field:O,depth:D},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:O,depth:D},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),l=A.useCallback(()=>fE(e),[e]),u=A.useCallback((O,D,N)=>{let U=e.current.getColumnIndex(D);const B=Mi(e),F=yE(e,{pagination:t.pagination,paginationMode:t.paginationMode}),T=f0(e),P=[].concat(T.top||[],F.rows,T.bottom||[]);let _=P.findIndex(k=>k.id===O);N==="right"?U+=1:N==="left"?U-=1:_+=1,U>=B.length?(_+=1,_<P.length&&(U=0)):U<0&&(_-=1,_>=0&&(U=B.length-1)),_=uf(_,0,P.length-1);const C=P[_];if(!C)return;const S=e.current.unstable_getCellColSpanInfo(C.id,U);S&&S.spannedByColSpan&&(N==="left"||N==="below"?U=S.leftVisibleCellIndex:N==="right"&&(U=S.rightVisibleCellIndex)),U=uf(U,0,B.length-1);const x=B[U];e.current.setCellFocus(C.id,x.field)},[e,t.pagination,t.paginationMode]),f=A.useCallback(({id:O,field:D})=>{e.current.setCellFocus(O,D)},[e]),d=A.useCallback((O,D)=>{D.key==="Enter"||D.key==="Tab"||D.key==="Shift"||px(D.key)||e.current.setCellFocus(O.id,O.field)},[e]),h=A.useCallback(({field:O},D)=>{D.target===D.currentTarget&&e.current.setColumnHeaderFocus(O,D)},[e]),p=A.useCallback(({fields:O,depth:D},N)=>{if(N.target!==N.currentTarget)return;const U=fE(e);U!==null&&U.depth===D&&O.includes(U.field)||e.current.setColumnGroupHeaderFocus(O[0],D,N)},[e]),g=A.useCallback((O,D)=>{var N;(N=D.relatedTarget)!=null&&N.className.includes(qe.columnHeader)||(r.debug("Clearing focus"),e.current.setState(U=>W({},U,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[r,e]),m=A.useCallback(O=>{n.current=O},[]),v=A.useCallback(O=>{const D=n.current;n.current=null;const N=ll(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:O,cell:D}))return;if(!N){D&&e.current.setCellFocus(D.id,D.field);return}if((D==null?void 0:D.id)===N.id&&(D==null?void 0:D.field)===N.field)return;const B=e.current.getCellElement(N.id,N.field);B!=null&&B.contains(O.target)||(D?e.current.setCellFocus(D.id,D.field):(e.current.setState(F=>W({},F,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),o(N,O)))},[e,o]),y=A.useCallback(O=>{if(O.cellMode==="view")return;const D=ll(e);((D==null?void 0:D.id)!==O.id||(D==null?void 0:D.field)!==O.field)&&e.current.setCellFocus(O.id,O.field)},[e]),b=A.useCallback(()=>{const O=ll(e);O&&!e.current.getRow(O.id)&&e.current.setState(D=>W({},D,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},[e]),w=Mt(()=>{const O=ll(e);if(!O)return;const D=yE(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(D.rows.find(B=>B.id===O.id))return;const U=Mi(e);e.current.setState(B=>W({},B,{tabIndex:{cell:{id:D.rows[0].id,field:U[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),E={setCellFocus:i,setColumnHeaderFocus:a,setColumnHeaderFilterFocus:s},I={moveFocusToRelativeCell:u,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:l};jr(e,E,"public"),jr(e,I,"private"),A.useEffect(()=>{const O=In(e.current.rootElementRef.current);return O.addEventListener("mouseup",v),()=>{O.removeEventListener("mouseup",v)}},[e,v]),Xt(e,"columnHeaderBlur",g),Xt(e,"cellDoubleClick",f),Xt(e,"cellMouseDown",m),Xt(e,"cellKeyDown",d),Xt(e,"cellModeChange",y),Xt(e,"columnHeaderFocus",h),Xt(e,"columnGroupHeaderFocus",p),Xt(e,"rowsSet",b),Xt(e,"paginationModelChange",w)};function GHe(e,t){const r=f0(e)||{};return[...r.top||[],...t,...r.bottom||[]]}const nP=({currentColIndex:e,firstColIndex:t,lastColIndex:r,direction:n})=>{if(n==="rtl"){if(e<r)return e+1}else if(n==="ltr"&&e>t)return e-1;return null},oP=({currentColIndex:e,firstColIndex:t,lastColIndex:r,direction:n})=>{if(n==="rtl"){if(e>t)return e-1}else if(n==="ltr"&&e<r)return e+1;return null},qHe=(e,t)=>{const r=Oi(e,"useGridKeyboardNavigation"),n=Sf(e,t).rows,o=An(),i=A.useMemo(()=>GHe(e,n),[e,n]),a=t.signature!=="DataGrid"&&t.unstable_headerFilters,s=A.useCallback((v,y,b="left")=>{const w=Cf(e),E=e.current.unstable_getCellColSpanInfo(y,v);E&&E.spannedByColSpan&&(b==="left"?v=E.leftVisibleCellIndex:b==="right"&&(v=E.rightVisibleCellIndex));const I=w.findIndex(D=>D.id===y);r.debug(`Navigating to cell row ${I}, col ${v}`),e.current.scrollToIndexes({colIndex:v,rowIndex:I});const O=e.current.getVisibleColumns()[v].field;e.current.setCellFocus(y,O)},[e,r]),c=A.useCallback((v,y)=>{r.debug(`Navigating to header col ${v}`),e.current.scrollToIndexes({colIndex:v});const b=e.current.getVisibleColumns()[v].field;e.current.setColumnHeaderFocus(b,y)},[e,r]),l=A.useCallback((v,y)=>{r.debug(`Navigating to header filter col ${v}`),e.current.scrollToIndexes({colIndex:v});const b=e.current.getVisibleColumns()[v].field;e.current.setColumnHeaderFilterFocus(b,y)},[e,r]),u=A.useCallback((v,y,b)=>{r.debug(`Navigating to header col ${v}`),e.current.scrollToIndexes({colIndex:v});const{field:w}=e.current.getVisibleColumns()[v];e.current.setColumnGroupHeaderFocus(w,y,b)},[e,r]),f=A.useCallback(v=>{var y;return(y=i[v])==null?void 0:y.id},[i]),d=A.useCallback((v,y)=>{const b=y.currentTarget.querySelector(`.${qe.columnHeaderTitleContainerContent}`);if(!!b&&b.contains(y.target)&&v.field!==p0.field||!e.current.getRootDimensions())return;const I=e.current.getViewportPageSize(),O=v.field?e.current.getColumnIndex(v.field):0,D=i.length>0?0:null,N=i.length-1,U=0,B=Mi(e).length-1,F=Y2(e);let T=!0;switch(y.key){case"ArrowDown":{D!==null&&(a?l(O,y):s(O,f(D)));break}case"ArrowRight":{const P=oP({currentColIndex:O,firstColIndex:U,lastColIndex:B,direction:o.direction});P!==null&&c(P,y);break}case"ArrowLeft":{const P=nP({currentColIndex:O,firstColIndex:U,lastColIndex:B,direction:o.direction});P!==null&&c(P,y);break}case"ArrowUp":{F>0&&u(O,F-1,y);break}case"PageDown":{D!==null&&N!==null&&s(O,f(Math.min(D+I,N)));break}case"Home":{c(U,y);break}case"End":{c(B,y);break}case"Enter":{(y.ctrlKey||y.metaKey)&&e.current.toggleColumnMenu(v.field);break}case" ":break;default:T=!1}T&&y.preventDefault()},[e,i.length,a,l,s,f,o.direction,c,u]),h=A.useCallback((v,y)=>{if(!e.current.getRootDimensions())return;const w=gee(e)===v.field,E=o8(e)===v.field;if(w||E||!px(y.key))return;const I=e.current.getViewportPageSize(),O=v.field?e.current.getColumnIndex(v.field):0,D=0,N=i.length-1,U=0,B=Mi(e).length-1;let F=!0;switch(y.key){case"ArrowDown":{const T=f(D);T!=null&&s(O,T);break}case"ArrowRight":{const T=oP({currentColIndex:O,firstColIndex:U,lastColIndex:B,direction:o.direction});T!==null&&l(T,y);break}case"ArrowLeft":{const T=nP({currentColIndex:O,firstColIndex:U,lastColIndex:B,direction:o.direction});T!==null?l(T,y):e.current.setColumnHeaderFilterFocus(v.field,y);break}case"ArrowUp":{c(O,y);break}case"PageDown":{N!==null&&s(O,f(Math.min(D+I,N)));break}case"Home":{l(U,y);break}case"End":{l(B,y);break}case" ":break;default:F=!1}F&&y.preventDefault()},[e,i.length,l,o.direction,c,s,f]),p=A.useCallback((v,y)=>{if(!e.current.getRootDimensions())return;const w=fE(e);if(w===null)return;const{field:E,depth:I}=w,{fields:O,depth:D,maxDepth:N}=v,U=e.current.getViewportPageSize(),B=e.current.getColumnIndex(E),F=E?e.current.getColumnIndex(E):0,T=0,P=i.length-1,_=0,C=Mi(e).length-1;let S=!0;switch(y.key){case"ArrowDown":{D===N-1?c(B,y):u(B,I+1,y);break}case"ArrowUp":{D>0&&u(B,I-1,y);break}case"ArrowRight":{const x=O.length-O.indexOf(E)-1;B+x+1<=C&&u(B+x+1,I,y);break}case"ArrowLeft":{const x=O.indexOf(E);B-x-1>=_&&u(B-x-1,I,y);break}case"PageDown":{P!==null&&s(F,f(Math.min(T+U,P)));break}case"Home":{u(_,I,y);break}case"End":{u(C,I,y);break}case" ":break;default:S=!1}S&&y.preventDefault()},[e,i.length,c,u,s,f]),g=A.useCallback((v,y)=>{if(Q1(y))return;const b=e.current.getCellParams(v.id,v.field);if(b.cellMode===eo.Edit||!px(y.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:y,cell:b}))return;const E=e.current.getRootDimensions();if(i.length===0||!E)return;const I=o.direction,O=e.current.getViewportPageSize(),D=v.field?e.current.getColumnIndex(v.field):0,N=i.findIndex(_=>_.id===v.id),U=0,B=i.length-1,F=0,T=Mi(e).length-1;let P=!0;switch(y.key){case"ArrowDown":{N<B&&s(D,f(N+1));break}case"ArrowUp":{N>U?s(D,f(N-1)):a?l(D,y):c(D,y);break}case"ArrowRight":{const _=oP({currentColIndex:D,firstColIndex:F,lastColIndex:T,direction:I});_!==null&&s(_,f(N),I==="rtl"?"left":"right");break}case"ArrowLeft":{const _=nP({currentColIndex:D,firstColIndex:F,lastColIndex:T,direction:I});_!==null&&s(_,f(N),I==="rtl"?"right":"left");break}case"Tab":{y.shiftKey&&D>F?s(D-1,f(N),"left"):!y.shiftKey&&D<T&&s(D+1,f(N),"right");break}case" ":{if(v.field===l8)break;const C=v.colDef;if(C&&C.type==="treeDataGroup")break;!y.shiftKey&&N<B&&s(D,f(Math.min(N+O,B)));break}case"PageDown":{N<B&&s(D,f(Math.min(N+O,B)));break}case"PageUp":{const _=Math.max(N-O,U);_!==N&&_>=U?s(D,f(_)):c(D,y);break}case"Home":{y.ctrlKey||y.metaKey||y.shiftKey?s(F,f(U)):s(F,f(N));break}case"End":{y.ctrlKey||y.metaKey||y.shiftKey?s(T,f(B)):s(T,f(N));break}default:P=!1}P&&y.preventDefault()},[e,i,o.direction,s,f,a,l,c]),m=A.useCallback((v,{event:y})=>y.key===" "?!1:v,[]);$n(e,"canStartEditing",m),Xt(e,"columnHeaderKeyDown",d),Xt(e,"headerFilterKeyDown",h),Xt(e,"columnGroupHeaderKeyDown",p),Xt(e,"cellKeyDown",g)},KHe=(e,t)=>{var r,n;return W({},e,{preferencePanel:(r=(n=t.initialState)==null?void 0:n.preferencePanel)!=null?r:{open:!1}})},YHe=(e,t)=>{var r;const n=Oi(e,"useGridPreferencesPanel"),o=A.useRef(),i=A.useRef(),a=A.useCallback(()=>{n.debug("Hiding Preferences Panel");const d=p1(e.current.state);d.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:d.openedPanelValue}),e.current.setState(h=>W({},h,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),s=A.useCallback(()=>{i.current=setTimeout(()=>clearTimeout(o.current),0)},[]),c=A.useCallback(()=>{o.current=setTimeout(a,100)},[a]),l=A.useCallback((d,h,p)=>{n.debug("Opening Preferences Panel"),s(),e.current.setState(g=>W({},g,{preferencePanel:W({},g.preferencePanel,{open:!0,openedPanelValue:d,panelId:h,labelId:p})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:d}),e.current.forceUpdate()},[n,s,e]);jr(e,{showPreferences:l,hidePreferences:c},"public");const u=A.useCallback((d,h)=>{var p;const g=p1(e.current.state);return!h.exportOnlyDirtyModels||((p=t.initialState)==null?void 0:p.preferencePanel)!=null||g.open?W({},d,{preferencePanel:g}):d},[e,(r=t.initialState)==null?void 0:r.preferencePanel]),f=A.useCallback((d,h)=>{const p=h.stateToRestore.preferencePanel;return p!=null&&e.current.setState(g=>W({},g,{preferencePanel:p})),d},[e]);$n(e,"exportState",u),$n(e,"restoreState",f),A.useEffect(()=>()=>{clearTimeout(o.current),clearTimeout(i.current)},[])},XHe=["id","field"],QHe=["id","field"],ZHe=cd(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),JHe=(e,t)=>{const[r,n]=A.useState({}),o=A.useRef(r),i=A.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:c,onCellModesModelChange:l}=t,u=P=>(..._)=>{t.editMode===nd.Cell&&P(..._)},f=A.useCallback((P,_)=>{const C=e.current.getCellParams(P,_);if(!e.current.isCellEditable(C))throw new Error(`MUI: The cell with id=${P} and field=${_} is not editable.`)},[e]),d=A.useCallback((P,_,C)=>{if(e.current.getCellMode(P,_)!==C)throw new Error(`MUI: The cell with id=${P} and field=${_} is not in ${C} mode.`)},[e]),h=A.useCallback((P,_)=>{if(!P.isEditable||P.cellMode===eo.Edit)return;const C=W({},P,{reason:Ad.cellDoubleClick});e.current.publishEvent("cellEditStart",C,_)},[e]),p=A.useCallback((P,_)=>{if(P.cellMode===eo.View||e.current.getCellMode(P.id,P.field)===eo.View)return;const C=W({},P,{reason:Fc.cellFocusOut});e.current.publishEvent("cellEditStop",C,_)},[e]),g=A.useCallback((P,_)=>{if(P.cellMode===eo.Edit){if(_.which===229)return;let C;if(_.key==="Escape"?C=Fc.escapeKeyDown:_.key==="Enter"?C=Fc.enterKeyDown:_.key==="Tab"&&(C=_.shiftKey?Fc.shiftTabKeyDown:Fc.tabKeyDown,_.preventDefault()),C){const S=W({},P,{reason:C});e.current.publishEvent("cellEditStop",S,_)}}else if(P.isEditable){let C;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:_,cellParams:P,editMode:"cell"}))return;if(JJ(_)?C=Ad.printableKeyDown:(_.ctrlKey||_.metaKey)&&_.key==="v"?C=Ad.pasteKeyDown:_.key==="Enter"?C=Ad.enterKeyDown:(_.key==="Delete"||_.key==="Backspace")&&(C=Ad.deleteKeyDown),C){const x=W({},P,{reason:C,key:_.key});e.current.publishEvent("cellEditStart",x,_)}}},[e]),m=A.useCallback(P=>{const{id:_,field:C,reason:S}=P,x={id:_,field:C};(S===Ad.printableKeyDown||S===Ad.deleteKeyDown||S===Ad.pasteKeyDown)&&(x.deleteValue=!0),e.current.startCellEditMode(x)},[e]),v=A.useCallback(P=>{const{id:_,field:C,reason:S}=P;e.current.runPendingEditCellValueMutation(_,C);let x;S===Fc.enterKeyDown?x="below":S===Fc.tabKeyDown?x="right":S===Fc.shiftTabKeyDown&&(x="left");const k=S==="escapeKeyDown";e.current.stopCellEditMode({id:_,field:C,ignoreModifications:k,cellToFocusAfter:x})},[e]);Xt(e,"cellDoubleClick",u(h)),Xt(e,"cellFocusOut",u(p)),Xt(e,"cellKeyDown",u(g)),Xt(e,"cellEditStart",u(m)),Xt(e,"cellEditStop",u(v)),Gn(e,"cellEditStart",t.onCellEditStart),Gn(e,"cellEditStop",t.onCellEditStop);const y=A.useCallback((P,_)=>{const C=oa(e.current.state);return C[P]&&C[P][_]?eo.Edit:eo.View},[e]),b=Mt(P=>{const _=P!==t.cellModesModel;l&&_&&l(P,{}),!(t.cellModesModel&&_)&&(n(P),o.current=P,e.current.publishEvent("cellModesModelChange",P))}),w=A.useCallback((P,_,C)=>{const S=W({},o.current);if(C!==null)S[P]=W({},S[P],{[_]:W({},C)});else{const x=S[P],k=ze(x,[_].map(Nm));S[P]=k,Object.keys(S[P]).length===0&&delete S[P]}b(S)},[b]),E=A.useCallback((P,_,C)=>{e.current.setState(S=>{const x=W({},S.editRows);return C!==null?x[P]=W({},x[P],{[_]:W({},C)}):(delete x[P][_],Object.keys(x[P]).length===0&&delete x[P]),W({},S,{editRows:x})}),e.current.forceUpdate()},[e]),I=A.useCallback(P=>{const{id:_,field:C}=P,S=ze(P,XHe);f(_,C),d(_,C,eo.View),w(_,C,W({mode:eo.Edit},S))},[f,d,w]),O=Mt(P=>{const{id:_,field:C,deleteValue:S,initialValue:x}=P;let k=e.current.getCellValue(_,C);(S||x)&&(k=S?"":x),E(_,C,{value:k,error:!1,isProcessingProps:!1}),e.current.setCellFocus(_,C)}),D=A.useCallback(P=>{const{id:_,field:C}=P,S=ze(P,QHe);d(_,C,eo.Edit),w(_,C,W({mode:eo.View},S))},[d,w]),N=Mt(async P=>{const{id:_,field:C,ignoreModifications:S,cellToFocusAfter:x="none"}=P;d(_,C,eo.Edit),e.current.runPendingEditCellValueMutation(_,C);const k=()=>{E(_,C,null),w(_,C,null),x!=="none"&&e.current.moveFocusToRelativeCell(_,C,x)};if(S){k();return}const L=oa(e.current.state),{error:j,isProcessingProps:z}=L[_][C];if(j||z){i.current[_][C].mode=eo.Edit,w(_,C,{mode:eo.Edit});return}const Y=e.current.getRowWithUpdatedValuesFromCellEditing(_,C);if(a){const K=Q=>{i.current[_][C].mode=eo.Edit,w(_,C,{mode:eo.Edit}),s?s(Q):ZHe()};try{const Q=e.current.getRow(_);Promise.resolve(a(Y,Q)).then(q=>{e.current.updateRows([q]),k()}).catch(K)}catch(Q){K(Q)}}else e.current.updateRows([Y]),k()}),U=A.useCallback(async P=>{var _;const{id:C,field:S,value:x,debounceMs:k,unstable_skipValueParser:L}=P;f(C,S),d(C,S,eo.Edit);const j=e.current.getColumn(S),z=e.current.getRow(C);let Y=x;j.valueParser&&!L&&(Y=j.valueParser(x,e.current.getCellParams(C,S)));let K=oa(e.current.state),Q=W({},K[C][S],{value:Y,changeReason:k?"debouncedSetEditCellValue":"setEditCellValue"});if(j.preProcessEditCellProps){const q=x!==K[C][S].value;Q=W({},Q,{isProcessingProps:!0}),E(C,S,Q),Q=await Promise.resolve(j.preProcessEditCellProps({id:C,row:z,props:Q,hasChanged:q}))}return e.current.getCellMode(C,S)===eo.View?!1:(K=oa(e.current.state),Q=W({},Q,{isProcessingProps:!1}),Q.value=j.preProcessEditCellProps?K[C][S].value:Y,E(C,S,Q),K=oa(e.current.state),!((_=K[C])!=null&&(_=_[S])!=null&&_.error))},[e,f,d,E]),B=A.useCallback((P,_)=>{const C=e.current.getColumn(_),S=oa(e.current.state),x=e.current.getRow(P);if(!S[P]||!S[P][_])return e.current.getRow(P);const{value:k}=S[P][_];return C.valueSetter?C.valueSetter({value:k,row:x}):W({},x,{[_]:k})},[e]),F={getCellMode:y,startCellEditMode:I,stopCellEditMode:D},T={setCellEditingEditCellValue:U,getRowWithUpdatedValuesFromCellEditing:B};jr(e,F,"public"),jr(e,T,"private"),A.useEffect(()=>{c&&b(c)},[c,b]),en(()=>{const P=dE(e),_=i.current;i.current=iee(r),Object.entries(r).forEach(([C,S])=>{Object.entries(S).forEach(([x,k])=>{var L,j;const z=((L=_[C])==null||(L=L[x])==null?void 0:L.mode)||eo.View,Y=(j=P[C])!=null?j:C;k.mode===eo.Edit&&z===eo.View?O(W({id:Y,field:x},k)):k.mode===eo.View&&z===eo.Edit&&N(W({id:Y,field:x},k))})})},[e,r,O,N])},eze=["id"],tze=["id"],rze=cd(["MUI: A call to `processRowUpdate` threw an error which was not handled because `onProcessRowUpdateError` is missing.","To handle the error pass a callback to the `onProcessRowUpdateError` prop, e.g. `<DataGrid onProcessRowUpdateError={(error) => ...} />`.","For more detail, see http://mui.com/components/data-grid/editing/#server-side-persistence."],"error"),nze=(e,t)=>{const[r,n]=A.useState({}),o=A.useRef(r),i=A.useRef({}),a=A.useRef(null),s=A.useRef(null),{processRowUpdate:c,onProcessRowUpdateError:l,rowModesModel:u,onRowModesModelChange:f}=t,d=x=>(...k)=>{t.editMode===nd.Row&&x(...k)},h=A.useCallback((x,k)=>{const L=e.current.getCellParams(x,k);if(!e.current.isCellEditable(L))throw new Error(`MUI: The cell with id=${x} and field=${k} is not editable.`)},[e]),p=A.useCallback((x,k)=>{if(e.current.getRowMode(x)!==k)throw new Error(`MUI: The row with id=${x} is not in ${k} mode.`)},[e]),g=A.useCallback((x,k)=>{if(!x.isEditable||e.current.getRowMode(x.id)===gn.Edit)return;const L=e.current.getRowParams(x.id),j=W({},L,{field:x.field,reason:Qf.cellDoubleClick});e.current.publishEvent("rowEditStart",j,k)},[e]),m=A.useCallback(x=>{s.current=x},[]),v=A.useCallback((x,k)=>{x.isEditable&&e.current.getRowMode(x.id)!==gn.View&&(s.current=null,a.current=setTimeout(()=>{var L;if(a.current=null,((L=s.current)==null?void 0:L.id)!==x.id){if(!e.current.getRow(x.id)||e.current.getRowMode(x.id)===gn.View)return;const j=e.current.getRowParams(x.id),z=W({},j,{field:x.field,reason:_u.rowFocusOut});e.current.publishEvent("rowEditStop",z,k)}}))},[e]);A.useEffect(()=>()=>{clearTimeout(a.current)},[]);const y=A.useCallback((x,k)=>{if(x.cellMode===gn.Edit){if(k.which===229)return;let L;if(k.key==="Escape")L=_u.escapeKeyDown;else if(k.key==="Enter")L=_u.enterKeyDown;else if(k.key==="Tab"){const j=Xh(e).filter(z=>e.current.getColumn(z).type===i4?!0:e.current.isCellEditable(e.current.getCellParams(x.id,z)));if(k.shiftKey?x.field===j[0]&&(L=_u.shiftTabKeyDown):x.field===j[j.length-1]&&(L=_u.tabKeyDown),k.preventDefault(),!L){const z=j.findIndex(K=>K===x.field),Y=j[k.shiftKey?z-1:z+1];e.current.setCellFocus(x.id,Y)}}if(L){const j=W({},e.current.getRowParams(x.id),{reason:L,field:x.field});e.current.publishEvent("rowEditStop",j,k)}}else if(x.isEditable){let L;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:k,cellParams:x,editMode:"row"}))return;if(JJ(k)||(k.ctrlKey||k.metaKey)&&k.key==="v"?L=Qf.printableKeyDown:k.key==="Enter"?L=Qf.enterKeyDown:(k.key==="Delete"||k.key==="Backspace")&&(L=Qf.deleteKeyDown),L){const z=e.current.getRowParams(x.id),Y=W({},z,{field:x.field,reason:L});e.current.publishEvent("rowEditStart",Y,k)}}},[e]),b=A.useCallback(x=>{const{id:k,field:L,reason:j}=x,z={id:k,fieldToFocus:L};(j===Qf.printableKeyDown||j===Qf.deleteKeyDown)&&(z.deleteValue=!!L),e.current.startRowEditMode(z)},[e]),w=A.useCallback(x=>{const{id:k,reason:L,field:j}=x;e.current.runPendingEditCellValueMutation(k);let z;L===_u.enterKeyDown?z="below":L===_u.tabKeyDown?z="right":L===_u.shiftTabKeyDown&&(z="left");const Y=L==="escapeKeyDown";e.current.stopRowEditMode({id:k,ignoreModifications:Y,field:j,cellToFocusAfter:z})},[e]);Xt(e,"cellDoubleClick",d(g)),Xt(e,"cellFocusIn",d(m)),Xt(e,"cellFocusOut",d(v)),Xt(e,"cellKeyDown",d(y)),Xt(e,"rowEditStart",d(b)),Xt(e,"rowEditStop",d(w)),Gn(e,"rowEditStart",t.onRowEditStart),Gn(e,"rowEditStop",t.onRowEditStop);const E=A.useCallback(x=>{if(t.editMode===nd.Cell)return gn.View;const k=oa(e.current.state);return k[x]&&Object.keys(k[x]).length>0?gn.Edit:gn.View},[e,t.editMode]),I=Mt(x=>{const k=x!==t.rowModesModel;f&&k&&f(x,{}),!(t.rowModesModel&&k)&&(n(x),o.current=x,e.current.publishEvent("rowModesModelChange",x))}),O=A.useCallback((x,k)=>{const L=W({},o.current);k!==null?L[x]=W({},k):delete L[x],I(L)},[I]),D=A.useCallback((x,k)=>{e.current.setState(L=>{const j=W({},L.editRows);return k!==null?j[x]=k:delete j[x],W({},L,{editRows:j})}),e.current.forceUpdate()},[e]),N=A.useCallback((x,k,L)=>{e.current.setState(j=>{const z=W({},j.editRows);return L!==null?z[x]=W({},z[x],{[k]:W({},L)}):(delete z[x][k],Object.keys(z[x]).length===0&&delete z[x]),W({},j,{editRows:z})}),e.current.forceUpdate()},[e]),U=A.useCallback(x=>{const{id:k}=x,L=ze(x,eze);p(k,gn.View),O(k,W({mode:gn.Edit},L))},[p,O]),B=Mt(x=>{const{id:k,fieldToFocus:L,deleteValue:j,initialValue:z}=x,K=tu(e).reduce((Q,q)=>{if(!e.current.getCellParams(k,q).isEditable)return Q;let G=e.current.getCellValue(k,q);return L===q&&(j||z)&&(G=j?"":z),Q[q]={value:G,error:!1,isProcessingProps:!1},Q},{});D(k,K),L&&e.current.setCellFocus(k,L)}),F=A.useCallback(x=>{const{id:k}=x,L=ze(x,tze);p(k,gn.Edit),O(k,W({mode:gn.View},L))},[p,O]),T=Mt(x=>{const{id:k,ignoreModifications:L,field:j,cellToFocusAfter:z="none"}=x;e.current.runPendingEditCellValueMutation(k);const Y=()=>{z!=="none"&&j&&e.current.moveFocusToRelativeCell(k,j,z),D(k,null),O(k,null)};if(L){Y();return}const K=oa(e.current.state),Q=e.current.getRow(k);if(Object.values(K[k]).some(V=>V.isProcessingProps)){i.current[k].mode=gn.Edit;return}if(Object.values(K[k]).some(V=>V.error)){i.current[k].mode=gn.Edit,O(k,{mode:gn.Edit});return}const G=e.current.getRowWithUpdatedValuesFromRowEditing(k);if(c){const V=X=>{i.current[k].mode=gn.Edit,O(k,{mode:gn.Edit}),l?l(X):rze()};try{Promise.resolve(c(G,Q)).then(X=>{e.current.updateRows([X]),Y()}).catch(V)}catch(X){V(X)}}else e.current.updateRows([G]),Y()}),P=A.useCallback(x=>{const{id:k,field:L,value:j,debounceMs:z,unstable_skipValueParser:Y}=x;h(k,L);const K=e.current.getColumn(L),Q=e.current.getRow(k);let q=j;K.valueParser&&!Y&&(q=K.valueParser(j,e.current.getCellParams(k,L)));let J=oa(e.current.state),G=W({},J[k][L],{value:q,changeReason:z?"debouncedSetEditCellValue":"setEditCellValue"});return K.preProcessEditCellProps||N(k,L,G),new Promise(V=>{const X=[];if(K.preProcessEditCellProps){const te=G.value!==J[k][L].value;G=W({},G,{isProcessingProps:!0}),N(k,L,G);const ee=J[k],re=ze(ee,[L].map(Nm)),se=Promise.resolve(K.preProcessEditCellProps({id:k,row:Q,props:G,hasChanged:te,otherFieldsProps:re})).then(pe=>{if(e.current.getRowMode(k)===gn.View){V(!1);return}J=oa(e.current.state),pe=W({},pe,{isProcessingProps:!1}),pe.value=K.preProcessEditCellProps?J[k][L].value:q,N(k,L,pe)});X.push(se)}Object.entries(J[k]).forEach(([te,ee])=>{if(te===L)return;const re=e.current.getColumn(te);if(!re.preProcessEditCellProps)return;ee=W({},ee,{isProcessingProps:!0}),N(k,te,ee),J=oa(e.current.state);const se=J[k],pe=ze(se,[te].map(Nm)),ce=Promise.resolve(re.preProcessEditCellProps({id:k,row:Q,props:ee,hasChanged:!1,otherFieldsProps:pe})).then(ne=>{if(e.current.getRowMode(k)===gn.View){V(!1);return}ne=W({},ne,{isProcessingProps:!1}),N(k,te,ne)});X.push(ce)}),Promise.all(X).then(()=>{e.current.getRowMode(k)===gn.Edit?(J=oa(e.current.state),V(!J[k][L].error)):V(!1)})})},[e,h,N]),_=A.useCallback(x=>{const k=oa(e.current.state),L=e.current.getRow(x);if(!k[x])return e.current.getRow(x);let j=W({},L);return Object.entries(k[x]).forEach(([z,Y])=>{const K=e.current.getColumn(z);K.valueSetter?j=K.valueSetter({value:Y.value,row:j}):j[z]=Y.value}),j},[e]),C={getRowMode:E,startRowEditMode:U,stopRowEditMode:F},S={setRowEditingEditCellValue:P,getRowWithUpdatedValuesFromRowEditing:_};jr(e,C,"public"),jr(e,S,"private"),A.useEffect(()=>{u&&I(u)},[u,I]),en(()=>{const x=dE(e),k=i.current;i.current=iee(r),Object.entries(r).forEach(([L,j])=>{var z,Y;const K=((z=k[L])==null?void 0:z.mode)||gn.View,Q=(Y=x[L])!=null?Y:L;j.mode===gn.Edit&&K===gn.View?B(W({id:Q},j)):j.mode===gn.View&&K===gn.Edit&&T(W({id:Q},j))})},[e,r,B,T])},oze=e=>W({},e,{editRows:{}}),ize=(e,t)=>{JHe(e,t),nze(e,t);const r=A.useRef({}),{isCellEditable:n}=t,o=A.useCallback(d=>hx(d.rowNode)||!d.colDef.editable||!d.colDef.renderEditCell?!1:n?n(d):!0,[n]),i=(d,h,p,g)=>{if(!p){g();return}if(r.current[d]||(r.current[d]={}),r.current[d][h]){const[y]=r.current[d][h];clearTimeout(y)}const m=()=>{const[y]=r.current[d][h];clearTimeout(y),g(),delete r.current[d][h]},v=setTimeout(()=>{g(),delete r.current[d][h]},p);r.current[d][h]=[v,m]};A.useEffect(()=>{const d=r.current;return()=>{Object.entries(d).forEach(([h,p])=>{Object.keys(p).forEach(g=>{const[m]=d[h][g];clearTimeout(m),delete d[h][g]})})}},[]);const a=A.useCallback((d,h)=>{if(r.current[d]){if(!h)Object.keys(r.current[d]).forEach(p=>{const[,g]=r.current[d][p];g()});else if(r.current[d][h]){const[,p]=r.current[d][h];p()}}},[]),s=A.useCallback(d=>{const{id:h,field:p,debounceMs:g}=d;return new Promise(m=>{i(h,p,g,async()=>{const v=t.editMode===nd.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(h,p)===eo.Edit){const y=await v(d);m(y)}})})},[e,t.editMode]),c=A.useCallback((d,h)=>t.editMode===nd.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(d,h):e.current.getRowWithUpdatedValuesFromRowEditing(d),[e,t.editMode]),l=A.useCallback((d,h)=>{var p,g;return(p=(g=oa(e.current.state)[d])==null?void 0:g[h])!=null?p:null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:c,unstable_getEditCellMeta:l},f={runPendingEditCellValueMutation:a};jr(e,u,"public"),jr(e,f,"private")},aze=(e,t,r)=>(r.current.caches.rows=ak({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W({},e,{rows:qJ({apiRef:r,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:null,previousTreeDepths:null})})),sze=(e,t)=>{const r=Oi(e,"useGridRows"),n=Sf(e,t),o=A.useRef(Date.now()),i=X2(),a=A.useCallback(T=>{const P=xh(e)[T];if(P)return P;const _=e.current.getRowNode(T);return _&&hx(_)?{[fv]:T}:null},[e]),s=t.getRowId,c=A.useCallback(T=>fv in T?T[fv]:s?s(T):T.id,[s]),l=A.useMemo(()=>n.rows.reduce((T,{id:P},_)=>(T[P]=_,T),{}),[n.rows]),u=A.useCallback(({cache:T,throttle:P})=>{const _=()=>{o.current=Date.now(),e.current.setState(S=>W({},S,{rows:qJ({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:dl(e),previousTreeDepths:NH(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(i.clear(),e.current.caches.rows=T,!P){_();return}const C=t.throttleRowsMs-(Date.now()-o.current);if(C>0){i.start(C,_);return}_()},[t.throttleRowsMs,t.rowCount,t.loading,e,i]),f=A.useCallback(T=>{r.debug(`Updating all rows, new length ${T.length}`);const P=ak({rows:T,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),_=e.current.caches.rows;P.rowsBeforePartialUpdates=_.rowsBeforePartialUpdates,u({cache:P,throttle:!0})},[r,t.getRowId,t.loading,t.rowCount,u,e]),d=A.useCallback(T=>{if(t.signature===Qu.DataGrid&&T.length>1)throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`));const P=[];T.forEach(C=>{const S=h1(C,t.getRowId,"A row was provided without id when calling updateRows():"),x=e.current.getRowNode(S);if((x==null?void 0:x.type)==="pinnedRow"){const k=e.current.caches.pinnedRows,L=k.idLookup[S];L&&(k.idLookup[S]=W({},L,C))}else P.push(C)});const _=Q9e({updates:P,getRowId:t.getRowId,previousCache:e.current.caches.rows});u({cache:_,throttle:!0})},[t.signature,t.getRowId,u,e]),h=A.useCallback(()=>{const T=Mb(e),P=xh(e);return new Map(T.map(_=>{var C;return[_,(C=P[_])!=null?C:{}]}))},[e]),p=A.useCallback(()=>ZI(e),[e]),g=A.useCallback(()=>Mb(e),[e]),m=A.useCallback(T=>l[T],[l]),v=A.useCallback((T,P)=>{const _=e.current.getRowNode(T);if(!_)throw new Error(`MUI: No row with id #${T} found`);if(_.type!=="group")throw new Error("MUI: Only group nodes can be expanded or collapsed");const C=W({},_,{childrenExpanded:P});e.current.setState(S=>W({},S,{rows:W({},S.rows,{tree:W({},S.rows.tree,{[T]:C})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",C)},[e]),y=A.useCallback(T=>{var P;return(P=dl(e)[T])!=null?P:null},[e]),b=A.useCallback(({skipAutoGeneratedRows:T=!0,groupId:P,applySorting:_,applyFiltering:C})=>{const S=dl(e);let x;if(_){const k=S[P];if(!k)return[];const L=GD(e);x=[];const j=L.findIndex(z=>z===P)+1;for(let z=j;z<L.length&&S[L[z]].depth>k.depth;z+=1){const Y=L[z];(!T||!hx(S[Y]))&&x.push(Y)}}else x=r4(S,P,T);if(C){const k=$J(e);x=x.filter(L=>k[L]!==!1)}return x},[e]),w=A.useCallback((T,P)=>{const _=e.current.getRowNode(T);if(!_)throw new Error(`MUI: No row with id #${T} found`);if(_.parent!==ro)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if(_.type!=="leaf")throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState(C=>{const S=dl(C,e.current.instanceId)[ro],x=S.children,k=x.findIndex(j=>j===T);if(k===-1||k===P)return C;r.debug(`Moving row ${T} to index ${P}`);const L=[...x];return L.splice(P,0,L.splice(k,1)[0]),W({},C,{rows:W({},C.rows,{tree:W({},C.rows.tree,{[ro]:W({},S,{children:L})})})})}),e.current.publishEvent("rowsSet")},[e,r]),E=A.useCallback((T,P)=>{if(t.signature===Qu.DataGrid&&P.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`));if(P.length===0)return;if(X1(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const C=W({},dl(e)),S=W({},xh(e)),x=W({},dE(e)),k=C[ro],L=[...k.children];for(let z=0;z<P.length;z+=1){const Y=P[z],K=h1(Y,t.getRowId,"A row was provided without id when calling replaceRows()."),[Q]=L.splice(T+z,1,K);delete S[Q],delete x[Q],delete C[Q];const q={id:K,depth:0,parent:ro,type:"leaf",groupingKey:null};S[K]=Y,x[K]=K,C[K]=q}C[ro]=W({},k,{children:L});const j=L.filter(z=>C[z].type==="leaf");e.current.caches.rows.dataRowIdToModelLookup=S,e.current.caches.rows.dataRowIdToIdLookup=x,e.current.setState(z=>W({},z,{rows:W({},z.rows,{dataRowIdToModelLookup:S,dataRowIdToIdLookup:x,dataRowIds:j,tree:C})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),I={getRow:a,getRowId:c,getRowModels:h,getRowsCount:p,getAllRowIds:g,setRows:f,updateRows:d,getRowNode:y,getRowIndexRelativeToVisibleRows:m,unstable_replaceRows:E},O={setRowIndex:w,setRowChildrenExpansion:v,getRowGroupChildren:b},D=A.useCallback(()=>{r.info("Row grouping pre-processing have changed, regenerating the row tree");let T;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?T=W({},e.current.caches.rows,{updates:{type:"full",rows:Mb(e)}}):T=ak({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),u({cache:T,throttle:!1})},[r,e,t.rows,t.getRowId,t.loading,t.rowCount,u]),N=A.useCallback(T=>{T==="rowTreeCreation"&&D()},[D]),U=A.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==R9e(e)&&D()},[e,D]);Xt(e,"activeStrategyProcessorChange",N),Xt(e,"strategyAvailabilityChange",U);const B=A.useCallback(()=>{e.current.setState(T=>{const P=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:dl(T,e.current.instanceId),treeDepths:NH(T,e.current.instanceId),dataRowIds:Mb(T,e.current.instanceId),dataRowIdToModelLookup:xh(T,e.current.instanceId),dataRowIdToIdLookup:dE(T,e.current.instanceId)});return W({},T,{rows:W({},T.rows,P,{totalTopLevelRowCount:GJ({tree:P.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);d8(e,"hydrateRows",B),jr(e,I,"public"),jr(e,O,t.signature===Qu.DataGrid?"private":"public");const F=A.useRef(!0);A.useEffect(()=>{if(F.current){F.current=!1;return}const T=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,P=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,_=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(T){P||(e.current.setState(C=>W({},C,{rows:W({},C.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),_||(e.current.setState(C=>W({},C,{rows:W({},C.rows,{totalRowCount:Math.max(t.rowCount||0,C.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,C.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate());return}r.debug(`Updating all rows, new length ${t.rows.length}`),u({cache:ak({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})},[t.rows,t.rowCount,t.getRowId,t.loading,r,u,e])},lze=e=>{const t={[ro]:W({},WJ(),{children:e})};for(let r=0;r<e.length;r+=1){const n=e[r];t[n]={id:n,depth:0,parent:ro,type:"leaf",groupingKey:null}}return{groupingName:qm,tree:t,treeDepths:{0:e.length},dataRowIds:e}},cze=({previousTree:e,actions:t})=>{const r=W({},e),n={};for(let a=0;a<t.remove.length;a+=1){const s=t.remove[a];n[s]=!0,delete r[s]}for(let a=0;a<t.insert.length;a+=1){const s=t.insert[a];r[s]={id:s,depth:0,parent:ro,type:"leaf",groupingKey:null}}const o=r[ro];let i=[...o.children,...t.insert];return Object.values(n).length&&(i=i.filter(a=>!n[a])),r[ro]=W({},o,{children:i}),{groupingName:qm,tree:r,treeDepths:{0:i.length},dataRowIds:i}},uze=e=>e.updates.type==="full"?lze(e.updates.rows):cze({previousTree:e.previousTree,actions:e.updates.actions}),dze=e=>{Sh(e,qm,"rowTreeCreation",uze)},Uee=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],fze=(e,t)=>{var r;return W({},e,{rowSelection:t.rowSelection?(r=Uee(t.rowSelectionModel))!=null?r:[]:[]})},hze=(e,t)=>{const r=Oi(e,"useGridSelection"),n=P=>(..._)=>{t.rowSelection&&P(..._)},o=A.useMemo(()=>Uee(t.rowSelectionModel,Kl(e.current.state)),[e,t.rowSelectionModel]),i=A.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:o,propOnChange:t.onRowSelectionModelChange,stateSelector:Kl,changeEvent:"rowSelectionChange"});const{checkboxSelection:a,disableMultipleRowSelection:s,disableRowSelectionOnClick:c,isRowSelectable:l}=t,u=!s||a,f=Sf(e,t),d=A.useCallback(P=>{var _;let C=P;const S=(_=i.current)!=null?_:P,x=e.current.isRowSelected(P);if(x){const k=cw(e),L=k.findIndex(z=>z===S),j=k.findIndex(z=>z===C);if(L===j)return;L>j?C=k[j+1]:C=k[j-1]}i.current=P,e.current.selectRowRange({startId:S,endId:C},!x)},[e]),h=A.useCallback(P=>{if(t.signature===Qu.DataGrid&&!t.checkboxSelection&&Array.isArray(P)&&P.length>1)throw new Error(["MUI: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(`
`));Kl(e.current.state)!==P&&(r.debug("Setting selection model"),e.current.setState(C=>W({},C,{rowSelection:t.rowSelection?P:[]})),e.current.forceUpdate())},[e,r,t.rowSelection,t.signature,t.checkboxSelection]),p=A.useCallback(P=>Kl(e.current.state).includes(P),[e]),g=A.useCallback(P=>{if(l&&!l(e.current.getRowParams(P)))return!1;const _=e.current.getRowNode(P);return!((_==null?void 0:_.type)==="footer"||(_==null?void 0:_.type)==="pinnedRow")},[e,l]),m=A.useCallback(()=>r$e(e),[e]),v=A.useCallback((P,_=!0,C=!1)=>{if(e.current.isRowSelectable(P))if(i.current=P,C)r.debug(`Setting selection for row ${P}`),e.current.setRowSelectionModel(_?[P]:[]);else{r.debug(`Toggling selection for row ${P}`);const x=Kl(e.current.state).filter(L=>L!==P);_&&x.push(P),(x.length<2||u)&&e.current.setRowSelectionModel(x)}},[e,r,u]),y=A.useCallback((P,_=!0,C=!1)=>{r.debug("Setting selection for several rows");const S=P.filter(L=>e.current.isRowSelectable(L));let x;if(C)x=_?S:[];else{const L=W({},vE(e));S.forEach(j=>{_?L[j]=j:delete L[j]}),x=Object.values(L)}(x.length<2||u)&&e.current.setRowSelectionModel(x)},[e,r,u]),b=A.useCallback(({startId:P,endId:_},C=!0,S=!1)=>{if(!e.current.getRow(P)||!e.current.getRow(_))return;r.debug(`Expanding selection from row ${P} to row ${_}`);const x=cw(e),k=x.indexOf(P),L=x.indexOf(_),[j,z]=k>L?[L,k]:[k,L],Y=x.slice(j,z+1);e.current.selectRows(Y,C,S)},[e,r]),w={selectRow:v,setRowSelectionModel:h,getSelectedRows:m,isRowSelected:p,isRowSelectable:g},E={selectRows:y,selectRowRange:b};jr(e,w,"public"),jr(e,E,t.signature===Qu.DataGrid?"private":"public");const I=A.useCallback(()=>{if(t.keepNonExistentRowsSelected)return;const P=Kl(e.current.state),_=xh(e),C=W({},vE(e));let S=!1;P.forEach(x=>{_[x]||(delete C[x],S=!0)}),S&&e.current.setRowSelectionModel(Object.values(C))},[e,t.keepNonExistentRowsSelected]),O=A.useCallback((P,_)=>{const C=_.metaKey||_.ctrlKey,S=!a&&!C&&!$7e(_),x=!u||S,k=e.current.isRowSelected(P);x?e.current.selectRow(P,S?!0:!k,!0):e.current.selectRow(P,!k,!1)},[e,u,a]),D=A.useCallback((P,_)=>{var C;if(c)return;const S=(C=_.target.closest(`.${qe.cell}`))==null?void 0:C.getAttribute("data-field");if(S===p0.field||S===l8)return;if(S){const k=e.current.getColumn(S);if((k==null?void 0:k.type)===i4)return}e.current.getRowNode(P.id).type!=="pinnedRow"&&(_.shiftKey&&(u||a)?d(P.id):O(P.id,_))},[c,u,a,e,d,O]),N=A.useCallback((P,_)=>{if(u&&_.shiftKey){var C;(C=window.getSelection())==null||C.removeAllRanges()}},[u]),U=A.useCallback((P,_)=>{_.nativeEvent.shiftKey?d(P.id):e.current.selectRow(P.id,P.value)},[e,d]),B=A.useCallback(P=>{const C=t.checkboxSelectionVisibleOnly&&t.pagination?dee(e):cw(e);e.current.selectRows(C,P.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination]),F=A.useCallback((P,_)=>{if(e.current.getCellMode(P.id,P.field)!==eo.Edit&&!Q1(_)){if(px(_.key)&&_.shiftKey){const C=ll(e);if(C&&C.id!==P.id){_.preventDefault();const S=e.current.isRowSelected(C.id);if(!u){e.current.selectRow(C.id,!S,!0);return}const x=e.current.getRowIndexRelativeToVisibleRows(C.id),k=e.current.getRowIndexRelativeToVisibleRows(P.id);let L,j;x>k?S?(L=k,j=x-1):(L=k,j=x):S?(L=x+1,j=k):(L=x,j=k);const z=f.rows.slice(L,j+1).map(Y=>Y.id);e.current.selectRows(z,!S);return}}if(_.key===" "&&_.shiftKey){_.preventDefault(),O(P.id,_);return}_.key==="a"&&(_.ctrlKey||_.metaKey)&&(_.preventDefault(),y(e.current.getAllRowIds(),!0))}},[e,O,y,f.rows,u]);Xt(e,"sortedRowsSet",n(I)),Xt(e,"rowClick",n(D)),Xt(e,"rowSelectionCheckboxChange",n(U)),Xt(e,"headerSelectionCheckboxChange",B),Xt(e,"cellMouseDown",n(N)),Xt(e,"cellKeyDown",n(F)),A.useEffect(()=>{o!==void 0&&e.current.setRowSelectionModel(o)},[e,o,t.rowSelection]),A.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const T=o!=null;A.useEffect(()=>{if(T||!t.rowSelection)return;const P=Kl(e.current.state);if(g){const _=P.filter(C=>g(C));_.length<P.length&&e.current.setRowSelectionModel(_)}},[e,g,T,t.rowSelection]),A.useEffect(()=>{if(!t.rowSelection||T)return;const P=Kl(e.current.state);!u&&P.length>1&&e.current.setRowSelectionModel([])},[e,u,a,T,t.rowSelection])},pze=e=>{const{classes:t}=e;return A.useMemo(()=>pt({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},Rr,t),[t])},mze=(e,t)=>{const r={classes:t.classes},n=pze(r),o=A.useCallback(i=>{const a=W({},p0,{cellClassName:n.cellCheckbox,headerClassName:n.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,c=i.lookup[Md]!=null;return s&&!c?(i.lookup[Md]=a,i.orderedFields=[Md,...i.orderedFields]):!s&&c?(delete i.lookup[Md],i.orderedFields=i.orderedFields.filter(l=>l!==Md)):s&&c&&(i.lookup[Md]=W({},a,i.lookup[Md])),i},[e,n,t.checkboxSelection]);$n(e,"hydrateColumns",o)},gze=(e,t)=>{var r,n,o;const i=(r=(n=t.sortModel)!=null?n:(o=t.initialState)==null||(o=o.sorting)==null?void 0:o.sortModel)!=null?r:[];return W({},e,{sorting:{sortModel:fee(i,t.disableMultipleColumnsSorting),sortedRows:[]}})},vze=(e,t)=>{var r;const n=Oi(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:us,changeEvent:"sortModelChange"});const o=A.useCallback((I,O)=>{const D=us(e),N=D.findIndex(B=>B.field===I);let U=[...D];return N>-1?O?U.splice(N,1,O):U.splice(N,1):U=[...D,O],U},[e]),i=A.useCallback((I,O)=>{var D;const U=us(e).find(F=>F.field===I.field);if(U){var B;const F=O===void 0?HH((B=I.sortingOrder)!=null?B:t.sortingOrder,U.sort):O;return F==null?void 0:W({},U,{sort:F})}return{field:I.field,sort:O===void 0?HH((D=I.sortingOrder)!=null?D:t.sortingOrder):O}},[e,t.sortingOrder]),a=A.useCallback((I,O)=>O==null||O.sortable===!1?I:(O.sortingOrder||t.sortingOrder).some(N=>!!N)?[...I,"columnMenuSortItem"]:I,[t.sortingOrder]),s=A.useCallback(()=>{e.current.setState(I=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),W({},I,{sorting:W({},I.sorting,{sortedRows:r4(dl(e),ro,!1)})});const O=us(I,e.current.instanceId),D=s$e(O,e),N=e.current.applyStrategyProcessor("sorting",{sortRowList:D});return W({},I,{sorting:W({},I.sorting,{sortedRows:N})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),c=A.useCallback(I=>{us(e)!==I&&(n.debug("Setting sort model"),e.current.setState(UH(I,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=A.useCallback((I,O,D)=>{if(!I.sortable)return;const N=i(I,O);let U;!D||t.disableMultipleColumnsSorting?U=N?[N]:[]:U=o(I.field,N),e.current.setSortModel(U)},[e,o,i,t.disableMultipleColumnsSorting]),u=A.useCallback(()=>us(e),[e]),f=A.useCallback(()=>qD(e).map(O=>O.model),[e]),d=A.useCallback(()=>GD(e),[e]),h=A.useCallback(I=>e.current.getSortedRowIds()[I],[e]);jr(e,{getSortModel:u,getSortedRows:f,getSortedRowIds:d,getRowIdFromRowIndex:h,setSortModel:c,sortColumn:l,applySorting:s},"public");const g=A.useCallback((I,O)=>{var D;const N=us(e);return!O.exportOnlyDirtyModels||t.sortModel!=null||((D=t.initialState)==null||(D=D.sorting)==null?void 0:D.sortModel)!=null||N.length>0?W({},I,{sorting:{sortModel:N}}):I},[e,t.sortModel,(r=t.initialState)==null||(r=r.sorting)==null?void 0:r.sortModel]),m=A.useCallback((I,O)=>{var D;const N=(D=O.stateToRestore.sorting)==null?void 0:D.sortModel;return N==null?I:(e.current.setState(UH(N,t.disableMultipleColumnsSorting)),W({},I,{callbacks:[...I.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=A.useCallback(I=>{const O=dl(e),D=O[ro],N=I.sortRowList?I.sortRowList(D.children.map(U=>O[U])):[...D.children];return D.footerId!=null&&N.push(D.footerId),N},[e]);$n(e,"exportState",g),$n(e,"restoreState",m),Sh(e,qm,"sorting",v);const y=A.useCallback(({colDef:I},O)=>{const D=O.shiftKey||O.metaKey||O.ctrlKey;l(I,void 0,D)},[l]),b=A.useCallback(({colDef:I},O)=>{D7e(O.key)&&!O.ctrlKey&&!O.metaKey&&l(I,void 0,O.shiftKey)},[l]),w=A.useCallback(()=>{const I=us(e),O=fp(e);if(I.length>0){const D=I.filter(N=>O[N.field]);D.length<I.length&&e.current.setSortModel(D)}},[e]),E=A.useCallback(I=>{I==="sorting"&&e.current.applySorting()},[e]);$n(e,"columnMenu",a),Xt(e,"columnHeaderClick",y),Xt(e,"columnHeaderKeyDown",b),Xt(e,"rowsSet",e.current.applySorting),Xt(e,"columnsChange",w),Xt(e,"activeStrategyProcessorChange",E),Z1(()=>{e.current.applySorting()}),en(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function dz(e){const{clientHeight:t,scrollTop:r,offsetHeight:n,offsetTop:o}=e,i=o+n;if(n>t)return o;if(i-t>r)return i-t;if(o<r)return o}const yze=(e,t)=>{const r=An(),n=Oi(e,"useGridScroll"),o=e.current.columnHeadersElementRef,i=e.current.virtualScrollerRef,a=$t(e,Cf),s=A.useCallback(f=>{const d=ZI(e),h=Mi(e);if(!(f.rowIndex==null)&&d===0||h.length===0)return!1;n.debug(`Scrolling to cell at row ${f.rowIndex}, col: ${f.colIndex} `);let g={};if(f.colIndex!=null){const b=Wm(e);let w;if(typeof f.rowIndex<"u"){var m;const E=(m=a[f.rowIndex])==null?void 0:m.id,I=e.current.unstable_getCellColSpanInfo(E,f.colIndex);I&&!I.spannedByColSpan&&(w=I.cellProps.width)}typeof w>"u"&&(w=h[f.colIndex].computedWidth),g.left=dz({clientHeight:i.current.clientWidth,scrollTop:Math.abs(i.current.scrollLeft),offsetHeight:w,offsetTop:b[f.colIndex]})}if(f.rowIndex!=null){var v,y;const b=Gm(e.current.state),w=ZLe(e),E=JLe(e),I=t.pagination?f.rowIndex-w*E:f.rowIndex,O=b.positions[I+1]?b.positions[I+1]-b.positions[I]:b.currentPageTotalHeight-b.positions[I],D=((v=i.current.querySelector(`.${qe["pinnedRows--top"]}`))==null?void 0:v.clientHeight)||0,N=((y=i.current.querySelector(`.${qe["pinnedRows--bottom"]}`))==null?void 0:y.clientHeight)||0;g.top=dz({clientHeight:i.current.clientHeight-D-N,scrollTop:i.current.scrollTop,offsetHeight:O,offsetTop:b.positions[I]})}return g=e.current.unstable_applyPipeProcessors("scrollToIndexes",g,f),typeof g.left!==void 0||typeof g.top!==void 0?(e.current.scroll(g),!0):!1},[n,e,i,t.pagination,a]),c=A.useCallback(f=>{if(i.current&&f.left!=null&&o.current){const d=r.direction==="rtl"?-1:1;o.current.scrollLeft=f.left,i.current.scrollLeft=d*f.left,n.debug(`Scrolling left: ${f.left}`)}i.current&&f.top!=null&&(i.current.scrollTop=f.top,n.debug(`Scrolling top: ${f.top}`)),n.debug("Scrolling, updating container, and viewport")},[i,r.direction,o,n]),l=A.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);jr(e,{scroll:c,scrollToIndexes:s,getScrollPosition:l},"public")};function bze(e,t){Gn(e,"columnHeaderClick",t.onColumnHeaderClick),Gn(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),Gn(e,"columnHeaderOver",t.onColumnHeaderOver),Gn(e,"columnHeaderOut",t.onColumnHeaderOut),Gn(e,"columnHeaderEnter",t.onColumnHeaderEnter),Gn(e,"columnHeaderLeave",t.onColumnHeaderLeave),Gn(e,"cellClick",t.onCellClick),Gn(e,"cellDoubleClick",t.onCellDoubleClick),Gn(e,"cellKeyDown",t.onCellKeyDown),Gn(e,"preferencePanelClose",t.onPreferencePanelClose),Gn(e,"preferencePanelOpen",t.onPreferencePanelOpen),Gn(e,"menuOpen",t.onMenuOpen),Gn(e,"menuClose",t.onMenuClose),Gn(e,"rowDoubleClick",t.onRowDoubleClick),Gn(e,"rowClick",t.onRowClick),Gn(e,"stateChange",t.onStateChange)}const wze=({content:e,container:t,scrollBarSize:r})=>{const n=e.width>t.width,o=e.height>t.height;let i=!1,a=!1;return(n||o)&&(i=n,a=e.height+(i?r:0)>t.height,a&&(i=e.width+r>t.width)),{hasScrollX:i,hasScrollY:a}};function xze(e,t){const r=Oi(e,"useResizeContainer"),n=A.useRef(!1),o=A.useRef(null),i=A.useRef(null),a=$t(e,Gm),s=$t(e,h0),c=Math.floor(t.rowHeight*s),l=J2(e,t.columnHeaderHeight),u=A.useCallback(()=>{var O;const D=(O=e.current.rootElementRef)==null?void 0:O.current,N=K2(e),U=XD(e);if(!o.current)return;let B;if(t.scrollbarSize!=null)B=t.scrollbarSize;else if(!N||!D)B=0;else{const k=In(D).createElement("div");k.style.width="99px",k.style.height="99px",k.style.position="absolute",k.style.overflow="scroll",k.className="scrollDiv",D.appendChild(k),B=k.offsetWidth-k.clientWidth,D.removeChild(k)}let F,T,P;if(t.autoHeight)P=!1,T=Math.round(N)>Math.round(o.current.width),F={width:o.current.width,height:a.currentPageTotalHeight+(T?B:0)};else{F={width:o.current.width,height:Math.max(o.current.height-l,0)};const x=wze({content:{width:Math.round(N),height:a.currentPageTotalHeight},container:{width:Math.round(F.width),height:F.height-U.top-U.bottom},scrollBarSize:B});P=x.hasScrollY,T=x.hasScrollX}const _={width:F.width-(P?B:0),height:F.height-(T?B:0)},C={viewportOuterSize:F,viewportInnerSize:_,hasScrollX:T,hasScrollY:P,scrollBarSize:B},S=i.current;i.current=C,(C.viewportInnerSize.width!==(S==null?void 0:S.viewportInnerSize.width)||C.viewportInnerSize.height!==(S==null?void 0:S.viewportInnerSize.height))&&e.current.publishEvent("viewportInnerSizeChange",C.viewportInnerSize)},[e,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,l]),[f,d]=A.useState(),h=A.useMemo(()=>ap(d,60),[]),p=A.useRef();en(()=>{f&&(u(),e.current.publishEvent("debouncedResize",o.current))},[e,f,u]);const g=A.useCallback(()=>{e.current.computeSizeAndPublishResizeEvent()},[e]),m=A.useCallback(()=>i.current,[]),v=A.useCallback(()=>{const O=e.current.getRootDimensions();if(!O)return 0;const D=yE(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const U=e.current.getRenderContext(),B=U.lastRowIndex-U.firstRowIndex;return Math.min(B-1,D.rows.length)}const N=Math.floor(O.viewportInnerSize.height/c);return Math.min(N,D.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,c]),y=A.useCallback(()=>{var O,D,N;const U=(O=e.current.mainElementRef)==null?void 0:O.current;if(!U)return;const F=Gs(U).getComputedStyle(U),T=parseFloat(F.height)||0,P=parseFloat(F.width)||0,_=T!==((D=p.current)==null?void 0:D.height),C=P!==((N=p.current)==null?void 0:N.width);if(!p.current||_||C){const S={width:P,height:T};e.current.publishEvent("resize",S),p.current=S}},[e]),b={resize:g,getRootDimensions:m},w={getViewportPageSize:v,updateGridDimensionsRef:u,computeSizeAndPublishResizeEvent:y};jr(e,b,"public"),jr(e,w,"private");const E=A.useRef(!0),I=A.useCallback(O=>{o.current=O;const D=/jsdom/.test(window.navigator.userAgent);if(O.height===0&&!n.current&&!t.autoHeight&&!D&&(r.error(["The parent DOM element of the data grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
`)),n.current=!0),O.width===0&&!n.current&&!D&&(r.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
`)),n.current=!0),E.current){d(O),E.current=!1;return}h(O)},[t.autoHeight,h,r]);en(()=>u(),[u]),Gn(e,"sortedRowsSet",u),Gn(e,"paginationModelChange",u),Gn(e,"columnsChange",u),Xt(e,"resize",I),Gn(e,"debouncedResize",t.onResize)}const Cze=["style"],Sze=["style"];function hv(e,t,r=0,n=t.length){if(t.length<=0)return-1;if(r>=n)return r;const o=r+Math.floor((n-r)/2),i=t[o];return e<=i?hv(e,t,r,o):hv(e,t,o+1,n)}function _ze(e,t,r){let n=1;for(;r<t.length&&Math.abs(t[r])<e;)r+=n,n*=2;return hv(e,t,Math.floor(r/2),Math.min(r,t.length))}const Fd=({firstIndex:e,lastIndex:t,buffer:r,minFirstIndex:n,maxLastIndex:o})=>[uf(e-r,n,o),uf(t+r,n,o)],Hee=(e,t)=>e===t?!0:e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,kze={maxSize:3},Eze=e=>{var t,r;const n=lu(),o=dr(),i=$t(n,Mi),a=$t(n,f$e),s=$t(n,i8),{ref:c,onRenderZonePositioning:l,renderZoneMinColumnIndex:u=0,renderZoneMaxColumnIndex:f=i.length,getRowProps:d}=e,h=An(),p=$t(n,Wm),g=$t(n,K2),m=$t(n,ll),v=$t(n,hE),y=$t(n,Gm),b=$t(n,vE),w=Sf(n,o),E=A.useRef(null),I=A.useRef(null),O=Ur(c,I),[D,N]=A.useState(null),U=A.useRef(D),B=A.useRef({top:0,left:0}),[F,T]=A.useState({width:null,height:null}),P=A.useRef(g),[_,C]=A.useState(null),S=A.useRef(Object.create(null)),x=A.useRef(),k=A.useRef(),L=A.useRef(XI((ce,ne,he,oe,le,de)=>{let ve;const we=ce.slice(ne,he);return de>-1&&(ne>de&&de>=oe||he<de&&de<le)&&(ve=de),{focusedCellColumnIndexNotInRange:ve,renderedColumns:we}},kze)),j=A.useMemo(()=>m!==null?i.findIndex(ce=>ce.field===m.field):-1,[m,i]),z=A.useCallback(ce=>{var ne,he;const oe=n.current.getLastMeasuredRowIndex();let le=oe===1/0;(ne=w.range)!=null&&ne.lastRowIndex&&!le&&(le=oe>=w.range.lastRowIndex);const de=uf(oe-(((he=w.range)==null?void 0:he.firstRowIndex)||0),0,y.positions.length);return le||y.positions[de]>=ce?hv(ce,y.positions):_ze(ce,y.positions,de)},[n,(t=w.range)==null?void 0:t.firstRowIndex,(r=w.range)==null?void 0:r.lastRowIndex,y.positions]),Y=A.useCallback(()=>{if(!a)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:i.length};const{top:ce,left:ne}=B.current,he=Math.min(z(ce),y.positions.length-1),oe=o.autoHeight?he+w.rows.length:z(ce+F.height);let le=0,de=p.length;if(s){let ve=!1;const[we,ie]=Fd({firstIndex:he,lastIndex:oe,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});for(let ge=we;ge<ie&&!ve;ge+=1){const Pe=w.rows[ge];ve=n.current.rowHasAutoHeight(Pe.id)}ve||(le=hv(Math.abs(ne),p),de=hv(Math.abs(ne)+F.width,p))}return{firstRowIndex:he,lastRowIndex:oe,firstColumnIndex:le,lastColumnIndex:de}},[a,s,z,y.positions.length,o.autoHeight,o.rowBuffer,w.rows,p,i.length,n,F]);en(()=>{a?(I.current.scrollLeft=0,I.current.scrollTop=0):E.current.style.transform="translate3d(0px, 0px, 0px)"},[a]),en(()=>{T({width:I.current.clientWidth,height:I.current.clientHeight})},[y.currentPageTotalHeight]);const K=A.useCallback(()=>{I.current&&T({width:I.current.clientWidth,height:I.current.clientHeight})},[]);Xt(n,"debouncedResize",K);const Q=A.useCallback(ce=>{const[ne,he]=Fd({firstIndex:ce.firstRowIndex,lastIndex:ce.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer}),[oe]=Fd({firstIndex:ce.firstColumnIndex,lastIndex:ce.lastColumnIndex,minFirstIndex:u,maxLastIndex:f,buffer:o.columnBuffer}),le=c5({firstColumnToRender:oe,apiRef:n,firstRowToRender:ne,lastRowToRender:he,visibleRows:w.rows}),de=h.direction==="ltr"?1:-1,ve=Gm(n.current.state).positions[ne],we=de*Wm(n)[le];E.current.style.transform=`translate3d(${we}px, ${ve}px, 0px)`,typeof l=="function"&&l({top:ve,left:we})},[n,w.rows,l,u,f,o.columnBuffer,o.rowBuffer,h.direction]),q=A.useCallback(()=>U.current,[]),J=A.useCallback(ce=>{if(U.current&&Hee(ce,U.current)){Q(ce);return}N(ce),Q(ce);const[ne,he]=Fd({firstIndex:ce.firstRowIndex,lastIndex:ce.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});n.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:ne,lastRowToRender:he}),U.current=ce},[n,N,U,w.rows.length,o.rowBuffer,Q]);en(()=>{if(F.width==null)return;const ce=Y();J(ce);const{top:ne,left:he}=B.current,oe={top:ne,left:he,renderContext:ce};n.current.publishEvent("scrollPositionChange",oe)},[n,Y,F.width,J]);const G=Mt(ce=>{const{scrollTop:ne,scrollLeft:he}=ce.currentTarget;if(B.current.top=ne,B.current.left=he,!U.current||ne<0||h.direction==="ltr"&&he<0||h.direction==="rtl"&&he>0)return;const oe=a?Y():U.current,le=Math.abs(oe.firstRowIndex-U.current.firstRowIndex),de=Math.abs(oe.lastRowIndex-U.current.lastRowIndex),ve=Math.abs(oe.firstColumnIndex-U.current.firstColumnIndex),we=Math.abs(oe.lastColumnIndex-U.current.lastColumnIndex),ie=le>=o.rowThreshold||de>=o.rowThreshold||ve>=o.columnThreshold||we>=o.columnThreshold||P.current!==g;n.current.publishEvent("scrollPositionChange",{top:ne,left:he,renderContext:ie?oe:U.current},ce),ie&&(ip.flushSync(()=>{J(oe)}),P.current=g)}),V=Mt(ce=>{n.current.publishEvent("virtualScrollerWheel",{},ce)}),X=Mt(ce=>{n.current.publishEvent("virtualScrollerTouchMove",{},ce)}),te=A.useMemo(()=>m!==null?w.rows.findIndex(ce=>ce.id===m.id):-1,[m,w.rows]);Xt(n,"rowMouseOver",(ce,ne)=>{var he;ne.currentTarget.contains(ne.relatedTarget)||C((he=ce.id)!=null?he:null)}),Xt(n,"rowMouseOut",(ce,ne)=>{ne.currentTarget.contains(ne.relatedTarget)||C(null)});const ee=(ce={renderContext:D})=>{var ne;const{onRowRender:he,renderContext:oe,minFirstColumn:le=u,maxLastColumn:de=f,availableSpace:ve=F.width,rowIndexOffset:we=0,position:ie="center"}=ce;if(!oe||ve==null)return null;const ge=a?o.rowBuffer:0,Pe=a?o.columnBuffer:0,[Fe,Ie]=Fd({firstIndex:oe.firstRowIndex,lastIndex:oe.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:ge}),Oe=[];if(ce.rows)ce.rows.forEach(st=>{Oe.push(st),n.current.calculateColSpan({rowId:st.id,minFirstColumn:le,maxLastColumn:de,columns:i})});else{if(!w.range)return null;for(let st=Fe;st<Ie;st+=1){const mt=w.rows[st];Oe.push(mt),n.current.calculateColSpan({rowId:mt.id,minFirstColumn:le,maxLastColumn:de,columns:i})}}let $e=!1;if(te>-1){const st=w.rows[te];(Fe>te||Ie<te)&&($e=!0,te>Fe?Oe.push(st):Oe.unshift(st),n.current.calculateColSpan({rowId:st.id,minFirstColumn:le,maxLastColumn:de,columns:i}))}const[et,Ze]=Fd({firstIndex:oe.firstColumnIndex,lastIndex:oe.lastColumnIndex,minFirstIndex:le,maxLastIndex:de,buffer:Pe}),Ne=c5({firstColumnToRender:et,apiRef:n,firstRowToRender:Fe,lastRowToRender:Ie,visibleRows:w.rows});let Qe=!1;(Ne>j||Ze<j)&&(Qe=!0);const{focusedCellColumnIndexNotInRange:Xe,renderedColumns:rt}=L.current(i,Ne,Ze,le,de,Qe?j:-1),ht=((ne=o.slotProps)==null?void 0:ne.row)||{},{style:At}=ht,Qt=ze(ht,Cze);(x.current!==d||k.current!==At)&&(S.current=Object.create(null));const Ue=[];let Ye=!1;for(let st=0;st<Oe.length;st+=1){var tt;const{id:mt,model:_t}=Oe[st],Pt=$e&&m.id===mt,Ut=$e?Fe+st===w.rows.length:Fe+st===w.rows.length-1,wt=n.current.rowHasAutoHeight(mt)?"auto":n.current.unstable_getRowHeight(mt);let Dt;b[mt]==null?Dt=!1:Dt=n.current.isRowSelectable(mt),he&&he(mt);const qt=m!==null&&m.id===mt?m.field:null,Tt=Xe!==void 0&&i[Xe],Me=Tt&&qt?[Tt,...rt]:rt;let Ge=null;v!==null&&v.id===mt&&(Ge=n.current.getCellParams(mt,v.field).cellMode==="view"?v.field:null);const nt=typeof d=="function"&&d(mt,_t)||{},{style:fe}=nt,ke=ze(nt,Sze);if(!S.current[mt]){const Ce=W({},fe,At);S.current[mt]=Ce}let be=we+((w==null||(tt=w.range)==null?void 0:tt.firstRowIndex)||0)+Fe+st;$e&&(m==null?void 0:m.id)===mt?(be=te,Ye=!0):Ye&&(be-=1),Ue.push(R(o.slots.row,W({row:_t,rowId:mt,focusedCellColumnIndexNotInRange:Xe,isNotVisible:Pt,rowHeight:wt,focusedCell:qt,tabbableCell:Ge,renderedColumns:Me,visibleColumns:i,firstColumnToRender:Ne,lastColumnToRender:Ze,selected:Dt,index:be,containerWidth:ve,isLastVisible:Ut,position:ie},ke,Qt,{hovered:_===mt,style:S.current[mt]}),mt))}return x.current=d,k.current=At,Ue},re=F.width&&g>=F.width,se=A.useMemo(()=>{const ce=Math.max(y.currentPageTotalHeight,1);let ne=!1;I!=null&&I.current&&ce<=(I==null?void 0:I.current.clientHeight)&&(ne=!0);const he={width:re?g:"auto",height:ce,minHeight:ne?"100%":"auto"};return o.autoHeight&&w.rows.length===0&&(he.height=KJ(n,o.rowHeight)),he},[n,I,g,y.currentPageTotalHeight,re,o.autoHeight,o.rowHeight,w.rows.length]);A.useEffect(()=>{n.current.publishEvent("virtualScrollerContentSizeChange")},[n,se]);const pe=A.useMemo(()=>{const ce={};return re||(ce.overflowX="hidden"),o.autoHeight&&(ce.overflowY="hidden"),ce},[re,o.autoHeight]);return n.current.register("private",{getRenderContext:q}),{renderContext:D,updateRenderZonePosition:Q,getRows:ee,getRootProps:(ce={})=>W({ref:O,onScroll:G,onWheel:V,onTouchMove:X},ce,{style:ce.style?W({},ce.style,pe):pe,role:"presentation"}),getContentProps:({style:ce}={})=>({style:ce?W({},ce,se):se,role:"presentation"}),getRenderZoneProps:()=>({ref:E,role:"rowgroup"})}},Tze=e=>{const{classes:t,headerAlign:r,isDragging:n,showColumnBorder:o,groupId:i}=e;return pt({root:["columnHeader",r==="left"&&"columnHeader--alignLeft",r==="center"&&"columnHeader--alignCenter",r==="right"&&"columnHeader--alignRight",n&&"columnHeader--moving",o&&"columnHeader--showColumnBorder",o&&"columnHeader--withRightBorder","withBorderColor",i===null?"columnHeader--emptyGroup":"columnHeader--filledGroup"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},Rr,t)};function Ize(e){var t;const{groupId:r,width:n,depth:o,maxDepth:i,fields:a,height:s,colIndex:c,hasFocus:l,tabIndex:u,isLastColumn:f}=e,d=dr(),h=A.useRef(null),p=Gr(),g=$t(p,FJ),m=r?g[r]:{},{headerName:v=r??"",description:y="",headerAlign:b=void 0}=m;let w;const E=r&&((t=g[r])==null?void 0:t.renderHeaderGroup),I=A.useMemo(()=>({groupId:r,headerName:v,description:y,depth:o,maxDepth:i,fields:a,colIndex:c,isLastColumn:f}),[r,v,y,o,i,a,c,f]);r&&E&&(w=E(I));const O=d.showColumnVerticalBorder,D=W({},e,{classes:d.classes,showColumnBorder:O,headerAlign:b,depth:o,isDragging:!1}),N=v??r,U=dn(),B=r===null?`empty-group-cell-${U}`:r,F=Tze(D);A.useLayoutEffect(()=>{if(l){const S=h.current.querySelector('[tabindex="0"]')||h.current;S==null||S.focus()}},[p,l]);const T=A.useCallback(C=>S=>{Q1(S)||p.current.publishEvent(C,I,S)},[p,I]),P=A.useMemo(()=>({onKeyDown:T("columnGroupHeaderKeyDown"),onFocus:T("columnGroupHeaderFocus"),onBlur:T("columnGroupHeaderBlur")}),[T]),_=typeof m.headerClassName=="function"?m.headerClassName(I):m.headerClassName;return R(nee,W({ref:h,classes:F,columnMenuOpen:!1,colIndex:c,height:s,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:u,isDraggable:!1,headerComponent:w,headerClassName:_,description:y,elementId:B,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:N,"aria-colspan":a.length,"data-fields":`|-${a.join("-|-")}-|`},P))}const fz=We("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})(()=>({display:"flex"}));function Aze(e){return!!e.target}const zee=e=>{const{innerRef:t,minColumnIndex:r=0,visibleColumns:n,sortColumnLookup:o,filterColumnLookup:i,columnPositions:a,columnHeaderTabIndexState:s,columnGroupHeaderTabIndexState:c,columnHeaderFocus:l,columnGroupHeaderFocus:u,densityFactor:f,headerGroupingMaxDepth:d,columnMenuState:h,columnVisibility:p,columnGroupsHeaderStructure:g,hasOtherElementInTabSequence:m}=e,v=An(),[y,b]=A.useState(""),[w,E]=A.useState(""),I=lu(),O=$t(I,i8),D=dr(),N=A.useRef(null),U=Ur(t,N),[B,F]=A.useState(null),T=A.useRef(B),P=A.useRef(0),_=Sf(I,D),C=J2(I,D.columnHeaderHeight),S=Math.floor(D.columnHeaderHeight*f),x=A.useCallback(X=>{B&&X&&Hee(B,X)||F(X)},[B]);A.useEffect(()=>{I.current.columnHeadersContainerElementRef.current.scrollLeft=0},[I]);const k=A.useRef(XI(kHe,{equalityCheck:(X,te)=>["firstColumnIndex","minColumnIndex","columnBuffer"].every(ee=>X[ee]===te[ee])})),L=A.useCallback(X=>{const[te,ee]=Fd({firstIndex:X.firstRowIndex,lastIndex:X.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:D.rowBuffer}),re=k.current({firstColumnIndex:X.firstColumnIndex,minColumnIndex:r,columnBuffer:D.columnBuffer,firstRowToRender:te,lastRowToRender:ee,apiRef:I,visibleRows:_.rows}),se=v.direction==="ltr"?1:-1,pe=re>0?P.current-se*a[re]:P.current;N.current.style.transform=`translate3d(${-pe}px, 0px, 0px)`},[a,r,D.columnBuffer,I,_.rows,D.rowBuffer,v.direction]);A.useLayoutEffect(()=>{B&&L(B)},[B,L]);const j=A.useCallback(({left:X,renderContext:te=null},ee)=>{var re,se;if(!N.current||P.current===X&&((re=T.current)==null?void 0:re.firstColumnIndex)===(te==null?void 0:te.firstColumnIndex)&&((se=T.current)==null?void 0:se.lastColumnIndex)===(te==null?void 0:te.lastColumnIndex))return;P.current=X;let pe=!1;te!==T.current||!T.current?(Aze(ee)?(ip.flushSync(()=>{x(te)}),pe=!0):x(te),T.current=te):pe=!0,te&&pe&&L(te)},[L,x]),z=A.useCallback(X=>E(X.field),[]),Y=A.useCallback(()=>E(""),[]),K=A.useCallback(X=>b(X.field),[]),Q=A.useCallback(()=>b(""),[]);Xt(I,"columnResizeStart",z),Xt(I,"columnResizeStop",Y),Xt(I,"columnHeaderDragStart",K),Xt(I,"columnHeaderDragEnd",Q),Xt(I,"scrollPositionChange",j);const q=X=>{const{renderContext:te=B,minFirstColumn:ee=r,maxLastColumn:re=n.length}=X||{};if(!te)return null;const[se,pe]=Fd({firstIndex:te.firstRowIndex,lastIndex:te.lastRowIndex,minFirstIndex:0,maxLastIndex:_.rows.length,buffer:D.rowBuffer}),ce=O?k.current({firstColumnIndex:te.firstColumnIndex,minColumnIndex:ee,columnBuffer:D.columnBuffer,apiRef:I,firstRowToRender:se,lastRowToRender:pe,visibleRows:_.rows}):0,ne=O?Math.min(te.lastColumnIndex+D.columnBuffer,re):re;return{renderedColumns:n.slice(ce,ne),firstColumnToRender:ce,lastColumnToRender:ne,minFirstColumn:ee,maxLastColumn:re}},J=(X,te={})=>{const ee=q(X);if(ee==null)return null;const{renderedColumns:re,firstColumnToRender:se}=ee,pe=[];for(let ce=0;ce<re.length;ce+=1){const ne=re[ce],he=se+ce,oe=he===0,le=s!==null&&s.field===ne.field||oe&&!m?0:-1,de=l!==null&&l.field===ne.field,ve=h.open&&h.field===ne.field;pe.push(R($Le,W({},o[ne.field],{columnMenuOpen:ve,filterItemsCounter:i[ne.field]&&i[ne.field].length,headerHeight:S,isDragging:ne.field===y,colDef:ne,colIndex:he,isResizing:w===ne.field,hasFocus:de,tabIndex:le},te),ne.field))}return R(fz,{role:"row","aria-rowindex":d+1,ownerState:D,children:pe})},G=X=>{if(d===0)return null;const te=q(X);if(te==null||te.renderedColumns.length===0)return null;const{firstColumnToRender:ee,lastColumnToRender:re}=te,se=[],pe=[];for(let he=0;he<d;he+=1){var ce,ne;const oe=g[he],le=n[ee].field,de=(ce=I.current.unstable_getColumnGroupPath(le)[he])!=null?ce:null,ve=oe.findIndex(({groupId:Ze,columnFields:Ne})=>Ze===de&&Ne.includes(le)),we=n[re-1].field,ie=(ne=I.current.unstable_getColumnGroupPath(we)[he])!=null?ne:null,ge=oe.findIndex(({groupId:Ze,columnFields:Ne})=>Ze===ie&&Ne.includes(we)),Pe=oe.slice(ve,ge+1).map(Ze=>W({},Ze,{columnFields:Ze.columnFields.filter(Ne=>p[Ne]!==!1)})).filter(Ze=>Ze.columnFields.length>0),Fe=Pe[0].columnFields.indexOf(le),Oe=Pe[0].columnFields.slice(0,Fe).reduce((Ze,Ne)=>{var Qe;const Xe=I.current.getColumn(Ne);return Ze+((Qe=Xe.computedWidth)!=null?Qe:0)},0);let $e=ee;const et=Pe.map(({groupId:Ze,columnFields:Ne})=>{const Qe=u!==null&&u.depth===he&&Ne.includes(u.field),Xe=c!==null&&c.depth===he&&Ne.includes(c.field)?0:-1,rt={groupId:Ze,width:Ne.reduce((ht,At)=>ht+I.current.getColumn(At).computedWidth,0),fields:Ne,colIndex:$e,hasFocus:Qe,tabIndex:Xe};return $e+=Ne.length,rt});pe.push({leftOverflow:Oe,elements:et})}return pe.forEach((he,oe)=>{se.push(R(fz,{style:{height:`${S}px`,transform:`translateX(-${he.leftOverflow}px)`},role:"row","aria-rowindex":oe+1,ownerState:D,children:he.elements.map(({groupId:le,width:de,fields:ve,colIndex:we,hasFocus:ie,tabIndex:ge},Pe)=>R(Ize,{groupId:le,width:de,fields:ve,colIndex:we,depth:oe,isLastColumn:we===n.length-ve.length,maxDepth:pe.length,height:S,hasFocus:ie,tabIndex:ge},Pe))},oe))}),se},V={minHeight:C,maxHeight:C,lineHeight:`${S}px`};return{renderContext:B,getColumnHeaders:J,getColumnsToRender:q,getColumnGroupHeaders:G,isDragging:!!y,getRootProps:(X={})=>W({style:V},X),getInnerProps:()=>({ref:U,role:"rowgroup"}),headerHeight:S}},Pze=["className"],Mze=e=>{const{classes:t}=e;return pt({root:["columnHeaders","withBorderColor"]},Rr,t)},Rze=Go("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({position:"relative",overflow:"hidden",display:"flex",alignItems:"center",boxSizing:"border-box",borderBottom:"1px solid",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),jee=A.forwardRef(function(t,r){const{className:n}=t,o=ze(t,Pze),i=dr(),a=Mze(i);return R(Rze,W({ref:r,className:it(n,a.root),ownerState:i},o,{role:"presentation"}))}),Oze=["isDragging","className"],Dze=e=>{const{isDragging:t,hasScrollX:r,classes:n}=e;return pt({root:["columnHeadersInner",t&&"columnHeaderDropZone",r&&"columnHeadersInner--scrollable"]},Rr,n)},Fze=Go("div",{name:"MuiDataGrid",slot:"columnHeadersInner",overridesResolver:(e,t)=>[{[`&.${qe.columnHeaderDropZone}`]:t.columnHeaderDropZone},t.columnHeadersInner]})(()=>({display:"flex",alignItems:"flex-start",flexDirection:"column",[`&.${qe.columnHeaderDropZone} .${qe.columnHeaderDraggableContainer}`]:{cursor:"move"},[`&.${qe["columnHeadersInner--scrollable"]} .${qe.columnHeader}:last-child`]:{borderRight:"none"}})),Vee=A.forwardRef(function(t,r){var n,o;const{isDragging:i,className:a}=t,s=ze(t,Oze),c=Gr(),l=dr(),u=W({},l,{isDragging:i,hasScrollX:(n=(o=c.current.getRootDimensions())==null?void 0:o.hasScrollX)!=null?n:!1}),f=Dze(u);return R(Fze,W({ref:r,className:it(a,f.root),ownerState:u},s))}),Nze=["innerRef","className","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],Lze=A.forwardRef(function(t,r){const{innerRef:n,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:s,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:l,columnHeaderFocus:u,columnGroupHeaderFocus:f,densityFactor:d,headerGroupingMaxDepth:h,columnMenuState:p,columnVisibility:g,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:v}=t,y=ze(t,Nze),{isDragging:b,getRootProps:w,getInnerProps:E,getColumnHeaders:I,getColumnGroupHeaders:O}=zee({innerRef:n,visibleColumns:o,sortColumnLookup:i,filterColumnLookup:a,columnPositions:s,columnHeaderTabIndexState:c,columnGroupHeaderTabIndexState:l,columnHeaderFocus:u,columnGroupHeaderFocus:f,densityFactor:d,headerGroupingMaxDepth:h,columnMenuState:p,columnVisibility:g,columnGroupsHeaderStructure:m,hasOtherElementInTabSequence:v});return R(jee,W({ref:r},w(y),{children:xe(Vee,W({isDragging:b},E(),{children:[O(),I()]}))}))}),$ze=n4(Lze),Bze=A.forwardRef(function(t,r){const o=Gr().current.getLocaleText("noResultsOverlayLabel");return R(JD,W({ref:r},t,{children:o}))}),Uze=["sortingOrder"],Hze=A.memo(function(t){const{sortingOrder:r}=t,n=ze(t,Uze),o=dr(),[i]=r,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?R(a,W({},n)):null}),zze=["native"];function jze(e){let{native:t}=e,r=ze(e,zze);return t?R("option",W({},r)):R(go,W({},r))}const Vze={BooleanCellTrueIcon:O$e,BooleanCellFalseIcon:rP,ColumnMenuIcon:A$e,OpenFilterButtonIcon:C$e,FilterPanelDeleteIcon:rP,ColumnFilteredIcon:GH,ColumnSelectorIcon:_$e,ColumnUnsortedIcon:Hze,ColumnSortedAscendingIcon:zH,ColumnSortedDescendingIcon:jH,ColumnResizeIcon:k$e,DensityCompactIcon:E$e,DensityStandardIcon:T$e,DensityComfortableIcon:I$e,ExportIcon:R$e,MoreActionsIcon:D$e,TreeDataCollapseIcon:WH,TreeDataExpandIcon:VH,GroupingCriteriaCollapseIcon:WH,GroupingCriteriaExpandIcon:VH,DetailPanelExpandIcon:qH,DetailPanelCollapseIcon:P$e,RowReorderIcon:KH,QuickFilterIcon:S$e,QuickFilterClearIcon:rP,ColumnMenuHideIcon:F$e,ColumnMenuSortAscendingIcon:zH,ColumnMenuSortDescendingIcon:jH,ColumnMenuFilterIcon:GH,ColumnMenuManageColumnsIcon:N$e,ColumnMenuClearIcon:L$e,LoadIcon:M$e,FilterPanelAddIcon:qH,FilterPanelRemoveAllIcon:$$e,ColumnReorderIcon:KH},Wze=W({},Vze,{BaseCheckbox:Tl,BaseTextField:Xa,BaseFormControl:N2,BaseSelect:L2,BaseSwitch:ENe,BaseButton:Ft,BaseIconButton:ri,BaseInputAdornment:c1,BaseTooltip:HD,BasePopper:bf,BaseInputLabel:F2,BaseSelectOption:jze,BaseChip:bo}),Gze=Wze,Wee=W({},Gze,{Cell:e5,SkeletonCell:tLe,ColumnHeaderFilterIconButton:p$e,ColumnMenu:X$e,ColumnHeaders:$ze,Footer:fUe,FooterRowCount:xUe,Toolbar:null,PreferencesPanel:_Be,LoadingOverlay:pUe,NoResultsOverlay:Bze,NoRowsOverlay:mUe,Pagination:vUe,FilterPanel:WBe,ColumnsPanel:yBe,Panel:SBe,Row:BUe}),f8=e=>{if(e!==void 0)return Object.keys(e).reduce((t,r)=>W({},t,{[`${r.charAt(0).toLowerCase()}${r.slice(1)}`]:e[r]}),{})};function qze({defaultSlots:e,slots:t,components:r}){const n=t??(r?f8(r):null);if(!n||Object.keys(n).length===0)return e;const o=W({},e);return Object.keys(n).forEach(i=>{const a=i;n[a]!==void 0&&(o[a]=n[a])}),o}const Kze=["components","componentsProps"];function Yze(e){var t;const r=Object.keys(e);if(!r.some(i=>i.startsWith("aria-")||i.startsWith("data-")))return e;const n={},o=(t=e.forwardedProps)!=null?t:{};for(let i=0;i<r.length;i+=1){const a=r[i];a.startsWith("aria-")||a.startsWith("data-")?o[a]=e[a]:n[a]=e[a]}return n.forwardedProps=o,n}function Xze(e){return A.useMemo(()=>{const{components:t,componentsProps:r}=e,n=ze(e,Kze);return[t,r,Yze(n)]},[e])}const Gee={autoHeight:!1,autoPageSize:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,columnBuffer:3,rowBuffer:3,columnThreshold:3,rowThreshold:3,rowSelection:!0,density:"standard",disableColumnFilter:!1,disableColumnMenu:!1,disableColumnSelector:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleRowSelection:!1,disableMultipleColumnsSorting:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:nd.Cell,filterMode:"client",filterDebounceMs:150,columnHeaderHeight:56,hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,logger:console,logLevel:"error",pagination:!1,paginationMode:"client",rowHeight:52,pageSizeOptions:[25,50,100],rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingOrder:["asc","desc",null],sortingMode:"client",throttleRowsMs:0,disableColumnReorder:!1,disableColumnResize:!1,keepNonExistentRowsSelected:!1,keepColumnPositionIfDraggedOutside:!1,unstable_ignoreValueFormatterDuringExport:!1,clipboardCopyCellDelimiter:"	",rowPositionsDebounceMs:166};f8(Wee);const Qze=e=>W({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}}),hz=(e,t,r)=>typeof e=="number"&&e>0?e:t,Zze=(e,t)=>{const{getRowHeight:r,getRowSpacing:n,getEstimatedRowHeight:o}=t,i=A.useRef(Object.create(null)),a=A.useRef(-1),s=A.useRef(!1),c=$t(e,h0),l=$t(e,Bi),u=$t(e,uee),f=$t(e,us),d=Sf(e,t),h=$t(e,f0),p=hz(t.rowHeight,Gee.rowHeight),g=Math.floor(p*c),m=A.useCallback(()=>{var F,T;s.current=!1;const P=S=>{i.current[S.id]||(i.current[S.id]={sizes:{baseCenter:g},isResized:!1,autoHeight:!1,needsFirstMeasurement:!0});const{isResized:x,needsFirstMeasurement:k,sizes:L}=i.current[S.id];let j=typeof g=="number"&&g>0?g:52;const z=L.baseCenter;if(x)j=z;else if(r){const J=r(W({},S,{densityFactor:c}));if(J==="auto"){if(k){const G=o?o(W({},S,{densityFactor:c})):g;j=G??g}else j=z;s.current=!0,i.current[S.id].autoHeight=!0}else j=hz(J,g),i.current[S.id].needsFirstMeasurement=!1,i.current[S.id].autoHeight=!1}else i.current[S.id].needsFirstMeasurement=!1;const Y={};for(const J in L)/^base[A-Z]/.test(J)&&(Y[J]=L[J]);if(Y.baseCenter=j,n){var K,Q;const J=e.current.getRowIndexRelativeToVisibleRows(S.id),G=n(W({},S,{isFirstVisible:J===0,isLastVisible:J===d.rows.length-1,indexRelativeToCurrentPage:J}));Y.spacingTop=(K=G.top)!=null?K:0,Y.spacingBottom=(Q=G.bottom)!=null?Q:0}const q=e.current.unstable_applyPipeProcessors("rowHeight",Y,S);return i.current[S.id].sizes=q,q},_=[],C=d.rows.reduce((S,x)=>{_.push(S);let k=0,L=0;const j=P(x);for(const z in j){const Y=j[z];/^base[A-Z]/.test(z)?k=Y>k?Y:k:L+=Y}return S+k+L},0);h==null||(F=h.top)==null||F.forEach(S=>{P(S)}),h==null||(T=h.bottom)==null||T.forEach(S=>{P(S)}),e.current.setState(S=>W({},S,{rowsMeta:{currentPageTotalHeight:C,positions:_}})),s.current||(a.current=1/0),e.current.forceUpdate()},[e,d.rows,g,r,n,o,h,c]),v=A.useCallback(F=>{const T=i.current[F];return T?T.sizes.baseCenter:g},[g]),y=F=>{var T;return(T=i.current[F])==null?void 0:T.sizes},b=A.useCallback((F,T)=>{i.current[F].sizes.baseCenter=T,i.current[F].isResized=!0,i.current[F].needsFirstMeasurement=!1,m()},[m]),w=A.useMemo(()=>ap(m,t.rowPositionsDebounceMs),[m,t.rowPositionsDebounceMs]),E=A.useCallback((F,T,P)=>{if(!i.current[F]||!i.current[F].autoHeight)return;const _=i.current[F].sizes[`base${ut(P)}`]!==T;i.current[F].needsFirstMeasurement=!1,i.current[F].sizes[`base${ut(P)}`]=T,_&&w()},[w]),I=A.useCallback(F=>{var T;return((T=i.current[F])==null?void 0:T.autoHeight)||!1},[]),O=A.useCallback(()=>a.current,[]),D=A.useCallback(F=>{s.current&&F>a.current&&(a.current=F)},[]),N=A.useCallback(()=>{i.current={},m()},[m]);A.useEffect(()=>{m()},[g,l,u,f,m]),d8(e,"rowHeight",m);const U={unstable_setLastMeasuredRowIndex:D,unstable_getRowHeight:v,unstable_getRowInternalSizes:y,unstable_setRowHeight:b,unstable_storeRowHeightMeasurement:E,resetRowHeights:N},B={getLastMeasuredRowIndex:O,rowHasAutoHeight:I};jr(e,U,"public"),jr(e,B,"private")},Jze=e=>{const t=A.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),r=A.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);jr(e,{exportState:t,restoreState:r},"public")},eje=e=>{const t=A.useRef({}),r=A.useCallback((l,u,f)=>{const d=t.current;d[l]||(d[l]={}),d[l][u]=f},[]),n=A.useCallback((l,u)=>{var f;return(f=t.current[l])==null?void 0:f[u]},[]),o=A.useCallback(l=>{const{columnIndex:u,rowId:f,minFirstColumnIndex:d,maxLastColumnIndex:h,columns:p}=l,g=p.length,m=p[u],v=typeof m.colSpan=="function"?m.colSpan(e.current.getCellParams(f,m.field)):m.colSpan;if(!v||v===1)return r(f,u,{spannedByColSpan:!1,cellProps:{colSpan:1,width:m.computedWidth}}),{colSpan:1};let y=m.computedWidth;for(let b=1;b<v;b+=1){const w=u+b;if(w>=d&&w<h){const E=p[w];y+=E.computedWidth,r(f,u+b,{spannedByColSpan:!0,rightVisibleCellIndex:Math.min(u+v,g-1),leftVisibleCellIndex:u})}r(f,u,{spannedByColSpan:!1,cellProps:{colSpan:v,width:y}})}return{colSpan:v}},[e,r]),i=A.useCallback(({rowId:l,minFirstColumn:u,maxLastColumn:f,columns:d})=>{for(let h=u;h<f;h+=1){const p=o({columnIndex:h,rowId:l,minFirstColumnIndex:u,maxLastColumnIndex:f,columns:d});p.colSpan>1&&(h+=p.colSpan-1)}},[o]),a={unstable_getCellColSpanInfo:n},s={calculateColSpan:i};jr(e,a,"public"),jr(e,s,"private");const c=A.useCallback(()=>{t.current={}},[]);Xt(e,"columnOrderChange",c)},qee=(e,t,r)=>{if(YJ(e)){if(r[e.field]!==void 0)throw new Error(["MUI: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${r[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(`
`));r[e.field]=t;return}const{groupId:n,children:o}=e;o.forEach(i=>{qee(i,[...t,n],r)})},u5=e=>{if(!e)return{};const t={};return e.forEach(r=>{qee(r,[],t)}),t},d5=(e,t,r)=>{const n=c=>{var l;return(l=t[c])!=null?l:[]},o=[],i=Math.max(...e.map(c=>n(c).length)),a=(c,l,u)=>zh(n(c).slice(0,u+1),n(l).slice(0,u+1)),s=(c,l)=>!!(r!=null&&r.left&&r.left.includes(c)&&!r.left.includes(l)||r!=null&&r.right&&!r.right.includes(c)&&r.right.includes(l));for(let c=0;c<i;c+=1){const l=e.reduce((u,f)=>{var d;const h=(d=n(f)[c])!=null?d:null;if(u.length===0)return[{columnFields:[f],groupId:h}];const p=u[u.length-1],g=p.columnFields[p.columnFields.length-1];return p.groupId!==h||!a(g,f,c)||s(g,f)?[...u,{columnFields:[f],groupId:h}]:[...u.slice(0,u.length-1),{columnFields:[...p.columnFields,f],groupId:h}]},[]);o.push(l)}return o},tje=["groupId","children"],h8=e=>{let t={};return e.forEach(r=>{if(YJ(r))return;const{groupId:n,children:o}=r,i=ze(r,tje);if(!n)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${n} has no children.`);const a=W({},i,{groupId:n}),s=h8(o);if(s[n]!==void 0||t[n]!==void 0)throw new Error(`MUI: The groupId ${n} is used multiple times in the columnGroupingModel.`);t=W({},t,s,{[n]:a})}),W({},t)},rje=(e,t,r)=>{var n,o,i,a;if(!((n=t.experimentalFeatures)!=null&&n.columnGrouping))return e;const s=tu(r),c=Xh(r),l=h8((o=t.columnGroupingModel)!=null?o:[]),u=u5((i=t.columnGroupingModel)!=null?i:[]),f=d5(s,u,(a=r.current.state.pinnedColumns)!=null?a:{}),d=c.length===0?0:Math.max(...c.map(h=>{var p,g;return(p=(g=u[h])==null?void 0:g.length)!=null?p:0}));return W({},e,{columnGrouping:{lookup:l,unwrappedGroupingModel:u,headerStructure:f,maxDepth:d}})},nje=(e,t)=>{var r;const n=A.useCallback(c=>{var l;return(l=I9e(e)[c])!=null?l:[]},[e]),o=A.useCallback(()=>FJ(e),[e]);jr(e,{unstable_getColumnGroupPath:n,unstable_getAllGroupDetails:o},"public");const a=A.useCallback(()=>{var c;const l=u5((c=t.columnGroupingModel)!=null?c:[]);e.current.setState(u=>{var f,d,h;const p=(f=(d=u.columns)==null?void 0:d.orderedFields)!=null?f:[],g=(h=u.pinnedColumns)!=null?h:{},m=d5(p,l,g);return W({},u,{columnGrouping:W({},u.columnGrouping,{headerStructure:m})})})},[e,t.columnGroupingModel]),s=A.useCallback(c=>{var l,u,f,d;if(!((l=t.experimentalFeatures)!=null&&l.columnGrouping))return;const h=(u=(f=(d=e.current).getPinnedColumns)==null?void 0:f.call(d))!=null?u:{},p=tu(e),g=Xh(e),m=h8(c??[]),v=u5(c??[]),y=d5(p,v,h),b=g.length===0?0:Math.max(...g.map(w=>{var E,I;return(E=(I=v[w])==null?void 0:I.length)!=null?E:0}));e.current.setState(w=>W({},w,{columnGrouping:{lookup:m,unwrappedGroupingModel:v,headerStructure:y,maxDepth:b}}))},[e,(r=t.experimentalFeatures)==null?void 0:r.columnGrouping]);Xt(e,"columnIndexChange",a),Xt(e,"columnsChange",()=>{s(t.columnGroupingModel)}),Xt(e,"columnVisibilityModelChange",()=>{s(t.columnGroupingModel)}),A.useEffect(()=>{s(t.columnGroupingModel)},[s,t.columnGroupingModel])},oje=e=>{const{classes:t}=e;return pt({root:["virtualScroller"]},Rr,t)},ije=Go("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),aje=A.forwardRef(function(t,r){const n=dr(),o=oje(n);return R(ije,W({ref:r},t,{className:it(o.root,t.className),ownerState:n}))}),sje=(e,t)=>{const{classes:r}=e;return pt({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},Rr,r)},lje=Go("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),cje=A.forwardRef(function(t,r){var n;const o=dr(),i=!o.autoHeight&&((n=t.style)==null?void 0:n.minHeight)==="auto",a=sje(o,i);return R(lje,W({ref:r},t,{ownerState:o,className:it(a.root,t.className)}))}),uje=["className"],dje=e=>{const{classes:t}=e;return pt({root:["virtualScrollerRenderZone"]},Rr,t)},fje=Go("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),hje=A.forwardRef(function(t,r){const{className:n}=t,o=ze(t,uje),i=dr(),a=dje(i);return R(fje,W({ref:r,className:it(a.root,n),ownerState:i},o))}),pje=e=>W({},e,{headerFiltering:{editing:null,menuOpen:null}}),mje=(e,t)=>{const r=Oi(e,"useGridHeaderFiltering"),n=A.useCallback(u=>{e.current.setState(f=>{var d,h;return t.signature==="DataGrid"?f:W({},f,{headerFiltering:{editing:(d=u.editing)!=null?d:null,menuOpen:(h=u.menuOpen)!=null?h:null}})}),e.current.forceUpdate()},[e,t.signature]),o=A.useCallback(u=>{r.debug(`Starting edit mode on header filter for field: ${u}`),e.current.setHeaderFilterState({editing:u})},[e,r]),i=A.useCallback(()=>{r.debug("Stopping edit mode on header filter"),e.current.setHeaderFilterState({editing:null})},[e,r]),a=A.useCallback(u=>{r.debug(`Opening header filter menu for field: ${u}`),e.current.setHeaderFilterState({menuOpen:u})},[e,r]),s=A.useCallback(()=>{r.debug("Hiding header filter menu for active field");let u=e.current.state.headerFiltering.menuOpen;if(u){const f=fp(e),d=ic(e),h=tu(e);if(f[u]||(u=h[0]),d[u]===!1){const p=h.filter(m=>m===u?!0:d[m]!==!1),g=p.indexOf(u);u=p[g+1]||p[g-1]}e.current.setHeaderFilterState({menuOpen:null}),e.current.setColumnHeaderFilterFocus(u)}},[e,r]),c={setHeaderFilterState:n};jr(e,{startHeaderFilterEditMode:o,stopHeaderFilterEditMode:i,showHeaderFilterMenu:a,hideHeaderFilterMenu:s},"public"),jr(e,c,"private")};function gje(){let e,t;const r=new Promise((n,o)=>{e=n,t=o});return r.resolve=e,r.reject=t,r}const vje=(e,t)=>{const r=$t(e,Mi),n=Sf(e,t),o=$t(e,Gm),i=Math.max(o.currentPageTotalHeight,1),a=A.useRef(!1),s=A.useCallback(l=>{const u=e.current.getRootDimensions();if(!u||t.rowsLoadingMode!=="client")return;const f=l.top+u.viewportOuterSize.height,d=e.current.getViewportPageSize();if(f<i-t.scrollEndThreshold&&(a.current=!1),f>=i-t.scrollEndThreshold&&!a.current){const h={visibleColumns:r,viewportPageSize:d,visibleRowsCount:n.rows.length};e.current.publishEvent("rowsScrollEnd",h),a.current=!0}},[i,t.scrollEndThreshold,t.rowsLoadingMode,r,e,n.rows.length]),c=A.useCallback(({left:l,top:u})=>{s({left:l,top:u})},[s]);Xt(e,"scrollPositionChange",c),Gn(e,"rowsScrollEnd",t.onRowsScrollEnd)},yje=e=>e.columnReorder,pz=Xr(yje,e=>e.dragCol),Kee="left",Yee="right",bje=(e,t)=>e.x<=t.x?Yee:Kee,wje=(e,t)=>e.x!==t.x||e.y!==t.y,xje=e=>{const{classes:t}=e;return pt({columnHeaderDragging:["columnHeader--dragging"]},Rr,t)},Cje=e=>W({},e,{columnReorder:{dragCol:""}}),Sje=(e,t)=>{const r=Oi(e,"useGridColumnReorder"),n=A.useRef(null),o=A.useRef({x:0,y:0}),i=A.useRef(null),a=A.useRef({}),s=A.useRef(),c={classes:t.classes},l=xje(c),u=An();A.useEffect(()=>()=>{clearTimeout(s.current)},[]);const f=A.useCallback((g,m)=>{if(t.disableColumnReorder||g.colDef.disableReorder)return;r.debug(`Start dragging col ${g.field}`),m.stopPropagation(),n.current=m.currentTarget,n.current.classList.add(l.columnHeaderDragging),m.dataTransfer&&(m.dataTransfer.effectAllowed="move"),e.current.setState(O=>W({},O,{columnReorder:W({},O.columnReorder,{dragCol:g.field})})),e.current.forceUpdate(),s.current=setTimeout(()=>{n.current.classList.remove(l.columnHeaderDragging)}),i.current=e.current.getColumnIndex(g.field,!1);const v=e.current.unstable_getColumnGroupPath(g.field),y=i.current,b=e.current.getAllColumns(),w=e.current.unstable_getAllGroupDetails(),E=O=>{const D=b[O].field;return e.current.unstable_getColumnGroupPath(D)};let I=null;v.forEach(O=>{var D;(D=w[O])!=null&&D.freeReordering||(y>0&&E(y-1).includes(O)||y+1<b.length&&E(y+1).includes(O))&&(I=O)}),a.current={};for(let O=0;O<b.length;O+=1){const D=O<=y?O-1:O,N=O<y?O:O+1;if(I!==null){let U=!1;(D>=0&&E(D).includes(I)||N<b.length&&E(N).includes(I))&&(U=!0),U||(a.current[O]=!0)}D>=0&&N<b.length&&E(N).forEach(U=>{if(E(D).includes(U)&&!v.includes(U)){var B;(B=w[U])!=null&&B.freeReordering||(a.current[O]=!0)}})}},[t.disableColumnReorder,l.columnHeaderDragging,r,e]),d=A.useCallback((g,m)=>{m.preventDefault(),m.stopPropagation()},[]),h=A.useCallback((g,m)=>{const v=pz(e);if(!v)return;r.debug(`Dragging over col ${g.field}`),m.preventDefault(),m.stopPropagation();const y={x:m.clientX,y:m.clientY};if(g.field!==v&&wje(o.current,y)){const b=e.current.getColumnIndex(g.field,!1),w=e.current.getColumnIndex(g.field,!0),E=e.current.getColumn(g.field),I=e.current.getColumnIndex(v,!1),O=e.current.getVisibleColumns(),D=e.current.getAllColumns(),N=bje(o.current,y),U=N===Kee&&(u.direction==="rtl"?I<b:b<I),B=N===Yee&&(u.direction==="rtl"?b<I:I<b);if(U||B){let F,T=0;if(E.disableReorder?U?F=w>0&&!O[w-1].disableReorder:F=w<O.length-1&&!O[w+1].disableReorder:F=!0,a.current[b]){let _,C=b+T;if(U)for(_=w>0?O[w-1].field:null;C>0&&D[C].field!==_&&a.current[C];)T-=1,C=b+T;else for(_=w+1<O.length?O[w+1].field:null;C<D.length-1&&D[C].field!==_&&a.current[C];)T+=1,C=b+T;(a.current[C]||D[C].field===_)&&(F=!1)}e.current.unstable_applyPipeProcessors("canBeReordered",F,{targetIndex:w})&&e.current.setColumnIndex(v,b+T)}o.current=y}},[e,r,u.direction]),p=A.useCallback((g,m)=>{const v=pz(e);if(!(t.disableColumnReorder||!v)){if(r.debug("End dragging col"),m.preventDefault(),m.stopPropagation(),clearTimeout(s.current),n.current=null,m.dataTransfer.dropEffect==="none"&&!t.keepColumnPositionIfDraggedOutside)e.current.setColumnIndex(v,i.current),i.current=null;else{const y={column:e.current.getColumn(v),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(v),oldIndex:i.current};e.current.publishEvent("columnOrderChange",y)}e.current.setState(y=>W({},y,{columnReorder:W({},y.columnReorder,{dragCol:""})})),e.current.forceUpdate()}},[t.disableColumnReorder,t.keepColumnPositionIfDraggedOutside,r,e]);Xt(e,"columnHeaderDragStart",f),Xt(e,"columnHeaderDragEnter",d),Xt(e,"columnHeaderDragOver",h),Xt(e,"columnHeaderDragEnd",p),Xt(e,"cellDragEnter",d),Xt(e,"cellDragOver",h),Gn(e,"columnOrderChange",t.onColumnOrderChange)};function _je(e){return e.getAttribute("data-field")}function kje(e,t){return e.querySelector(`[data-field="${t}"]`)}function mz(e,t){var r;return Array.from((r=e.querySelectorAll(`[data-fields*="|-${t}-|"]`))!=null?r:[])}function gz(e,t){var r,n;if(!pE(e,qe.root))throw new Error("MUI: The root element is not found.");const i=e.getAttribute("aria-colindex");if(!i)return[];const a=Number(i)-1,s=[];return(r=t.virtualScrollerRef)!=null&&r.current?(((n=t.virtualScrollerRef)==null?void 0:n.current.querySelectorAll(`:scope > div > div > .${qe.row}`)).forEach(l=>{const u=l.getAttribute("data-id");if(!u)return;let f=a;const d=t.unstable_getCellColSpanInfo(u,a);d&&d.spannedByColSpan&&(f=d.leftVisibleCellIndex);const h=l.querySelector(`[data-colindex="${f}"]`);h&&s.push(h)}),s):[]}function Eje(e,t){return e.columnHeadersContainerElementRef.current.querySelector(`:scope > div > div > [data-field="${t}"][role="columnheader"]`)}function Tje(e,t){const r=e.virtualScrollerRef.current,n=o=>`:scope > div > div > div > [data-field="${t}"][role="${o}"]`;return Array.from(r.querySelectorAll(`${n("cell")}, ${n("gridcell")}`))}const Ije={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1};let Aje=!1;function Pje(){return Aje}function vz(e,t){if(t!==void 0&&e.changedTouches){for(let r=0;r<e.changedTouches.length;r+=1){const n=e.changedTouches[r];if(n.identifier===t)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function yz(e,t,r,n){let o=e;return n==="Right"?o+=t-r.left:o+=r.right-t,o}function bz(e,t,r){return r==="Left"?e-t.left:t.right-e}function Mje(e){return e==="Right"?"Left":"Right"}function wz(e,t){const r=e.classList.contains(qe["columnSeparator--sideRight"])?"Right":"Left";return t==="rtl"?Mje(r):r}function xz(e){e.preventDefault(),e.stopImmediatePropagation()}function Rje(e){const t=A.useRef(),r=()=>i8(e),n=$t(e,r);return A.useEffect(()=>{t.current&&n===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(r()===!1)return Promise.resolve();t.current=gje()}return t.current}}function Oje(e,t){if(e.length<4)return e;const r=e.slice();r.sort((s,c)=>s-c);const n=r[Math.floor(r.length*.25)],o=r[Math.floor(r.length*.75)-1],i=o-n,a=i<5?5:i*t;return r.filter(s=>s>n-a&&s<o+a)}function Dje(e,t,r){const n={},o=e.current.rootElementRef.current;return o.classList.add(qe.autosizing),r.forEach(i=>{const s=Tje(e.current,i.field).map(p=>{var g,m;const v=window.getComputedStyle(p,null),y=parseInt(v.paddingLeft,10)+parseInt(v.paddingRight,10),b=(g=(m=p.firstElementChild)==null?void 0:m.getBoundingClientRect().width)!=null?g:0;return y+b}),c=t.includeOutliers?s:Oje(s,t.outliersFactor);if(t.includeHeaders){const p=Eje(e.current,i.field);if(p){const g=p.querySelector(`.${qe.columnHeaderTitle}`),m=p.querySelector(`.${qe.columnHeaderTitleContainerContent}`),v=g??m,y=window.getComputedStyle(p,null),b=parseInt(y.paddingLeft,10)+parseInt(y.paddingRight,10),w=v.scrollWidth+1,E=b+w;c.push(E)}}const l=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,f=l?i.minWidth:0,d=u?i.maxWidth:1/0,h=c.length===0?0:Math.max(...c);n[i.field]=uf(h,f,d)}),o.classList.remove(qe.autosizing),n}const Fje=e=>W({},e,{columnResize:{resizingColumnField:""}}),Nje=(e,t)=>{const r=Oi(e,"useGridColumnResize"),n=A.useRef(),o=A.useRef(),i=A.useRef(),a=A.useRef(),s=A.useRef(),c=An(),l=A.useRef(),u=A.useRef(),f=X2(),d=A.useRef(),h=F=>{r.debug(`Updating width to ${F} for col ${n.current.field}`);const T=o.current.offsetWidth,P=F-T;n.current.computedWidth=F,n.current.width=F,n.current.flex=0,o.current.style.width=`${F}px`,o.current.style.minWidth=`${F}px`,o.current.style.maxWidth=`${F}px`;const _=i.current;_&&(_.style.width=`${F}px`,_.style.minWidth=`${F}px`,_.style.maxWidth=`${F}px`),[...s.current,...a.current].forEach(C=>{const S=C;let x;S.getAttribute("aria-colspan")==="1"?x=`${F}px`:x=`${S.offsetWidth+P}px`,S.style.width=x,S.style.minWidth=x,S.style.maxWidth=x})},p=F=>{w(),n.current&&(e.current.setColumnWidth(n.current.field,n.current.width),r.debug(`Updating col ${n.current.field} with new width: ${n.current.width}`)),f.start(0,()=>{e.current.publishEvent("columnResizeStop",null,F)})},g=Mt(p),m=Mt(F=>{if(F.buttons===0){g(F);return}let T=yz(l.current,F.clientX,o.current.getBoundingClientRect(),u.current);T=uf(T,n.current.minWidth,n.current.maxWidth),h(T);const P={element:o.current,colDef:n.current,width:T};e.current.publishEvent("columnResize",P,F)}),v=Mt(F=>{vz(F,d.current)&&p(F)}),y=Mt(F=>{const T=vz(F,d.current);if(!T)return;if(F.type==="mousemove"&&F.buttons===0){v(F);return}let P=yz(l.current,T.x,o.current.getBoundingClientRect(),u.current);P=uf(P,n.current.minWidth,n.current.maxWidth),h(P);const _={element:o.current,colDef:n.current,width:P};e.current.publishEvent("columnResize",_,F)}),b=Mt(F=>{var T,P;if(!pE(F.target,qe["columnSeparator--resizable"]))return;F.preventDefault();const C=F.changedTouches[0];C!=null&&(d.current=C.identifier),o.current=pE(F.target,qe.columnHeader);const S=_je(o.current),x=e.current.getColumn(S);a.current=mz((T=e.current.columnHeadersContainerElementRef)==null?void 0:T.current,S),r.debug(`Start Resize on col ${x.field}`),e.current.publishEvent("columnResizeStart",{field:S},F),n.current=x,o.current=kje((P=e.current.columnHeadersElementRef)==null?void 0:P.current,x.field),s.current=gz(o.current,e.current),u.current=wz(F.target,c.direction),l.current=bz(C.clientX,o.current.getBoundingClientRect(),u.current);const k=In(F.currentTarget);k.addEventListener("touchmove",y),k.addEventListener("touchend",v)}),w=A.useCallback(()=>{const F=In(e.current.rootElementRef.current);F.body.style.removeProperty("cursor"),F.removeEventListener("mousemove",m),F.removeEventListener("mouseup",g),F.removeEventListener("touchmove",y),F.removeEventListener("touchend",v),setTimeout(()=>{F.removeEventListener("click",xz,!0)},100),o.current&&(o.current.style.pointerEvents="unset")},[e,o,m,g,y,v]),E=A.useCallback(({field:F})=>{e.current.setState(T=>W({},T,{columnResize:W({},T.columnResize,{resizingColumnField:F})})),e.current.forceUpdate()},[e]),I=A.useCallback(()=>{e.current.setState(F=>W({},F,{columnResize:W({},F.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),O=Mt(({colDef:F},T)=>{var P,_,C;if(T.button!==0||!T.currentTarget.classList.contains(qe["columnSeparator--resizable"]))return;T.preventDefault(),r.debug(`Start Resize on col ${F.field}`),e.current.publishEvent("columnResizeStart",{field:F.field},T),n.current=F,o.current=(P=e.current.columnHeadersContainerElementRef)==null?void 0:P.current.querySelector(`[data-field="${F.field}"]`);const S=(_=e.current.headerFiltersElementRef)==null?void 0:_.current;S&&(i.current=S.querySelector(`[data-field="${F.field}"]`)),a.current=mz((C=e.current.columnHeadersContainerElementRef)==null?void 0:C.current,F.field),s.current=gz(o.current,e.current);const x=In(e.current.rootElementRef.current);x.body.style.cursor="col-resize",u.current=wz(T.currentTarget,c.direction),l.current=bz(T.clientX,o.current.getBoundingClientRect(),u.current),x.addEventListener("mousemove",m),x.addEventListener("mouseup",g),x.addEventListener("click",xz,!0)}),D=Mt((F,T)=>{if(t.disableAutosize||T.button!==0)return;const P=e.current.state.columns.lookup[F.field];P.resizable!==!1&&e.current.autosizeColumns(W({},t.autosizeOptions,{columns:[P.field]}))}),N=Rje(e),U=A.useRef(!1),B=A.useCallback(async F=>{var T,P;if(!((T=e.current.rootElementRef)==null?void 0:T.current)||U.current)return;U.current=!0;const C=Hh(e.current.state),S=W({},Ije,F,{columns:(P=F==null?void 0:F.columns)!=null?P:C.orderedFields});S.columns=S.columns.filter(j=>C.columnVisibilityModel[j]!==!1);const x=S.columns.map(j=>e.current.state.columns.lookup[j]);try{e.current.unstable_setColumnVirtualization(!1),await N();const j=Dje(e,S,x),z=x.map(Y=>W({},Y,{width:j[Y.field],computedWidth:j[Y.field]}));if(S.expand){var k,L;const K=C.orderedFields.map(J=>C.lookup[J]).filter(J=>C.columnVisibilityModel[J.field]!==!1).reduce((J,G)=>{var V,X;return J+((V=(X=j[G.field])!=null?X:G.computedWidth)!=null?V:G.width)},0),q=((k=(L=e.current.getRootDimensions())==null?void 0:L.viewportInnerSize.width)!=null?k:0)-K;if(q>0){const J=q/(z.length||1);z.forEach(G=>{G.width+=J,G.computedWidth+=J})}}e.current.updateColumns(z)}finally{e.current.unstable_setColumnVirtualization(!0),U.current=!1}},[e,N]);A.useEffect(()=>w,[w]),VD(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),aee(e,()=>{var F;return(F=e.current.columnHeadersElementRef)==null?void 0:F.current},"touchstart",b,{passive:Pje()}),jr(e,{autosizeColumns:B},"public"),Xt(e,"columnResizeStop",I),Xt(e,"columnResizeStart",E),Xt(e,"columnSeparatorMouseDown",O),Xt(e,"columnSeparatorDoubleClick",D),Gn(e,"columnResize",t.onColumnResize),Gn(e,"columnWidthChange",t.onColumnWidthChange)},Lje=e=>{const t=A.useCallback((r,n)=>{if(e.current.getCellParams(r.id,r.field).colDef.type==="treeDataGroup"&&n.key===" "&&!n.shiftKey){if(r.rowNode.type!=="group")return;e.current.setRowChildrenExpansion(r.id,!r.rowNode.childrenExpanded)}},[e]);Xt(e,"cellKeyDown",t)},$je=W({},Ws,{type:"treeDataGroup",sortable:!1,filterable:!1,disableColumnMenu:!0,disableReorder:!0,align:"left",width:200,valueGetter:e=>e.rowNode.type==="group"||e.rowNode.type==="leaf"?e.rowNode.groupingKey:void 0}),Bje="__tree_data_group__",Cz={field:Bje,editable:!1,groupable:!1},Wf="tree-data",Uje=e=>{const{apiRef:t,rowTree:r,disableChildrenFiltering:n,isRowMatchingFilters:o}=e,i={},a={},s={},c={passingFilterItems:null,passingQuickFilterValues:null},l=(f,d,h)=>{const p=n&&f.depth>0;let g;if(p)g=null;else if(!o||f.type==="footer")g=!0;else{const y=t.current.getRow(f.id);o(y,void 0,c),g=Pee([c.passingFilterItems],[c.passingQuickFilterValues],e.filterModel,e.apiRef,s)}let m=0;f.type==="group"&&f.children.forEach(y=>{var b;const w=r[y],E=l(w,(b=g)!=null?b:d,h&&!!f.childrenExpanded);m+=E});let v;switch(g){case!0:{v=!0;break}case!1:{v=m>0;break}default:{v=d;break}}return i[f.id]=v,v?(a[f.id]=m,f.type==="footer"?m:m+1):0},u=Object.values(r);for(let f=0;f<u.length;f+=1){const d=u[f];d.depth===0&&l(d,!0,!0)}return{filteredRowsLookup:i,filteredDescendantCountLookup:a}},Il=dr,J1=Gr,Hje=e=>{const{classes:t}=e;return pt({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},Rr,t)};function zje(e){var t,r;const{id:n,field:o,formattedValue:i,rowNode:a,hideDescendantCount:s,offsetMultiplier:c=2}=e,l=Il(),u=J1(),f={classes:l.classes},d=Hje(f),p=(t=$t(u,U9e)[a.id])!=null?t:0,g=a.childrenExpanded?l.slots.treeDataCollapseIcon:l.slots.treeDataExpandIcon,m=v=>{u.current.setRowChildrenExpansion(n,!a.childrenExpanded),u.current.setCellFocus(n,o),v.stopPropagation()};return xe(nr,{className:d.root,sx:{ml:a.depth*c},children:[R("div",{className:d.toggle,children:p>0&&R(l.slots.baseIconButton,W({size:"small",onClick:m,tabIndex:-1,"aria-label":a.childrenExpanded?u.current.getLocaleText("treeDataCollapse"):u.current.getLocaleText("treeDataExpand")},l==null||(r=l.slotProps)==null?void 0:r.baseIconButton,{children:R(g,{fontSize:"inherit"})}))}),xe("span",{children:[i===void 0?a.groupingKey:i,!s&&p>0?` (${p})`:""]})]})}const _h=e=>e.pinnedColumns;var mo=function(e){return e.left="left",e.right="right",e}(mo||{});function jje(e){const{colDef:t,onClick:r}=e,n=J1(),o=Il(),i=An(),a=A.useCallback(f=>d=>{n.current.pinColumn(t.field,f),r(d)},[n,t.field,r]),s=f=>{n.current.unpinColumn(t.field),r(f)},c=xe(go,{onClick:a(mo.left),children:[R(gl,{children:R(o.slots.columnMenuPinLeftIcon,{fontSize:"small"})}),R(ps,{children:n.current.getLocaleText("pinToLeft")})]}),l=xe(go,{onClick:a(mo.right),children:[R(gl,{children:R(o.slots.columnMenuPinRightIcon,{fontSize:"small"})}),R(ps,{children:n.current.getLocaleText("pinToRight")})]});if(!t)return null;const u=n.current.isColumnPinned(t.field);if(u){const f=u===mo.right?mo.left:mo.right,d=f===mo.right?"pinToRight":"pinToLeft",h=u===mo.right?o.slots.columnMenuPinLeftIcon:o.slots.columnMenuPinRightIcon;return xe(A.Fragment,{children:[xe(go,{onClick:a(f),children:[R(gl,{children:R(h,{fontSize:"small"})}),R(ps,{children:n.current.getLocaleText(d)})]}),xe(go,{onClick:s,children:[R(gl,{}),R(ps,{children:n.current.getLocaleText("unpin")})]})]})}return i.direction==="rtl"?xe(A.Fragment,{children:[l,c]}):xe(A.Fragment,{children:[c,l]})}const Qp=e=>e.detailPanel.expandedRowIds,p8=e=>e.detailPanel.contentCache,f5=e=>e.detailPanel.heightCache,Xee=ko(f5,e=>Object.entries(e).reduce((t,[r,{height:n}])=>(t[r]=n||0,t),{})),Vje=e=>{const{classes:t,isExpanded:r}=e;return pt({root:["detailPanelToggleCell",r&&"detailPanelToggleCell--expanded"]},Rr,t)};function Wje(e){var t;const{id:r,value:n}=e,o=Il(),i=J1(),a={classes:o.classes,isExpanded:n},s=Vje(a),c=$t(i,p8),l=A.isValidElement(c[r]),u=n?o.slots.detailPanelCollapseIcon:o.slots.detailPanelExpandIcon;return R(o.slots.baseIconButton,W({size:"small",tabIndex:-1,disabled:!l,className:s.root,"aria-label":n?i.current.getLocaleText("collapseDetailPanel"):i.current.getLocaleText("expandDetailPanel")},(t=o.slotProps)==null?void 0:t.baseIconButton,{children:R(u,{fontSize:"inherit"})}))}const Gje=Sr(R("g",{transform:"rotate(-30 15 10)",children:R("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinRight"),qje=Sr(R("g",{transform:"rotate(30 8 12)",children:R("path",{d:"M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",fillRule:"evenodd"})}),"PushPinLeft"),Kje=["operators","item","field","buttonRef","headerFilterMenuRef"],Yje={width:22,height:22,margin:"auto 0 10px 5px"};function Xje(e){var t;const{operators:r,item:n,field:o,buttonRef:i,headerFilterMenuRef:a}=e,s=ze(e,Kje),c=dn(),l=dn(),u=Il(),f=Gr(),d=!!(o8(f)===o&&a.current),h=p=>{a.current=p.currentTarget,f.current.showHeaderFilterMenu(o)};return u.slots.headerFilterMenu?xe(A.Fragment,{children:[R(u.slots.baseIconButton,W({id:c,ref:i,"aria-label":f.current.getLocaleText("filterPanelOperator"),title:f.current.getLocaleText("filterPanelOperator"),"aria-controls":l,"aria-expanded":d?"true":void 0,"aria-haspopup":"true",tabIndex:-1,size:"small",onClick:h,sx:Yje},(t=u.slotProps)==null?void 0:t.baseIconButton,{children:R(u.slots.openFilterButtonIcon,{fontSize:"small"})})),R(u.slots.headerFilterMenu,W({field:o,open:d,item:n,target:a.current,operators:r,labelledBy:c,id:l},s))]}):null}const Qje={padding:"2px"};function Zje({onClick:e}){var t;const r=Il();return R(r.slots.baseIconButton,W({tabIndex:-1,"aria-label":"Clear filter",size:"small",onClick:e,sx:Qje},(t=r.slotProps)==null?void 0:t.baseIconButton,{children:R(r.slots.columnMenuClearIcon,{fontSize:"inherit"})}))}const Jje=["colIndex","height","hasFocus","filterOperators","width","headerClassName","colDef","item","headerFilterMenuRef","InputComponentProps","showClearIcon"],eVe=e=>{const{colDef:t,classes:r,showColumnVerticalBorder:n}=e,o={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight","withBorderColor",n&&"columnHeader--withRightBorder"]};return pt(o,Rr,r)},tVe={'& input[value=""]:not(:focus)':{color:"transparent"}},rVe=A.forwardRef((e,t)=>{var r,n,o;const{colIndex:i,height:a,hasFocus:s,filterOperators:c,width:l,headerClassName:u,colDef:f,item:d,headerFilterMenuRef:h,InputComponentProps:p,showClearIcon:g=!0}=e,m=ze(e,Jje),v=lu(),y=Xh(v),b=Il(),w=A.useRef(null),E=Ur(t,w),I=A.useRef(null),O=A.useRef(null),D=gee(v)===f.field,N=o8(v)===f.field,U=c[0],B=f.filterable?U.InputComponent:null,F=A.useCallback(Q=>{if(d.value&&!Q.value){v.current.deleteFilterItem(Q);return}v.current.upsertFilterItem(Q)},[v,d]),T=A.useCallback(()=>{v.current.deleteFilterItem(d)},[v,d]);let P;f.renderHeaderFilter&&(P=f.renderHeaderFilter(e)),A.useLayoutEffect(()=>{if(s&&!N){let Q=w.current.querySelector('[tabindex="0"]');D&&B&&(Q=I.current);const q=Q||w.current;q==null||q.focus(),v.current.columnHeadersContainerElementRef.current.scrollLeft=0}},[B,v,s,D,N]);const _=A.useCallback(Q=>{if(!(N||px(Q.key)))switch(Q.key){case"Escape":D&&v.current.stopHeaderFilterEditMode();break;case"Enter":if(D){v.current.stopHeaderFilterEditMode();break}if(Q.metaKey||Q.ctrlKey){h.current=O.current,v.current.showHeaderFilterMenu(f.field);break}v.current.startHeaderFilterEditMode(f.field);break;case"Tab":{if(D){var q;const J=(q=y[i+(Q.shiftKey?-1:1)])!=null?q:null;J&&(v.current.startHeaderFilterEditMode(J),v.current.setColumnHeaderFilterFocus(J,Q))}break}default:if(D||Q.metaKey||Q.ctrlKey||Q.altKey||Q.shiftKey)break;v.current.startHeaderFilterEditMode(f.field);break}},[v,f.field,i,y,h,D,N]),C=A.useCallback((Q,q)=>J=>{v.current.publishEvent(Q,v.current.getColumnHeaderParams(f.field),J),q&&q(J)},[v,f.field]),S=A.useCallback(Q=>{s||(I.current&&I.current.contains(Q.target)&&I.current.focus(),v.current.setColumnHeaderFilterFocus(f.field,Q))},[v,f.field,s]),x=A.useMemo(()=>({onKeyDown:C("headerFilterKeyDown",_),onClick:C("headerFilterClick"),onMouseDown:C("headerFilterMouseDown",S),onBlur:C("headerFilterBlur")}),[S,_,C]),k=W({},b,{colDef:f}),L=eVe(k),j=(c==null||(r=c.find(({value:Q})=>d.operator===Q))==null?void 0:r.requiresFilterValue)===!1,z=!!(d!=null&&d.value)||j,Y=(n=U.headerLabel)!=null?n:v.current.getLocaleText(`headerFilterOperator${ut(d.operator)}`),K=z||s;return xe("div",W({className:it(L.root,u),ref:E,style:{height:a,width:l,minWidth:l,maxWidth:l},role:"columnheader","aria-colindex":i+1,"aria-label":P==null?(o=f.headerName)!=null?o:f.field:void 0},m,x,{children:[P,B&&P===void 0?xe(A.Fragment,{children:[R(B,W({apiRef:v,item:d,inputRef:I,applyValue:F,onFocus:()=>v.current.startHeaderFilterEditMode(f.field),onBlur:Q=>{var q;v.current.stopHeaderFilterEditMode(),(q=Q.relatedTarget)!=null&&q.className.includes("columnHeader")||v.current.setState(J=>W({},J,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))},label:ut(Y),placeholder:"",isFilterActive:K,clearButton:g&&z?R(Zje,{onClick:T}):null,disabled:j,tabIndex:-1,InputLabelProps:null,sx:f.type==="date"||f.type==="dateTime"?tVe:void 0},j?{value:""}:{},U==null?void 0:U.InputComponentProps,p)),R(Xje,{operators:c,item:d,field:f.field,applyFilterChanges:F,headerFilterMenuRef:h,buttonRef:O})]}):null]}))});function nVe({open:e,field:t,target:r,applyFilterChanges:n,operators:o,item:i,id:a,labelledBy:s}){const c=Gr(),l=A.useCallback(()=>{c.current.hideHeaderFilterMenu()},[c]),u=A.useCallback(f=>{f.key==="Tab"&&f.preventDefault(),(f.key==="Escape"||f.key==="Tab")&&l()},[l]);return r?R(o4,{placement:"bottom-end",open:e,target:r,onClose:l,children:R(j1,{"aria-labelledby":s,id:a,onKeyDown:u,children:o.map((f,d)=>{var h;const p=(h=f==null?void 0:f.headerLabel)!=null?h:c.current.getLocaleText(`headerFilterOperator${ut(f.value)}`);return R(go,{onClick:()=>{n(W({},i,{operator:f.value})),l()},autoFocus:d===0?e:!1,selected:f.value===i.operator,children:p},`${t}-${f.value}`)})})}):null}const Qee=e=>`auto-generated-row-${e.map(r=>`${r.field}/${r.key}`).join("-")}`,Zee=({id:e,tree:t})=>{const r=[];let n=t[e];for(;n.id!==ro;)r.push({field:n.type==="leaf"?null:n.groupingField,key:n.groupingKey}),n=t[n.parent];return r.reverse(),r},Sz=(e,t,r)=>{let n;return e.id===ro?n=!0:r?n=r(e):n=t===-1||t>e.depth,e.childrenExpanded=n,e},wE=(e,t,r,n)=>{var o;t[e.id]=e,r[e.depth]=((o=r[e.depth])!=null?o:0)+1;const i=t[e.parent];if(e.type==="group"||e.type==="leaf"){var a,s,c;const l=(a=e.groupingField)!=null?a:"__no_field__",u=(s=e.groupingKey)!=null?s:"__no_key__",f=(c=i.childrenFromPath)==null?void 0:c[l];n!==null&&n[i.id]===t[i.id]?i.children=[...i.children,e.id]:i.children.push(e.id),f==null?i.childrenFromPath[l]={[u.toString()]:e.id}:f[u.toString()]=e.id}else e.type==="footer"&&(i.footerId=e.id)},h5=({node:e,tree:t,treeDepths:r})=>{delete t[e.id];const n=e.depth,o=r[n];o===1?delete r[n]:r[n]=o-1;const i=t[e.parent];if(e.type==="footer")t[i.id]=W({},i,{footerId:null});else{var a,s;const c=(a=e.groupingField)!=null?a:"__no_field__",l=(s=e.groupingKey)!=null?s:"__no_key__",u=i.children.filter(d=>d!==e.id),f=i.childrenFromPath;delete f[c][l.toString()],t[i.id]=W({},i,{children:u,childrenFromPath:f})}},Jee=({node:e,updatedNode:t,previousTree:r,tree:n,treeDepths:o})=>{e.children.forEach(a=>{n[a]=W({},n[a],{parent:t.id})}),h5({node:e,tree:n,treeDepths:o});const i=W({},e,t);wE(i,n,o,r)},oVe=()=>({value:{},addAction(e,t){this.value[e]||(this.value[e]={}),this.value[e][t]=!0}}),iVe=({tree:e,filteredRowsLookup:t})=>{if(!t)return{};const r={},n=(i,a)=>{const s=t[i.id];i.type==="group"&&i.children.forEach(c=>{const l=e[c];n(l,a&&!!i.childrenExpanded)}),r[i.id]=s&&a,i.type==="group"&&i.footerId!=null&&(r[i.footerId]=s&&a&&!!i.childrenExpanded)},o=Object.values(e);for(let i=0;i<o.length;i+=1){const a=o[i];a.depth===0&&n(a,!0)}return r},p5=({id:e,path:t,updatedGroupsManager:r,previousTree:n,tree:o,treeDepths:i,onDuplicatePath:a,isGroupExpandedByDefault:s,defaultGroupingExpansionDepth:c})=>{let l=ro;for(let f=0;f<t.length;f+=1){var u;const{key:d,field:h}=t[f],p=h??"__no_field__",g=d??"__no_key__",m=(u=o[l].childrenFromPath)==null||(u=u[p])==null?void 0:u[g.toString()];if(f===t.length-1)if(m==null){const v={type:"leaf",id:e,depth:f,parent:l,groupingKey:d};r==null||r.addAction(l,"insertChildren"),wE(v,o,i,n)}else{const v=o[m];v.type==="group"&&v.isAutoGenerated?(r==null||r.addAction(l,"removeChildren"),r==null||r.addAction(l,"insertChildren"),Jee({tree:o,previousTree:n,treeDepths:i,node:v,updatedNode:{id:e,isAutoGenerated:!1}})):a==null||a(m,e,t)}else if(m==null){const v=Qee(t.slice(0,f+1)),y={type:"group",id:v,parent:l,depth:f,isAutoGenerated:!0,groupingKey:d,groupingField:h,children:[],childrenFromPath:{},childrenExpanded:!1};r==null||r.addAction(l,"insertChildren"),wE(Sz(y,c,s),o,i,n),l=v}else{const v=o[m];if(v.type!=="group"){const y={type:"group",id:v.id,parent:v.parent,depth:v.depth,isAutoGenerated:!1,groupingKey:d,groupingField:h,children:[],childrenFromPath:{},childrenExpanded:!1};o[m]=Sz(y,c,s)}l=v.id}}},aVe=e=>{const t=[],r={[ro]:WJ()},n={};for(let o=0;o<e.nodes.length;o+=1){const i=e.nodes[o];t.push(i.id),p5({tree:r,previousTree:e.previousTree,id:i.id,path:i.path,onDuplicatePath:e.onDuplicatePath,treeDepths:n,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth})}return{tree:r,treeDepths:n,groupingName:e.groupingName,dataRowIds:t}};class _z{constructor(t,r){this.next=void 0,this.data=void 0,this.next=r,this.data=t}insertAfter(t){if(!t.first||!t.last)return;const r=this.next;this.next=t.first,t.last.next=r}}class gx{constructor(t,r){this.first=void 0,this.last=void 0,this.first=t,this.last=r}data(){const t=[];return this.forEach(r=>{t.push(r.data)}),t}forEach(t){let r=this.first;for(;r!==null;)t(r),r=r.next}static from(t){if(t.length===0)return new gx(null,null);let r=0;const n=new _z(t[r],null);let o=n;for(;r+1<t.length;){r+=1;const i=new _z(t[r],null);o.next=i,o=i}return new gx(n,o)}}const sVe=e=>{const{rowTree:t,disableChildrenSorting:r,sortRowList:n,shouldRenderGroupBelowLeaves:o}=e,i=new Map,a=c=>{const l=!!n&&(!r||c.depth===-1);let u;if(l){for(let f=0;f<c.children.length;f+=1){const d=t[c.children[f]];d.type==="group"&&a(d)}u=n(c.children.map(f=>t[f]))}else if(o){const f=[],d=[];for(let h=0;h<c.children.length;h+=1){const p=c.children[h],g=t[p];g.type==="group"?(a(g),d.push(p)):g.type==="leaf"&&f.push(p)}u=[...f,...d]}else{for(let f=0;f<c.children.length;f+=1){const d=t[c.children[f]];d.type==="group"&&a(d)}u=[...c.children]}c.footerId!=null&&u.push(c.footerId),i.set(c.id,u)};a(t[ro]);const s=gx.from(i.get(ro));return s.forEach(c=>{const l=i.get(c.data);l!=null&&l.length&&c.insertAfter(gx.from(l))}),s.data()},ete=({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{h5({node:e,tree:t,treeDepths:r}),e.type==="group"&&e.footerId!=null&&h5({node:t[e.footerId],tree:t,treeDepths:r});const o=t[e.parent];n==null||n.addAction(o.id,"removeChildren"),o.id!==ro&&o.children.length===0&&(o.isAutoGenerated?ete({node:o,tree:t,treeDepths:r}):t[o.id]={type:"leaf",id:o.id,depth:o.depth,parent:o.parent,groupingKey:o.groupingKey})},lVe=({node:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{n==null||n.addAction(e.parent,"removeChildren"),n==null||n.addAction(e.parent,"insertChildren"),Jee({previousTree:null,tree:t,treeDepths:r,node:e,updatedNode:{id:Qee(Zee({id:e.id,tree:t})),isAutoGenerated:!0}})},kz=({id:e,tree:t,treeDepths:r,updatedGroupsManager:n})=>{const o=t[e];o.type==="group"&&o.children.length>0?lVe({node:o,tree:t,treeDepths:r,updatedGroupsManager:n}):ete({node:o,tree:t,treeDepths:r,updatedGroupsManager:n})},cVe=e=>{const t=W({},e.previousTree),r=W({},e.previousTreeDepth),n=oVe();for(let i=0;i<e.nodes.inserted.length;i+=1){const{id:a,path:s}=e.nodes.inserted[i];p5({previousTree:e.previousTree,tree:t,treeDepths:r,updatedGroupsManager:n,id:a,path:s,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth})}for(let i=0;i<e.nodes.removed.length;i+=1){const a=e.nodes.removed[i];kz({tree:t,treeDepths:r,updatedGroupsManager:n,id:a})}for(let i=0;i<e.nodes.modified.length;i+=1){const{id:a,path:s}=e.nodes.modified[i],c=Zee({tree:t,id:a});zh(c,s)?n==null||n.addAction(t[a].parent,"modifyChildren"):(kz({tree:t,treeDepths:r,updatedGroupsManager:n,id:a}),p5({previousTree:e.previousTree,tree:t,treeDepths:r,updatedGroupsManager:n,id:a,path:s,onDuplicatePath:e.onDuplicatePath,isGroupExpandedByDefault:e.isGroupExpandedByDefault,defaultGroupingExpansionDepth:e.defaultGroupingExpansionDepth}))}const o=r4(t,ro,!0);return{tree:t,treeDepths:r,groupingName:e.groupingName,dataRowIds:o,updatedGroupsManager:n}},uVe=["hideDescendantCount"],dVe=(e,t)=>{const r=A.useCallback(()=>{e.current.setStrategyAvailability("rowTree",Wf,t.treeData?()=>!0:()=>!1)},[e,t.treeData]),n=A.useCallback(()=>{var l;const u=t.groupingColDef;let f;typeof u=="function"?f=u({groupingName:Wf,fields:[]}):f=u;const d=(l=f)!=null?l:{},{hideDescendantCount:h}=d,p=ze(d,uVe),g=W({},$je,{renderCell:m=>R(zje,W({},m,{hideDescendantCount:h})),headerName:e.current.getLocaleText("treeDataGroupingHeaderName")});return W({},g,p,Cz)},[e,t.groupingColDef]),o=A.useCallback(l=>{const u=Cz.field,f=t.treeData,d=l.lookup[u];if(f){const h=n();if(d&&(h.width=d.width,h.flex=d.flex),l.lookup[u]=h,d==null){const p=l.orderedFields[0]===Md?1:0;l.orderedFields=[...l.orderedFields.slice(0,p),u,...l.orderedFields.slice(p)]}}else!f&&d&&(delete l.lookup[u],l.orderedFields=l.orderedFields.filter(h=>h!==u));return l},[t.treeData,n]),i=A.useCallback(l=>{if(!t.getTreeDataPath)throw new Error("MUI: No getTreeDataPath given.");const u=d=>({id:d,path:t.getTreeDataPath(l.dataRowIdToModelLookup[d]).map(h=>({key:h,field:null}))}),f=(d,h,p)=>{throw new Error(["MUI: The path returned by `getTreeDataPath` should be unique.",`The rows with id #${d} and #${h} have the same.`,`Path: ${JSON.stringify(p.map(g=>g.key))}.`].join(`
`))};return l.updates.type==="full"?aVe({previousTree:l.previousTree,nodes:l.updates.rows.map(u),defaultGroupingExpansionDepth:t.defaultGroupingExpansionDepth,isGroupExpandedByDefault:t.isGroupExpandedByDefault,groupingName:Wf,onDuplicatePath:f}):cVe({nodes:{inserted:l.updates.actions.insert.map(u),modified:l.updates.actions.modify.map(u),removed:l.updates.actions.remove},previousTree:l.previousTree,previousTreeDepth:l.previousTreeDepths,defaultGroupingExpansionDepth:t.defaultGroupingExpansionDepth,isGroupExpandedByDefault:t.isGroupExpandedByDefault,groupingName:Wf})},[t.getTreeDataPath,t.defaultGroupingExpansionDepth,t.isGroupExpandedByDefault]),a=A.useCallback(l=>{const u=dl(e);return Uje({rowTree:u,isRowMatchingFilters:l.isRowMatchingFilters,disableChildrenFiltering:t.disableChildrenFiltering,filterModel:l.filterModel,apiRef:e})},[e,t.disableChildrenFiltering]),s=A.useCallback(l=>{const u=dl(e);return sVe({rowTree:u,sortRowList:l.sortRowList,disableChildrenSorting:t.disableChildrenSorting,shouldRenderGroupBelowLeaves:!1})},[e,t.disableChildrenSorting]);$n(e,"hydrateColumns",o),Sh(e,Wf,"rowTreeCreation",i),Sh(e,Wf,"filtering",a),Sh(e,Wf,"sorting",s),Sh(e,Wf,"visibleRowsLookupCreation",iVe),Z1(()=>{r()});const c=A.useRef(!0);A.useEffect(()=>{c.current?c.current=!1:r()},[r])},tte=lu,Nd="__detail_panel_toggle__",fVe=W({},Ws,{field:Nd,type:"detailPanelToggle",editable:!1,sortable:!1,filterable:!1,resizable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,align:"left",width:40,valueGetter:e=>Qp(e.api.state).includes(e.id),renderCell:e=>R(Wje,W({},e)),renderHeader:()=>null}),hVe=["rowId","height","style"],pVe=We(nr,{name:"MuiDataGrid",slot:"DetailPanel",overridesResolver:(e,t)=>t.detailPanel})(({theme:e})=>({zIndex:2,width:"100%",position:"absolute",backgroundColor:(e.vars||e).palette.background.default,overflow:"auto"}));function mVe(e){const{rowId:t,height:r,style:n={}}=e,o=ze(e,hVe),i=tte(),a=A.useRef(),c=Il();A.useLayoutEffect(()=>{r==="auto"&&typeof ResizeObserver>"u"&&i.current.storeDetailPanelHeight(t,a.current.clientHeight)},[i,r,t]),A.useLayoutEffect(()=>{if(r!=="auto"||typeof ResizeObserver>"u")return;const f=new ResizeObserver(d=>{const[h]=d,p=h.borderBoxSize&&h.borderBoxSize.length>0?h.borderBoxSize[0].blockSize:h.contentRect.height;i.current.storeDetailPanelHeight(t,p)});return f.observe(a.current),()=>f.disconnect()},[i,r,t]);const l=W({},n,{height:r});return R(pVe,W({ref:a,ownerState:c,style:l},o))}const gVe=["className","disableVirtualization"],vx=(e,t,r)=>{var n,o;if(!Array.isArray(e.left)&&!Array.isArray(e.right))return[[],[]];if(((n=e.left)==null?void 0:n.length)===0&&((o=e.right)==null?void 0:o.length)===0)return[[],[]];const i=(l,u)=>Array.isArray(l)?l.filter(f=>u.includes(f)):[],a=i(e.left,t),s=t.filter(l=>!a.includes(l)),c=i(e.right,s);return r?[c,a]:[a,c]},vVe=e=>{const{classes:t}=e;return pt({leftPinnedColumns:["pinnedColumns","pinnedColumns--left"],rightPinnedColumns:["pinnedColumns","pinnedColumns--right","withBorderColor"],topPinnedRows:["pinnedRows","pinnedRows--top"],bottomPinnedRows:["pinnedRows","pinnedRows--bottom"],pinnedRowsRenderZone:["pinnedRowsRenderZone"],detailPanels:["detailPanels"],detailPanel:["detailPanel"]},Rr,t)},Ez=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,t/100},rte=e=>e.vars?"rgba(0 0 0 /  0.21)":to(e.palette.common.black,.21),yVe=We("div",{name:"MuiDataGrid",slot:"DetailPanels",overridesResolver:(e,t)=>t.detailPanels})({position:"relative"}),nte=`linear-gradient(${to("#fff",Ez(2))}, ${to("#fff",Ez(2))})`,dg=We("div",{name:"MuiDataGrid",slot:"PinnedColumns",overridesResolver:(e,t)=>[{[`&.${qe["pinnedColumns--left"]}`]:t["pinnedColumns--left"]},{[`&.${qe["pinnedColumns--right"]}`]:t["pinnedColumns--right"]},t.pinnedColumns]})(({theme:e,ownerState:t})=>{var r;const n=rte(e);return W({position:"sticky",overflow:"hidden",zIndex:1,backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:(r=e.vars.overlays)==null?void 0:r[2]}:W({},e.palette.mode==="dark"&&{backgroundImage:nte}),t.side===mo.left&&{left:0,float:"left",boxShadow:`2px 0px 4px -2px ${n}`},t.side===mo.right&&{right:0,float:"right",boxShadow:`-2px 0px 4px -2px ${n}`},t.side===mo.right&&t.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})});var xE=function(e){return e.top="top",e.bottom="bottom",e}(xE||{});const Tz=We("div",{name:"MuiDataGrid",slot:"PinnedRows",overridesResolver:(e,t)=>[{[`&.${qe["pinnedRows--top"]}`]:t["pinnedRows--top"]},{[`&.${qe["pinnedRows--bottom"]}`]:t["pinnedRows--bottom"]},t.pinnedRows]})(({theme:e,ownerState:t})=>{var r;const n=rte(e);return W({position:"sticky",zIndex:4,backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:(r=e.vars.overlays)==null?void 0:r[2]}:W({},e.palette.mode==="dark"&&{backgroundImage:nte}),t.position==="top"&&{top:0,boxShadow:`0px 3px 4px -2px ${n}`},t.position===xE.bottom&&{boxShadow:`0px -3px 4px -2px ${n}`,bottom:0})}),Iz=We("div")({position:"absolute"}),bVe=A.forwardRef(function(t,r){const n=ze(t,gVe),o=tte(),i=Il(),a=$t(o,Xh),s=$t(o,Qp),c=$t(o,p8),l=$t(o,Xee),u=A.useRef(null),f=A.useRef(null),d=A.useRef(null),h=A.useRef(null),p=An(),g=A.useCallback(({top:J,left:G})=>{u.current&&(u.current.style.transform=`translate3d(0px, ${J}px, 0px)`),f.current&&(f.current.style.transform=`translate3d(0px, ${J}px, 0px)`),d.current&&(d.current.style.transform=`translate3d(${G}px, 0px, 0px)`),h.current&&(h.current.style.transform=`translate3d(${G}px, 0px, 0px)`)},[]),m=A.useMemo(()=>{const J=new Set;return s.forEach(G=>{J.add(G)}),J},[s]),v=A.useCallback(J=>m.has(J)?{style:{marginBottom:l[J]}}:null,[l,m]),y=$t(o,_h),[b,w]=vx(y,a,p.direction==="rtl"),E=$t(o,f0),I=A.useMemo(()=>(E==null?void 0:E.top)||[],[E==null?void 0:E.top]),O=A.useMemo(()=>(E==null?void 0:E.bottom)||[],[E==null?void 0:E.bottom]),D=W({},i,{classes:i.classes}),N=vVe(D),{renderContext:U,getRows:B,getRootProps:F,getContentProps:T,getRenderZoneProps:P,updateRenderZonePosition:_}=Eze(W({ref:r,renderZoneMinColumnIndex:b.length,renderZoneMaxColumnIndex:a.length-w.length,onRenderZonePositioning:g,getRowProps:v},t)),C=A.useCallback(()=>{U&&_(U)},[U,_]);Xt(o,"columnWidthChange",C),Xt(o,"columnOrderChange",C),Xt(o,"rowOrderChange",C);const S=U&&b.length>0?W({},U,{firstColumnIndex:0,lastColumnIndex:b.length}):null,x=U&&w.length>0?W({},U,{firstColumnIndex:a.length-w.length,lastColumnIndex:a.length}):null,k=J=>{const G=Gm(o.current.state),V=c[J],X=o.current.getRowIndexRelativeToVisibleRows(J),te=X!==void 0;if(A.isValidElement(V)&&te){const re=o.current.detailPanelHasAutoHeight(J)?"auto":l[J],se=o.current.unstable_getRowInternalSizes(J),pe=(se==null?void 0:se.spacingTop)||0,ce=G.positions[X]+o.current.unstable_getRowHeight(J)+pe;return R(mVe,{rowId:J,style:{top:ce},height:re,className:N.detailPanel,children:V},J)}return null},L=[],j=B({renderContext:U,rows:I,position:"center"}),z=XD(o),Y=B({renderContext:U,rowIndexOffset:I.length,position:"center",onRowRender:J=>{if(i.getDetailPanelContent==null||!m.has(J))return;const G=k(J);G&&L.push(G)}}),K=B({renderContext:U,rows:O,rowIndexOffset:I.length+(Y?Y.length:0),position:"center"}),Q=T(),q={minHeight:Q.style.minHeight};return Q.style.minHeight&&Q.style.minHeight==="100%"&&(Q.style.minHeight=`calc(100% - ${z.top}px - ${z.bottom}px)`),xe(aje,W({},F(n),{children:[R(r7e,{}),I.length>0?xe(Tz,{className:N.topPinnedRows,ownerState:W({},D,{position:xE.top}),style:{width:Q.style.width,height:z.top},role:"rowgroup",children:[S&&R(dg,{className:N.leftPinnedColumns,ownerState:W({},D,{side:mo.left,showCellVerticalBorder:i.showCellVerticalBorder}),children:B({renderContext:S,minFirstColumn:S.firstColumnIndex,maxLastColumn:S.lastColumnIndex,availableSpace:0,rows:I,position:"left"})}),R(Iz,{className:N.pinnedRowsRenderZone,ref:d,role:"presentation",children:j}),x&&R(dg,{className:N.rightPinnedColumns,ownerState:W({},D,{side:mo.right,showCellVerticalBorder:i.showCellVerticalBorder}),children:B({renderContext:x,minFirstColumn:x.firstColumnIndex,maxLastColumn:x.lastColumnIndex,availableSpace:0,rows:I,position:"right"})})]}):null,xe(cje,W({},Q,{children:[S&&R(dg,{ref:u,className:N.leftPinnedColumns,ownerState:W({},D,{side:mo.left,showCellVerticalBorder:i.showCellVerticalBorder}),style:q,children:B({renderContext:S,minFirstColumn:S.firstColumnIndex,maxLastColumn:S.lastColumnIndex,availableSpace:0,rowIndexOffset:I.length,position:"left"})}),R(hje,W({},P(),{children:Y})),x&&R(dg,{ref:f,ownerState:W({},D,{side:mo.right,showCellVerticalBorder:i.showCellVerticalBorder}),className:N.rightPinnedColumns,style:q,children:B({renderContext:x,minFirstColumn:x.firstColumnIndex,maxLastColumn:x.lastColumnIndex,availableSpace:0,rowIndexOffset:I.length,position:"right"})}),L.length>0&&R(yVe,{className:N.detailPanels,ownerState:D,children:L})]})),O.length>0?xe(Tz,{className:N.bottomPinnedRows,ownerState:W({},D,{position:xE.bottom}),style:{width:Q.style.width,height:z.bottom},role:"rowgroup",children:[S&&R(dg,{className:N.leftPinnedColumns,ownerState:W({},D,{side:mo.left,showCellVerticalBorder:i.showCellVerticalBorder}),children:B({renderContext:S,minFirstColumn:S.firstColumnIndex,maxLastColumn:S.lastColumnIndex,availableSpace:0,rows:O,rowIndexOffset:I.length+(Y?Y.length:0),position:"left"})}),R(Iz,{className:N.pinnedRowsRenderZone,ref:h,role:"presentation",children:K}),x&&R(dg,{className:N.rightPinnedColumns,ownerState:W({},D,{side:mo.right,showCellVerticalBorder:i.showCellVerticalBorder}),children:B({renderContext:x,minFirstColumn:x.firstColumnIndex,maxLastColumn:x.lastColumnIndex,availableSpace:0,rows:O,rowIndexOffset:I.length+(Y?Y.length:0),position:"right"})})]}):null]}))}),ote=(e,t,r)=>{var n;r.current.caches.columnPinning={orderedFieldsBeforePinningColumns:null};let o;if(t.disableColumnPinning)o={};else if(t.pinnedColumns)o=t.pinnedColumns;else if((n=t.initialState)!=null&&n.pinnedColumns){var i;o=(i=t.initialState)==null?void 0:i.pinnedColumns}else o={};return W({},e,{pinnedColumns:o})},Az=e=>t=>W({},t,{pinnedColumns:e}),wVe=(e,t)=>{var r;const n=$t(e,_h),o=An(),i=A.useCallback((y,b)=>{if(t.disableColumnPinning)return y;const w=Xh(e),[E,I]=vx(n,w,o.direction==="rtl");if(!b.colIndex||E.length===0&&I.length===0)return y;const O=Mi(e),D=K2(e),N=Wm(e),U=e.current.virtualScrollerRef.current.clientWidth,B=Math.abs(e.current.virtualScrollerRef.current.scrollLeft),F=O[b.colIndex].computedWidth,T=N[b.colIndex],P=N[E.length],_=D-N[N.length-I.length],C=T+F;if(C-(U-_)>B){const S=C-(U-_);return W({},y,{left:S})}if(T<B+P){const S=T-P;return W({},y,{left:S})}return y},[e,n,t.disableColumnPinning,o.direction]),a=A.useCallback((y,b)=>t.disableColumnPinning||b.pinnable===!1?y:[...y,"columnMenuPinningItem"],[t.disableColumnPinning]),s=A.useCallback((y,{targetIndex:b})=>{const w=Xh(e),[E,I]=vx(n,w,o.direction==="rtl");if(E.length===0&&I.length===0)return y;if(E.length>0&&b<E.length)return!1;if(I.length>0){const D=Mi(e).length-I.length;return b>=D?!1:y}return y},[e,n,o.direction]),c=A.useCallback((y,b)=>{var w,E,I;const O=_h(e.current.state);return!b.exportOnlyDirtyModels||t.pinnedColumns!=null||((w=t.initialState)==null?void 0:w.pinnedColumns)!=null||((E=O.left)!=null?E:[]).length>0||((I=O.right)!=null?I:[]).length>0?W({},y,{pinnedColumns:O}):y},[e,t.pinnedColumns,(r=t.initialState)==null?void 0:r.pinnedColumns]),l=A.useCallback((y,b)=>{const w=b.stateToRestore.pinnedColumns;return w!=null&&e.current.setState(Az(w)),y},[e]);$n(e,"scrollToIndexes",i),$n(e,"columnMenu",a),$n(e,"canBeReordered",s),$n(e,"exportState",c),$n(e,"restoreState",l),e.current.registerControlState({stateId:"pinnedColumns",propModel:t.pinnedColumns,propOnChange:t.onPinnedColumnsChange,stateSelector:_h,changeEvent:"pinnedColumnsChange"});const u=A.useCallback(y=>{if(t.disableColumnPinning)throw new Error(`MUI: You cannot call \`apiRef.current.${y}\` when \`disableColumnPinning\` is true.`)},[t.disableColumnPinning]),f=A.useCallback((y,b)=>{if(u("pinColumn"),e.current.isColumnPinned(y)===b)return;const w=b===mo.right?mo.left:mo.right,E={[b]:[...n[b]||[],y],[w]:(n[w]||[]).filter(I=>I!==y)};e.current.setPinnedColumns(E)},[e,u,n]),d=A.useCallback(y=>{u("unpinColumn"),e.current.setPinnedColumns({left:(n.left||[]).filter(b=>b!==y),right:(n.right||[]).filter(b=>b!==y)})},[e,u,n.left,n.right]),h=A.useCallback(()=>(u("getPinnedColumns"),_h(e.current.state)),[e,u]),p=A.useCallback(y=>{u("setPinnedColumns"),e.current.setState(Az(y)),e.current.forceUpdate()},[e,u]),g=A.useCallback(y=>(u("isColumnPinned"),(n.left||[]).includes(y)?mo.left:(n.right||[]).includes(y)?mo.right:!1),[n.left,n.right,u]);jr(e,{pinColumn:f,unpinColumn:d,getPinnedColumns:h,setPinnedColumns:p,isColumnPinned:g},"public");const v=A.useCallback(y=>{if(!e.current.caches.columnPinning.orderedFieldsBeforePinningColumns)return;const{column:b,targetIndex:w,oldIndex:E}=y,I=w>E?1:-1,D=tu(e)[w-I],N=[...e.current.caches.columnPinning.orderedFieldsBeforePinningColumns];let U=N.findIndex(T=>T===b.field),B=U+I;const F=N.findIndex(T=>T===D);for(;I>0?U<F:U>F;){for(;e.current.isColumnPinned(N[B]);)B+=I;const T=N[U];N[U]=N[B],N[B]=T,U=B,B=U+I}e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=N},[e]);Xt(e,"columnOrderChange",v),A.useEffect(()=>{t.pinnedColumns&&e.current.setPinnedColumns(t.pinnedColumns)},[e,t.pinnedColumns])},xVe=(e,t)=>{const{disableColumnPinning:r,pinnedColumns:n,initialState:o}=t,i=An();let a=_h(e.current.state);if(a==null){const l=ote(e.current.state,{disableColumnPinning:r,pinnedColumns:n,initialState:o},e);a=_h(l)}const s=A.useRef([]),c=A.useCallback(l=>{if(l.orderedFields.length===0||r)return l;const[u,f]=vx(a,l.orderedFields,i.direction==="rtl");let d;const h=[...u,...f],{orderedFieldsBeforePinningColumns:p}=e.current.caches.columnPinning;if(p){d=new Array(l.orderedFields.length).fill(null);const m=[...d],v=[...l.orderedFields];s.current.forEach(b=>{if(!h.includes(b)&&l.lookup[b]){const w=p.indexOf(b);d[w]=b,m[w]=b,v.splice(v.indexOf(b),1)}}),h.forEach(b=>{let w=p.indexOf(b);if((w===-1||w>=m.length)&&(w=l.orderedFields.indexOf(b)),m[w]!==null)for(w=0;m[w]!==null;)w+=1;d[w]=b,m[w]=b,v.splice(v.indexOf(b),1)});let y=0;v.forEach(b=>{for(;m[y]!==null;)y+=1;m[y]=b,d[y]=b}),e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=m}else d=[...l.orderedFields],e.current.caches.columnPinning.orderedFieldsBeforePinningColumns=[...l.orderedFields];s.current=h;const g=d.filter(m=>!u.includes(m)&&!f.includes(m));return W({},l,{orderedFields:[...u,...g,...f]})},[e,r,a,i.direction]);$n(e,"hydrateColumns",c)},CVe=(e,t)=>{var r,n,o;return W({},e,{detailPanel:{heightCache:{},expandedRowIds:(r=(n=t.detailPanelExpandedRowIds)!=null?n:(o=t.initialState)==null||(o=o.detailPanel)==null?void 0:o.expandedRowIds)!=null?r:[]}})};function Pz(e,t,r,n){if(typeof t!="function")return{};const o=Mb(e),i=o.reduce((s,c)=>{const l=e.current.getRowParams(c);return s[c]=t(l),s},{}),a=o.reduce((s,c)=>{var l;if(i[c]==null)return s;const u=e.current.getRowParams(c),f=r(u),d=f==="auto";return s[c]={autoHeight:d,height:d?(l=n[c])==null?void 0:l.height:f},s},{});return{contentCache:i,heightCache:a}}const SVe=(e,t)=>{const r=$t(e,Qp),n=$t(e,p8),o=A.useCallback((b,w)=>{if(b.field!==Nd||t.getDetailPanelContent==null)return;const E=n[b.id];A.isValidElement(E)&&w.target!==w.currentTarget&&e.current.toggleDetailPanel(b.id)},[e,n,t.getDetailPanelContent]),i=A.useCallback((b,w)=>{t.getDetailPanelContent!=null&&b.field===Nd&&w.key===" "&&e.current.toggleDetailPanel(b.id)},[e,t.getDetailPanelContent]);Xt(e,"cellClick",o),Xt(e,"cellKeyDown",i),e.current.registerControlState({stateId:"detailPanels",propModel:t.detailPanelExpandedRowIds,propOnChange:t.onDetailPanelExpandedRowIdsChange,stateSelector:Qp,changeEvent:"detailPanelsExpandedRowIdsChange"});const a=A.useCallback(b=>{if(t.getDetailPanelContent==null)return;const w=n[b];if(!A.isValidElement(w))return;const E=e.current.getExpandedDetailPanels();e.current.setExpandedDetailPanels(E.includes(b)?E.filter(I=>I!==b):[...E,b])},[e,n,t.getDetailPanelContent]),s=A.useCallback(()=>Qp(e.current.state),[e]),c=A.useCallback(b=>{e.current.setState(w=>W({},w,{detailPanel:W({},w.detailPanel,{expandedRowIds:b})})),e.current.forceUpdate()},[e]),l=A.useCallback((b,w)=>{const E=f5(e.current.state);!E[b]||E[b].height===w||(e.current.setState(I=>W({},I,{detailPanel:W({},I.detailPanel,{heightCache:W({},E,{[b]:W({},E[b],{height:w})})})})),e.current.requestPipeProcessorsApplication("rowHeight"))},[e]),u=A.useCallback(b=>{const w=f5(e.current.state);return w[b]?w[b].autoHeight:!1},[e]),f={toggleDetailPanel:a,getExpandedDetailPanels:s,setExpandedDetailPanels:c},d={storeDetailPanelHeight:l,detailPanelHasAutoHeight:u};jr(e,f,"public"),jr(e,d,"private"),A.useEffect(()=>{t.detailPanelExpandedRowIds&&Qp(e.current.state)!==t.detailPanelExpandedRowIds&&e.current.setExpandedDetailPanels(t.detailPanelExpandedRowIds)},[e,t.detailPanelExpandedRowIds]);const h=A.useCallback(()=>{e.current.setState(b=>W({},b,{detailPanel:W({},b.detailPanel,Pz(e,t.getDetailPanelContent,t.getDetailPanelHeight,b.detailPanel.heightCache))})),e.current.forceUpdate()},[e,t.getDetailPanelContent,t.getDetailPanelHeight]);Xt(e,"sortedRowsSet",h);const p=A.useRef(),g=A.useRef(),m=A.useCallback(()=>{t.getDetailPanelContent===p.current&&t.getDetailPanelHeight===g.current||(e.current.setState(b=>W({},b,{detailPanel:W({},b.detailPanel,Pz(e,t.getDetailPanelContent,t.getDetailPanelHeight,b.detailPanel.heightCache))})),p.current=t.getDetailPanelContent,g.current=t.getDetailPanelHeight)},[e,t.getDetailPanelContent,t.getDetailPanelHeight]),v=A.useCallback((b,w)=>{var E;if(!r||r.length===0||!r.includes(w.id))return b.detail=0,b;m();const I=Xee(e);return b.detail=(E=I[w.id])!=null?E:0,b},[e,r,m]);$n(e,"rowHeight",v);const y=A.useRef(!0);y.current&&(y.current=!1,m())},_Ve=(e,t)=>{const r=A.useCallback(o=>t.getDetailPanelContent==null?(o.lookup[Nd]&&(delete o.lookup[Nd],o.orderedFields=o.orderedFields.filter(i=>i!==Nd)),o):(o.lookup[Nd]||(o.orderedFields=[Nd,...o.orderedFields],o.lookup[Nd]=W({},fVe,{headerName:e.current.getLocaleText("detailPanelToggle")})),o),[e,t.getDetailPanelContent]),n=A.useCallback((o,i)=>t.getDetailPanelContent==null||!Qp(e.current.state).includes(i)?o:[...o,qe["row--detailPanelExpanded"]],[e,t.getDetailPanelContent]);$n(e,"hydrateColumns",r),$n(e,"rowClassName",n)},kVe=e=>{const{isDraggable:t,classes:r}=e;return pt({root:["rowReorderCell",t&&"rowReorderCell--draggable"],placeholder:["rowReorderCellPlaceholder"]},Rr,r)};function EVe(e){const t=Gr(),r=Il(),n=$t(t,us),o=$t(t,X1),i=$t(t,oa),a=e.row.__reorder__||e.id,s=A.useMemo(()=>!!r.rowReordering&&!n.length&&o===1&&Object.keys(i).length===0,[r.rowReordering,n,o,i]),c={isDraggable:s,classes:r.classes},l=kVe(c),u=A.useCallback((d,h)=>p=>{Q1(p)||t.current.getRow(e.id)&&(t.current.publishEvent(d,t.current.getRowParams(e.id),p),h&&h(p))},[t,e.id]),f=s?{onDragStart:u("rowDragStart"),onDragOver:u("rowDragOver"),onDragEnd:u("rowDragEnd")}:null;return e.rowNode.type==="footer"?null:xe("div",W({className:l.root,draggable:s},f,{children:[R(r.slots.rowReorderIcon,{}),R("div",{className:l.placeholder,children:a})]}))}const TVe=e=>e.rowNode.type==="footer"||e.rowNode.type==="pinnedRow"?null:R(EVe,W({},e)),ite=W({},Ws,{field:"__reorder__",type:"reorder",sortable:!1,filterable:!1,width:50,align:"center",headerAlign:"center",disableColumnMenu:!0,disableExport:!0,disableReorder:!0,resizable:!1,aggregable:!1,renderHeader:()=>" ",renderCell:TVe});var m5=function(e){return e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e}(m5||{});let iP=null,cb={previousTargetId:null,dragDirection:null};const IVe=e=>{const{classes:t}=e;return pt({rowDragging:["row--dragging"]},Rr,t)},AVe=(e,t)=>{const r=Oi(e,"useGridRowReorder"),n=$t(e,us),o=$t(e,X1),i=A.useRef(null),a=A.useRef(null),s=A.useRef(),c={classes:t.classes},l=IVe(c),[u,f]=A.useState("");A.useEffect(()=>()=>{clearTimeout(s.current)},[]);const d=A.useMemo(()=>!t.rowReordering||!!n.length||o!==1,[t.rowReordering,n,o]),h=A.useCallback((m,v)=>{const y=oa(e.current.state);d||Object.keys(y).length!==0||(r.debug(`Start dragging row ${m.id}`),v.stopPropagation(),i.current=v.currentTarget,i.current.classList.add(l.rowDragging),f(m.id),s.current=setTimeout(()=>{i.current.classList.remove(l.rowDragging)}),a.current=e.current.getRowIndexRelativeToVisibleRows(m.id),e.current.setCellFocus(m.id,ite.field))},[d,l.rowDragging,r,e]),p=A.useCallback((m,v)=>{if(u==="")return;const y=e.current.getRowNode(m.id);if(!y||y.type==="footer"||y.type==="pinnedRow")return;r.debug(`Dragging over row ${m.id}`),v.preventDefault(),v.stopPropagation();const b=iP?iP.y-v.clientY:v.clientY;if(m.id!==u){const w=e.current.getRowIndexRelativeToVisibleRows(m.id),I={dragDirection:b>0?m5.DOWN:m5.UP,previousTargetId:m.id},O=I.dragDirection!==cb.dragDirection||I.previousTargetId!==cb.previousTargetId;(cb.dragDirection===null||Math.abs(b)>=1&&O)&&(e.current.setRowIndex(u,w),cb=I)}iP={x:v.clientX,y:v.clientY}},[e,r,u]),g=A.useCallback((m,v)=>{const y=oa(e.current.state);if(!(u===""||d||Object.keys(y).length!==0)){if(r.debug("End dragging row"),v.preventDefault(),v.stopPropagation(),clearTimeout(s.current),i.current=null,cb.dragDirection=null,v.dataTransfer.dropEffect==="none")e.current.setRowIndex(u,a.current),a.current=null;else{const b={row:e.current.getRow(u),targetIndex:e.current.getRowIndexRelativeToVisibleRows(m.id),oldIndex:a.current};e.current.publishEvent("rowOrderChange",b)}f("")}},[d,r,e,u]);Xt(e,"rowDragStart",h),Xt(e,"rowDragOver",p),Xt(e,"rowDragEnd",g),Xt(e,"cellDragOver",p),Gn(e,"rowOrderChange",t.onRowOrderChange)},PVe=e=>{const{classes:t}=e;return A.useMemo(()=>pt({rowReorderCellContainer:["rowReorderCellContainer"],columnHeaderReorder:["columnHeaderReorder"]},Rr,t),[t])},MVe=(e,t)=>{const r={classes:t.classes},n=PVe(r),o=A.useCallback(i=>{const a=W({},ite,{cellClassName:n.rowReorderCellContainer,headerClassName:n.columnHeaderReorder,headerName:e.current.getLocaleText("rowReorderingHeaderName")}),s=t.rowReordering,c=i.lookup[a.field]!=null;return s&&c||(s&&!c?(i.lookup[a.field]=a,i.orderedFields=[a.field,...i.orderedFields]):!s&&c&&(delete i.lookup[a.field],i.orderedFields=i.orderedFields.filter(l=>l!==a.field))),i},[e,n,t.rowReordering]);$n(e,"hydrateColumns",o)};function RVe({apiRef:e,visibleRows:t,range:r}){let{firstRowIndex:n,lastRowIndex:o}=r;const i=t.slice(r.firstRowIndex,r.lastRowIndex);let a=0,s=i.length-1,c=!1;for(;!c&&n<o;){var l,u;const f=((l=e.current.getRowNode(i[a].id))==null?void 0:l.type)==="skeletonRow",d=((u=e.current.getRowNode(i[s].id))==null?void 0:u.type)==="skeletonRow";f&&d&&(c=!0),f||(a+=1,n+=1),d||(s-=1,o-=1)}return c?{firstRowIndex:n,lastRowIndex:o}:void 0}function aP({lazyLoadingFeatureFlag:e,rowsLoadingMode:t,gridDimensions:r}){return!e||!r||t!=="server"}const OVe=(e,t)=>{var r;const n=Sf(e,t),o=$t(e,us),i=$t(e,Bi),a=A.useRef({firstRowToRender:0,lastRowToRender:0}),{lazyLoading:s}=(r=t.experimentalFeatures)!=null?r:{},c=A.useCallback(()=>{const d=e.current.getRenderContext(),[h,p]=Fd({firstIndex:d.firstRowIndex,lastIndex:d.lastRowIndex,minFirstIndex:0,maxLastIndex:n.rows.length,buffer:t.rowBuffer});return{firstRowToRender:h,lastRowToRender:p}},[e,t.rowBuffer,n.rows.length]),l=A.useCallback(d=>{const h=e.current.getRootDimensions();if(aP({lazyLoadingFeatureFlag:s,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:h}))return;const p={firstRowToRender:d.firstRowToRender,lastRowToRender:d.lastRowToRender,sortModel:o,filterModel:i};if(!(a.current.firstRowToRender===d.firstRowToRender&&a.current.lastRowToRender===d.lastRowToRender)){if(o.length===0&&i.items.length===0){const g=RVe({apiRef:e,visibleRows:n.rows,range:{firstRowIndex:d.firstRowToRender,lastRowIndex:d.lastRowToRender}});if(!g)return;p.firstRowToRender=g.firstRowIndex,p.lastRowToRender=g.lastRowIndex}a.current=d,e.current.publishEvent("fetchRows",p)}},[e,t.rowsLoadingMode,o,i,n.rows,s]),u=A.useCallback(d=>{const h=e.current.getRootDimensions();if(aP({lazyLoadingFeatureFlag:s,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:h}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:p,lastRowToRender:g}=c(),m={firstRowToRender:p,lastRowToRender:g,sortModel:d,filterModel:i};e.current.publishEvent("fetchRows",m)},[e,t.rowsLoadingMode,i,s,c]),f=A.useCallback(d=>{const h=e.current.getRootDimensions();if(aP({lazyLoadingFeatureFlag:s,rowsLoadingMode:t.rowsLoadingMode,gridDimensions:h}))return;e.current.requestPipeProcessorsApplication("hydrateRows");const{firstRowToRender:p,lastRowToRender:g}=c(),m={firstRowToRender:p,lastRowToRender:g,sortModel:o,filterModel:d};e.current.publishEvent("fetchRows",m)},[e,t.rowsLoadingMode,o,s,c]);Xt(e,"renderedRowsIntervalChange",l),Xt(e,"sortModelChange",u),Xt(e,"filterModelChange",f),Gn(e,"fetchRows",t.onFetchRows)},DVe="auto-generated-skeleton-row-root",FVe=e=>`${DVe}-${e}`,NVe=(e,t)=>{var r;const{lazyLoading:n}=(r=t.experimentalFeatures)!=null?r:{},o=A.useCallback(i=>{const a=i.tree[ro];if(!n||t.rowsLoadingMode!=="server"||!t.rowCount||a.children.length>=t.rowCount)return i;const s=W({},i.tree),c=[...a.children];for(let l=0;l<t.rowCount-a.children.length;l+=1){const u=FVe(l);c.push(u);const f={type:"skeletonRow",id:u,parent:ro,depth:0};s[u]=f}return s[ro]=W({},a,{children:c}),W({},i,{tree:s})},[t.rowCount,t.rowsLoadingMode,n]);$n(e,"hydrateRows",o)};function ate(e,t){var r,n;const o={topIds:[],bottomIds:[],idLookup:{}};return e==null||(r=e.top)==null||r.forEach(i=>{const a=h1(i,t);o.topIds.push(a),o.idLookup[a]=i}),e==null||(n=e.bottom)==null||n.forEach(i=>{const a=h1(i,t);o.bottomIds.push(a),o.idLookup[a]=i}),o}const LVe=(e,t,r)=>{var n;return r.current.caches.pinnedRows=ate(t.pinnedRows,t.getRowId),W({},e,{rows:W({},e.rows,{additionalRowGroups:W({},(n=e.rows)==null?void 0:n.additionalRowGroups,{pinnedRows:{top:[],bottom:[]}})})})},$Ve=(e,t)=>{const r=A.useCallback(o=>{e.current.caches.pinnedRows=ate(o,t.getRowId),e.current.requestPipeProcessorsApplication("hydrateRows")},[e,t.getRowId]);jr(e,{unstable_setPinnedRows:r},"public");const n=A.useRef(!0);A.useEffect(()=>{if(n.current){n.current=!1;return}e.current.unstable_setPinnedRows(t.pinnedRows)},[e,t.pinnedRows])};function Mz({groupingParams:e,rowModel:t,rowId:r,position:n,apiRef:o,isAutoGenerated:i}){var a,s;const c=W({},e.dataRowIdToModelLookup),l=W({},e.dataRowIdToIdLookup),u=W({},e.tree),f=W({},e.treeDepths);wE({type:"pinnedRow",id:r,depth:0,parent:ro,isAutoGenerated:i},u,f,null),i||(c[r]=t,l[r]=r),o.current.caches.rows.dataRowIdToModelLookup[r]=W({},t),o.current.caches.rows.dataRowIdToIdLookup[r]=r;const h=((a=e.additionalRowGroups)==null?void 0:a.pinnedRows)||{},p={id:r,model:t};return(s=e.additionalRowGroups)!=null&&(s=s.pinnedRows)!=null&&(s=s[n])!=null&&s.includes(p)?W({},e,{dataRowIdToModelLookup:c,dataRowIdToIdLookup:l,tree:u,treeDepths:f}):W({},e,{dataRowIdToModelLookup:c,dataRowIdToIdLookup:l,tree:u,treeDepths:f,additionalRowGroups:W({},e.additionalRowGroups,{pinnedRows:W({},h,{[n]:[...h[n]||[],p]})})})}const BVe=e=>{const t=A.useCallback(r=>{var n,o,i,a;const s=e.current.caches.pinnedRows||{};let c=W({},r,{additionalRowGroups:W({},r.additionalRowGroups,{pinnedRows:{}})});if((n=s.topIds)==null||n.forEach(l=>{c=Mz({groupingParams:c,rowModel:s.idLookup[l],rowId:l,position:"top",apiRef:e,isAutoGenerated:!1})}),(o=s.bottomIds)==null||o.forEach(l=>{c=Mz({groupingParams:c,rowModel:s.idLookup[l],rowId:l,position:"bottom",apiRef:e,isAutoGenerated:!1})}),(i=s.bottomIds)!=null&&i.length||(a=s.topIds)!=null&&a.length){const l=f=>!(c.tree[f]&&c.tree[f].type==="pinnedRow"),u=c.tree[ro];c.tree[ro]=W({},u,{children:u.children.filter(l)}),c.dataRowIds=c.dataRowIds.filter(l)}return c},[e]);$n(e,"hydrateRows",t)},UVe=(e,t)=>{const r=mHe(e,t);return mze(r,t),MVe(r,t),dVe(r,t),NVe(r,t),BVe(r),_Ve(r,t),xVe(r,t),dze(r),Ci(pje,r,t),Ci(fze,r,t),Ci(CVe,r,t),Ci(ote,r,t),Ci(EHe,r,t),Ci(LVe,r,t),Ci(aze,r,t),Ci(oze,r,t),Ci(VHe,r,t),Ci(gze,r,t),Ci(KHe,r,t),Ci(UHe,r,t),Ci(PHe,r,t),Ci(Cje,r,t),Ci(Fje,r,t),Ci(FHe,r,t),Ci(Qze,r,t),Ci(xHe,r,t),Ci(rje,r,t),Ci(u$e,r,t),mje(r,t),Lje(r),qHe(r,t),hze(r,t),wVe(r,t),$Ve(r,t),THe(r,t),sze(r,t),l7e(r,t),SVe(r,t),eje(r),nje(r,t),ize(r,t),WHe(r,t),YHe(r,t),jHe(r,t),vze(r,t),MHe(r,t),Sje(r,t),Nje(r,t),NHe(r,t),Zze(r,t),AVe(r,t),yze(r,t),vje(r,t),OVe(r,t),CHe(r),DHe(r,t),BHe(r,t),wHe(r,t),xze(r,t),bze(r,t),Jze(r),d$e(r,t),r},HVe=W({},yee,{columnMenuPinningItem:jje}),zVe=W({},bee,{columnMenuPinningItem:{displayOrder:15}}),jVe=A.forwardRef(function(t,r){return R(wee,W({ref:r},t,{defaultSlots:HVe,defaultSlotProps:zVe}))}),VVe=["getColumnsToRender","getRootProps"],WVe=e=>{const{classes:t}=e;return A.useMemo(()=>pt({headerFilterRow:["headerFilterRow"]},Rr,t),[t])},GVe=Go("div",{name:"MuiDataGrid",slot:"HeaderFilterRow",overridesResolver:(e,t)=>t.headerFilterRow})(()=>({display:"flex"})),Rz=Object.create(null),qVe=e=>{const t=lu(),{headerGroupingMaxDepth:r,hasOtherElementInTabSequence:n}=e,o=$t(t,W9e),i=zee(W({},e,{hasOtherElementInTabSequence:n||o!==null})),{getColumnsToRender:a,getRootProps:s}=i,c=ze(i,VVe),l=A.useRef(null);t.current.register("private",{headerFiltersElementRef:l});const u=A.useRef(null),f=Il(),d=WVe(f),h=!f.unstable_headerFilters,p=Math.floor(f.columnHeaderHeight*e.densityFactor),g=$t(t,Bi),m=J2(t,f.columnHeaderHeight)+(h?0:p),v=$t(t,V9e),y=A.useCallback(E=>{const I=g==null?void 0:g.items.find(N=>N.field===E.field&&N.operator!=="isAnyOf");if(I!=null)return I;const O=Rz[E.field];if(O!=null)return O;const D=r5(E);return Rz[E.field]=D,D},[g]),b=(E,I={})=>{if(h)return null;const O=a(E);if(O==null)return null;const{renderedColumns:D,firstColumnToRender:N}=O,U=[];for(let P=0;P<D.length;P+=1){var B,F,T;const _=D[P],C=N+P,S=(v==null?void 0:v.field)===_.field,x=C===0,L=(o==null?void 0:o.field)===_.field||x&&!e.hasOtherElementInTabSequence?0:-1,j=typeof _.headerClassName=="function"?_.headerClassName({field:_.field,colDef:_}):_.headerClassName,z=(B=(F=_.filterOperators)==null?void 0:F.filter(K=>K.value!=="isAnyOf"))!=null?B:[],Y=y(_);U.push(R(f.slots.headerFilterCell,W({colIndex:C,height:p,width:_.computedWidth,colDef:_,hasFocus:S,tabIndex:L,headerFilterMenuRef:u,headerClassName:j,filterOperators:z,"data-field":_.field,item:Y},(T=f.slotProps)==null?void 0:T.headerFilterCell,I),`${_.field}-filter`))}return R(GVe,{ref:l,ownerState:f,className:d.headerFilterRow,role:"row","aria-rowindex":r+2,children:U})},w={minHeight:m,maxHeight:m,lineHeight:`${p}px`};return W({},c,{getColumnFilters:b,getRootProps:h?s:(E={})=>W({style:w},E)})},Oz=1,KVe=1.5,YVe=e=>{const{scrollDirection:t,classes:r}=e,n={root:["scrollArea",`scrollArea--${t}`]};return pt(n,Rr,r)},XVe=Go("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${qe["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${qe["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${qe["scrollArea--left"]}`]:{left:0},[`&.${qe["scrollArea--right"]}`]:{right:0}}));function QVe(e){const{scrollDirection:t}=e,r=A.useRef(null),n=Gr(),o=X2(),[i,a]=A.useState(!1),[s,c]=A.useState(!0),l=$t(n,h0),u=$t(n,K2),f=A.useRef({left:0,top:0}),d=Il(),h=W({},d,{scrollDirection:t}),p=YVe(h),g=J2(n,d.columnHeaderHeight),m=Math.floor(d.columnHeaderHeight*l),v=A.useCallback(E=>{f.current=E;const I=n.current.getRootDimensions();c(()=>{if(t==="left")return f.current.left>0;if(t==="right"){const O=u-I.viewportInnerSize.width;return f.current.left<O}return!1})},[n,u,t]),y=A.useCallback(E=>{let I;if(E.preventDefault(),t==="left")I=E.clientX-r.current.getBoundingClientRect().right;else if(t==="right")I=Math.max(1,E.clientX-r.current.getBoundingClientRect().left);else throw new Error("MUI: Wrong drag direction");I=(I-Oz)*KVe+Oz,o.start(0,()=>{n.current.scroll({left:f.current.left+I,top:f.current.top})})},[t,n,o]),b=Mt(()=>{a(!0)}),w=Mt(()=>{a(!1)});return Xt(n,"scrollPositionChange",v),Xt(n,"columnHeaderDragStart",b),Xt(n,"columnHeaderDragEnd",w),!i||!s?null:R(XVe,{ref:r,className:it(p.root),ownerState:h,onDragOver:y,style:{height:m,top:g-m}})}const Dz=A.memo(QVe),ZVe=["style","className","innerRef","visibleColumns","sortColumnLookup","filterColumnLookup","columnPositions","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","densityFactor","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence","pinnedColumns"],JVe=e=>{const{leftPinnedColumns:t,rightPinnedColumns:r,classes:n}=e,o={leftPinnedColumns:["pinnedColumnHeaders",t&&t.length>0&&"pinnedColumnHeaders--left"],rightPinnedColumns:["pinnedColumnHeaders",r&&r.length>0&&"pinnedColumnHeaders--right","withBorderColor"]};return pt(o,Rr,n)},Fz=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,t/100},g5=We("div",{name:"MuiDataGrid",slot:"PinnedColumnHeaders",overridesResolver:(e,t)=>[{[`&.${qe["pinnedColumnHeaders--left"]}`]:t["pinnedColumnHeaders--left"]},{[`&.${qe["pinnedColumnHeaders--right"]}`]:t["pinnedColumnHeaders--right"]},t.pinnedColumnHeaders]})(({theme:e,ownerState:t})=>{var r;return W({position:"absolute",top:0,overflow:"hidden",zIndex:1,display:"flex",flexDirection:"column",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.default},e.vars?{backgroundImage:(r=e.vars.overlays)==null?void 0:r[2]}:W({},e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${to("#fff",Fz(2))}, ${to("#fff",Fz(2))})`}),t.side===mo.left&&{left:0},t.side===mo.right&&{right:0},t.side===mo.right&&t.showCellVerticalBorder&&{borderLeftWidth:"1px",borderLeftStyle:"solid"})});g5.propTypes={ownerState:ue.object.isRequired};const eWe=A.forwardRef(function(t,r){const{className:n,innerRef:o,visibleColumns:i,sortColumnLookup:a,filterColumnLookup:s,columnPositions:c,columnHeaderTabIndexState:l,columnGroupHeaderTabIndexState:u,columnHeaderFocus:f,columnGroupHeaderFocus:d,densityFactor:h,headerGroupingMaxDepth:p,columnMenuState:g,columnVisibility:m,columnGroupsHeaderStructure:v,hasOtherElementInTabSequence:y,pinnedColumns:b}=t,w=ze(t,ZVe),E=Il(),I=J1(),[O,D]=A.useState(0),N=An(),U=Mt(()=>{const J=I.current.getRootDimensions();if(!J)return;const G=J.hasScrollY?J.scrollBarSize:0;O!==G&&D(G)});Xt(I,"virtualScrollerContentSizeChange",U);const B=A.useMemo(()=>i.map(({field:J})=>J),[i]),[F,T]=vx(b,B,N.direction==="rtl"),{isDragging:P,renderContext:_,getRootProps:C,getInnerProps:S,getColumnHeaders:x,getColumnFilters:k,getColumnGroupHeaders:L}=qVe({innerRef:o,visibleColumns:i,sortColumnLookup:a,filterColumnLookup:s,columnPositions:c,columnHeaderTabIndexState:l,hasOtherElementInTabSequence:y,columnGroupHeaderTabIndexState:u,columnHeaderFocus:f,columnGroupHeaderFocus:d,densityFactor:h,headerGroupingMaxDepth:p,columnMenuState:g,columnVisibility:m,columnGroupsHeaderStructure:v,minColumnIndex:F.length}),j=W({},E,{leftPinnedColumns:F,rightPinnedColumns:T,classes:E.classes}),z=JVe(j),Y=_&&F.length?W({},_,{firstColumnIndex:0,lastColumnIndex:F.length}):null,K=_&&T.length?W({},_,{firstColumnIndex:B.length-T.length,lastColumnIndex:B.length}):null,Q=S(),q={role:Q.role};return xe(jee,W({ref:r,className:n},C(w),{children:[Y&&xe(g5,W({className:z.leftPinnedColumns,ownerState:W({},j,{side:mo.left,showCellVerticalBorder:E.showCellVerticalBorder})},q,{children:[L({renderContext:Y,minFirstColumn:Y.firstColumnIndex,maxLastColumn:Y.lastColumnIndex}),x({renderContext:Y,minFirstColumn:Y.firstColumnIndex,maxLastColumn:Y.lastColumnIndex},{disableReorder:!0}),k({renderContext:Y,minFirstColumn:Y.firstColumnIndex,maxLastColumn:Y.lastColumnIndex})]})),R(Dz,{scrollDirection:"left"}),xe(Vee,W({isDragging:P},Q,{children:[L({renderContext:_,minFirstColumn:F.length,maxLastColumn:B.length-T.length}),x({renderContext:_,minFirstColumn:F.length,maxLastColumn:B.length-T.length}),k({renderContext:_,minFirstColumn:F.length,maxLastColumn:B.length-T.length})]})),R(Dz,{scrollDirection:"right"}),K&&xe(g5,W({ownerState:W({},j,{side:mo.right,showCellVerticalBorder:E.showCellVerticalBorder}),className:z.rightPinnedColumns,style:{paddingRight:O}},q,{children:[L({renderContext:K,minFirstColumn:K.firstColumnIndex,maxLastColumn:K.lastColumnIndex}),x({renderContext:K,minFirstColumn:K.firstColumnIndex,maxLastColumn:K.lastColumnIndex},{disableReorder:!0,separatorSide:e8.Left}),k({renderContext:K,minFirstColumn:K.firstColumnIndex,maxLastColumn:K.lastColumnIndex})]}))]}))}),tWe={ColumnMenuPinRightIcon:Gje,ColumnMenuPinLeftIcon:qje},rWe=W({},tWe),nWe=rWe,oWe=W({},Wee,nWe,{ColumnMenu:jVe,ColumnHeaders:eWe,HeaderFilterCell:rVe,HeaderFilterMenu:nVe}),iWe=W({},Gee,{scrollEndThreshold:80,treeData:!1,defaultGroupingExpansionDepth:0,autosizeOnMount:!1,disableAutosize:!1,disableColumnPinning:!1,keepColumnPositionIfDraggedOutside:!1,disableChildrenFiltering:!1,disableChildrenSorting:!1,rowReordering:!1,rowsLoadingMode:"client",getDetailPanelHeight:()=>500,unstable_headerFilters:!1}),aWe=f8(oWe),sWe=e=>{const[t,r,n]=Xze(Wt({props:e,name:"MuiDataGrid"})),o=A.useMemo(()=>W({},UUe,n.localeText),[n.localeText]),i=A.useMemo(()=>qze({defaultSlots:aWe,slots:n.slots,components:t}),[t,n.slots]);return A.useMemo(()=>{var a;return W({},iWe,n,{localeText:o,slots:i,slotProps:(a=n.slotProps)!=null?a:r,signature:"DataGridPro"})},[n,o,i,r])},lWe=()=>"MTcwMTY0MDgwMDAwMA==",Nz=lWe(),ste=A.forwardRef(function(t,r){const n=sWe(t),o=UVe(n.apiRef,n);b2("x-data-grid-pro",Nz);const i=$t(o,_h);return R(HUe,{privateApiRef:o,props:n,children:xe(aLe,W({className:n.className,style:n.style,sx:n.sx,ref:r},n.forwardedProps,{children:[R(hUe,{}),R(K9e,{VirtualScrollerComponent:bVe,ColumnHeadersProps:{pinnedColumns:i},children:R(DY,{packageName:"x-data-grid-pro",releaseInfo:Nz})}),R(Y9e,{})]}))})}),lte=A.memo(ste);ste.propTypes={apiRef:ue.shape({current:ue.object.isRequired}),"aria-label":ue.string,"aria-labelledby":ue.string,autoHeight:ue.bool,autoPageSize:ue.bool,autosizeOnMount:ue.bool,autosizeOptions:ue.shape({columns:ue.arrayOf(ue.string),expand:ue.bool,includeHeaders:ue.bool,includeOutliers:ue.bool,outliersFactor:ue.number}),cellModesModel:ue.object,checkboxSelection:ue.bool,checkboxSelectionVisibleOnly:wA(ue.bool),classes:ue.object,clipboardCopyCellDelimiter:ue.string,columnBuffer:ue.number,columnGroupingModel:ue.arrayOf(ue.object),columnHeaderHeight:ue.number,columns:ue.arrayOf(ue.object).isRequired,columnThreshold:ue.number,columnVisibilityModel:ue.object,components:ue.object,componentsProps:ue.object,defaultGroupingExpansionDepth:ue.number,density:ue.oneOf(["comfortable","compact","standard"]),detailPanelExpandedRowIds:ue.arrayOf(ue.oneOfType([ue.number,ue.string]).isRequired),disableAutosize:ue.bool,disableChildrenFiltering:ue.bool,disableChildrenSorting:ue.bool,disableColumnFilter:ue.bool,disableColumnMenu:ue.bool,disableColumnPinning:ue.bool,disableColumnReorder:ue.bool,disableColumnResize:ue.bool,disableColumnSelector:ue.bool,disableDensitySelector:ue.bool,disableEval:ue.bool,disableMultipleColumnsFiltering:ue.bool,disableMultipleColumnsSorting:ue.bool,disableMultipleRowSelection:ue.bool,disableRowSelectionOnClick:ue.bool,disableVirtualization:ue.bool,editMode:ue.oneOf(["cell","row"]),experimentalFeatures:ue.shape({ariaV7:ue.bool,columnGrouping:ue.bool,lazyLoading:ue.bool,warnIfFocusStateIsNotSynced:ue.bool}),filterDebounceMs:ue.number,filterMode:wA(ue.oneOf(["client","server"])),filterModel:ue.shape({items:ue.arrayOf(ue.shape({field:ue.string.isRequired,id:ue.oneOfType([ue.number,ue.string]),operator:ue.string.isRequired,value:ue.any})).isRequired,logicOperator:ue.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:ue.bool,quickFilterLogicOperator:ue.oneOf(["and","or"]),quickFilterValues:ue.array}),forwardedProps:ue.object,getCellClassName:ue.func,getDetailPanelContent:ue.func,getDetailPanelHeight:ue.func,getEstimatedRowHeight:ue.func,getRowClassName:ue.func,getRowHeight:ue.func,getRowId:ue.func,getRowSpacing:ue.func,getTreeDataPath:ue.func,groupingColDef:ue.oneOfType([ue.func,ue.object]),hideFooter:ue.bool,hideFooterPagination:ue.bool,hideFooterRowCount:wA(ue.bool),hideFooterSelectedRowCount:ue.bool,ignoreDiacritics:ue.bool,initialState:ue.object,isCellEditable:ue.func,isGroupExpandedByDefault:ue.func,isRowSelectable:ue.func,keepColumnPositionIfDraggedOutside:ue.bool,keepNonExistentRowsSelected:ue.bool,loading:ue.bool,localeText:ue.object,logger:ue.shape({debug:ue.func.isRequired,error:ue.func.isRequired,info:ue.func.isRequired,warn:ue.func.isRequired}),logLevel:ue.oneOf(["debug","error","info","warn",!1]),nonce:ue.string,onCellClick:ue.func,onCellDoubleClick:ue.func,onCellEditStart:ue.func,onCellEditStop:ue.func,onCellKeyDown:ue.func,onCellModesModelChange:ue.func,onClipboardCopy:ue.func,onColumnHeaderClick:ue.func,onColumnHeaderDoubleClick:ue.func,onColumnHeaderEnter:ue.func,onColumnHeaderLeave:ue.func,onColumnHeaderOut:ue.func,onColumnHeaderOver:ue.func,onColumnOrderChange:ue.func,onColumnResize:ue.func,onColumnVisibilityModelChange:ue.func,onColumnWidthChange:ue.func,onDetailPanelExpandedRowIdsChange:ue.func,onFetchRows:ue.func,onFilterModelChange:ue.func,onMenuClose:ue.func,onMenuOpen:ue.func,onPaginationModelChange:ue.func,onPinnedColumnsChange:ue.func,onPreferencePanelClose:ue.func,onPreferencePanelOpen:ue.func,onProcessRowUpdateError:ue.func,onResize:ue.func,onRowClick:ue.func,onRowDoubleClick:ue.func,onRowEditCommit:ue.func,onRowEditStart:ue.func,onRowEditStop:ue.func,onRowModesModelChange:ue.func,onRowOrderChange:ue.func,onRowSelectionModelChange:ue.func,onRowsScrollEnd:ue.func,onSortModelChange:ue.func,onStateChange:ue.func,pageSizeOptions:ue.arrayOf(ue.oneOfType([ue.number,ue.shape({label:ue.string.isRequired,value:ue.number.isRequired})]).isRequired),pagination:ue.bool,paginationMode:ue.oneOf(["client","server"]),paginationModel:ue.shape({page:ue.number.isRequired,pageSize:ue.number.isRequired}),pinnedColumns:ue.shape({left:ue.arrayOf(ue.string),right:ue.arrayOf(ue.string)}),pinnedRows:ue.shape({bottom:ue.arrayOf(ue.object),top:ue.arrayOf(ue.object)}),processRowUpdate:ue.func,rowBuffer:ue.number,rowCount:ue.number,rowHeight:ue.number,rowModesModel:ue.object,rowPositionsDebounceMs:ue.number,rowReordering:ue.bool,rows:ue.arrayOf(ue.object).isRequired,rowSelection:ue.bool,rowSelectionModel:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.number,ue.string]).isRequired),ue.number,ue.string]),rowsLoadingMode:ue.oneOf(["client","server"]),rowSpacingType:ue.oneOf(["border","margin"]),rowThreshold:ue.number,scrollbarSize:ue.number,scrollEndThreshold:ue.number,showCellVerticalBorder:ue.bool,showColumnVerticalBorder:ue.bool,slotProps:ue.object,slots:ue.object,sortingMode:ue.oneOf(["client","server"]),sortingOrder:ue.arrayOf(ue.oneOf(["asc","desc"])),sortModel:ue.arrayOf(ue.shape({field:ue.string.isRequired,sort:ue.oneOf(["asc","desc"])})),sx:ue.oneOfType([ue.arrayOf(ue.oneOfType([ue.func,ue.object,ue.bool])),ue.func,ue.object]),throttleRowsMs:ue.number,treeData:ue.bool,unstable_headerFilters:ue.bool,unstable_ignoreValueFormatterDuringExport:ue.oneOfType([ue.shape({clipboardExport:ue.bool,csvExport:ue.bool}),ue.bool])};const m8=rHe;function cWe(e){rr(1,arguments);var t=e||{},r=tr(t.start),n=tr(t.end),o=n.getTime(),i=[];if(!(r.getTime()<=o))throw new RangeError("Invalid interval");var a=r;for(a.setHours(0,0,0,0),a.setDate(1);a.getTime()<=o;)i.push(tr(a)),a.setMonth(a.getMonth()+1);return i}function uWe(e){rr(1,arguments);var t=tr(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}const cte=e=>{if(!e.isActive)return!1;const{serviceEndDate:t,serviceStartDate:r}=e,n=new Date;return r&&t?XY(n,{start:Hr(r),end:Hr(t)}):r?ym(af(n),Hr(r)):t?wg(af(n),Hr(t)):!0},v5=e=>e.isActive?!e.inactiveDate||ym(Hr(e.inactiveDate),new Date):!1,mr={ACCOUNTS:"/accounts",ALLOCATIONS:"/allocations",BILLS:"/bills",BUDGETS:"/budgets",DASHBOARDS:"/dashboards",IN_PROCESS_BILLS:"/inProcessBills",FACILITIES:"/facilities",FACILITY_GROUPS:"/facilityGroups",FORGOT_PASSWORD:"/forgotPassword",LINE_ITEM_SUBTYPES:"/lineItemSubtypes",METERS:"/meters",ORGANIZATIONS:"/organizations",PROJECTS:"/projects",UTILITIES:"/utilities",UTILITY_CREDENTIALS:"/utilityCredentials",UTILITY_REGEX:"/utilityRegex",USERS:"/users"},eC="multipart/form-data; boundary=----WebKitFormBoundarySuB4CUhmigFY73hg",km="application/json",dWe="application/json",ute="Content-Type",fg=Symbol(),dte=Symbol();function Lz(e={}){var t;return(t=Object.entries(e).find(([r])=>r.toLowerCase()===ute.toLowerCase()))===null||t===void 0?void 0:t[1]}function $z(e){return/^application\/.*json.*/.test(e)}const Em=function(e,t,r=!1){return Object.entries(t).reduce((n,[o,i])=>{const a=e[o];return Array.isArray(a)&&Array.isArray(i)?n[o]=r?[...a,...i]:i:typeof a=="object"&&typeof i=="object"?n[o]=Em(a,i,r):n[o]=i,n},{...e})},m1={options:{},errorType:"text",polyfills:{},polyfill(e,t=!0,r=!1,...n){const o=this.polyfills[e]||(typeof self<"u"?self[e]:null)||(typeof global<"u"?global[e]:null);if(t&&!o)throw new Error(e+" is not defined");return r&&o?new o(...n):o}};function fWe(e,t=!1){m1.options=t?e:Em(m1.options,e)}function hWe(e,t=!1){m1.polyfills=t?e:Em(m1.polyfills,e)}function pWe(e){m1.errorType=e}const mWe=e=>t=>e.reduceRight((r,n)=>n(r),t)||t;class fte extends Error{}const gWe=e=>{const t=Object.create(null);e=e._addons.reduce((b,w)=>w.beforeRequest&&w.beforeRequest(b,e._options,t)||b,e);const{_url:r,_options:n,_config:o,_catchers:i,_resolvers:a,_middlewares:s,_addons:c}=e,l=new Map(i),u=Em(o.options,n);let f=r;const d=mWe(s)((b,w)=>(f=b,o.polyfill("fetch")(b,w)))(r,u),h=new Error,p=d.catch(b=>{throw{[fg]:b}}).then(b=>{if(!b.ok){const w=new fte;if(w.cause=h,w.stack=w.stack+`
CAUSE: `+h.stack,w.response=b,w.url=f,b.type==="opaque")throw w;return b.text().then(E=>{var I;if(w.message=E,o.errorType==="json"||((I=b.headers.get("Content-Type"))===null||I===void 0?void 0:I.split(";")[0])==="application/json")try{w.json=JSON.parse(E)}catch{}throw w.text=E,w.status=b.status,w})}return b}),g=b=>b.catch(w=>{const E=w.hasOwnProperty(fg),I=E?w[fg]:w,O=(I==null?void 0:I.status)&&l.get(I.status)||l.get(I==null?void 0:I.name)||E&&l.has(fg)&&l.get(fg);if(O)return O(I,e);const D=l.get(dte);if(D)return D(I,e);throw I}),m=b=>w=>g(b?p.then(E=>E&&E[b]()).then(E=>w?w(E):E):p.then(E=>w?w(E):E)),v={_wretchReq:e,_fetchReq:d,_sharedState:t,res:m(null),json:m("json"),blob:m("blob"),formData:m("formData"),arrayBuffer:m("arrayBuffer"),text:m("text"),error(b,w){return l.set(b,w),this},badRequest(b){return this.error(400,b)},unauthorized(b){return this.error(401,b)},forbidden(b){return this.error(403,b)},notFound(b){return this.error(404,b)},timeout(b){return this.error(408,b)},internalError(b){return this.error(500,b)},fetchError(b){return this.error(fg,b)}},y=c.reduce((b,w)=>({...b,...typeof w.resolver=="function"?w.resolver(b):w.resolver}),v);return a.reduce((b,w)=>w(b,e),y)},vWe={_url:"",_options:{},_config:m1,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(e){return{...this,_addons:[...this._addons,e],...e.wretch}},errorType(e){return{...this,_config:{...this._config,errorType:e}}},polyfills(e,t=!1){return{...this,_config:{...this._config,polyfills:t?e:Em(this._config.polyfills,e)}}},url(e,t=!1){if(t)return{...this,_url:e};const r=this._url.split("?");return{...this,_url:r.length>1?r[0]+e+"?"+r[1]:this._url+e}},options(e,t=!1){return{...this,_options:t?e:Em(this._options,e)}},headers(e){const t=e?Array.isArray(e)?Object.fromEntries(e):"entries"in e?Object.fromEntries(e.entries()):e:{};return{...this,_options:Em(this._options,{headers:t})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[ute]:e})},auth(e){return this.headers({Authorization:e})},catcher(e,t){const r=new Map(this._catchers);return r.set(e,t),{...this,_catchers:r}},catcherFallback(e){return this.catcher(dte,e)},resolve(e,t=!1){return{...this,_resolvers:t?[e]:[...this._resolvers,e]}},defer(e,t=!1){return{...this,_deferred:t?[e]:[...this._deferred,e]}},middlewares(e,t=!1){return{...this,_middlewares:t?e:[...this._middlewares,...e]}},fetch(e=this._options.method,t="",r=null){let n=this.url(t).options({method:e});const o=Lz(n._options.headers),i=typeof r=="object"&&(!n._options.headers||!o||$z(o));return n=r?i?n.json(r,o):n.body(r):n,gWe(n._deferred.reduce((a,s)=>s(a,a._url,a._options),n))},get(e=""){return this.fetch("GET",e)},delete(e=""){return this.fetch("DELETE",e)},put(e,t=""){return this.fetch("PUT",t,e)},post(e,t=""){return this.fetch("POST",t,e)},patch(e,t=""){return this.fetch("PATCH",t,e)},head(e=""){return this.fetch("HEAD",e)},opts(e=""){return this.fetch("OPTIONS",e)},body(e){return{...this,_options:{...this._options,body:e}}},json(e,t){const r=Lz(this._options.headers);return this.content(t||$z(r)&&r||dWe).body(JSON.stringify(e))}};function Km(e="",t={}){return{...vWe,_url:e,_options:t}}Km.default=Km;Km.options=fWe;Km.errorType=pWe;Km.polyfills=hWe;Km.WretchError=fte;function hte(e,t=!1,r,n=r.polyfill("FormData",!0,!0),o=[]){return Object.entries(e).forEach(([i,a])=>{let s=o.reduce((c,l)=>c?`${c}[${l}]`:l,null);if(s=s?`${s}[${i}]`:i,a instanceof Array||globalThis.FileList&&a instanceof FileList)for(const c of a)n.append(s,c);else t&&typeof a=="object"&&(!(t instanceof Array)||!t.includes(i))?a!==null&&hte(a,t,r,n,[...o,i]):n.append(s,a)}),n}const yWe={wretch:{formData(e,t=!1){return this.body(hte(e,t,this._config))}}},bWe=yWe;function Bz(e){return typeof e<"u"?e:""}const wWe=(e,t,r,n)=>{let o;if(typeof t=="string")o=t;else{const a=n.polyfill("URLSearchParams",!0,!0);for(const s in t){const c=t[s];if(t[s]instanceof Array)for(const l of c)a.append(s,Bz(l));else a.append(s,Bz(c))}o=a.toString()}const i=e.split("?");return o?r||i.length<2?i[0]+"?"+o:e+"&"+o:r?i[0]:e},xWe={wretch:{query(e,t=!1){return{...this,_url:wWe(this._url,e,t,this._config)}}}},CWe=xWe,SWe="https://api.nimble-energy.com",ey=Km(SWe).addon(bWe).addon(CWe).options({credentials:"include"}),g8=async(e,t={})=>await ey.url(e).query(t).get().blob(),Ao=async(e,t={})=>await ey.url(e).query(t).get().json(),fa=async(e,t={},r={},n=km)=>{let o=ey.url(e).query(t);return n===eC&&(o=o.formData(r)),n===km&&(o=o.json(r).content(km)),await o.post().badRequest(i=>{throw i.json}).res()},_We=async(e,t={},r={},n=km)=>await ey.url(e).query(t).content(n).json(r).post().badRequest(o=>{throw o.json}).res(),Ys=async(e,t={},r={},n=km)=>{let o=ey.url(e).query(t);return n===eC&&(o=o.formData(r)),n===km&&(o=o.json(r).content(km)),await o.patch().badRequest(i=>{throw i.json}).res()},ty=async(e,t={})=>await ey.url(e).query(t).delete().res(),kWe=async e=>await fa(mr.ACCOUNTS,{},e),hp=async({filter:e}={})=>await Ao(mr.ACCOUNTS,{...e&&{filters:JSON.stringify(e)}}),pte=async(e,t)=>await Ys(`${mr.ACCOUNTS}/${e}`,{},t),a4=async e=>await Ao(`${mr.ACCOUNTS}/${e}`),mte=async e=>await Ao(`${mr.ACCOUNTS}/${e}/lastBill`),EWe=async e=>await Ao(`${mr.ACCOUNTS}/${e}/billsAccountStats`),gte=A.createContext({filter:{filterColumnName:"",filterColumnValue:"",operator:""},setFilter:void 0,selectedAccount:null,setSelectedAccount:void 0,setSortModel:void 0,sortModel:[],masterAccountId:void 0,setMasterAccountId:void 0});function s4(){return A.useContext(gte)}function TWe({children:e}){const[t,r]=A.useState({filterColumnName:"",filterColumnValue:"",operator:""}),[n,o]=A.useState(null),[i,a]=A.useState([]),[s,c]=A.useState(void 0),l=h=>{r(h)},u=h=>{o(h)},f=h=>{a(h)},d=h=>c(h);return R(gte.Provider,{value:{filter:t,setFilter:l,selectedAccount:n,setSelectedAccount:u,setSortModel:f,sortModel:i,masterAccountId:s,setMasterAccountId:d},children:e})}const Br=({message:e,open:t,isLoading:r=!1,onClose:n,primaryButtonLabel:o,onPrimaryButtonClicked:i,secondaryButtonLabel:a,onSecondaryButtonClicked:s,renderElement:c})=>xe(SD,{open:t,onClose:n,children:[R(CD,{children:xe(Jt,{direction:"column",justifyContent:"center",alignItems:"center",children:[c&&A.cloneElement(c,{...c.props,style:{height:"80px",width:"50px",marginTop:"-15px",marginBottom:"-5px",...c.props.style}}),R(jt,{children:e})]})}),xe(ED,{children:[a&&R(Ft,{type:"submit",disabled:r,onClick:()=>s&&s(),color:"secondary",variant:"outlined",children:a}),R(Ft,{disableElevation:!0,disabled:r,onClick:i,color:"secondary",variant:"contained",children:o})]})]}),v8={StateContext:A.createContext(void 0),DispatchContext:A.createContext(void 0)};function vte(){return A.useContext(v8.StateContext)}function IWe(){return A.useContext(v8.DispatchContext)}const l4=({defaultGlobalState:e,children:t})=>{const{StateContext:r,DispatchContext:n}=v8,[o,i]=A.useReducer((a,s)=>({...a,...s}),e);return R(r.Provider,{value:o,children:R(n.Provider,{value:i,children:t})})};function AWe({customToolbar:e,filename:t="File",showFilter:r=!0,showExport:n=!0}){return xe(tee,{children:[r&&R(JBe,{}),n&&R(sUe,{color:"secondary",csvOptions:{fileName:`Nimble Energy - ${t}`}}),e]})}function PWe(e,t,r){const{id:n}=e==null?void 0:e.row;n&&t(`${MWe(r)}/${n}`)}function MWe(e){const t=window.location.pathname;return t.endsWith(e)?t:`${t}/${e}`}function Yn({apiRef:e,checkboxSelection:t=!0,columns:r,contextName:n="",csvFilename:o,columnVisibilityModel:i={},customToolbarOptions:a,dataFetchError:s=!1,disableMultipleColumnsFiltering:c=!1,editMode:l,filterMode:u="client",filterModel:f,handleSelectionChange:d,initialState:h={},isRowSelectable:p,isRowNavigation:g=!0,loading:m=!1,getRowClassName:v,getRowId:y,onFilterModelChange:b,onPaginationModelChange:w,onRowDoubleClick:E,onRowModesModelChange:I,onRowOrderChange:O,onSortModelChange:D,paginationMode:N="client",paginationModel:U,processRowUpdate:B,pinCheckboxSelection:F=!0,pinActions:T=!0,rows:P,rowCount:_,rowModesModel:C,rowReordering:S,rowSelectionModel:x,showToolbar:k=!0,showToolbarFilter:L=!0,slots:j,slotProps:z,sortModel:Y,sortingMode:K="client",sx:Q={}}){var pe,ce;const q=vte()??{},J=IWe(),G=ii(),V=E||PWe,X=(ne,he)=>{ne.reason===_u.rowFocusOut&&(he.defaultMuiPrevented=!0)},{filter:te,sort:ee}=q[n]??{},re=(ne,he)=>n&&J({[n]:{...q[n],[he]:ne}}),se={...h};return(F||T)&&(se.pinnedColumns={...(se==null?void 0:se.pinnedColumns)??{}},F&&(se.pinnedColumns.left=[...((pe=h.pinnedColumns)==null?void 0:pe.left)??[],p0.field]),T&&(se.pinnedColumns.right=[...((ce=h.pinnedColumns)==null?void 0:ce.right)??[],"actions"])),R(nr,{display:"grid",width:"100%",minHeight:Q.minHeight??"24rem",overflow:"hidden",children:R(lte,{apiRef:e,checkboxSelection:t,columnVisibilityModel:i,columns:r,disableColumnMenu:!0,disableMultipleColumnsFiltering:c,editMode:l,filterMode:u,filterModel:f??te,initialState:se,isRowSelectable:p,loading:m,getRowClassName:v,getRowId:y,onFilterModelChange:(ne,he)=>{d&&d([]),re(ne,"filter"),b&&b(ne,he)},onPaginationModelChange:w,onRowDoubleClick:ne=>g&&((p==null?void 0:p(ne))??!0)&&V(ne,G,n),onRowEditStop:X,onRowModesModelChange:I,onRowSelectionModelChange:d,onRowOrderChange:O,onSortModelChange:(ne,he)=>{d&&d([]),re(ne,"sort"),D&&D(ne,he)},pagination:!0,paginationMode:N,paginationModel:U,processRowUpdate:B,rowCount:_,rowModesModel:C,rowReordering:S,rowSelectionModel:x,rows:s?[]:P,slots:{...k?{...j,toolbar:()=>R(AWe,{filename:o,customToolbar:a,showFilter:L})}:j,noRowsOverlay:()=>R(Jt,{height:"100%",alignItems:"center",justifyContent:"center",children:s?"Error fetching data. Please try again.":"No data found."})},sortModel:Y??ee,sortingMode:K,slotProps:z,sx:{"& .MuiDataGrid-pinnedColumnHeaders":{paddingRight:"0px !important"},...Q}})})}var y8={},sP={};const RWe=su(dSe);var Uz;function tn(){return Uz||(Uz=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=RWe}(sP)),sP}const rn=su(Ope);var OWe=Wr;Object.defineProperty(y8,"__esModule",{value:!0});var yte=y8.default=void 0,DWe=OWe(tn()),FWe=rn,NWe=(0,DWe.default)((0,FWe.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");yte=y8.default=NWe;function tC({infoMessage:e,placement:t="bottom-start"}){const r=We(({className:n,...o})=>R(HD,{...o,classes:{popper:n}}))(({theme:n})=>({[`& .${Uu.tooltip}`]:{backgroundColor:n.palette.grey[50],color:n.palette.grey[800],boxShadow:n.shadows[3],fontSize:"13px",lineHeight:"18px",opacity:1,fontWeight:400,padding:"0.5rem 0.75rem"},[`& .${Uu.arrow}`]:{color:n.palette.grey[50]}}));return R(r,{arrow:!0,title:e,placement:t,children:R(yte,{sx:{color:"#0003",marginInline:1}})})}var b8={},LWe=Wr;Object.defineProperty(b8,"__esModule",{value:!0});var w8=b8.default=void 0,$We=LWe(tn()),BWe=rn,UWe=(0,$We.default)((0,BWe.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}),"CancelOutlined");w8=b8.default=UWe;var x8={},HWe=Wr;Object.defineProperty(x8,"__esModule",{value:!0});var es=x8.default=void 0,zWe=HWe(tn()),jWe=rn,VWe=(0,zWe.default)((0,jWe.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM5.92 19H5v-.92l9.06-9.06.92.92L5.92 19zM20.71 5.63l-2.34-2.34c-.2-.2-.45-.29-.71-.29s-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41z"}),"CreateOutlined");es=x8.default=VWe;var C8={},WWe=Wr;Object.defineProperty(C8,"__esModule",{value:!0});var qo=C8.default=void 0,GWe=WWe(tn()),qWe=rn,KWe=(0,GWe.default)((0,qWe.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");qo=C8.default=KWe;var S8={},YWe=Wr;Object.defineProperty(S8,"__esModule",{value:!0});var _8=S8.default=void 0,XWe=YWe(tn()),QWe=rn,ZWe=(0,XWe.default)((0,QWe.jsx)("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"}),"KeyboardReturn");_8=S8.default=ZWe;var k8={},JWe=Wr;Object.defineProperty(k8,"__esModule",{value:!0});var E8=k8.default=void 0,eGe=JWe(tn()),tGe=rn,rGe=(0,eGe.default)((0,tGe.jsx)("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2v9.67z"}),"SaveAltOutlined");E8=k8.default=rGe;class mi{constructor(t,r,n){this.error=t,this.status=r,this.path=n,this.timestamp=new Date().toISOString()}static compatible(t){return t.error&&t.status&&t.path&&t.timestamp}}var _a=(e=>(e.EQUALS="==",e.GREATER_THAN=">",e.GREATER_THAN_OR_EQUAL_TO=">=",e.LESS_THAN="<",e.LESS_THAN_OR_EQUAL_TO="<=",e.NOT_EQUAL_TO="!=",e))(_a||{}),CE=(e=>(e.IN="in",e.NOT_IN="not-in",e.CONTAINS="contains",e))(CE||{}),ka=(e=>(e.ActualDemand="Actual Demand",e.BilledDemand="Billed Demand",e.Demand="Demand",e.Charges="Charges",e.SolarGridPurchased="Solar Grid Purchased",e.SolarOnSiteExcess="Solar Onsite Excess",e.Taxes="Taxes",e.Usage="Usage",e.Other="Other",e))(ka||{});function bte(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var yx;(function(e){e.event="event",e.props="prop"})(yx||(yx={}));function ih(){}function nGe(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(i,a){return i===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function bx(e){return!!(e||"").match(/\d/)}function pv(e){return e==null}function oGe(e){return typeof e=="number"&&isNaN(e)}function wte(e){return pv(e)||oGe(e)||typeof e=="number"&&!isFinite(e)}function xte(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function iGe(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function aGe(e,t,r){var n=iGe(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function sGe(e){var t=A.useRef(e);t.current=e;var r=A.useRef(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function T8(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNegation:r,addNegation:n}}function lGe(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function Cte(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function Hz(e,t){return Array(t+1).join(e)}function Ste(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(i=Number(i),!i)return r+o;o=o.replace(".","");var a=1+i,s=o.length;return a<0?o="0."+Hz("0",Math.abs(a))+o:a>=s?o=o+Hz("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function zz(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=T8(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,c=parseFloat("0."+(a||"0")),l=a.length<=t?"0."+a:c.toFixed(t),u=l.split("."),f=i.split("").reverse().reduce(function(g,m,v){return g.length>v?(Number(g[0])+Number(m)).toString()+g.substring(1,g.length):m+g},u[0]),d=Cte(u[1]||"",t,r),h=s?"-":"",p=n?".":"";return""+h+f+p+d}function Hp(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var _te=nGe(function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}});function cGe(e,t,r){return Math.min(Math.max(e,t),r)}function lP(e){return Math.max(e.selectionStart,e.selectionEnd)}function uGe(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function dGe(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function fGe(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function hGe(e,t,r,n,o,i,a){a===void 0&&(a=fGe);var s=o.findIndex(function(w){return w}),c=e.slice(0,s);!t&&!r.startsWith(c)&&(t=c,r=c+r,n=n+c.length);for(var l=r.length,u=e.length,f={},d=new Array(l),h=0;h<l;h++){d[h]=-1;for(var p=0,g=u;p<g;p++){var m=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:p});if(m&&f[p]!==!0){d[h]=p,f[p]=!0;break}}}for(var v=n;v<l&&(d[v]===-1||!i(r[v]));)v++;var y=v===l||d[v]===-1?u:d[v];for(v=n-1;v>0&&d[v]===-1;)v--;var b=v===-1||d[v]===-1?0:d[v]+1;return b>y?y:n-b<y-n?b:y}function jz(e,t,r,n){var o=e.length;if(t=cGe(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function pGe(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(bx(e[r])||bx(e[r-1]));return t}function kte(e,t,r,n,o,i){i===void 0&&(i=ih);var a=sGe(function(p,g){var m,v;return wte(p)?(v="",m=""):typeof p=="number"||g?(v=typeof p=="number"?Ste(p):p,m=n(v)):(v=o(p,void 0),m=n(v)),{formattedValue:m,numAsString:v}}),s=A.useState(function(){return a(pv(e)?t:e,r)}),c=s[0],l=s[1],u=function(p,g){p.formattedValue!==c.formattedValue&&l({formattedValue:p.formattedValue,numAsString:p.value}),i(p,g)},f=e,d=r;pv(e)&&(f=c.numAsString,d=!0);var h=a(f,d);return A.useMemo(function(){l(h)},[h.formattedValue]),[c,u]}function mGe(e){return e.replace(/[^0-9]/g,"")}function gGe(e){return e}function vGe(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;a===void 0&&(a=gGe);var s=e.removeFormatting;s===void 0&&(s=mGe);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,f=e.isAllowed,d=e.onChange;d===void 0&&(d=ih);var h=e.onKeyDown;h===void 0&&(h=ih);var p=e.onMouseUp;p===void 0&&(p=ih);var g=e.onFocus;g===void 0&&(g=ih);var m=e.onBlur;m===void 0&&(m=ih);var v=e.value,y=e.getCaretBoundary;y===void 0&&(y=pGe);var b=e.isValidInputCharacter;b===void 0&&(b=bx);var w=e.isCharacterSame,E=bte(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),I=kte(v,c,!!l,a,s,u),O=I[0],D=O.formattedValue,N=O.numAsString,U=I[1],B=A.useRef({formattedValue:D,numAsString:N}),F=function(pe,ce){B.current={formattedValue:pe.formattedValue,numAsString:pe.value},U(pe,ce)},T=A.useState(!1),P=T[0],_=T[1],C=A.useRef(null),S=A.useRef({setCaretTimeout:null,focusTimeout:null});A.useEffect(function(){return _(!0),function(){clearTimeout(S.current.setCaretTimeout),clearTimeout(S.current.focusTimeout)}},[]);var x=a,k=function(pe,ce){var ne=parseFloat(ce);return{formattedValue:pe,value:ce,floatValue:isNaN(ne)?void 0:ne}},L=function(pe,ce,ne){pe.selectionStart===0&&pe.selectionEnd===pe.value.length||(Hp(pe,ce),S.current.setCaretTimeout=setTimeout(function(){pe.value===ne&&pe.selectionStart!==pe.selectionEnd&&Hp(pe,ce)},0))},j=function(pe,ce,ne){return jz(pe,ce,y(pe),ne)},z=function(pe,ce,ne){var he=y(ce),oe=hGe(ce,D,pe,ne,he,b,w);return oe=jz(ce,oe,he),oe},Y=function(pe){var ce=pe.formattedValue;ce===void 0&&(ce="");var ne=pe.input,he=pe.setCaretPosition;he===void 0&&(he=!0);var oe=pe.source,le=pe.event,de=pe.numAsString,ve=pe.caretPos;if(ne){if(ve===void 0&&he){var we=pe.inputValue||ne.value,ie=lP(ne);ne.value=ce,ve=z(we,ce,ie)}ne.value=ce,he&&ve!==void 0&&L(ne,ve,ce)}ce!==D&&F(k(ce,de),{event:le,source:oe})};A.useEffect(function(){var pe=B.current,ce=pe.formattedValue,ne=pe.numAsString;D!==ce&&(D!==N||ce!==ne)&&F(k(D,N),{event:void 0,source:yx.props})},[D,N]);var K=C.current?lP(C.current):void 0,Q=typeof window<"u"?A.useLayoutEffect:A.useEffect;Q(function(){var pe=C.current;if(D!==B.current.formattedValue&&pe){var ce=z(B.current.formattedValue,D,K);pe.value=D,L(pe,ce,D)}},[D]);var q=function(pe,ce,ne){var he=_te(D,pe),oe=Object.assign(Object.assign({},he),{lastValue:D}),le=s(pe,oe),de=x(le);if(le=s(de,void 0),f&&!f(k(de,le))){var ve=ce.target,we=lP(ve),ie=z(pe,D,we);return ve.value=D,L(ve,ie,D),!1}return Y({formattedValue:de,numAsString:le,inputValue:pe,event:ce,source:ne,setCaretPosition:!0,input:ce.target}),!0},J=function(pe){var ce=pe.target,ne=ce.value,he=q(ne,pe,yx.event);he&&d(pe)},G=function(pe){var ce=pe.target,ne=pe.key,he=ce.selectionStart,oe=ce.selectionEnd,le=ce.value;le===void 0&&(le="");var de;if(ne==="ArrowLeft"||ne==="Backspace"?de=Math.max(he-1,0):ne==="ArrowRight"?de=Math.min(he+1,le.length):ne==="Delete"&&(de=he),de===void 0||he!==oe){h(pe);return}var ve=de;if(ne==="ArrowLeft"||ne==="ArrowRight"){var we=ne==="ArrowLeft"?"left":"right";ve=j(le,de,we),ve!==de&&pe.preventDefault()}else ne==="Delete"&&!b(le[de])?ve=j(le,de,"right"):ne==="Backspace"&&!b(le[de])&&(ve=j(le,de,"left"));ve!==de&&L(ce,ve,le),pe.isUnitTestRun&&L(ce,ve,le),h(pe)},V=function(pe){var ce=pe.target,ne=ce.selectionStart,he=ce.selectionEnd,oe=ce.value;if(oe===void 0&&(oe=""),ne===he){var le=j(oe,ne);le!==ne&&L(ce,le,oe)}p(pe)},X=function(pe){pe.persist&&pe.persist();var ce=pe.target;C.current=ce,S.current.focusTimeout=setTimeout(function(){var ne=ce.selectionStart,he=ce.selectionEnd,oe=ce.value;oe===void 0&&(oe="");var le=j(oe,ne);le!==ne&&!(ne===0&&he===oe.length)&&L(ce,le,oe),g(pe)},0)},te=function(pe){C.current=null,clearTimeout(S.current.focusTimeout),clearTimeout(S.current.setCaretTimeout),m(pe)},ee=P&&uGe()?"numeric":void 0,re=Object.assign({inputMode:ee},E,{type:t,value:D,onChange:J,onKeyDown:G,onMouseUp:V,onFocus:X,onBlur:te});if(r==="text")return o?sr.createElement(sr.Fragment,null,o(D,E)||null):sr.createElement("span",Object.assign({},E,{ref:i}),D);if(n){var se=n;return sr.createElement(se,Object.assign({},re,{ref:i}))}return sr.createElement("input",Object.assign({},re,{ref:i}))}function Vz(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var i=t.suffix;i===void 0&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var c=c4(t),l=c.thousandSeparator,u=c.decimalSeparator,f=r!==0&&e.indexOf(".")!==-1||r&&n,d=T8(e,a),h=d.beforeDecimal,p=d.afterDecimal,g=d.addNegation;return r!==void 0&&(p=Cte(p,r,!!n)),l&&(h=aGe(h,l,s)),o&&(h=o+h),i&&(p=p+i),g&&(h="-"+h),e=h+(f&&u||"")+p,e}function c4(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function yGe(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}function bGe(e,t){return new RegExp("(^-)|[0-9]|"+xte(e),t?"g":void 0)}function wGe(e,t,r){return e===""?!0:!(t!=null&&t.match(/\d/))&&!(r!=null&&r.match(/\d/))&&typeof e=="string"&&!isNaN(Number(e))}function xGe(e,t,r){var n;t===void 0&&(t=dGe(e));var o=r.allowNegative,i=r.prefix;i===void 0&&(i="");var a=r.suffix;a===void 0&&(a="");var s=r.decimalScale,c=t.from,l=t.to,u=l.start,f=l.end,d=c4(r),h=d.allowedDecimalSeparators,p=d.decimalSeparator,g=e[f]===p;if(bx(e)&&(e===i||e===a)&&t.lastValue==="")return e;if(f-u===1&&h.indexOf(e[u])!==-1){var m=s===0?"":p;e=e.substring(0,u)+m+e.substring(u+1,e.length)}var v=function(S,x,k){var L=!1,j=!1;i.startsWith("-")?L=!1:S.startsWith("--")?(L=!1,j=!0):a.startsWith("-")&&S.length===a.length?L=!1:S[0]==="-"&&(L=!0);var z=L?1:0;return j&&(z=2),z&&(S=S.substring(z),x-=z,k-=z),{value:S,start:x,end:k,hasNegation:L}},y=v(e,u,f),b=y.hasNegation;n=y,e=n.value,u=n.start,f=n.end;var w=v(t.lastValue,c.start,c.end),E=w.start,I=w.end,O=w.value,D=e.substring(u,f);e.length&&O.length&&(E>O.length-a.length||I<i.length)&&!(D&&a.startsWith(D))&&(e=O);var N=0;e.startsWith(i)?N+=i.length:u<i.length&&(N=u),e=e.substring(N),f-=N;var U=e.length,B=e.length-a.length;e.endsWith(a)?U=B:(f>B||f>e.length-a.length)&&(U=f),e=e.substring(0,U),e=yGe(b?"-"+e:e,o),e=(e.match(bGe(p,!0))||[]).join("");var F=e.indexOf(p);e=e.replace(new RegExp(xte(p),"g"),function(S,x){return x===F?".":""});var T=T8(e,o),P=T.beforeDecimal,_=T.afterDecimal,C=T.addNegation;return l.end-l.start<c.end-c.start&&P===""&&g&&!parseFloat(_)&&(e=C?"-":""),e}function CGe(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";o.fill(!1,0,r.length+(i?1:0));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function SGe(e){var t=c4(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
        Decimal separator can't be same as thousand separator.
        thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
        decimalSeparator: `+n+` (default value for decimalSeparator is .)
     `);return o.startsWith("-")&&i&&(console.error(`
      Prefix can't start with '-' when allowNegative is true.
      prefix: `+o+`
      allowNegative: `+i+`
    `),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function _Ge(e){e=SGe(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,n=e.allowLeadingZeros,o=e.onKeyDown;o===void 0&&(o=ih);var i=e.onBlur;i===void 0&&(i=ih);var a=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l="");var u=e.defaultValue,f=e.value,d=e.valueIsNumericString,h=e.onValueChange,p=bte(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),g=c4(e),m=g.decimalSeparator,v=g.allowedDecimalSeparators,y=function(C){return Vz(C,e)},b=function(C,S){return xGe(C,S,e)},w=pv(f)?u:f,E=d??wGe(w,l,t);pv(f)?pv(u)||(E=E||typeof u=="number"):E=E||typeof f=="number";var I=function(C){return wte(C)?C:(typeof C=="number"&&(C=Ste(C)),E&&typeof s=="number"?zz(C,s,!!c):C)},O=kte(I(f),I(u),!!E,y,b,h),D=O[0],N=D.numAsString,U=D.formattedValue,B=O[1],F=function(C){var S=C.target,x=C.key,k=S.selectionStart,L=S.selectionEnd,j=S.value;if(j===void 0&&(j=""),k!==L){o(C);return}x==="Backspace"&&j[0]==="-"&&k===l.length+1&&r&&Hp(S,1),s&&c&&(x==="Backspace"&&j[k-1]===m?(Hp(S,k-1),C.preventDefault()):x==="Delete"&&j[k]===m&&C.preventDefault()),v!=null&&v.includes(x)&&j[k]===m&&Hp(S,k+1);var z=a===!0?",":a;x==="Backspace"&&j[k-1]===z&&Hp(S,k-1),x==="Delete"&&j[k]===z&&Hp(S,k+1),o(C)},T=function(C){var S=N;if(S.match(/\d/g)||(S=""),n||(S=lGe(S)),c&&s&&(S=zz(S,s,c)),S!==N){var x=Vz(S,e);B({formattedValue:x,value:S,floatValue:parseFloat(S)},{event:C,source:yx.event})}i(C)},P=function(C){return C===m?!0:bx(C)},_=function(C){var S=C.currentValue,x=C.lastValue,k=C.formattedValue,L=C.currentValueIndex,j=C.formattedValueIndex,z=S[L],Y=k[j],K=_te(x,S),Q=K.to;return L>=Q.start&&L<Q.end&&v&&v.includes(z)&&Y===m?!0:z===Y};return Object.assign(Object.assign({},p),{value:U,valueIsNumericString:!1,isValidInputCharacter:P,isCharacterSame:_,onValueChange:B,format:y,removeFormatting:b,getCaretBoundary:function(C){return CGe(C,e)},onKeyDown:F,onBlur:T})}function Ete(e){var t=_Ge(e);return sr.createElement(vGe,Object.assign({},t))}const kGe=({applyValue:e,service:t,item:r})=>{const[n,o]=A.useState(r.value??[]);A.useEffect(()=>{e({...r,value:n})},[n]);const i=(a=[])=>()=>o([...a]);return R(Bh,{id:"custom-multiple-search-selector",multiple:!0,options:t.data,value:n,onChange:i(),PaperComponent:a=>{const s=a.children;return R(Es,{...a,children:s,style:{width:250,minHeight:100}})},renderOption:(a,s)=>{const{key:c,value:l,label:u}=t.fieldset,f=s[c||l]||a.id,d=s[u],h=s[l],p=n.findIndex(g=>g===h)>-1;return xe(go,{value:h,onClick:i([...n.filter(g=>g!==h),...p?[]:[h]]),children:[R(Tl,{checked:p}),R(jt,{style:{display:"inline-block",whiteSpace:"pre-line"},children:d})]},f)},getOptionLabel:a=>a[t.fieldset.label]??"",isOptionEqualToValue:a=>!!a[t.fieldset.label],renderInput:a=>R(Xa,{...a,variant:"standard",label:"Values",placeholder:"Search..."}),renderTags:a=>a.map((s,c)=>{const l=t.data.find(u=>u[t.fieldset.value]===s);if(l){const u=l[t.fieldset.label];return R(bo,{label:u,onDelete:i(n.filter(f=>f!==s))},`chip-tag-${c}`)}})})},EGe=({applyValue:e,service:t,item:r})=>{const[n,o]=A.useState(r.value??""),i=A.useId();return A.useEffect(()=>{e({...r,value:n})},[n]),xe(N2,{variant:"standard",children:[R(F2,{id:i,children:"Value"}),R(L2,{value:n,onChange:s=>{o(s.target.value)},label:"Value",placeholder:"Select value",labelId:i,children:t.data.map(s=>{const{key:c,value:l,label:u}=t.fieldset,f=s[c||l]||s.id,d=s[u];return R(go,{value:s[l],children:d},f)})})]})};function TGe(e){const{item:t,applyValue:r,focusElementRef:n}=e,o=A.useRef(null);A.useImperativeHandle(n,()=>({focus:()=>{o.current.querySelector("input").focus()}}));const i=s=>{Number.isNaN(Number(s))||r({...t,value:s})},a={fullWidth:!0,label:"Value",variant:"standard",placeholder:"Filter value",InputLabelProps:{shrink:!0}};return R(Ete,{allowNegative:!0,decimalScale:2,value:t.value,thousandSeparator:!0,getInputRef:o,onValueChange:s=>{const{value:c}=s;i(c)},customInput:Xa,...a})}function IGe(e){const{item:t,applyValue:r}=e,n=(o,i)=>{r({...t,value:i})};return R(Bh,{multiple:!0,freeSolo:!0,options:[],value:t.value||[],onChange:n,renderInput:o=>R(Xa,{...o,label:"Value",variant:"standard",inputProps:{...o.inputProps,"data-testid":"free-solo-selector-component"}})})}const u4=[{label:"Equals",value:_a.EQUALS},{label:"Greather than",value:_a.GREATER_THAN},{label:"Greater than or equal to",value:_a.GREATER_THAN_OR_EQUAL_TO},{label:"Less than",value:_a.LESS_THAN},{label:"Less than or equal to",value:_a.LESS_THAN_OR_EQUAL_TO},{label:"Not equals",value:_a.NOT_EQUAL_TO}],Tte=[{label:"In",value:CE.IN},{label:"Contains",value:CE.CONTAINS}],Ite=()=>{const{...e}=s8()[0];return e.InputComponent=TGe,u4.map(r=>(e.label=r.label,e.value=r.value,e.getApplyFilterFn=n=>n,{...e}))},uw=()=>{const{...e}=c8()[0];return u4.map(r=>(e.label=r.label,e.value=r.value,{...e}))},ub=(e,t=[])=>u4.filter(({value:n})=>t.indexOf(n)===-1).map(n=>({...n,getApplyFilterFn:o=>o,InputComponent:EGe,InputComponentProps:{...e}})),n_=(e,t=[CE.CONTAINS])=>Tte.filter(({value:n})=>t.indexOf(n)===-1).map(n=>({...n,getApplyFilterFn:o=>o,InputComponent:kGe,InputComponentProps:{...e}})),o_=({singleOperators:e,multipleOperators:t})=>[...e,...t],Ate=async e=>await ty(`${mr.BILLS}/${e}`,{}),I8=async({limit:e=50,page:t=0,sort:r,sortDirection:n="asc",filter:o=[]})=>await Ao(`${mr.BILLS}`,{limit:e,page:t,sort:r,filters:JSON.stringify(o),sortDirection:n}),AGe=async e=>await fa(mr.BILLS,{},e),y5=async(e,t)=>await Ys(`${mr.BILLS}/${e}`,{},t),Wz=async(e,t)=>await Ys(`${mr.BILLS}/${e}/image`,{},t,eC),PGe=async e=>await g8(`${mr.BILLS}/${e}/image`),Gz=async e=>await Ao(`${mr.BILLS}/${e}`,{}),MGe=async e=>await fa(`${mr.BILLS}/uploads`,{},e,eC);var A8={},RGe=Wr;Object.defineProperty(A8,"__esModule",{value:!0});var Pte=A8.default=void 0,OGe=RGe(tn()),DGe=rn,FGe=(0,OGe.default)((0,DGe.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");Pte=A8.default=FGe;const ts=({actions:e,position:t="flex-end"})=>{const[r,n]=A.useState(!1),o=A.useRef(null),i=()=>{n(l=>!l)},a=l=>{o.current&&o.current.contains(l.target)||n(!1)},s=e.filter(({primary:l})=>!!l),c=e.filter(({primary:l})=>!l);return xe(nr,{alignSelf:t,sx:{zIndex:2,position:"sticky",top:0,paddingBlock:1},children:[xe(eDe,{"aria-label":"Button group with a nested menu",color:"secondary",ref:o,variant:"contained",children:[s.map(({disabled:l,handleAction:u,name:f,icon:d,iconDirection:h="end",variant:p="contained",width:g=150},m)=>A.createElement(Ft,{[h==="start"?"startIcon":"endIcon"]:d??R(zr,{}),key:`${m}-${f}`,sx:{width:g},onClick:u,variant:p,disabled:l},f)),c.length>0&&R(Ft,{size:"small","aria-controls":r?"split-button-menu":void 0,"aria-expanded":r?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:i,children:R(Pte,{})})]}),R(bf,{sx:{zIndex:2},open:r,anchorEl:o.current,transition:!0,style:{minWidth:300},children:({TransitionProps:l})=>R(s1,{...l,children:R(Es,{sx:{marginRight:4,marginTop:1},children:R(oD,{onClickAway:a,children:R(j1,{id:"split-button-menu",autoFocusItem:!0,children:c.map(({name:u,handleAction:f,icon:d})=>xe(go,{onClick:f,children:[R(gl,{children:d}),u]},u))})})})})})]})};function vo(e,t={style:"currency",currency:"USD"}){return!e&&e!==0?"":new Intl.NumberFormat("en-US",t).format(e)}const Mte=({children:e})=>R(nr,{maxWidth:256,minWidth:128,sx:{position:"relative",top:-16},children:R(Jt,{spacing:2,pt:2,sx:{position:"sticky",top:0,alignSelf:"flex-start"},children:e})}),_o=({children:e,buttons:t,header:r,title:n,direction:o="row"})=>xe(Jt,{direction:o,spacing:2,children:[R(f1,{variant:"outlined",sx:{backgroundColor:"inherit",width:"100%"},children:R(dx,{children:xe(Jt,{direction:"column",spacing:2,justifyContent:"space-between",children:[R(jt,{variant:"h6",children:n}),r&&r,R(yo,{}),e]})})}),t&&(o.toString().includes("column")?R(Ot,{display:"flex",justifyContent:"end",children:t}):R(Mte,{children:t}))]});function gi({getValues:e,setError:t},r){const{error:n}=r,o=Object.keys(e());n.forEach(({property:i,message:a})=>{o.includes(i)&&t(i,{message:a,type:"apiError"})})}var rC=e=>e.type==="checkbox",Yg=e=>e instanceof Date,ds=e=>e==null;const Rte=e=>typeof e=="object";var Gi=e=>!ds(e)&&!Array.isArray(e)&&Rte(e)&&!Yg(e),Ote=e=>Gi(e)&&e.target?rC(e.target)?e.target.checked:e.target.value:e,NGe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Dte=(e,t)=>e.has(NGe(t)),LGe=e=>{const t=e.constructor&&e.constructor.prototype;return Gi(t)&&t.hasOwnProperty("isPrototypeOf")},P8=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Nc(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(P8&&(e instanceof Blob||e instanceof FileList))&&(r||Gi(e)))if(t=r?[]:{},!r&&!LGe(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Nc(e[n]));else return e;return t}var nC=e=>Array.isArray(e)?e.filter(Boolean):[],Jo=e=>e===void 0,lr=(e,t,r)=>{if(!t||!Gi(e))return r;const n=nC(t.split(/[,[\].]+?/)).reduce((o,i)=>ds(o)?o:o[i],e);return Jo(n)||n===e?Jo(e[t])?r:e[t]:n},Lu=e=>typeof e=="boolean";const SE={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Wc={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ed={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},$Ge=sr.createContext(null),M8=()=>sr.useContext($Ge);var Fte=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==Wc.all&&(t._proxyFormState[a]=!n||Wc.all),r&&(r[a]=!0),e[a]}});return o},Yl=e=>Gi(e)&&!Object.keys(e).length,Nte=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return Yl(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||Wc.all))},ck=e=>Array.isArray(e)?e:[e],Lte=(e,t,r)=>!e||!t||e===t||ck(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n)));function R8(e){const t=sr.useRef(e);t.current=e,sr.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function BGe(e){const t=M8(),{control:r=t.control,disabled:n,name:o,exact:i}=e||{},[a,s]=sr.useState(r._formState),c=sr.useRef(!0),l=sr.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=sr.useRef(o);return u.current=o,R8({disabled:n,next:f=>c.current&&Lte(u.current,f.name,i)&&Nte(f,l.current,r._updateFormState)&&s({...r._formState,...f}),subject:r._subjects.state}),sr.useEffect(()=>(c.current=!0,l.current.isValid&&r._updateValid(!0),()=>{c.current=!1}),[r]),Fte(a,r,l.current,!1)}var Hu=e=>typeof e=="string",$te=(e,t,r,n,o)=>Hu(e)?(n&&t.watch.add(e),lr(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),lr(r,i))):(n&&(t.watchAll=!0),r);function UGe(e){const t=M8(),{control:r=t.control,name:n,defaultValue:o,disabled:i,exact:a}=e||{},s=sr.useRef(n);s.current=n,R8({disabled:i,subject:r._subjects.values,next:u=>{Lte(s.current,u.name,a)&&l(Nc($te(s.current,r._names,u.values||r._formValues,!1,o)))}});const[c,l]=sr.useState(r._getWatch(n,o));return sr.useEffect(()=>r._removeUnmounted()),c}var O8=e=>/^\w*$/.test(e),Bte=e=>nC(e.replace(/["|']|\]/g,"").split(/\.|\[/));function xo(e,t,r){let n=-1;const o=O8(t)?[t]:Bte(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let c=r;if(n!==a){const l=e[s];c=Gi(l)||Array.isArray(l)?l:isNaN(+o[n+1])?{}:[]}e[s]=c,e=e[s]}return e}function HGe(e){const t=M8(),{name:r,disabled:n,control:o=t.control,shouldUnregister:i}=e,a=Dte(o._names.array,r),s=UGe({control:o,name:r,defaultValue:lr(o._formValues,r,lr(o._defaultValues,r,e.defaultValue)),exact:!0}),c=BGe({control:o,name:r}),l=sr.useRef(o.register(r,{...e.rules,value:s}));return l.current=o.register(r,e.rules),sr.useEffect(()=>{const u=o._options.shouldUnregister||i,f=(d,h)=>{const p=lr(o._fields,d);p&&(p._f.mount=h)};if(f(r,!0),u){const d=Nc(lr(o._options.defaultValues,r));xo(o._defaultValues,r,d),Jo(lr(o._formValues,r))&&xo(o._formValues,r,d)}return()=>{(a?u&&!o._state.action:u)?o.unregister(r):f(r,!1)}},[r,o,a,i]),sr.useEffect(()=>{lr(o._fields,r)&&o._updateDisabledField({disabled:n,fields:o._fields,name:r,value:lr(o._fields,r)._f.value})},[n,r,o]),{field:{name:r,value:s,...Lu(n)||Lu(c.disabled)?{disabled:c.disabled||n}:{},onChange:sr.useCallback(u=>l.current.onChange({target:{value:Ote(u),name:r},type:SE.CHANGE}),[r]),onBlur:sr.useCallback(()=>l.current.onBlur({target:{value:lr(o._formValues,r),name:r},type:SE.BLUR}),[r,o]),ref:u=>{const f=lr(o._fields,r);f&&u&&(f._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:d=>u.setCustomValidity(d),reportValidity:()=>u.reportValidity()})}},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!lr(c.errors,r)},isDirty:{enumerable:!0,get:()=>!!lr(c.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!lr(c.touchedFields,r)},error:{enumerable:!0,get:()=>lr(c.errors,r)}})}}const _E=e=>e.render(HGe(e));var zGe=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},qz=e=>({isOnSubmit:!e||e===Wc.onSubmit,isOnBlur:e===Wc.onBlur,isOnChange:e===Wc.onChange,isOnAll:e===Wc.all,isOnTouch:e===Wc.onTouched}),Kz=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const uk=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=lr(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else Gi(s)&&uk(s,t)}}};var jGe=(e,t,r)=>{const n=nC(lr(e,r));return xo(n,"root",t[r]),xo(e,r,n),e},D8=e=>e.type==="file",kh=e=>typeof e=="function",kE=e=>{if(!P8)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dk=e=>Hu(e),F8=e=>e.type==="radio",EE=e=>e instanceof RegExp;const Yz={value:!1,isValid:!1},Xz={value:!0,isValid:!0};var Ute=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Jo(e[0].attributes.value)?Jo(e[0].value)||e[0].value===""?Xz:{value:e[0].value,isValid:!0}:Xz:Yz}return Yz};const Qz={isValid:!1,value:null};var Hte=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Qz):Qz;function Zz(e,t,r="validate"){if(dk(e)||Array.isArray(e)&&e.every(dk)||Lu(e)&&!e)return{type:r,message:dk(e)?e:"",ref:t}}var hg=e=>Gi(e)&&!EE(e)?e:{value:e,message:""},Jz=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:c,minLength:l,min:u,max:f,pattern:d,validate:h,name:p,valueAsNumber:g,mount:m,disabled:v}=e._f,y=lr(t,p);if(!m||v)return{};const b=a?a[0]:i,w=F=>{n&&b.reportValidity&&(b.setCustomValidity(Lu(F)?"":F||""),b.reportValidity())},E={},I=F8(i),O=rC(i),D=I||O,N=(g||D8(i))&&Jo(i.value)&&Jo(y)||kE(i)&&i.value===""||y===""||Array.isArray(y)&&!y.length,U=zGe.bind(null,p,r,E),B=(F,T,P,_=Ed.maxLength,C=Ed.minLength)=>{const S=F?T:P;E[p]={type:F?_:C,message:S,ref:i,...U(F?_:C,S)}};if(o?!Array.isArray(y)||!y.length:s&&(!D&&(N||ds(y))||Lu(y)&&!y||O&&!Ute(a).isValid||I&&!Hte(a).isValid)){const{value:F,message:T}=dk(s)?{value:!!s,message:s}:hg(s);if(F&&(E[p]={type:Ed.required,message:T,ref:b,...U(Ed.required,T)},!r))return w(T),E}if(!N&&(!ds(u)||!ds(f))){let F,T;const P=hg(f),_=hg(u);if(!ds(y)&&!isNaN(y)){const C=i.valueAsNumber||y&&+y;ds(P.value)||(F=C>P.value),ds(_.value)||(T=C<_.value)}else{const C=i.valueAsDate||new Date(y),S=L=>new Date(new Date().toDateString()+" "+L),x=i.type=="time",k=i.type=="week";Hu(P.value)&&y&&(F=x?S(y)>S(P.value):k?y>P.value:C>new Date(P.value)),Hu(_.value)&&y&&(T=x?S(y)<S(_.value):k?y<_.value:C<new Date(_.value))}if((F||T)&&(B(!!F,P.message,_.message,Ed.max,Ed.min),!r))return w(E[p].message),E}if((c||l)&&!N&&(Hu(y)||o&&Array.isArray(y))){const F=hg(c),T=hg(l),P=!ds(F.value)&&y.length>+F.value,_=!ds(T.value)&&y.length<+T.value;if((P||_)&&(B(P,F.message,T.message),!r))return w(E[p].message),E}if(d&&!N&&Hu(y)){const{value:F,message:T}=hg(d);if(EE(F)&&!y.match(F)&&(E[p]={type:Ed.pattern,message:T,ref:i,...U(Ed.pattern,T)},!r))return w(T),E}if(h){if(kh(h)){const F=await h(y,t),T=Zz(F,b);if(T&&(E[p]={...T,...U(Ed.validate,T.message)},!r))return w(T.message),E}else if(Gi(h)){let F={};for(const T in h){if(!Yl(F)&&!r)break;const P=Zz(await h[T](y,t),b,T);P&&(F={...P,...U(T,P.message)},w(P.message),r&&(E[p]=F))}if(!Yl(F)&&(E[p]={ref:b,...F},!r))return E}}return w(!0),E};function VGe(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Jo(e)?n++:e[t[n++]];return e}function WGe(e){for(const t in e)if(e.hasOwnProperty(t)&&!Jo(e[t]))return!1;return!0}function ba(e,t){const r=Array.isArray(t)?t:O8(t)?[t]:Bte(t),n=r.length===1?e:VGe(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(Gi(n)&&Yl(n)||Array.isArray(n)&&WGe(n))&&ba(e,r.slice(0,-1)),e}function cP(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var TE=e=>ds(e)||!Rte(e);function Zp(e,t){if(TE(e)||TE(t))return e===t;if(Yg(e)&&Yg(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Yg(i)&&Yg(a)||Gi(i)&&Gi(a)||Array.isArray(i)&&Array.isArray(a)?!Zp(i,a):i!==a)return!1}}return!0}var zte=e=>e.type==="select-multiple",GGe=e=>F8(e)||rC(e),uP=e=>kE(e)&&e.isConnected,jte=e=>{for(const t in e)if(kh(e[t]))return!0;return!1};function IE(e,t={}){const r=Array.isArray(e);if(Gi(e)||r)for(const n in e)Array.isArray(e[n])||Gi(e[n])&&!jte(e[n])?(t[n]=Array.isArray(e[n])?[]:{},IE(e[n],t[n])):ds(e[n])||(t[n]=!0);return t}function Vte(e,t,r){const n=Array.isArray(e);if(Gi(e)||n)for(const o in e)Array.isArray(e[o])||Gi(e[o])&&!jte(e[o])?Jo(t)||TE(r[o])?r[o]=Array.isArray(e[o])?IE(e[o],[]):{...IE(e[o])}:Vte(e[o],ds(t)?{}:t[o],r[o]):r[o]=!Zp(e[o],t[o]);return r}var dP=(e,t)=>Vte(e,t,IE(t)),Wte=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Jo(e)?e:t?e===""?NaN:e&&+e:r&&Hu(e)?new Date(e):n?n(e):e;function fP(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return D8(t)?t.files:F8(t)?Hte(e.refs).value:zte(t)?[...t.selectedOptions].map(({value:r})=>r):rC(t)?Ute(e.refs).value:Wte(Jo(t.value)?e.ref.value:t.value,e)}var qGe=(e,t,r,n)=>{const o={};for(const i of e){const a=lr(t,i);a&&xo(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},db=e=>Jo(e)?e:EE(e)?e.source:Gi(e)?EE(e.value)?e.value.source:e.value:e,KGe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ej(e,t,r){const n=lr(e,r);if(n||O8(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=lr(t,i),s=lr(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var YGe=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,XGe=(e,t)=>!nC(lr(e,t)).length&&ba(e,t);const QGe={mode:Wc.onSubmit,reValidateMode:Wc.onChange,shouldFocusError:!0};function ZGe(e={},t){let r={...QGe,...e},n={submitCount:0,isDirty:!1,isLoading:kh(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=Gi(r.defaultValues)||Gi(r.values)?Nc(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:Nc(i),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:cP(),array:cP(),state:cP()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=qz(r.mode),g=qz(r.reValidateMode),m=r.criteriaMode===Wc.all,v=oe=>le=>{clearTimeout(u),u=setTimeout(oe,le)},y=async oe=>{if(f.isValid||oe){const le=r.resolver?Yl((await N()).errors):await B(o,!0);le!==n.isValid&&d.state.next({isValid:le})}},b=oe=>f.isValidating&&d.state.next({isValidating:oe}),w=(oe,le=[],de,ve,we=!0,ie=!0)=>{if(ve&&de){if(s.action=!0,ie&&Array.isArray(lr(o,oe))){const ge=de(lr(o,oe),ve.argA,ve.argB);we&&xo(o,oe,ge)}if(ie&&Array.isArray(lr(n.errors,oe))){const ge=de(lr(n.errors,oe),ve.argA,ve.argB);we&&xo(n.errors,oe,ge),XGe(n.errors,oe)}if(f.touchedFields&&ie&&Array.isArray(lr(n.touchedFields,oe))){const ge=de(lr(n.touchedFields,oe),ve.argA,ve.argB);we&&xo(n.touchedFields,oe,ge)}f.dirtyFields&&(n.dirtyFields=dP(i,a)),d.state.next({name:oe,isDirty:T(oe,le),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else xo(a,oe,le)},E=(oe,le)=>{xo(n.errors,oe,le),d.state.next({errors:n.errors})},I=(oe,le,de,ve)=>{const we=lr(o,oe);if(we){const ie=lr(a,oe,Jo(de)?lr(i,oe):de);Jo(ie)||ve&&ve.defaultChecked||le?xo(a,oe,le?ie:fP(we._f)):C(oe,ie),s.mount&&y()}},O=(oe,le,de,ve,we)=>{let ie=!1,ge=!1;const Pe={name:oe};if(!de||ve){f.isDirty&&(ge=n.isDirty,n.isDirty=Pe.isDirty=T(),ie=ge!==Pe.isDirty);const Fe=Zp(lr(i,oe),le);ge=lr(n.dirtyFields,oe),Fe?ba(n.dirtyFields,oe):xo(n.dirtyFields,oe,!0),Pe.dirtyFields=n.dirtyFields,ie=ie||f.dirtyFields&&ge!==!Fe}if(de){const Fe=lr(n.touchedFields,oe);Fe||(xo(n.touchedFields,oe,de),Pe.touchedFields=n.touchedFields,ie=ie||f.touchedFields&&Fe!==de)}return ie&&we&&d.state.next(Pe),ie?Pe:{}},D=(oe,le,de,ve)=>{const we=lr(n.errors,oe),ie=f.isValid&&Lu(le)&&n.isValid!==le;if(e.delayError&&de?(l=v(()=>E(oe,de)),l(e.delayError)):(clearTimeout(u),l=null,de?xo(n.errors,oe,de):ba(n.errors,oe)),(de?!Zp(we,de):we)||!Yl(ve)||ie){const ge={...ve,...ie&&Lu(le)?{isValid:le}:{},errors:n.errors,name:oe};n={...n,...ge},d.state.next(ge)}b(!1)},N=async oe=>r.resolver(a,r.context,qGe(oe||c.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),U=async oe=>{const{errors:le}=await N(oe);if(oe)for(const de of oe){const ve=lr(le,de);ve?xo(n.errors,de,ve):ba(n.errors,de)}else n.errors=le;return le},B=async(oe,le,de={valid:!0})=>{for(const ve in oe){const we=oe[ve];if(we){const{_f:ie,...ge}=we;if(ie){const Pe=c.array.has(ie.name),Fe=await Jz(we,a,m,r.shouldUseNativeValidation&&!le,Pe);if(Fe[ie.name]&&(de.valid=!1,le))break;!le&&(lr(Fe,ie.name)?Pe?jGe(n.errors,Fe,ie.name):xo(n.errors,ie.name,Fe[ie.name]):ba(n.errors,ie.name))}ge&&await B(ge,le,de)}}return de.valid},F=()=>{for(const oe of c.unMount){const le=lr(o,oe);le&&(le._f.refs?le._f.refs.every(de=>!uP(de)):!uP(le._f.ref))&&J(oe)}c.unMount=new Set},T=(oe,le)=>(oe&&le&&xo(a,oe,le),!Zp(z(),i)),P=(oe,le,de)=>$te(oe,c,{...s.mount?a:Jo(le)?i:Hu(oe)?{[oe]:le}:le},de,le),_=oe=>nC(lr(s.mount?a:i,oe,e.shouldUnregister?lr(i,oe,[]):[])),C=(oe,le,de={})=>{const ve=lr(o,oe);let we=le;if(ve){const ie=ve._f;ie&&(!ie.disabled&&xo(a,oe,Wte(le,ie)),we=kE(ie.ref)&&ds(le)?"":le,zte(ie.ref)?[...ie.ref.options].forEach(ge=>ge.selected=we.includes(ge.value)):ie.refs?rC(ie.ref)?ie.refs.length>1?ie.refs.forEach(ge=>(!ge.defaultChecked||!ge.disabled)&&(ge.checked=Array.isArray(we)?!!we.find(Pe=>Pe===ge.value):we===ge.value)):ie.refs[0]&&(ie.refs[0].checked=!!we):ie.refs.forEach(ge=>ge.checked=ge.value===we):D8(ie.ref)?ie.ref.value="":(ie.ref.value=we,ie.ref.type||d.values.next({name:oe,values:{...a}})))}(de.shouldDirty||de.shouldTouch)&&O(oe,we,de.shouldTouch,de.shouldDirty,!0),de.shouldValidate&&j(oe)},S=(oe,le,de)=>{for(const ve in le){const we=le[ve],ie=`${oe}.${ve}`,ge=lr(o,ie);(c.array.has(oe)||!TE(we)||ge&&!ge._f)&&!Yg(we)?S(ie,we,de):C(ie,we,de)}},x=(oe,le,de={})=>{const ve=lr(o,oe),we=c.array.has(oe),ie=Nc(le);xo(a,oe,ie),we?(d.array.next({name:oe,values:{...a}}),(f.isDirty||f.dirtyFields)&&de.shouldDirty&&d.state.next({name:oe,dirtyFields:dP(i,a),isDirty:T(oe,ie)})):ve&&!ve._f&&!ds(ie)?S(oe,ie,de):C(oe,ie,de),Kz(oe,c)&&d.state.next({...n}),d.values.next({name:oe,values:{...a}}),!s.mount&&t()},k=async oe=>{const le=oe.target;let de=le.name,ve=!0;const we=lr(o,de),ie=()=>le.type?fP(we._f):Ote(oe),ge=Pe=>{ve=Number.isNaN(Pe)||Pe===lr(a,de,Pe)};if(we){let Pe,Fe;const Ie=ie(),Oe=oe.type===SE.BLUR||oe.type===SE.FOCUS_OUT,$e=!KGe(we._f)&&!r.resolver&&!lr(n.errors,de)&&!we._f.deps||YGe(Oe,lr(n.touchedFields,de),n.isSubmitted,g,p),et=Kz(de,c,Oe);xo(a,de,Ie),Oe?(we._f.onBlur&&we._f.onBlur(oe),l&&l(0)):we._f.onChange&&we._f.onChange(oe);const Ze=O(de,Ie,Oe,!1),Ne=!Yl(Ze)||et;if(!Oe&&d.values.next({name:de,type:oe.type,values:{...a}}),$e)return f.isValid&&y(),Ne&&d.state.next({name:de,...et?{}:Ze});if(!Oe&&et&&d.state.next({...n}),b(!0),r.resolver){const{errors:Qe}=await N([de]);if(ge(Ie),ve){const Xe=ej(n.errors,o,de),rt=ej(Qe,o,Xe.name||de);Pe=rt.error,de=rt.name,Fe=Yl(Qe)}}else Pe=(await Jz(we,a,m,r.shouldUseNativeValidation))[de],ge(Ie),ve&&(Pe?Fe=!1:f.isValid&&(Fe=await B(o,!0)));ve&&(we._f.deps&&j(we._f.deps),D(de,Fe,Pe,Ze))}},L=(oe,le)=>{if(lr(n.errors,le)&&oe.focus)return oe.focus(),1},j=async(oe,le={})=>{let de,ve;const we=ck(oe);if(b(!0),r.resolver){const ie=await U(Jo(oe)?oe:we);de=Yl(ie),ve=oe?!we.some(ge=>lr(ie,ge)):de}else oe?(ve=(await Promise.all(we.map(async ie=>{const ge=lr(o,ie);return await B(ge&&ge._f?{[ie]:ge}:ge)}))).every(Boolean),!(!ve&&!n.isValid)&&y()):ve=de=await B(o);return d.state.next({...!Hu(oe)||f.isValid&&de!==n.isValid?{}:{name:oe},...r.resolver||!oe?{isValid:de}:{},errors:n.errors,isValidating:!1}),le.shouldFocus&&!ve&&uk(o,L,oe?we:c.mount),ve},z=oe=>{const le={...i,...s.mount?a:{}};return Jo(oe)?le:Hu(oe)?lr(le,oe):oe.map(de=>lr(le,de))},Y=(oe,le)=>({invalid:!!lr((le||n).errors,oe),isDirty:!!lr((le||n).dirtyFields,oe),isTouched:!!lr((le||n).touchedFields,oe),error:lr((le||n).errors,oe)}),K=oe=>{oe&&ck(oe).forEach(le=>ba(n.errors,le)),d.state.next({errors:oe?n.errors:{}})},Q=(oe,le,de)=>{const ve=(lr(o,oe,{_f:{}})._f||{}).ref;xo(n.errors,oe,{...le,ref:ve}),d.state.next({name:oe,errors:n.errors,isValid:!1}),de&&de.shouldFocus&&ve&&ve.focus&&ve.focus()},q=(oe,le)=>kh(oe)?d.values.subscribe({next:de=>oe(P(void 0,le),de)}):P(oe,le,!0),J=(oe,le={})=>{for(const de of oe?ck(oe):c.mount)c.mount.delete(de),c.array.delete(de),le.keepValue||(ba(o,de),ba(a,de)),!le.keepError&&ba(n.errors,de),!le.keepDirty&&ba(n.dirtyFields,de),!le.keepTouched&&ba(n.touchedFields,de),!r.shouldUnregister&&!le.keepDefaultValue&&ba(i,de);d.values.next({values:{...a}}),d.state.next({...n,...le.keepDirty?{isDirty:T()}:{}}),!le.keepIsValid&&y()},G=({disabled:oe,name:le,field:de,fields:ve,value:we})=>{if(Lu(oe)){const ie=oe?void 0:Jo(we)?fP(de?de._f:lr(ve,le)._f):we;xo(a,le,ie),O(le,ie,!1,!1,!0)}},V=(oe,le={})=>{let de=lr(o,oe);const ve=Lu(le.disabled);return xo(o,oe,{...de||{},_f:{...de&&de._f?de._f:{ref:{name:oe}},name:oe,mount:!0,...le}}),c.mount.add(oe),de?G({field:de,disabled:le.disabled,name:oe}):I(oe,!0,le.value),{...ve?{disabled:le.disabled}:{},...r.progressive?{required:!!le.required,min:db(le.min),max:db(le.max),minLength:db(le.minLength),maxLength:db(le.maxLength),pattern:db(le.pattern)}:{},name:oe,onChange:k,onBlur:k,ref:we=>{if(we){V(oe,le),de=lr(o,oe);const ie=Jo(we.value)&&we.querySelectorAll&&we.querySelectorAll("input,select,textarea")[0]||we,ge=GGe(ie),Pe=de._f.refs||[];if(ge?Pe.find(Fe=>Fe===ie):ie===de._f.ref)return;xo(o,oe,{_f:{...de._f,...ge?{refs:[...Pe.filter(uP),ie,...Array.isArray(lr(i,oe))?[{}]:[]],ref:{type:ie.type,name:oe}}:{ref:ie}}}),I(oe,!1,void 0,ie)}else de=lr(o,oe,{}),de._f&&(de._f.mount=!1),(r.shouldUnregister||le.shouldUnregister)&&!(Dte(c.array,oe)&&s.action)&&c.unMount.add(oe)}}},X=()=>r.shouldFocusError&&uk(o,L,c.mount),te=oe=>{Lu(oe)&&(d.state.next({disabled:oe}),uk(o,le=>{le.disabled=oe},0,!1))},ee=(oe,le)=>async de=>{de&&(de.preventDefault&&de.preventDefault(),de.persist&&de.persist());let ve=Nc(a);if(d.state.next({isSubmitting:!0}),r.resolver){const{errors:we,values:ie}=await N();n.errors=we,ve=ie}else await B(o);ba(n.errors,"root"),Yl(n.errors)?(d.state.next({errors:{}}),await oe(ve,de)):(le&&await le({...n.errors},de),X(),setTimeout(X)),d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Yl(n.errors),submitCount:n.submitCount+1,errors:n.errors})},re=(oe,le={})=>{lr(o,oe)&&(Jo(le.defaultValue)?x(oe,lr(i,oe)):(x(oe,le.defaultValue),xo(i,oe,le.defaultValue)),le.keepTouched||ba(n.touchedFields,oe),le.keepDirty||(ba(n.dirtyFields,oe),n.isDirty=le.defaultValue?T(oe,lr(i,oe)):T()),le.keepError||(ba(n.errors,oe),f.isValid&&y()),d.state.next({...n}))},se=(oe,le={})=>{const de=oe?Nc(oe):i,ve=Nc(de),we=oe&&!Yl(oe)?ve:i;if(le.keepDefaultValues||(i=de),!le.keepValues){if(le.keepDirtyValues||h)for(const ie of c.mount)lr(n.dirtyFields,ie)?xo(we,ie,lr(a,ie)):x(ie,lr(we,ie));else{if(P8&&Jo(oe))for(const ie of c.mount){const ge=lr(o,ie);if(ge&&ge._f){const Pe=Array.isArray(ge._f.refs)?ge._f.refs[0]:ge._f.ref;if(kE(Pe)){const Fe=Pe.closest("form");if(Fe){Fe.reset();break}}}}o={}}a=e.shouldUnregister?le.keepDefaultValues?Nc(i):{}:Nc(we),d.array.next({values:{...we}}),d.values.next({values:{...we}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!f.isValid||!!le.keepIsValid,s.watch=!!e.shouldUnregister,d.state.next({submitCount:le.keepSubmitCount?n.submitCount:0,isDirty:le.keepDirty?n.isDirty:!!(le.keepDefaultValues&&!Zp(oe,i)),isSubmitted:le.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:le.keepDirtyValues?n.dirtyFields:le.keepDefaultValues&&oe?dP(i,oe):{},touchedFields:le.keepTouched?n.touchedFields:{},errors:le.keepErrors?n.errors:{},isSubmitSuccessful:le.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},pe=(oe,le)=>se(kh(oe)?oe(a):oe,le);return{control:{register:V,unregister:J,getFieldState:Y,handleSubmit:ee,setError:Q,_executeSchema:N,_getWatch:P,_getDirty:T,_updateValid:y,_removeUnmounted:F,_updateFieldArray:w,_updateDisabledField:G,_getFieldArray:_,_reset:se,_resetDefaultValues:()=>kh(r.defaultValues)&&r.defaultValues().then(oe=>{pe(oe,r.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:oe=>{n={...n,...oe}},_disableForm:te,_subjects:d,_proxyFormState:f,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(oe){s=oe},get _defaultValues(){return i},get _names(){return c},set _names(oe){c=oe},get _formState(){return n},set _formState(oe){n=oe},get _options(){return r},set _options(oe){r={...r,...oe}}},trigger:j,register:V,handleSubmit:ee,watch:q,setValue:x,getValues:z,reset:pe,resetField:re,clearErrors:K,unregister:J,setError:Q,setFocus:(oe,le={})=>{const de=lr(o,oe),ve=de&&de._f;if(ve){const we=ve.refs?ve.refs[0]:ve.ref;we.focus&&(we.focus(),le.shouldSelect&&we.select())}},getFieldState:Y}}function Bn(e={}){const t=sr.useRef(),r=sr.useRef(),[n,o]=sr.useState({isDirty:!1,isValidating:!1,isLoading:kh(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:kh(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...ZGe(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,R8({subject:i._subjects.state,next:a=>{Nte(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),sr.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),sr.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),sr.useEffect(()=>{e.values&&!Zp(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),sr.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Fte(n,i),t.current}var N8={},JGe=Wr;Object.defineProperty(N8,"__esModule",{value:!0});var m0=N8.default=void 0,eqe=JGe(tn()),tqe=rn,rqe=(0,eqe.default)((0,tqe.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");m0=N8.default=rqe;var L8={},nqe=Wr;Object.defineProperty(L8,"__esModule",{value:!0});var ud=L8.default=void 0,oqe=nqe(tn()),iqe=rn,aqe=(0,oqe.default)((0,iqe.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");ud=L8.default=aqe;var $8={},sqe=Wr;Object.defineProperty($8,"__esModule",{value:!0});var g0=$8.default=void 0,lqe=sqe(tn()),cqe=rn,uqe=(0,lqe.default)((0,cqe.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"}),"Save");g0=$8.default=uqe;var B8={},dqe=Wr;Object.defineProperty(B8,"__esModule",{value:!0});var od=B8.default=void 0,fqe=dqe(tn()),hqe=rn,pqe=(0,fqe.default)((0,hqe.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");od=B8.default=pqe;class mqe{constructor(t,r){G3(this,"getValues");G3(this,"lineItems");this.getValues=t,this.lineItems=r}getWarningsValidators(t,r){const n=[{message:"You have entered the same start and end date for the bill and/or line items.",validate:()=>{const o=this.getValues(),{startDate:i,endDate:a}=o,s=i.getTime()===a.getTime(),c=this.lineItems.some(({startDate:l,endDate:u})=>new Date(l).getTime()===new Date(u).getTime());return[!(s||c),n[1]]}},{message:"You have unsaved line items. Do you want to save the bill or go back to editing it?",validate:()=>{const{editRows:o}=t.current.state;return[!Object.keys(o).length,n[2]]}},{next:r}];return n}getLineItemsValidator(t){const r=this.getValues();return[{message:"You must add at least one Bill Line Item",validate:()=>!!this.lineItems.length},{message:"The total of the Line Items must equal the Bill amount",validate:()=>parseFloat(r.amount)===t}]}}const U8=(e,t)=>e?xO(e,t)||ym(e,t):!0,hP=e=>Bu(e)?!0:"is not a valid date format",gqe=(e={})=>({date:e.date?Hr(e.date):null,amount:e.amount??0,dueDate:e.dueDate?Hr(e.dueDate):null,budgetPeriod:e.budgetPeriod?Hr(e.budgetPeriod):null,endDate:e.endDate?Hr(e.endDate):null,estimated:e.estimated??!1,needsReview:e.needsReview??!1,number:e.number??"",image:e.image??"",workingImage:null,notes:e.notes??"",startDate:e.startDate?Hr(e.startDate):null}),vqe=({setValue:e,getValues:t,id:r,billPageNumber:n=null})=>[{placeholder:"Bill Date",label:"Bill Date",name:"date",type:"datePicker",required:!0,validate:hP},{placeholder:"Bill Amount",label:"Bill Amount",name:"amount",type:"number",required:!0,adorment:"$ ",allowNegative:!0,autoDecimalFormat:!0},{placeholder:"Bill Start Date",label:"Bill Start Date",name:"startDate",type:"datePicker",required:!0,validate:hP},{placeholder:"Bill End Date",label:"Bill End Date",name:"endDate",type:"datePicker",required:!0,validate:(i,a)=>{const s=hP(i);if(typeof s=="string")return s;let c=!0;return a.startDate&&(c=U8(i,a.startDate),!c)?"bill end date cannot be less than bill start date":c}},{placeholder:"Due date",label:"Due date",name:"dueDate",type:"datePicker",required:!1},{placeholder:"Budget period",label:"Budget period",name:"budgetPeriod",type:"datePicker",required:!1,other:{views:["year","month"]}},{placeholder:"Estimated",label:"Estimated",name:"estimated",type:"selectInput",required:!1,values:[{label:"Yes",value:!0},{label:"No",value:!1}]},{placeholder:"Bill Number",label:"Bill Number",name:"number",type:"textInput",required:!1},{placeholder:"Notes",label:"Notes",multiline:!0,name:"notes",type:"textInput",required:!1},{label:"Bill Image",name:"workingImage",fileName:t("image"),type:"fileUploader",required:!1,accept:"image/jpg, image/jpeg, image/png, application/pdf",viewPath:`/bill-image/${r}${n?`?page=${n}`:""}`,onChange:i=>{e("workingImage",i),e("image",i.name,{shouldDirty:!0})},onDelete:()=>{e("workingImage",null),e("image","",{shouldDirty:!0})},tooltip:n&&`Bill starts on page ${n}`}],yqe=async e=>await fa(mr.UTILITIES,{},e),ry=async(e={})=>await Ao(mr.UTILITIES,e),bqe=async e=>await Ao(`${mr.UTILITIES}/${e}`),Gte=async(e,t)=>await Ys(`${mr.UTILITIES}/${e}`,{},t);function AE(e,t,r=!0,n=!1){return[...e].sort((o,i)=>{let a=o[t],s=i[t];return a==null||s==null?0:(!n&&typeof a=="string"&&typeof s=="string"&&(a=a.toLowerCase(),s=s.toLowerCase()),r?a>s?1:a<s?-1:0:a<s?1:a>s?-1:0)})}function wqe(e,t){const r=new Date(e,t,0);return af(r)}function xqe(e,t){const r=cWe({start:e,end:t});if(r.length===1)return{month:r[0].getMonth()+1,year:r[0].getFullYear()};if(r.length===2){const o=Math.abs(jk(e,Qw(e))),i=Math.abs(jk(t,rR(t)))+1;return o>i?{month:e.getMonth()+1,year:e.getFullYear()}:{month:t.getMonth()+1,year:t.getFullYear()}}let n={month:0,year:0};return t.getDate()===Qw(t).getDate()?n={month:t.getMonth()+1,year:t.getFullYear()}:n={month:r[r.length-2].getMonth()+1,year:r[r.length-2].getFullYear()},n}var H8={},Cqe=Wr;Object.defineProperty(H8,"__esModule",{value:!0});var qte=H8.default=void 0,Sqe=Cqe(tn()),_qe=rn,kqe=(0,Sqe.default)((0,_qe.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");qte=H8.default=kqe;var z8={},Eqe=Wr;Object.defineProperty(z8,"__esModule",{value:!0});var Kte=z8.default=void 0,Tqe=Eqe(tn()),Iqe=rn,Aqe=(0,Tqe.default)((0,Iqe.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank");Kte=z8.default=Aqe;const Pqe=e=>{const{autoCompleteProps:t=()=>({}),clearIcon:r=!1,field:n,onChange:o,options:i,placeholder:a,label:s,error:c,multiple:l=!1,readonly:u=!1,required:f=!1,helperText:d="",tags:h=!1}=e,p=(E,I)=>E.value&&I.value?E.value==I.value:E===I,g=E=>!!E.disabled,m=E=>E.label,v=({label:E,key:I})=>I||E,y=E=>R(Xa,{...E,label:`${s}${f?"*":""}`,error:c,placeholder:a,helperText:d,fullWidth:!0,inputProps:{...E.inputProps,"data-testid":n.name,readOnly:u}}),b={options:i,readOnly:u,isOptionEqualToValue:p,getOptionDisabled:g,getOptionLabel:m,getOptionKey:v,renderInput:y,sx:{width:"100%"},...!r&&{clearIcon:void 0}};if(l){const E={multiple:l,onChange:o,options:i,disableCloseOnSelect:l,id:"multiple-autocomplete-form-field",value:n.value.map(D=>i.find(N=>N.value===D)).filter(Boolean)},I=R(Kte,{fontSize:"small"}),O=R(qte,{fontSize:"small"});return R(Bh,{...Object.assign(b,E),renderOption:(D,N,{selected:U})=>xe("li",{...D,children:[R(Tl,{icon:I,checkedIcon:O,style:{marginRight:8},checked:U}),N.label]},N.key||N.label)})}if(h){const E={value:n.value,id:"tags-autocomplete-form-field",...t(n)};return R(Bh,{...Object.assign(b,E)})}const w={onChange:o,options:i,id:"single-autocomplete-form-field",value:i.find(E=>E.value===n.value)??null};return R(Bh,{...Object.assign(b,w),renderInput:E=>y({...E,...n})})},Mqe=e=>{const{error:t,helperText:r="",label:n,name:o,onBlur:i,onChange:a,other:s={},placeholder:c,readonly:l=!1,required:u=!1,slotProps:f={},value:d}=e;return R(TD,{value:d,onChange:a,label:`${n}${u?"*":""}`,readOnly:l,sx:{width:"100%"},slotProps:{...f,textField:{fullWidth:!0,error:t,name:o,onBlur:i,placeholder:c,inputProps:{"data-testid":o},helperText:r}},...s})},Yte=e=>{const{error:t,helperText:r="",label:n,name:o,onBlur:i,onChange:a,other:s={},placeholder:c,readonly:l=!1,required:u=!1,slotProps:f={},value:d}=e;return R(SRe,{value:d,onChange:a,label:`${n}${u?"*":""}`,readOnly:l,slots:{field:yZ},slotProps:{textField:{fullWidth:!0,error:t,name:o,onBlur:i,placeholder:c,inputProps:{"data-testid":o},helperText:r},...f},...s})};var j8={},Rqe=Wr;Object.defineProperty(j8,"__esModule",{value:!0});var oo=j8.default=void 0,Oqe=Rqe(tn()),Dqe=rn,Fqe=(0,Oqe.default)((0,Dqe.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");oo=j8.default=Fqe;var V8={},Nqe=Wr;Object.defineProperty(V8,"__esModule",{value:!0});var Xte=V8.default=void 0,Lqe=Nqe(tn()),$qe=rn,Bqe=(0,Lqe.default)((0,$qe.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image");Xte=V8.default=Bqe;var W8={},Uqe=Wr;Object.defineProperty(W8,"__esModule",{value:!0});var Qte=W8.default=void 0,Hqe=Uqe(tn()),zqe=rn,jqe=(0,Hqe.default)((0,zqe.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFile");Qte=W8.default=jqe;const Zte=({accept:e,fileName:t="",icon:r=R(Qte,{}),helperText:n="",label:o="Upload File",name:i,multiple:a=!1,onChange:s,onDelete:c,tooltip:l,showIcon:u=!0,viewPath:f=""})=>{const[d,h]=A.useState(t),p=g=>{if(!g.target.files)return;const m=g.target.files[0];h(m.name),s(m),g.target.value=""};return xe(Ot,{container:!0,flexDirection:"row",sx:{height:"100%"},children:[R(Ot,{item:!0,xs:d?f?10:11:12,children:xe(Ft,{variant:"outlined",component:"label",startIcon:u?r:R(zr,{}),sx:{width:"100%",height:"100%",display:"flex"},children:[xe(jt,{title:d,overflow:"hidden",textOverflow:"ellipsis",children:[o," ",d&&`(${d})`]}),R("input",{accept:e,name:i,onChange:p,type:"file",hidden:!0,multiple:a})]})}),d&&f&&R(Ot,{item:!0,xs:1,alignItems:"center",display:"flex",children:R(HD,{title:l||"View File",children:R(ri,{onClick:()=>window.open(f),sx:{height:40,width:40},children:R(Xte,{})})})}),d&&R(Ot,{item:!0,xs:1,alignItems:"center",display:"flex",children:R(ri,{"arial-label":"Delete Image",onClick:()=>{h(""),c&&c()},sx:{height:40,width:40},children:R(oo,{})})}),n&&R(pD,{error:!0,children:n})]})},Vqe=e=>{const{InputProps:t,allowNegative:r=!1,autoDecimalFormat:n=!1,disabled:o=!1,error:i,helperAction:a,name:s,label:c,max:l,min:u,onChange:f,placeholder:d,prefix:h,helperText:p="",readonly:g=!1,required:m,thousandSeparator:v=!0,value:y}=e;return xe(zr,{children:[R(Ete,{fullWidth:!0,prefix:h,allowNegative:r,decimalScale:2,value:y,error:i,fixedDecimalScale:!!n,thousandSeparator:v,customInput:Xa,helperText:p,placeholder:d,label:`${c}${m?"*":""}`,isAllowed:b=>{const{floatValue:w}=b;return(w>=u||!u)&&(w<=l||!l)},onValueChange:b=>{const{floatValue:w}=b;w!==void 0&&f(w)},InputProps:{readOnly:g,...t},inputProps:{"data-testid":s},disabled:o}),a&&R(jt,{color:"primary",variant:"caption",onClick:a.onClick,sx:{cursor:"pointer",ml:"auto",mr:0},children:a.label})]})},Wqe=e=>{const{error:t,label:r,helperText:n="",multiple:o=!1,name:i,onBlur:a,onChange:s,readonly:c=!1,required:l=!1,disabled:u=!1,value:f,values:d}=e;return xe(N2,{sx:{width:"100%"},error:t,children:[xe(F2,{id:i,children:[r,l&&"*"]}),xe(L2,{name:i,disabled:u,value:d.length?f:o?[""]:"",onBlur:a,onChange:s,error:t,inputProps:{"data-testid":i},label:r,labelId:i,multiple:o,readOnly:c,renderValue:h=>{if(!o){const p=d.find(g=>g.value===h);return h.length===0?r:p?p.label:""}return h.map(p=>{const g=d.find(m=>m.value===p);return g?g.label:""}).join(", ")},children:[R(go,{value:"",disabled:!0,children:R(jt,{component:"div",children:R(nr,{sx:{fontStyle:"italic",m:1},children:r})})},r),d.map(h=>xe(go,{value:h.value,disabled:h.disabled,children:[o&&R(Tl,{checked:(f==null?void 0:f.indexOf(h.value))>-1}),R(ps,{primary:h.label})]},h.value))]}),n&&R(pD,{children:n})]})},b5=e=>{const{adornmentText:t,inputProps:r,disabled:n=!1,error:o,helperText:i,label:a,multiline:s=!1,name:c,onBlur:l,onChange:u,placeholder:f,readonly:d=!1,required:h=!1,type:p,value:g}=e;return R(Xa,{name:c,value:g,onBlur:l,onChange:u,InputProps:{readOnly:d,endAdornment:xe(c1,{position:"end",children:[t,o&&R(qo,{color:"error",fontSize:"medium"})]})},disabled:n,error:o,fullWidth:!0,helperText:i,inputProps:{"data-testid":c,readOnly:d,...r},label:`${a}${h?"*":""}`,multiline:s,placeholder:f,rows:3,type:p})},Dn=({control:e,errors:t,fieldConf:r,isViewMode:n=!1})=>R(_E,{name:r.name,control:e,rules:{required:r.required,validate:r.validate},render:({field:o})=>{const{type:i="",message:a}=e.getFieldState(o.name).error??{},s=a||i;switch(delete o.ref,r.type){case"autocomplete":return R(Pqe,{field:o,clearIcon:r.clearIcon,tags:r.tags,autoCompleteProps:r.autoCompleteProps,multiple:r.multiple,options:r.options,onChange:(f,d)=>{o.onChange(Array.isArray(d)?d.map(h=>h.value):d.value||"")},placeholder:r.placeholder,label:r.label,error:!!t[r.name],required:r.required,readonly:n,helperText:s});case"checkbox":return R(dp,{label:r.label,labelPlacement:r.labelPlacement??"end",style:{display:"flex"},control:R(Tl,{checked:r.checked,onChange:r.onChange})});case"number":const{onChange:c}=r;return R(Vqe,{...o,allowNegative:r==null?void 0:r.allowNegative,autoDecimalFormat:r==null?void 0:r.autoDecimalFormat,disabled:r.disabled,error:!!t[r.name],label:r.label,max:r==null?void 0:r.max,min:r==null?void 0:r.min,onChange:f=>{c&&c(f),o.onChange(f)},prefix:r==null?void 0:r.adorment,placeholder:r.placeholder,readonly:n,required:r.required,thousandSeparator:r==null?void 0:r.thousandSeparator,helperText:s,helperAction:r==null?void 0:r.helperAction});case"datePicker":return R(Mqe,{...o,label:r.label,placeholder:r.placeholder,readonly:n,required:r.required,error:!!t[r.name],other:r.other,helperText:s,slotProps:r.slotProps});case"dateRangePicker":return R(Yte,{...o,label:r.label,placeholder:r.placeholder,readonly:n,required:r.required,error:!!t[r.name],other:r.other,helperText:s,slotProps:r.slotProps});case"fileUploader":return R(()=>{const{onChange:f,...d}=o;return R(Zte,{...d,accept:r.accept,fileName:r.fileName,label:r.label,onChange:h=>{var p;f(h),(p=r==null?void 0:r.onChange)==null||p.call(r,h)},onDelete:r.onDelete,tooltip:r.tooltip,helperText:s,viewPath:r.viewPath})},{});case"selectInput":return R(()=>{const{onChange:f,...d}=o;return R(Wqe,{...d,label:r.label,values:r.values,disabled:r.disabled,readonly:n,required:r.required,multiple:r.multiple,error:!!t[r.name],onChange:h=>{var p;f(h),(p=r==null?void 0:r.onChange)==null||p.call(r,h.target.value)},helperText:s})},{});case"password":return R(b5,{...o,disabled:r.disabled,placeholder:r.placeholder,label:r.label,error:!!t[r.name],onBlur:r.onBlur,readonly:n,required:r.required,type:"password",inputProps:{maxLength:r==null?void 0:r.maxLength},helperText:s});default:return R(b5,{...o,disabled:r.disabled,placeholder:r.placeholder,label:r.label,error:!!t[r.name],multiline:r.multiline,onBlur:r.onBlur,readonly:n,required:r.required,inputProps:{maxLength:r==null?void 0:r.maxLength},helperText:s})}}}),Gqe=({accountId:e,id:t,formConfig:{control:r,formState:{dirtyFields:n,errors:o},setValue:i,watch:a},formFieldsConfiguration:s})=>{const c=a("startDate"),l=a("endDate"),{featureChecker:u}=on(),[{data:f},{data:d,error:h}]=qi({queries:[{queryKey:["lastBill"],queryFn:async()=>await mte(e),initialData:{amount:0,startDate:"",endDate:""}},{queryKey:["billsAccountStats"],queryFn:async()=>await EWe(e),initialData:null}]}),p=()=>{!t&&e&&i("startDate",f.endDate?Hr(f.endDate):null)};return A.useEffect(()=>{p()},[f,i]),A.useEffect(()=>{if((n.startDate||n.endDate)&&Bu(c)&&Bu(l)&&U8(l,c)){const m=xqe(c,l),{month:v,year:y}=m,b=wqe(y,v);i("budgetPeriod",b)}},[c,l,i]),xe(nr,{children:[u.devFeatureEnabled(xf.Experimental)&&xe(zr,{children:[xe(Jt,{direction:"column",children:[R(jt,{variant:"h6",children:"Account Bill Stats"}),xe(Ot,{container:!0,spacing:1,children:[R(Ot,{item:!0,xs:12,md:6,children:xe(jt,{variant:"body2",color:"textSecondary",component:"div",children:["Previous Bill Amount: ",vo(f==null?void 0:f.amount)]})}),R(Ot,{item:!0,xs:12,md:6,children:xe(jt,{variant:"body2",color:"textSecondary",component:"div",children:["Previous Bill Dates (Start - End): ",(f==null?void 0:f.startDate)??""," ","- ",(f==null?void 0:f.endDate)??""]})}),R(Ot,{item:!0,xs:12,md:6,children:xe(jt,{variant:"body2",color:"textSecondary",component:"div",children:["Total Bill Amount Last 12 Months:"," ",h?R(nr,{sx:{fontStyle:"italic"},children:"Insufficient bill history"}):vo(d==null?void 0:d.totalAmountLast12Months)]})}),R(Ot,{item:!0,xs:8,md:4,children:xe(jt,{variant:"body2",color:"textSecondary",component:"div",children:["Average Monthly Bill Amount Last 12 Months:"," ",h?R(nr,{sx:{fontStyle:"italic"},children:"Insufficient bill history"}):vo(d==null?void 0:d.avgAmountLast12Months)]})})]})]}),R(yo,{sx:{mt:2,mb:3}})]}),R(Ot,{container:!0,spacing:2,children:s.map((g,m)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:r,fieldConf:g,errors:o})},m))})]})};var G8={},qqe=Wr;Object.defineProperty(G8,"__esModule",{value:!0});var _f=G8.default=void 0,Kqe=qqe(tn()),Yqe=rn,Xqe=(0,Kqe.default)((0,Yqe.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");_f=G8.default=Xqe;const Cs=({fullWidth:e=!0,dialogActions:t,children:r,maxWidth:n,open:o,onClose:i,title:a})=>xe(SD,{fullWidth:e,open:o,onClose:i,maxWidth:n??"lg",children:[a&&R(GDe,{children:a}),R(CD,{children:r}),t&&R(ED,{children:t})]});var fk=(e=>(e.kW="kW",e.MW="MW",e))(fk||{}),Mr=(e=>(e.ChilledWater="Chilled Water",e.Coal="Coal",e.Diesel="Diesel",e.Electric="Electric",e.FuelOil="Fuel Oil",e.Irrigation="Irrigation",e.NaturalGas="Natural Gas",e.OnSiteSolar="On-Site Solar",e.OnSiteWind="On-Site Wind",e.Propane="Propane",e.Recycling="Recycling",e.Refuse="Refuse",e.Steam="Steam",e.Stormwater="Stormwater",e.Telecom="Telecom",e.Wastewater="Wastewater",e.Water="Water",e.Wood="Wood",e))(Mr||{}),Fr=(e=>(e.cf="cf",e.ccf="ccf",e.Container="Container",e.Decatherms="Decatherms",e.Gallons="Gallons",e.Kgal="Kgal",e.KBtu="KBtu",e.kWh="kWh",e.lbs="lbs",e.Mcf="Mcf",e.Minutes="Minutes",e.MMBtu="MMBtu",e.MWh="MWh",e.Therms="Therms",e.TonHr="Ton Hr",e.Tons="Tons",e))(Fr||{});const Xi=[ka.Charges,ka.Taxes,ka.Usage],Qqe={[Mr.ChilledWater]:Xi,[Mr.Coal]:Xi,[Mr.Diesel]:Xi,[Mr.Electric]:[...Xi,ka.ActualDemand,ka.BilledDemand,ka.Demand,ka.SolarGridPurchased],[Mr.FuelOil]:Xi,[Mr.Irrigation]:Xi,[Mr.NaturalGas]:Xi,[Mr.OnSiteSolar]:Xi,[Mr.OnSiteWind]:Xi,[Mr.Propane]:Xi,[Mr.Recycling]:Xi,[Mr.Refuse]:Xi,[Mr.Steam]:Xi,[Mr.Stormwater]:Xi,[Mr.Telecom]:Xi,[Mr.Wastewater]:Xi,[Mr.Water]:Xi,[Mr.Wood]:Xi},kf=async({filter:e}={})=>await Ao(mr.METERS,{...e&&{filters:JSON.stringify(e)}}),Jte=async e=>await fa(mr.METERS,{},e),ere=async(e,t)=>await Ys(`${mr.METERS}/${e}`,{},t),q8={[Mr.ChilledWater]:[Fr.TonHr],[Mr.Coal]:[Fr.Tons,Fr.lbs],[Mr.Diesel]:[Fr.Gallons],[Mr.Electric]:[Fr.kWh,Fr.MWh],[Mr.FuelOil]:[Fr.Gallons,Fr.Tons],[Mr.Irrigation]:[Fr.Gallons,Fr.Kgal,Fr.cf,Fr.ccf],[Mr.NaturalGas]:[Fr.Decatherms,Fr.Therms,Fr.ccf,Fr.Mcf,Fr.MMBtu,Fr.KBtu],[Mr.OnSiteSolar]:[Fr.kWh,Fr.MWh],[Mr.OnSiteWind]:[Fr.kWh,Fr.MWh],[Mr.Propane]:[Fr.Gallons,Fr.ccf,Fr.KBtu,Fr.MMBtu,Fr.lbs,Fr.Therms],[Mr.Refuse]:[Fr.Tons,Fr.lbs,Fr.Container],[Mr.Recycling]:[Fr.Tons,Fr.lbs,Fr.Container],[Mr.Steam]:[Fr.TonHr],[Mr.Stormwater]:[Fr.Gallons,Fr.Kgal],[Mr.Telecom]:[Fr.Minutes],[Mr.Wastewater]:[Fr.Gallons,Fr.Kgal,Fr.cf,Fr.ccf],[Mr.Water]:[Fr.Gallons,Fr.Kgal,Fr.cf,Fr.ccf],[Mr.Wood]:[Fr.Tons,Fr.lbs]},Zqe=e=>({bulkDelivery:e.bulkDelivery??!1,chargesOnly:e.chargesOnly===void 0?"":e.chargesOnly?"Yes":"No",demandUnit:e.demandUnit??"",inactiveDate:e.inactiveDate?Hr(e.inactiveDate):null,code:e.code??"",multiplier:e.multiplier??"",name:e.name??"",serialNumber:e.serialNumber??"",netMeter:Object.keys(e).length===0?"No":e.netMeter?"Yes":e.netMeter===!1?"No":"",notes:e.notes??"",parentAccountId:e.parentAccountId??"",parentFacilityId:e.parentFacilityId??"",replacesMeterId:e.replacesMeterId??null,serviceType:e.serviceType??"",smartMeter:e.smartMeter===void 0?"":e.smartMeter?"Yes":"No",usageUnit:e.usageUnit??""}),Jqe=(e,t=[],r,n=[],o=[],i,a,s)=>{const c=(f,d)=>{s(d),d?a("name",{type:"custom",message:f}):r("name")},l=async f=>{try{if(!f||f===e.name)return;const{data:d}=await kf({filter:[{field:"name",value:f,operator:"=="}]});d.length?c("Meter name already exists",!0):c("",!1)}catch{St.error(bt.ERROR)}};return[{placeholder:"Meter Name",label:"Meter Name",name:"name",type:"textInput",required:!0,onBlur(f){l(f.target.value)}},{placeholder:"Replaces Meter",label:"Replaces Meter",name:"replacesMeterId",type:"autocomplete",required:!1,options:o.map(f=>({label:f.name,value:f.id}))},{placeholder:"Parent Account",label:"Parent Account",name:"parentAccountId",type:"autocomplete",required:!0,options:t.map(f=>({label:f.number,value:f.id,disabled:!f.isActive}))},{placeholder:"Parent Facility",label:"Parent Facility",name:"parentFacilityId",type:"autocomplete",required:!0,options:n.map(f=>({label:f.name,value:f.id,key:f.id,disabled:!f.isActive}))},{placeholder:"Service Type",label:"Service Type",name:"serviceType",type:"selectInput",required:!0,values:Object.values(Mr).map(f=>({label:f,value:f}))},{placeholder:"Usage Unit",label:"Usage Unit",name:"usageUnit",type:"selectInput",required:!0,values:i?q8[i].map(f=>({label:f,value:f})):[]},{placeholder:"Bulk Delivery",label:"Bulk Delivery",name:"bulkDelivery",type:"selectInput",required:!1,values:[{label:"Yes",value:!0},{label:"No",value:!1}],hidden:![Mr.Coal,Mr.Diesel,Mr.FuelOil,Mr.Propane,Mr.Wood].includes(i)},{placeholder:"Demand Unit",label:"Demand Unit",name:"demandUnit",type:"selectInput",required:i===Mr.Electric,values:[{label:"kW",value:"kW"},{label:"MW",value:"MW"}],hidden:i!==Mr.Electric},{placeholder:"Net Meter",label:"Net Meter",name:"netMeter",type:"selectInput",required:!1,values:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],hidden:i!==Mr.Electric},{placeholder:"Meter Code",label:"Meter Code",name:"code",type:"textInput",required:!1},{placeholder:"Meter Serial Number",label:"Meter Serial Number",name:"serialNumber",type:"textInput",required:!1},{placeholder:"Inactive Date",label:"Inactive Date",name:"inactiveDate",type:"datePicker",required:!1},{placeholder:"Meter Multiplier",label:"Meter Multiplier",name:"multiplier",type:"textInput",required:!1},{placeholder:"Charges Only",label:"Charges Only",name:"chargesOnly",type:"selectInput",required:!1,values:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}]},{placeholder:"Smart Meter",label:"Smart Meter",name:"smartMeter",type:"selectInput",required:!1,values:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}]},{placeholder:"Notes",label:"Notes",multiline:!0,name:"notes",type:"textInput",required:!1}]},eKe=(e={},t,r)=>{var o,i;const n=(a,s)=>a&&typeof a=="string"?Hr(a):a||(Bu(s)?s:null);return{meterId:e.meterId??"",facilityName:((i=(o=e.meter)==null?void 0:o.parentFacility)==null?void 0:i.name)??"",type:e.type??"",subTypeId:e.subTypeId??"",description:e.description??"",unitOfMeasure:e.unitOfMeasure??"",startDate:n(e.startDate,r),endDate:n(e.endDate,t),usage:e.usage??0,cost:e.cost??0}},tre=(e,t)=>{var o;if(!(e!=null&&e.meterId))return[];const r=[ka.ActualDemand,ka.BilledDemand,ka.Demand],n=(o=t.find(i=>i.id===e.meterId))==null?void 0:o.serviceType;if(n){if(r.includes(e.type))return Object.keys(fk).map(i=>({label:fk[i],value:fk[i]}));{const i=q8[n];return Object.keys(i).map(a=>({label:i[a],value:i[a]}))}}return[]},tKe=(e,t,r,n,o={})=>{const[i,a]=A.useState(null),[s,c]=A.useState(null);A.useEffect(()=>{var f,d;!Object.keys(o).length&&i&&n("facilityName",(d=(f=r.find(h=>h.id===i))==null?void 0:f.parentFacility)==null?void 0:d.name)},[i]),A.useEffect(()=>{Object.keys(o).length&&(a(o.meterId),c(o.type))},[o]);const l=()=>{if(!i)return[];const f=r.find(p=>p.id===i);if(!f)return[];const{serviceType:d,netMeter:h}=f;if(d){const p=Qqe[d],g=[];d===Mr.Electric&&h&&g.push(ka.SolarOnSiteExcess);const m=[...p,...g],v=Object.keys(m.sort()).map(y=>({label:m[y],value:m[y]}));return v.push({label:ka.Other,value:ka.Other}),v}return[]};return[{label:"Meter Name",name:"meterId",placeholder:"Meter Name",type:"selectInput",required:!0,values:AE(r,"name").map(f=>({label:f.name,value:f.id})),onChange:f=>a(f)},{label:"Facility Name",name:"facilityName",placeholder:"Facility Name",type:"textInput",required:!1,disabled:!0},{label:"Line Item Type",name:"type",placeholder:"Line Item Type",type:"selectInput",required:!0,values:l(),onChange:f=>c(f)},{label:"Line Item Subtype",name:"subTypeId",placeholder:"Line Item Subtype",type:"selectInput",required:!1,values:AE(t,"name").map(f=>({label:f.name,value:f.id}))},{label:"Line Item Description",name:"description",placeholder:"Line Item Description",type:"textInput",helperText:"Max 100 characters",maxLength:100,multiline:!0,required:!1},{label:"Unit",name:"unitOfMeasure",placeholder:"Unit",type:"selectInput",required:e("type")===ka.Usage,values:tre({meterId:i,type:s},r)},{label:"Start Date",name:"startDate",placeholder:"Start Date",type:"datePicker",required:!0},{label:"End Date",name:"endDate",placeholder:"End Date",type:"datePicker",required:!0,validate:(f,d)=>U8(f,d.startDate)},{allowNegative:!0,label:"Usage",name:"usage",placeholder:"Usage",type:"number",required:!1,min:0},{label:"Cost",name:"cost",placeholder:"Cost",type:"number",required:!1,min:0,adorment:"$ ",allowNegative:!0,autoDecimalFormat:!0}]},tj=({defaultEndDate:e,defaultStartDate:t,doc:r={},lineItemSubtypes:n,meters:o,open:i,onClose:a,onSave:s})=>{const{control:c,handleSubmit:l,formState:{errors:u},getValues:f,setValue:d}=Bn({defaultValues:eKe(r,e,t)}),h=g=>{s(g)},p=tKe(f,n,o,d,r);return R(Cs,{title:`${Object.keys(r).length?"Edit":"Add"} Line Item`,open:i,onClose:a,dialogActions:xe(Ho,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:a,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,type:"submit",form:"line-item-form",children:Object.keys(r).length?"Update line item":"Add line item"})]}),children:R("form",{onSubmit:l(h),id:"line-item-form",children:R(Ot,{container:!0,spacing:2,mt:.25,children:p.map((g,m)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:c,fieldConf:g,errors:u})},m))})})})},rKe=async e=>await fa(mr.LINE_ITEM_SUBTYPES,{},e),nKe=async e=>await ty(`${mr.LINE_ITEM_SUBTYPES}/${e}`,{}),rre=async()=>await Ao(mr.LINE_ITEM_SUBTYPES,{}),rj={valueParser:e=>{if(isNaN(parseFloat(e)))return 0;const t=e.split(".")[1]??"";return parseFloat(e).toFixed(t.length)}},oKe=({accountId:e,apiDataGridRef:t,defaultLineItemsCost:r,editable:n=!1,endDate:o,startDate:i,lineItems:a,onRowsChange:s})=>{const[{data:c,isError:l,isFetching:u,refetch:f},{data:d,isError:h,isFetching:p}]=qi({queries:[{queryKey:["lineItemMeters"],queryFn:async()=>{const X=await kf();return{...X,data:X.data.filter(({parentAccountId:te,isActive:ee})=>te===e&&ee)}},initialData:{data:[]}},{queryKey:["lineItemSubtypes"],queryFn:async()=>await rre(),initialData:{data:[]}}]});A.useEffect(()=>{f()},[e]);const[g,m]=A.useState(!1),[v,y]=A.useState(a??[]),[b,w]=A.useState(!1),[E,I]=A.useState(!1),[O,D]=A.useState({}),[N,U]=A.useState(!1),[B,F]=A.useState(!1),[T,P]=A.useState("");async function _(){try{const X=await mte(e),{lineItems:te=[]}=X??{},ee=te.map(re=>({...te.length===1&&{cost:r},description:re.description,type:re.type,meter:re.meter,meterId:re.meterId,sortIndex:re.sortIndex,unitOfMeasure:re.unitOfMeasure,...o&&{endDate:o},...i&&{startDate:i}}));y(ee)}catch{St.error(bt.ERROR),m(!0)}finally{w(!1)}}A.useEffect(()=>{(!Array.isArray(a)||!a.length)&&n&&(w(!0),_())},[]),A.useEffect(()=>{s==null||s(v),y(v.sort((X,te)=>X.sortIndex-te.sortIndex))},[v]);const C=X=>{P(X[0])},S=()=>{(T||T.toString()==="0")&&y(X=>X.filter((ee,re)=>ee!=null&&ee.id&&(ee==null?void 0:ee.id)===T?!1:re.toString()!==T.toString())),P(""),I(!1)},x=()=>{I(!1)},k=X=>{Y(),y(te=>[...te,X])},L=X=>{Y(),(T||T.toString()==="0")&&y(te=>te.map((re,se)=>(re==null?void 0:re.id)===T.toString()?{id:re.id,...X}:se.toString()===T.toString()?X:re))},j=()=>{U(!0),F(!1)},z=()=>{F(!0),U(!1)},Y=()=>{U(!1),F(!1),P("")},K=X=>()=>{D({...O,[X]:{mode:gn.View}})},Q=X=>()=>{D({...O,[X]:{mode:gn.View,ignoreModifications:!0}})},q=X=>(y(v.map((te,ee)=>{const{id:re,...se}=X;return(te==null?void 0:te.id)===re||ee===re?se:te})),X),J=X=>{n&&D(X)},G=[{field:"meterName",headerName:"Meter Name",width:160,valueGetter:({row:X})=>{var te,ee;return((te=X.meter)==null?void 0:te.name)??((ee=c.data.find(re=>re.id===X.meterId))==null?void 0:ee.name)}},{field:"facilityName",headerName:"Facility",width:160,valueGetter:({row:X})=>{var te,ee,re,se;return((ee=(te=X.meter)==null?void 0:te.parentFacility)==null?void 0:ee.name)??((se=(re=c.data.find(pe=>pe.id===X.meterId))==null?void 0:re.parentFacility)==null?void 0:se.name)}},{field:"type",headerName:"Line Item Type",width:128},{editable:!0,field:"subTypeId",headerName:"Subtype",width:128,type:"singleSelect",valueOptions:AE(d.data,"name").map(X=>({label:X.name,value:X.id}))},{field:"description",headerName:"Description",width:160},{editable:!0,field:"unitOfMeasure",headerName:"Unit",width:80,type:"singleSelect",valueOptions:({row:X})=>tre(X,c.data)},{editable:!0,field:"startDate",headerName:"Start Date",width:108,type:"date",valueFormatter:({value:X})=>X?Vo(X,"P"):"",valueGetter:({row:X})=>X.startDate&&typeof X.startDate=="string"?Hr(X.startDate):X.startDate?X.startDate:null},{editable:!0,field:"endDate",headerName:"End Date",width:108,type:"date",valueFormatter:({value:X})=>X?Vo(X,"P"):"",valueGetter:({row:X})=>X.endDate&&typeof X.endDate=="string"?Hr(X.endDate):X.endDate?X.endDate:null},{editable:!0,field:"usage",headerName:"Usage",type:"number",width:100,valueFormatter:({value:X})=>vo(X||0,{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}),...rj},{editable:!0,field:"cost",headerName:"Cost",type:"number",width:100,valueFormatter:({value:X})=>vo(X||0),...rj},...n?[{field:"actions",type:"actions",headerName:"Actions",cellClassName:"actions",width:96,getActions:({id:X})=>{var ee;return((ee=O[X])==null?void 0:ee.mode)===gn.Edit?[R(yr,{icon:R(g0,{}),label:"Save",sx:{color:"primary.main"},onClick:K(X)},"save"),R(yr,{icon:R(m0,{}),label:"Cancel",className:"textPrimary",onClick:Q(X),color:"inherit"},"cancel")]:[R(yr,{icon:R(ud,{}),label:"Edit",className:"textPrimary",onClick:()=>{P(X),z()},color:"inherit"},"edit"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{P(X),I(!0)},color:"inherit"},"delete")]}}]:[]];return xe(nr,{style:{display:"grid"},children:[R(Jt,{direction:"column",spacing:2,overflow:"hidden",children:R(Jt,{direction:"row",children:R(Yn,{apiRef:t,editMode:"row",rowModesModel:O,isRowNavigation:!1,processRowUpdate:q,checkboxSelection:!1,columns:G,csvFilename:"Bill Line Items",customToolbarOptions:n&&R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:j,sx:{alignSelf:"flex-end"},children:"Add item"})}),dataFetchError:g||l||h,handleSelectionChange:C,loading:b||u||p,onRowModesModelChange:J,onRowOrderChange:X=>{const{targetIndex:te,oldIndex:ee}=X;y(re=>re.map((pe,ce)=>ce===ee?{...pe,sortIndex:te}:ee<te&&ce>ee&&ce<=te?{...pe,sortIndex:ce-1}:ee>te&&ce>=te&&ce<ee?{...pe,sortIndex:ce+1}:{...pe,sortIndex:ce}))},rows:g||l||h?[]:v.map((X,te)=>({id:te,...X})),rowReordering:!0,sx:{minHeight:"15rem"}})})}),N&&R(tj,{defaultEndDate:o,defaultStartDate:i,lineItemSubtypes:d.data,meters:c.data,open:N,onClose:Y,onSave:k}),B&&R(tj,{doc:v.find((X,te)=>X!=null&&X.id&&(X==null?void 0:X.id)===T?!0:te.toString()===T.toString()),defaultEndDate:o,defaultStartDate:i,lineItemSubtypes:d.data,meters:c.data,open:B,onClose:Y,onSave:L}),R(Br,{open:E,onClose:x,message:"Are you sure you want to remove this item?",primaryButtonLabel:"Yes",onPrimaryButtonClicked:S,secondaryButtonLabel:"No",onSecondaryButtonClicked:x,renderElement:R(oo,{sx:{color:"error.main"}})})]})},iKe=({error:e})=>xe(Jt,{flexDirection:"row",children:[R(qo,{color:"error",fontSize:"medium"}),R(jt,{ml:1,fontWeight:"bold",color:"error",children:e})]}),nre=A.forwardRef(function({accountId:t,billDoc:r={},defaultLineItems:n=[],disableEditAccount:o,showLineItems:i},a){const{control:s,formState:{errors:c},setValue:l,getValues:u,watch:f}=Bn({defaultValues:{accountId:t}}),{control:d,formState:{dirtyFields:h,errors:p,isDirty:g},handleSubmit:m,getValues:v,setValue:y,setError:b,trigger:w,watch:E}=Bn({defaultValues:gqe(r)}),I=vqe({setValue:y,getValues:v,id:r.id,billPageNumber:r.pageNumber}),O=m8(),[D,N]=A.useState(!1),[U,B]=A.useState(""),[F,T]=A.useState({}),[P,_]=A.useState([]),[C,S]=A.useState(r.lineItems??n),[x,k]=A.useState({}),[L,j]=A.useState(0),[z,Y]=A.useState(!1),[K,Q]=A.useState(!1),[q,J]=A.useState(""),[G,V]=A.useState(()=>()=>{}),X=E("amount"),te=X-L,ee=async he=>{for(const{validate:oe,message:le}of he)if(!await oe())return B(le),St.error(le),!1;return B(""),!0},re=A.useCallback(he=>{const{message:oe,validate:le,next:de}=he;if(Q(!1),oe&&le){const[ve,we]=le(),ie=()=>re(we);J(oe),V(()=>ie),ve?ie():Q(!0)}de&&de()},[]);A.useImperativeHandle(a,()=>({form:{isDirty:g,getValues:v,handleSubmit:m,setError:b,trigger:w},data:{account:F,lineItems:C,utility:x,total:L},refs:{lineItems:O},handleSubmit:async he=>{const oe=new mqe(v,C);await ee(oe.getLineItemsValidator(L))&&re(oe.getWarningsValidators(O,he)[0])}})),A.useEffect(()=>{pe()},[]),A.useEffect(()=>{F.utilityId&&se()},[F]);async function se(){N(!1);try{const he=await bqe(F.utilityId);k(he)}catch{St.error(bt.ERROR)}}async function pe(){try{const he=await a4(t),{data:oe}=await hp();T(he),_(AE(oe,"number"))}catch{St.error(bt.ERROR)}}const ce=(he,oe)=>{var ve,we;const le=((ve=he.toString().split(".")[1])==null?void 0:ve.length)??0,de=((we=oe.toString().split(".")[1])==null?void 0:we.length)??0;return le>de?le:de},ne=()=>{z&&Y(!1),K&&Q(!1)};return F.id?xe(_o,{header:R(Jt,{direction:"row",spacing:2,justifyContent:"space-between",children:D?xe(Jt,{direction:"row",width:"50%",spacing:.5,alignItems:"center",children:[R(Dn,{control:s,errors:c,fieldConf:{type:"autocomplete",clearIcon:!1,options:P.map(({number:he,id:oe,isActive:le})=>({label:he,value:oe,disabled:F.id===oe||!le})),required:!0,label:"Account number",name:"accountId"}}),R(ri,{disabled:f("accountId")===F.id,size:"small",sx:{height:40,paddingX:1.2},onClick:()=>{const he=u().accountId;N(!1),T(P.find(({id:oe})=>he===oe)),Y(!0)},children:R(g0,{fontSize:"small"})}),R(ri,{size:"small",sx:{height:40,paddingX:1.2},onClick:()=>{l("accountId",F.id),N(!1)},children:R(m0,{fontSize:"small"})})]}):R(zr,{children:xe(Jt,{direction:"column",children:[xe(jt,{variant:"h6",children:["Account number: ",F.number??"-"," ",r.id&&!o&&R(ri,{size:"small",onClick:()=>N(!0),children:R(ud,{fontSize:"small"})})]}),xe(jt,{variant:"body2",color:"textSecondary",component:"div",children:["Utility: ",x.name??"-"]})]})})}),children:[R(Gqe,{accountId:F.id,id:r.id,formConfig:{control:d,formState:{dirtyFields:h,errors:p},handleSubmit:m,setValue:y,watch:E},formFieldsConfiguration:I}),i&&xe(zr,{children:[R(yo,{children:"Line items"}),R(Jt,{direction:"row",spacing:2,justifyContent:"flex-end",children:R(jt,{variant:"subtitle1",children:xe(Ot,{container:!0,children:[R(Ot,{item:!0,px:1,children:"Bill Amount:"}),R(Ot,{item:!0,px:1,children:vo(X)}),R(yo,{orientation:"vertical",flexItem:!0}),R(Ot,{item:!0,px:1,children:"Remaining:"}),R(Ot,{item:!0,px:1,children:vo(te,{minimumFractionDigits:2,maximumFractionDigits:5,style:"currency",currency:"USD"})}),R(yo,{orientation:"vertical",flexItem:!0}),R(Ot,{item:!0,px:1,children:"Total Line Item:"}),R(Ot,{item:!0,px:1,children:vo(L)})]})})}),R(oKe,{apiDataGridRef:O,accountId:F.id,defaultLineItemsCost:v("amount"),editable:!0,endDate:v("endDate"),startDate:v("startDate"),lineItems:C,onRowsChange:he=>{const oe=he.reduce((le=0,{cost:de=0})=>{const ve=ce(le,de);return le+=Number(de),parseFloat(le.toFixed(ve))},0);S(he),j(oe)}}),U&&R(iKe,{error:U})]}),R(Br,{open:z,onClose:ne,message:"Reminder: Be sure to update line items with meters associated with the new account number.",primaryButtonLabel:"Accept",onPrimaryButtonClicked:ne,renderElement:R(od,{sx:{color:"yellow"}})}),R(Br,{open:K,onClose:ne,message:`Warning: ${q}`,primaryButtonLabel:r.id?"Update":"Save",onPrimaryButtonClicked:G,secondaryButtonLabel:"Edit",onSecondaryButtonClicked:ne,renderElement:R(od,{sx:{color:"yellow"}})})]}):R(nr,{display:"flex",justifyContent:"center",padding:10,children:R(Ri,{})})});function ore(e,t,r){const{data:n,form:o}=t.current,i=o.getValues(),a={...i,utility:n.utility.id,accountId:n.account.id,lineItems:[],organizationId:r};return e.id&&(a.id=e.id),i.date&&(a.date=i.date.toISOString()),i.budgetPeriod&&(a.budgetPeriod=uWe(new Date(i.budgetPeriod)).toISOString()),i.dueDate&&(a.dueDate=i.dueDate.toISOString()),i.endDate&&(a.endDate=i.endDate.toISOString()),a.estimated=i.estimated,i.startDate&&(a.startDate=i.startDate.toISOString()),n.lineItems.forEach((s,c)=>{a.lineItems[c]={},s.id&&(a.lineItems[c].id=s.id),e.id&&(a.lineItems[c].billId=e.id),a.lineItems[c].cost=s.cost!=null?s.cost.toString():"0",s.endDate&&(a.lineItems[c].endDate=s.endDate&&typeof s.endDate!="string"?s.endDate.toISOString():s.endDate),s.startDate&&(a.lineItems[c].startDate=s.startDate&&typeof s.startDate!="string"?s.startDate.toISOString():s.startDate),a.lineItems[c].usage=s.usage!=null?s.usage.toString():"0",(s.sortIndex||s.sortIndex===0)&&(a.lineItems[c].sortIndex=s.sortIndex.toString()),a.lineItems[c].description=s.description,a.lineItems[c].type=s.type,a.lineItems[c].subTypeId=s.subTypeId||null,a.lineItems[c].meterId=s.meterId,a.lineItems[c].unitOfMeasure=s.unitOfMeasure}),delete a.workingImage,a}const nj={data:[],count:0,totalCount:0,page:0,pageSize:50,prev:"",next:"",mode:"next"},K8=({accountId:e,handleBackAction:t})=>{const{id:r}=j2(),n=A.useRef(null),[o,i]=A.useState(),[a,s]=A.useState(!1),[c,l]=A.useState({...nj}),[u,f]=A.useState({open:!1,data:{}}),[d,h]=A.useState({}),[p,g]=A.useState([{field:"startDate",sort:"desc"}]),m=B2(),[{data:v},{data:y,isError:b,isFetching:w,refetch:E}]=qi({queries:[{queryKey:["account"],queryFn:async()=>await a4(e),initialData:{}},{queryKey:["bills"],queryFn:async()=>await N({sorting:p[0],pagination:c,filter:d}),initialData:[],enabled:!1}]}),{mutate:I,isPending:O}=xs({mutationKey:["billMutation"],mutationFn:D,onSuccess:x=>{m.setQueryData(["bills"],k=>{const L=[...k];if(k){const j=L.findIndex(({id:z})=>z===x.id);j!==-1&&(L[j]={...x})}return L})}});A.useEffect(()=>{E()},[]);async function D(){const{current:x}=n,{form:k}=x;try{const{data:L}=u,j=ore(L,{current:x},L.organizationId);await y5(L.id,j);const z=await Gz(L.id);return F(),St.success(bt.UPDATE_SUCCESS),z}catch(L){if(mi.compatible(L)){const{getValues:j,setError:z}=k;gi({setError:z,getValues:j},L)}St.error(bt.ERROR)}}async function N({sorting:x,pagination:k,filter:L}){try{const{data:j,meta:z}=await I8({limit:k.pageSize,page:k.page,sort:x.field,sortDirection:x.sort,filter:[...L.items||[],{field:"accountId",operator:_a.EQUALS,value:e}]});return l(Y=>({...Y,data:j,totalCount:z.totalCount})),j}catch(j){throw St.error(bt.ERROR),j}}function U(x={}){l({...nj,...x})}function B(x){let k=!1,L;const{items:j=[]}=x;if(!j.filter(Y=>!Y.value||!Y.value.length).length){k=!0;for(const Y of j)if(!["==","in","array-contains-any"].includes(Y.operator)&&(L||(L=Y),L.field!==Y.field)){St.error("Filter error: Interval and inequality operators should be applied in same column."),k=!1;break}}return k}function F(){f({open:!1,data:{}})}const T=()=>i(setTimeout(E,1e3)),P=async()=>{n.current&&await n.current.handleSubmit(I)},_=async x=>{try{const k=await Gz(x.id);f({open:!0,data:k})}catch{St.error(bt.ERROR)}},C=[{field:"startDate",headerName:"Bill Start Date",flex:1,filterOperators:uw(),valueFormatter:({value:x})=>Vo(x,"PPP"),sortingOrder:["asc","desc"],type:"date",valueGetter:({row:x})=>x.startDate?Hr(x.startDate):""},{field:"endDate",headerName:"Bill End Date",flex:1,filterOperators:uw(),valueFormatter:({value:x})=>Vo(x,"PPP"),sortingOrder:["asc","desc"],type:"date",valueGetter:({row:x})=>x.endDate?Hr(x.endDate):""},{field:"amount",headerName:"Bill Amount",flex:1,filterOperators:Ite(),renderCell:({value:x})=>vo(x),sortingOrder:["asc","desc"]},{field:"budgetPeriod",headerName:"Budget Period",flex:1,valueFormatter:({value:x})=>{try{return Vo(Hr(x),"PPP")}catch{return""}},sortable:!1,filterable:!1,type:"date"},{field:"lineItems",filterable:!1,flex:1,headerName:"Bill Usage",sortable:!1,renderCell:({value:x})=>R(bo,{label:x}),valueGetter:({value:x})=>x.filter(({type:k})=>k===ka.Usage).reduce((k,L)=>k+L.usage,0)},...r?[{field:"id",headerName:" ",flex:.3,sortable:!1,filterable:!1,renderCell:({row:x})=>x.id===r?R(bo,{label:"Current",variant:"outlined",color:"success"}):R(zr,{})}]:[],{field:"actions",headerName:"Options",type:"actions",getActions:({row:x})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:async()=>await _(x)},"updateBtn")]}],S=[{name:"Back",icon:R(_8,{}),handleAction:t,...!u.open&&{primary:!0}},...u.open?[{name:"Update",icon:R(E8,{}),handleAction:P,primary:!0,disabled:O},{name:"Cancel",icon:R(w8,{}),handleAction:()=>s(!0),primary:!0,disabled:O}]:[]];return xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:S}),xe(_o,{title:`View ${v.number??"-"} Account bills`,children:[u.open?R(nre,{ref:n,accountId:e,billDoc:u.data,showLineItems:!0,disableEditAccount:!0}):R(Yn,{columns:C,dataFetchError:b,disableMultipleColumnsFiltering:!0,filterMode:"server",loading:w,paginationMode:"server",rows:y,rowCount:c.totalCount,sortingMode:"server",sortModel:p,getRowClassName:x=>x.id===r?"row-disabled":"",isRowSelectable:({row:x})=>x.id!==r,onFilterModelChange:x=>{h(x),clearTimeout(o);const k=JSON.stringify(x),L=JSON.stringify(d);B(x)&&k!==L&&(l({...c,next:"",prev:""}),T())},onRowDoubleClick:_,paginationModel:{page:c.page,pageSize:c.pageSize},onPaginationModelChange:(x,{reason:k})=>{if(k==="setPaginationModel"){const L=x.pageSize!==c.pageSize?0:x.page;if(x.pageSize!==c.pageSize)U({pageSize:x.pageSize});else{const j=x.page<c.page?"prev":"next";l(z=>({...z,mode:j,page:L,pageSize:x.pageSize}))}T()}},onSortModelChange:x=>{g(x),l(k=>({...k,page:0,prev:"",next:""})),T()},slotProps:{filterPanel:{logicOperators:[Va.And]}},sx:{"& .row-disabled":{opacity:.5}}}),R(Br,{open:a,onClose:()=>s(!1),message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:()=>{F(),s(!1)},secondaryButtonLabel:"Save",onSecondaryButtonClicked:()=>s(!1),renderElement:R(qo,{sx:{color:"red"}})})]})]})},oC=({disabled:e=!1,showDeactivatedType:t,setShowDeactivatedType:r,type:n})=>R(nr,{sx:{ml:"auto"},children:R(dp,{disabled:e,sx:{m:0},control:R(Tl,{checked:t,onChange:()=>r(!t),name:"toggleDeactivatedFacilities",color:"primary"}),label:`Show deactivated ${n}`,labelPlacement:"start"})});var Y8={},aKe=Wr;Object.defineProperty(Y8,"__esModule",{value:!0});var ire=Y8.default=void 0,sKe=aKe(tn()),lKe=rn,cKe=(0,sKe.default)((0,lKe.jsx)("path",{d:"M14 2H4c-1.11 0-2 .9-2 2v10h2V4h10V2zm4 4H8c-1.11 0-2 .9-2 2v10h2V8h10V6zm2 4h-8c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h8c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2z"}),"AutoAwesomeMotion");ire=Y8.default=cKe;var X8={},uKe=Wr;Object.defineProperty(X8,"__esModule",{value:!0});var Q8=X8.default=void 0,dKe=uKe(tn()),pP=rn,fKe=(0,dKe.default)([(0,pP.jsx)("path",{d:"M7 13h4v4H7zm6 0h4v4h-4z"},"0"),(0,pP.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"},"1"),(0,pP.jsx)("path",{d:"M7 7h4v4H7zm6 0h4v4h-4z"},"2")],"DatasetOutlined");Q8=X8.default=fKe;var Z8={},hKe=Wr;Object.defineProperty(Z8,"__esModule",{value:!0});var Qa=Z8.default=void 0,pKe=hKe(tn()),mKe=rn,gKe=(0,pKe.default)((0,mKe.jsx)("path",{d:"M13 11h-2v3H8v2h3v3h2v-3h3v-2h-3zm1-9H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"}),"NoteAddOutlined");Qa=Z8.default=gKe;var J8={},vKe=Wr;Object.defineProperty(J8,"__esModule",{value:!0});var ny=J8.default=void 0,yKe=vKe(tn()),bKe=rn,wKe=(0,yKe.default)((0,bKe.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"Visibility");ny=J8.default=wKe;var eF={},xKe=Wr;Object.defineProperty(eF,"__esModule",{value:!0});var oy=eF.default=void 0,CKe=xKe(tn()),SKe=rn,_Ke=(0,CKe.default)((0,SKe.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");oy=eF.default=_Ke;const kKe=async e=>await fa(mr.ALLOCATIONS,{},e),EKe=async(e,t)=>await Ys(`${mr.ALLOCATIONS}/${e}`,{},t),TKe=async({filter:e=[]})=>await Ao(mr.ALLOCATIONS,{filters:JSON.stringify(e)}),IKe=async e=>await ty(`${mr.ALLOCATIONS}/${e}`);function oj(e,t,r="ACCOUNT"){return`[${e}] - SUB ${r} - [${String(t).padStart(3,"0")}]`}var mv=(e=>(e.TotalPercent="Total Percent",e.LineItemPercent="Line Item Percent",e.LineItemPercentMeterRead="Line Item Percent & Meter Read",e))(mv||{});const AKe=(e,t=[])=>[{placeholder:"Sub Account Number",label:"Sub Account Number",name:"subAccountId",disabled:!0,type:"selectInput",required:!0,values:[{value:e.id,label:e.number}]},{placeholder:"Sub Meter Name",label:"Sub Meter Name",name:"metersIds",disabled:!0,type:"selectInput",required:!0,multiple:!0,values:t.map(({id:r,name:n})=>({value:r,label:n}))},{placeholder:"Allocation Percent",label:"Allocation Percent",name:"percent",type:"number",min:0,adorment:"% ",required:!0}],PKe=({doc:e={},handleBackAction:t})=>{var s;const[{data:r},{data:n}]=qi({queries:[{queryKey:["allocationAccount"],initialData:{id:""}},{queryKey:["masterAccountMeters"],initialData:{data:[]}}]}),{control:o,formState:{errors:i},handleSubmit:a}=Bn({defaultValues:{subAccountId:e.subAccountId??r.id,metersIds:(e.meters??n.data).map(c=>c.id),percent:e.percent??""}});return R(_o,{title:"Sub Account Information",direction:"column",buttons:xe(zr,{children:[R(Ft,{color:"secondary",onClick:()=>t(),sx:{marginRight:2},variant:"outlined",children:"Cancel"}),xe(Ft,{color:"secondary",disableElevation:!0,onClick:a(c=>t(Object.assign(c,{id:e.id}))),variant:"contained",children:[`${(s=e.id)!=null&&s.toString()?"Update":"Add"} `,"sub account"]})]}),children:R(nr,{children:R(Ot,{container:!0,spacing:2,children:AKe(e.subAccount??r,e.meters??n.data).map((c,l)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:c,errors:i})},l))})})})},MKe=()=>[{placeholder:"Allocation Type",label:"Allocation Type",name:"allocationType",type:"selectInput",required:!1,values:[{label:"Total Account Allocation by Percent",value:mv.TotalPercent},{label:"Line Item Percent",value:mv.LineItemPercent},{label:"Line Item Percent & Meter Read (new)",value:mv.LineItemPercentMeterRead}]}],RKe=({doc:e={},handleBackAction:t})=>{const{masterAccountId:r}=s4(),{getUser:n}=on(),{organizationId:o}=n(),[{data:i},{data:a}]=qi({queries:[{queryKey:["allocationAccount"],queryFn:async()=>await a4(r),initialData:{utility:{}}},{queryKey:["masterAccountMeters"],queryFn:()=>kf({filter:[{field:"parentAccountId",value:r,operator:"=="}]}),initialData:{data:[]}}]}),{mutate:s,isPending:c}=xs({mutationKey:["allocationTransaction"],mutationFn:async _=>await _(),onSuccess:()=>{St.success(e.id?bt.UPDATE_SUCCESS:bt.CREATE_SUCCESS),t()},onError:()=>St.error(bt.ERROR)}),{control:l,formState:{errors:u},getValues:f,watch:d}=Bn({defaultValues:{allocationType:e.allocationType??mv.TotalPercent}}),[h,p]=A.useState(T(e.allocationDetails??[])),[g,m]=A.useState({open:!1,data:{id:""}}),[v,y]=A.useState({open:!1,data:{id:""}}),[b,w]=A.useState({open:!1}),[E,I]=A.useState(0);A.useEffect(()=>{const _=h.reduce((C,S)=>C+S.percent,0);I(_)},[h]);const O=[{field:"subAccount",headerName:"Sub Account Number",width:300,valueGetter:({row:_})=>oj(i.number,_.id)},{field:"meters",headerName:"Sub Meters Name",flex:1,valueGetter:({row:_})=>a.data.map(({name:C})=>oj(C,_.id,"METER")).join(", ")},{field:"utilityId",headerName:"Utility Name",width:200,valueGetter:()=>i.utility.name},{field:"status",headerName:"Status",width:100,renderCell:({value:_})=>R(bo,{label:_||"saved",color:_?"warning":"success",variant:"outlined"})},{field:"percent",headerName:"Percent",width:75,valueFormatter:({value:_})=>vo(_??0,{style:"unit",unit:"percent",minimumFractionDigits:2,maximumFractionDigits:2})},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({row:_})=>{const C=S=>()=>S({open:!0,data:_});return[R(yr,{icon:R(ud,{}),label:"Edit",sx:{color:"primary.main"},onClick:C(m)},"edit"),R(yr,{icon:R(oo,{}),label:"Cancel",className:"textPrimary",color:"inherit",onClick:C(y)},"cancel")]}}];async function D(){const _=async()=>{const S={organizationId:o,allocationType:f("allocationType"),masterAccountId:r,allocationDetails:h.map(x=>({isActive:!0,percent:x.percent}))};return await kKe(S)},C=async()=>await EKe(e.id,{allocationDetails:h});await s(e.id?C:_)}function N(_){return vo(_,{style:"unit",unit:"percent",minimumFractionDigits:2,maximumFractionDigits:2})}const U=_=>()=>_({open:!1,data:{id:""}}),B=_=>{if(_){const{data:C}=g;C.id.toString()?p(T(h.map(S=>({...S,...S.id===C.id&&{percent:_.percent,status:"to update"}})))):p(T([...h,{meters:[...a.data],percent:_.percent,subAccount:{...i},status:"to save"}]))}U(m)()},F=()=>{p(T(h.filter(({id:_})=>_!==v.data.id))),U(y)()};function T(_){return _.map((C,S)=>({...C,id:S+1}))}const P=[{name:e.id?"Update":"Save",icon:R(E8,{}),handleAction:D,primary:!0,disabled:c||E!==100},{name:"Cancel",icon:R(w8,{}),handleAction:()=>w({open:!0}),primary:!0,disabled:c}];return xe(zr,{children:[xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:P}),xe(_o,{title:"Allocation Information",children:[R(nr,{children:R(Ot,{container:!0,spacing:2,children:MKe().map((_,C)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:l,fieldConf:_,errors:u})},C))})}),d("allocationType")===mv.TotalPercent&&xe(zr,{children:[R(yo,{}),R(Jt,{direction:"row",spacing:2,justifyContent:"flex-end",children:R(jt,{variant:"subtitle1",children:xe(Ot,{container:!0,children:[R(Ot,{item:!0,px:1,children:"Allocation Percent:"}),R(Ot,{item:!0,px:1,children:N(100)}),R(yo,{orientation:"vertical",flexItem:!0}),R(Ot,{item:!0,px:1,children:"Remaining:"}),R(Ot,{item:!0,px:1,children:N(100-E)}),R(yo,{orientation:"vertical",flexItem:!0}),R(Ot,{item:!0,px:1,children:"Total Percent:"}),R(Ot,{item:!0,px:1,children:N(E)})]})})}),R(Yn,{checkboxSelection:!1,isRowNavigation:!1,rows:h,columns:O,customToolbarOptions:R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),sx:{alignSelf:"flex-end"},onClick:()=>m({open:!0,data:{id:""}}),children:"Add Sub Account"})}),initialState:{pinnedColumns:{right:["percent"]}}})]})]}),R(Cs,{open:g.open,onClose:()=>B(),children:R(PKe,{doc:g.data,handleBackAction:B})}),R(Br,{open:v.open,onClose:U(y),message:"Are you sure you want to remove this Allocation Detail?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:F,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:U(y),renderElement:R(oo,{sx:{color:"error.main"}})}),R(Br,{open:b.open,onClose:U(w),message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:U(w),renderElement:R(qo,{sx:{color:"red"}})})]}),R(Yh,{open:c,style:{zIndex:2},children:R(Ri,{})})]})},OKe=({handleBackAction:e})=>{const{masterAccountId:t}=s4(),[{data:r,isFetching:n},{data:o,refetch:i}]=qi({queries:[{queryKey:["allocationAccount"],queryFn:()=>a4(t),initialData:{}},{queryKey:["allocations"],queryFn:async()=>await TKe({filter:[{operator:_a.EQUALS,field:"masterAccountId",value:t}]}),initialData:{data:[]}}]}),{mutateAsync:a,isPending:s}=xs({mutationKey:["allocationDelete"],mutationFn:IKe,onSuccess:async()=>{St.success(bt.DELETE_SUCCESS),await i()},onError:()=>St.error(bt.ERROR)}),[c,l]=A.useState({open:!1,data:{id:""}}),[u,f]=A.useState({open:!1,data:{id:""}}),d=[{field:"allocationType",flex:1,headerName:"Allocation Type"},{field:"allocationDetails",headerName:"Sub Accounts",flex:1,valueGetter:({row:m})=>{var v;return((v=m.allocationDetails)==null?void 0:v.length)??0},renderCell:({value:m})=>R(bo,{label:m})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:m})=>{const v=y=>()=>y({open:!0,data:{...m}});return[R(yr,{icon:R(es,{}),label:"Update",onClick:v(f)},"updateBtn"),R(yr,{icon:R(oo,{}),label:"Cancel",className:"textPrimary",color:"inherit",onClick:v(l)},"cancel")]}}],h=()=>l({open:!1,data:{id:""}}),p=()=>{a(c.data.id),h()},g=[{name:"New",icon:R(Qa,{}),handleAction:()=>f({open:!0,data:{id:""}}),primary:!0},{name:"Back",icon:R(_8,{}),handleAction:e}];return u.open?R(RKe,{doc:u.data,handleBackAction:()=>{f({open:!1,data:{id:""}}),i()}}):xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:g}),R(_o,{header:xe(Jt,{direction:"column",children:[R(jt,{variant:"h6",children:"Allocations"}),!!r.number&&xe(jt,{variant:"body2",color:"textSecondary",component:"div",children:["Account Number: ",r.number]})]}),children:R(Jt,{direction:"row",spacing:3,justifyContent:"space-between",children:R(Yn,{checkboxSelection:!1,onRowDoubleClick:({row:m})=>f({open:!0,data:{...m}}),columns:d,csvFilename:"Accounts",loading:n||s,rows:o.data})})}),R(Br,{open:c.open,onClose:h,message:"Are you sure you would like to remove this allocation?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:p,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:h,renderElement:R(qo,{sx:{color:"red"}})})]})},DKe="accounts",FKe=()=>{const{featureChecker:e}=on(),{setSelectedAccount:t,setMasterAccountId:r}=s4(),[{data:n,isFetching:o,isError:i,refetch:a}]=qi({queries:[{queryKey:["accounts"],queryFn:async()=>await hp(),initialData:{data:[]}}]}),[s,c]=A.useState({open:!1,data:{}}),[l,u]=A.useState(!1),[f,d]=A.useState({open:!1,data:{}}),[h,p]=A.useState({open:!1}),{pathname:g}=El(),m=ii();A.useEffect(()=>{r(void 0)},[]);async function v(U){try{const B=n.data.find(T=>T.id===U),F={...B,isActive:!B.isActive};await pte(U,F),await a(),y(),St.success(F.isActive?bt.REACTIVATE_SUCCESS:bt.DEACTIVATE_SUCCESS)}catch{St.error(bt.ERROR)}}function y(){c({open:!1,data:{}})}const b=()=>{s.data.id&&v(s.data.id)},w=U=>()=>{t(U),m(`/administration/bills/new?account=${U.id}`)},E=B2(),I=U=>()=>{E.invalidateQueries({queryKey:["docForm"]}),m(`${g}/${U}`)},O=U=>()=>{r(U),p({open:!0})},D=[{field:"number",headerName:"Account Number",flex:2},{field:"utility",headerName:"Utility",flex:1,valueGetter:({row:U})=>{var B;return((B=U.utility)==null?void 0:B.name)??""}},{field:"activeMeters",headerName:"Active Meters",flex:1,valueGetter:({row:U})=>{var F;const B=(F=U.meters)==null?void 0:F.filter(T=>v5(T));return(B==null?void 0:B.length)??0},renderCell:({value:U})=>R(bo,{label:U})},{field:"serviceStartDate",headerName:"Service Start Date",flex:1.2,valueFormatter:({value:U})=>U?Vo(U,"PPP"):"",valueGetter:({row:U})=>U.serviceStartDate?Hr(U.serviceStartDate):""},{field:"serviceEndDate",headerName:"Service End Date",flex:1.2,valueFormatter:({value:U})=>U?Vo(U,"PPP"):"",valueGetter:({row:U})=>U.serviceEndDate?Hr(U.serviceEndDate):""},{field:"isMaster",headerName:"Master",flex:.8,valueGetter:U=>U.row.isMaster?"No":"Yes",renderCell:({row:U})=>R(bo,{label:U.isMaster?"Yes":"No",variant:"outlined",color:U.isMaster?"success":"error"})},{field:"deactivated",headerName:"Deactivated",flex:.8,valueGetter:U=>U.row.isActive?"No":"Yes",renderCell:({row:U})=>xe(zr,{children:[R(bo,{label:U.isActive?"No":"Yes",variant:"outlined",color:U.isActive?"success":"error"}),!U.isActive&&R(tC,{infoMessage:"This item does not show up in any reports"})]})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:U,isActive:B,isMaster:F,...T}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:I(U)},"updateBtn"),...F&&e.devFeatureEnabled(xf.Experimental)?[R(yr,{icon:R(ire,{}),label:"Allocations",showInMenu:!0,onClick:O(U)},"AllocationBtn")]:[],R(yr,{icon:B?R(oy,{}):R(ny,{}),label:B?"Deactivate":"Reactivate",showInMenu:!0,onClick:()=>c({open:!0,data:{...T,id:U,isActive:B}})},"hiddenBtn"),R(yr,{disabled:!cte({...T,id:U,isActive:B}),icon:R(Qa,{}),label:"Add Bill",onClick:w({...T,id:U,isActive:B}),showInMenu:!0},"AddBillBtn"),R(yr,{icon:R(Q8,{}),label:"View Bills",onClick:()=>d({open:!0,data:{...T,id:U,isActive:B}}),showInMenu:!0},"viewBillsBtn")]}],N=[{name:"New",icon:R(Qa,{}),handleAction:I("new"),primary:!0}];return f.open?R(K8,{accountId:f.data.id,handleBackAction:()=>d({open:!1,data:{}})}):h.open?R(OKe,{handleBackAction:()=>{p({open:!1}),r(void 0)}}):xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:N}),R(Yn,{columns:D,contextName:DKe,csvFilename:"Accounts",dataFetchError:i,loading:o,customToolbarOptions:R(oC,{showDeactivatedType:l,setShowDeactivatedType:u,type:"Accounts"}),rows:l?n.data:n.data.filter(({isActive:U})=>U)}),R(Br,{open:s.open,onClose:y,message:`Deactivating this item will remove all associated data from reports.
     Are you sure you would like to ${s.data.isActive?"deactivate":"reactivate"} this account?`,primaryButtonLabel:s.data.isActive?"Deactivate":"Reactivate",onPrimaryButtonClicked:b,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:y,renderElement:s.data.isActive?R(q2,{sx:{color:"error.main"}}):R(G2,{sx:{color:"success.main"}})})]})};var tF={},NKe=Wr;Object.defineProperty(tF,"__esModule",{value:!0});var are=tF.default=void 0,LKe=NKe(tn()),$Ke=rn,BKe=(0,LKe.default)((0,$Ke.jsx)("path",{d:"M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"}),"ClearAllOutlined");are=tF.default=BKe;var rF={},UKe=Wr;Object.defineProperty(rF,"__esModule",{value:!0});var sre=rF.default=void 0,HKe=UKe(tn()),zKe=rn,jKe=(0,HKe.default)((0,zKe.jsx)("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21z"}),"ConstructionOutlined");sre=rF.default=jKe;const v0=async()=>await Ao(mr.FACILITIES),VKe=async e=>await fa(mr.FACILITIES,{},e),lre=async(e,t)=>await Ys(`${mr.FACILITIES}/${e}`,{},t),WKe=(e={})=>({name:e.name??"",description:e.description??""}),GKe=()=>[{placeholder:"Name",label:"Name",name:"name",type:"textInput",required:!0},{placeholder:"Description",label:"Description",name:"description",type:"textInput",required:!1}],qKe=({loading:e,open:t,onClose:r,onSave:n})=>{const{control:o,handleSubmit:i,formState:{errors:a}}=Bn({defaultValues:WKe()}),s=l=>{n(l)},c=GKe();return R(Cs,{title:"Add Line Item Subtype",open:t,onClose:r,dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:r,disabled:e,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,type:"submit",form:"line-item-subtype-form",disabled:e,children:"Add Line Item Subtype"})]}),children:R("form",{onSubmit:i(s),id:"line-item-subtype-form",children:R(Ot,{container:!0,spacing:2,mt:.25,children:c.map((l,u)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:l,errors:a})},u))})})})},KKe=({onClose:e,open:t})=>{const{getUser:r}=on(),{organizationId:n}=r(),[o,i]=A.useState(!1),[a,s]=A.useState(!1),[c,l]=A.useState(""),{data:u,isFetching:f,isError:d,refetch:h}=da({queryKey:["lineItemSubtypes"],queryFn:async()=>await rre(),initialData:{data:[]}}),{mutate:p,isPending:g}=xs({mutationKey:["addLineItemSubtype"],mutationFn:async O=>await rKe(O),onSuccess:async()=>{await h(),y(),St.success(bt.CREATE_SUCCESS)},onError:()=>{St.error(bt.ERROR)}}),{mutate:m}=xs({mutationKey:["removeLineItemSubtype"],mutationFn:async O=>await nKe(O),onMutate:()=>{u.data=u.data.filter(O=>O.id!==c)},onSuccess:async()=>{await h(),St.success(bt.DELETE_SUCCESS)},onError:()=>{St.error(bt.ERROR)}}),v=()=>s(!0),y=()=>{s(!1),l("")},b=O=>{p({organizationId:n,...O})},w=O=>l(O[0]),E=()=>i(!1);return xe(Cs,{title:"Line Item Subtypes",open:t,onClose:e,dialogActions:R(Jt,{direction:"row",spacing:2,children:R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,onClick:e,children:"Close"})}),children:[R(Yn,{editMode:"row",isRowNavigation:!1,checkboxSelection:!1,columns:[{field:"name",headerName:"Name",flex:1},{field:"description",headerName:"Description",flex:1},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:O})=>[R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{l(O),i(!0)},color:"inherit"},"delete")]}],csvFilename:"Line Item Subtypes",customToolbarOptions:R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:v,sx:{alignSelf:"flex-end"},children:"Add Subtype"})}),dataFetchError:d,handleSelectionChange:w,loading:f,rows:u.data}),a&&R(qKe,{loading:g,open:a,onClose:y,onSave:b}),R(Br,{open:o,onClose:E,message:"Are you sure you want to delete the selected line item subtype?",primaryButtonLabel:"Yes",onPrimaryButtonClicked:()=>{m(c),i(!1)},secondaryButtonLabel:"No",onSecondaryButtonClicked:E,renderElement:R(oo,{sx:{color:"error.main"}})})]})},fb={nextBtnLabel:"Next",backBtnLabel:"Prev",cancelBtnLabel:"Cancel",active:0,loading:!1},nF=({active:e=fb.active,backBtnLabel:t=fb.backBtnLabel,cancelBtnFn:r,cancelBtnLabel:n=fb.cancelBtnLabel,disableNavigation:o=!1,loading:i=fb.loading,nextBtnLabel:a=fb.nextBtnLabel,setActive:s,steps:c})=>{const l=async()=>{(e>=0?!c[e].guard||await c[e].guard():!0)&&s(v=>v+1)},u=()=>{s(m=>m-1)},f=c[e].directionBtns,d=["bottom","right"].includes(f)?f:"bottom",h=e>0&&c[e].showBackBtn&&R(Ft,{onClick:u,disabled:!c[e].showBackBtn||o,color:"secondary",variant:"contained",children:t},"back-btn"),p=R(Ft,{disabled:!c[e].showNextBtn||o,onClick:c[e].nextBtnFn?c[e].nextBtnFn:l,color:"secondary",variant:"contained",disableElevation:!0,children:c[e].nextBtnLabel??a},"next-btn"),g=[...(c[e].actionBtns??[]).map(({display:m,label:v,...y},b)=>m&&A.createElement(Ft,{...y,key:`action-btn-${b}`,color:"secondary",variant:"contained",disableElevation:!0,sx:{...d==="bottom"&&{marginRight:2}}},v)),r&&R(Ft,{disabled:o,color:"secondary",variant:"outlined",onClick:r,sx:{...d==="bottom"&&{marginRight:2}},children:n},"cancel-btn")];return xe(zr,{children:[R(mNe,{activeStep:e,alternativeLabel:!0,children:c.map(({id:m,label:v})=>R(LFe,{...{},children:R(tNe,{...{},children:v})},m))}),R(yo,{sx:{marginTop:"30px"}}),xe(Jt,{direction:"row",spacing:2,sx:{marginY:"20px"},children:[R(nr,{sx:{justifyContent:"center",alignItems:"center",flexDirection:"column",width:"100%"},children:i?R(Ri,{sx:{marginY:"100px"}}):c[e].render}),d==="right"&&R(Mte,{children:[p,h,...g]})]}),d==="bottom"&&xe(Ot,{container:!0,flex:"column",children:[R(Ot,{item:!0,xs:1,children:h}),R(Ot,{item:!0,xs:11,display:"flex",justifyContent:"end",children:[...g,p]})]})]})};function i_(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var cre={exports:{}};/*! ExcelJS 19-10-2023 */(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,o,i){function a(l,u){if(!o[l]){if(!n[l]){var f=typeof i_=="function"&&i_;if(!u&&f)return f(l,!0);if(s)return s(l,!0);var d=new Error("Cannot find module '"+l+"'");throw d.code="MODULE_NOT_FOUND",d}var h=o[l]={exports:{}};n[l][0].call(h.exports,function(p){return a(n[l][1][p]||p)},h,h.exports,r,n,o,i)}return o[l].exports}for(var s=typeof i_=="function"&&i_,c=0;c<i.length;c++)a(i[c]);return a}({1:[function(r,n,o){const i=r("fs"),a=r("fast-csv"),s=r("dayjs/plugin/customParseFormat"),c=r("dayjs/plugin/utc"),l=r("dayjs").extend(s).extend(c),u=r("../utils/stream-buf"),{fs:{exists:f}}=r("../utils/utils"),d={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(h){this.workbook=h,this.worksheet=null}async readFile(h,p){if(p=p||{},!await f(h))throw new Error("File not found: "+h);const g=i.createReadStream(h),m=await this.read(g,p);return g.close(),m}read(h,p){return p=p||{},new Promise((g,m)=>{const v=this.workbook.addWorksheet(p.sheetName),y=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(E){if(E==="")return null;const I=Number(E);if(!Number.isNaN(I)&&I!==1/0)return I;const O=y.reduce((N,U)=>{if(N)return N;const B=l(E,U,!0);return B.isValid()?B:null},null);if(O)return new Date(O.valueOf());const D=d[E];return D!==void 0?D:E},w=a.parse(p.parserOptions).on("data",E=>{v.addRow(E.map(b))}).on("end",()=>{w.emit("worksheet",v)});w.on("worksheet",g).on("error",m),h.pipe(w)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(h,p){return new Promise((g,m)=>{p=p||{};const v=this.workbook.getWorksheet(p.sheetName||p.sheetId),y=a.format(p.formatterOptions);h.on("finish",()=>{g()}),y.on("error",m),y.pipe(h);const{dateFormat:b,dateUTC:w}=p,E=p.map||(D=>{if(D){if(D.text||D.hyperlink)return D.hyperlink||D.text||"";if(D.formula||D.result)return D.result||"";if(D instanceof Date)return b?w?l.utc(D).format(b):l(D).format(b):w?l.utc(D).format():l(D).format();if(D.error)return D.error;if(typeof D=="object")return JSON.stringify(D)}return D}),I=p.includeEmptyRows===void 0||p.includeEmptyRows;let O=1;v&&v.eachRow((D,N)=>{if(I)for(;O++<N-1;)y.write([]);const{values:U}=D;U.shift(),y.write(U.map(E)),O=N}),y.end()})}writeFile(h,p){const g={encoding:(p=p||{}).encoding||"utf8"},m=i.createWriteStream(h,g);return this.write(m,p)}async writeBuffer(h){const p=new u;return await this.write(p,h),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(r,n,o){const i=r("../utils/col-cache");class a{constructor(c,l){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=c,l)if(typeof l=="string"){const f=i.decodeAddress(l);this.nativeCol=f.col+u,this.nativeColOff=0,this.nativeRow=f.row+u,this.nativeRowOff=0}else l.nativeCol!==void 0?(this.nativeCol=l.nativeCol||0,this.nativeColOff=l.nativeColOff||0,this.nativeRow=l.nativeRow||0,this.nativeRowOff=l.nativeRowOff||0):l.col!==void 0?(this.col=l.col+u,this.row=l.row+u):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(c){return c instanceof a||c==null?c:new a(c)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(c){this.nativeCol=Math.floor(c),this.nativeColOff=Math.floor((c-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(c){this.nativeRow=Math.floor(c),this.nativeRowOff=Math.floor((c-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(c){this.nativeCol=c.nativeCol,this.nativeColOff=c.nativeColOff,this.nativeRow=c.nativeRow,this.nativeRowOff=c.nativeRowOff}}n.exports=a},{"../utils/col-cache":19}],3:[function(r,n,o){const i=r("../utils/col-cache"),a=r("../utils/under-dash"),s=r("./enums"),{slideFormula:c}=r("../utils/shared-formula"),l=r("./note");class u{constructor(h,p,g){if(!h||!p)throw new Error("A Cell needs a Row");this._row=h,this._column=p,i.validateAddress(g),this._address=g,this._value=f.create(u.Types.Null,this),this.style=this._mergeStyle(h.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(h){this.style.numFmt=h}get font(){return this.style.font}set font(h){this.style.font=h}get alignment(){return this.style.alignment}set alignment(h){this.style.alignment=h}get border(){return this.style.border}set border(h){this.style.border=h}get fill(){return this.style.fill}set fill(h){this.style.fill=h}get protection(){return this.style.protection}set protection(h){this.style.protection=h}_mergeStyle(h,p,g){const m=h&&h.numFmt||p&&p.numFmt;m&&(g.numFmt=m);const v=h&&h.font||p&&p.font;v&&(g.font=v);const y=h&&h.alignment||p&&p.alignment;y&&(g.alignment=y);const b=h&&h.border||p&&p.border;b&&(g.border=b);const w=h&&h.fill||p&&p.fill;w&&(g.fill=w);const E=h&&h.protection||p&&p.protection;return E&&(g.protection=E),g}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===u.Types.Merge}merge(h,p){this._value.release(),this._value=f.create(u.Types.Merge,this,h),p||(this.style=h.style)}unmerge(){this.type===u.Types.Merge&&(this._value.release(),this._value=f.create(u.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(h){return this._value.type===u.Types.Merge&&this._value.isMergedTo(h)}get master(){return this.type===u.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===u.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(h){this.type!==u.Types.Merge?(this._value.release(),this._value=f.create(f.getType(h),this,h)):this._value.master.value=h}get note(){return this._comment&&this._comment.note}set note(h){this._comment=new l(h)}get text(){return this._value.toString()}get html(){return a.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(h){this.type===u.Types.String&&(this._value=f.create(u.Types.Hyperlink,this,{text:this._value.value,hyperlink:h}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:h}=this._row;return{sheetName:h.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(h){this.names=[h]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(h){const{definedNames:p}=this.workbook;p.removeAllNames(this.fullAddress),h.forEach(g=>{p.addEx(this.fullAddress,g)})}addName(h){this.workbook.definedNames.addEx(this.fullAddress,h)}removeName(h){this.workbook.definedNames.removeEx(this.fullAddress,h)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(h){this._dataValidations.add(this.address,h)}get model(){const{model:h}=this._value;return h.style=this.style,this._comment&&(h.comment=this._comment.model),h}set model(h){if(this._value.release(),this._value=f.create(h.type,this),this._value.model=h,h.comment)switch(h.comment.type){case"note":this._comment=l.fromModel(h.comment)}h.style?this.style=h.style:this.style={}}}u.Types=s.ValueType;const f={getType:d=>d==null?u.Types.Null:d instanceof String||typeof d=="string"?u.Types.String:typeof d=="number"?u.Types.Number:typeof d=="boolean"?u.Types.Boolean:d instanceof Date?u.Types.Date:d.text&&d.hyperlink?u.Types.Hyperlink:d.formula||d.sharedFormula?u.Types.Formula:d.richText?u.Types.RichText:d.sharedString?u.Types.SharedString:d.error?u.Types.Error:u.Types.JSON,types:[{t:u.Types.Null,f:class{constructor(d){this.model={address:d.address,type:u.Types.Null}}get value(){return null}set value(d){}get type(){return u.Types.Null}get effectiveType(){return u.Types.Null}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return""}release(){}toString(){return""}}},{t:u.Types.Number,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.Number,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}get type(){return u.Types.Number}get effectiveType(){return u.Types.Number}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.String,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.String,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:u.Types.Date,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.Date,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}get type(){return u.Types.Date}get effectiveType(){return u.Types.Date}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Hyperlink,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.Hyperlink,text:h?h.text:void 0,hyperlink:h?h.hyperlink:void 0},h&&h.tooltip&&(this.model.tooltip=h.tooltip)}get value(){const d={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(d.tooltip=this.model.tooltip),d}set value(d){this.model={text:d.text,hyperlink:d.hyperlink},d.tooltip&&(this.model.tooltip=d.tooltip)}get text(){return this.model.text}set text(d){this.model.text=d}get hyperlink(){return this.model.hyperlink}set hyperlink(d){this.model.hyperlink=d}get type(){return u.Types.Hyperlink}get effectiveType(){return u.Types.Hyperlink}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:u.Types.Formula,f:class{constructor(d,h){this.cell=d,this.model={address:d.address,type:u.Types.Formula,shareType:h?h.shareType:void 0,ref:h?h.ref:void 0,formula:h?h.formula:void 0,sharedFormula:h?h.sharedFormula:void 0,result:h?h.result:void 0}}_copyModel(d){const h={},p=g=>{const m=d[g];m&&(h[g]=m)};return p("formula"),p("result"),p("ref"),p("shareType"),p("sharedFormula"),h}get value(){return this._copyModel(this.model)}set value(d){this.model=this._copyModel(d)}validate(d){switch(f.getType(d)){case u.Types.Null:case u.Types.String:case u.Types.Number:case u.Types.Date:break;case u.Types.Hyperlink:case u.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(d){this.model.formula=d}get formulaType(){return this.model.formula?s.FormulaType.Master:this.model.sharedFormula?s.FormulaType.Shared:s.FormulaType.None}get result(){return this.model.result}set result(d){this.model.result=d}get type(){return u.Types.Formula}get effectiveType(){const d=this.model.result;return d==null?s.ValueType.Null:d instanceof String||typeof d=="string"?s.ValueType.String:typeof d=="number"?s.ValueType.Number:d instanceof Date?s.ValueType.Date:d.text&&d.hyperlink?s.ValueType.Hyperlink:d.formula?s.ValueType.Formula:s.ValueType.Null}get address(){return this.model.address}set address(d){this.model.address=d}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:d}=this.cell,h=d.findCell(this.model.sharedFormula);this._translatedFormula=h&&c(h.formula,h.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:u.Types.Merge,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.Merge,master:h?h.address:void 0},this._master=h,h&&h.addMergeRef()}get value(){return this._master.value}set value(d){d instanceof u?(this._master&&this._master.releaseMergeRef(),d.addMergeRef(),this._master=d):this._master.value=d}isMergedTo(d){return d===this._master}get master(){return this._master}get type(){return u.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:u.Types.JSON,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.String,value:JSON.stringify(h),rawValue:h}}get value(){return this.model.rawValue}set value(d){this.model.rawValue=d,this.model.value=JSON.stringify(d)}get type(){return u.Types.String}get effectiveType(){return u.Types.String}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:u.Types.SharedString,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.SharedString,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}get type(){return u.Types.SharedString}get effectiveType(){return u.Types.SharedString}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.RichText,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.String,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}toString(){return this.model.value.richText.map(d=>d.text).join("")}get type(){return u.Types.RichText}get effectiveType(){return u.Types.RichText}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:u.Types.Boolean,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.Boolean,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}get type(){return u.Types.Boolean}get effectiveType(){return u.Types.Boolean}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:u.Types.Error,f:class{constructor(d,h){this.model={address:d.address,type:u.Types.Error,value:h}}get value(){return this.model.value}set value(d){this.model.value=d}get type(){return u.Types.Error}get effectiveType(){return u.Types.Error}get address(){return this.model.address}set address(d){this.model.address=d}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((d,h)=>(d[h.t]=h.f,d),[]),create(d,h,p){const g=this.types[d];if(!g)throw new Error("Could not create Value of type "+d);return new g(h,p)}};n.exports=u},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(r,n,o){const i=r("../utils/under-dash"),a=r("./enums"),s=r("../utils/col-cache");class c{constructor(u,f,d){this._worksheet=u,this._number=f,d!==!1&&(this.defn=d)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return s.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(u){u?(this.key=u.key,this.width=u.width!==void 0?u.width:9,this.outlineLevel=u.outlineLevel,u.style?this.style=u.style:this.style={},this.header=u.header,this._hidden=!!u.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(u){u!==void 0?(this._header=u,this.headers.forEach((f,d)=>{this._worksheet.getCell(d+1,this.number).value=f})):this._header=void 0}get key(){return this._key}set key(u){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=u,u&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(u){this._hidden=u}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(u){this._outlineLevel=u}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(u){return this.width===u.width&&this.hidden===u.hidden&&this.outlineLevel===u.outlineLevel&&i.isEqual(this.style,u.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const u=this.style;return!u||!(u.font||u.numFmt||u.alignment||u.border||u.fill||u.protection)}get headerCount(){return this.headers.length}eachCell(u,f){const d=this.number;f||(f=u,u=null),this._worksheet.eachRow(u,(h,p)=>{f(h.getCell(d),p)})}get values(){const u=[];return this.eachCell((f,d)=>{f&&f.type!==a.ValueType.Null&&(u[d]=f.value)}),u}set values(u){if(!u)return;const f=this.number;let d=0;u.hasOwnProperty("0")&&(d=1),u.forEach((h,p)=>{this._worksheet.getCell(p+d,f).value=h})}_applyStyle(u,f){return this.style[u]=f,this.eachCell(d=>{d[u]=f}),f}get numFmt(){return this.style.numFmt}set numFmt(u){this._applyStyle("numFmt",u)}get font(){return this.style.font}set font(u){this._applyStyle("font",u)}get alignment(){return this.style.alignment}set alignment(u){this._applyStyle("alignment",u)}get protection(){return this.style.protection}set protection(u){this._applyStyle("protection",u)}get border(){return this.style.border}set border(u){this._applyStyle("border",u)}get fill(){return this.style.fill}set fill(u){this._applyStyle("fill",u)}static toModel(u){const f=[];let d=null;return u&&u.forEach((h,p)=>{h.isDefault?d&&(d=null):d&&h.equivalentTo(d)?d.max=p+1:(d={min:p+1,max:p+1,width:h.width!==void 0?h.width:9,style:h.style,isCustomWidth:h.isCustomWidth,hidden:h.hidden,outlineLevel:h.outlineLevel,collapsed:h.collapsed},f.push(d))}),f.length?f:void 0}static fromModel(u,f){const d=[];let h=1,p=0;for(f=(f=f||[]).sort(function(g,m){return g.min-m.min});p<f.length;){const g=f[p++];for(;h<g.min;)d.push(new c(u,h++));for(;h<=g.max;)d.push(new c(u,h++,g))}return d.length?d:null}}n.exports=c},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(r,n,o){n.exports=class{constructor(i){this.model=i||{}}add(i,a){return this.model[i]=a}find(i){return this.model[i]}remove(i){this.model[i]=void 0}}},{}],6:[function(r,n,o){const i=r("../utils/under-dash"),a=r("../utils/col-cache"),s=r("../utils/cell-matrix"),c=r("./range"),l=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;n.exports=class{constructor(){this.matrixMap={}}getMatrix(u){return this.matrixMap[u]||(this.matrixMap[u]=new s)}add(u,f){const d=a.decodeEx(u);this.addEx(d,f)}addEx(u,f){const d=this.getMatrix(f);if(u.top)for(let h=u.left;h<=u.right;h++)for(let p=u.top;p<=u.bottom;p++){const g={sheetName:u.sheetName,address:a.n2l(h)+p,row:p,col:h};d.addCellEx(g)}else d.addCellEx(u)}remove(u,f){const d=a.decodeEx(u);this.removeEx(d,f)}removeEx(u,f){this.getMatrix(f).removeCellEx(u)}removeAllNames(u){i.each(this.matrixMap,f=>{f.removeCellEx(u)})}forEach(u){i.each(this.matrixMap,(f,d)=>{f.forEach(h=>{u(d,h)})})}getNames(u){return this.getNamesEx(a.decodeEx(u))}getNamesEx(u){return i.map(this.matrixMap,(f,d)=>f.findCellEx(u)&&d).filter(Boolean)}_explore(u,f){f.mark=!1;const{sheetName:d}=f,h=new c(f.row,f.col,f.row,f.col,d);let p,g;function m(y,b){const w=u.findCellAt(d,y,f.col);return!(!w||!w.mark)&&(h[b]=y,w.mark=!1,!0)}for(g=f.row-1;m(g,"top");g--);for(g=f.row+1;m(g,"bottom");g++);function v(y,b){const w=[];for(g=h.top;g<=h.bottom;g++){const E=u.findCellAt(d,g,y);if(!E||!E.mark)return!1;w.push(E)}h[b]=y;for(let E=0;E<w.length;E++)w[E].mark=!1;return!0}for(p=f.col-1;v(p,"left");p--);for(p=f.col+1;v(p,"right");p++);return h}getRanges(u,f){return(f=f||this.matrixMap[u])?(f.forEach(d=>{d.mark=!0}),{name:u,ranges:f.map(d=>d.mark&&this._explore(f,d)).filter(Boolean).map(d=>d.$shortRange)}):{name:u,ranges:[]}}normaliseMatrix(u,f){u.forEachInSheet(f,(d,h,p)=>{d&&(d.row===h&&d.col===p||(d.row=h,d.col=p,d.address=a.n2l(p)+h))})}spliceRows(u,f,d,h){i.each(this.matrixMap,p=>{p.spliceRows(u,f,d,h),this.normaliseMatrix(p,u)})}spliceColumns(u,f,d,h){i.each(this.matrixMap,p=>{p.spliceColumns(u,f,d,h),this.normaliseMatrix(p,u)})}get model(){return i.map(this.matrixMap,(u,f)=>this.getRanges(f,u)).filter(u=>u.ranges.length)}set model(u){const f=this.matrixMap={};u.forEach(d=>{const h=f[d.name]=new s;d.ranges.forEach(p=>{l.test(p.split("!").pop()||"")&&h.addCell(p)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(r,n,o){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(r,n,o){const i=r("../utils/col-cache"),a=r("./anchor");n.exports=class{constructor(s,c){this.worksheet=s,this.model=c}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(s){let{type:c,imageId:l,range:u,hyperlinks:f}=s;if(this.type=c,this.imageId=l,c==="image")if(typeof u=="string"){const d=i.decode(u);this.range={tl:new a(this.worksheet,{col:d.left,row:d.top},-1),br:new a(this.worksheet,{col:d.right,row:d.bottom},0),editAs:"oneCell"}}else this.range={tl:new a(this.worksheet,u.tl,0),br:u.br&&new a(this.worksheet,u.br,0),ext:u.ext,editAs:u.editAs,hyperlinks:f||u.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(r,n,o){const i=r("../utils/under-dash");class a{constructor(c){this.note=c}get model(){let c=null;switch(typeof this.note){case"string":c={type:"note",note:{texts:[{text:this.note}]}};break;default:c={type:"note",note:this.note}}return i.deepMerge({},a.DEFAULT_CONFIGS,c)}set model(c){const{note:l}=c,{texts:u}=l;u.length===1&&Object.keys(u[0]).length===1?this.note=u[0].text:this.note=l}static fromModel(c){const l=new a;return l.model=c,l}}a.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},n.exports=a},{"../utils/under-dash":26}],10:[function(r,n,o){const i=r("../utils/col-cache");class a{constructor(){this.decode(arguments)}setTLBR(c,l,u,f,d){if(arguments.length<4){const h=i.decodeAddress(c),p=i.decodeAddress(l);this.model={top:Math.min(h.row,p.row),left:Math.min(h.col,p.col),bottom:Math.max(h.row,p.row),right:Math.max(h.col,p.col),sheetName:u},this.setTLBR(h.row,h.col,p.row,p.col,d)}else this.model={top:Math.min(c,u),left:Math.min(l,f),bottom:Math.max(c,u),right:Math.max(l,f),sheetName:d}}decode(c){switch(c.length){case 5:this.setTLBR(c[0],c[1],c[2],c[3],c[4]);break;case 4:this.setTLBR(c[0],c[1],c[2],c[3]);break;case 3:this.setTLBR(c[0],c[1],c[2]);break;case 2:this.setTLBR(c[0],c[1]);break;case 1:{const l=c[0];if(l instanceof a)this.model={top:l.model.top,left:l.model.left,bottom:l.model.bottom,right:l.model.right,sheetName:l.sheetName};else if(l instanceof Array)this.decode(l);else if(l.top&&l.left&&l.bottom&&l.right)this.model={top:l.top,left:l.left,bottom:l.bottom,right:l.right,sheetName:l.sheetName};else{const u=i.decodeEx(l);u.top?this.model={top:u.top,left:u.left,bottom:u.bottom,right:u.right,sheetName:u.sheetName}:this.model={top:u.row,left:u.col,bottom:u.row,right:u.col,sheetName:u.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+c.length)}}get top(){return this.model.top||1}set top(c){this.model.top=c}get left(){return this.model.left||1}set left(c){this.model.left=c}get bottom(){return this.model.bottom||1}set bottom(c){this.model.bottom=c}get right(){return this.model.right||1}set right(c){this.model.right=c}get sheetName(){return this.model.sheetName}set sheetName(c){this.model.sheetName=c}get _serialisedSheetName(){const{sheetName:c}=this.model;return c?/^[a-zA-Z0-9]*$/.test(c)?c+"!":`'${c}'!`:""}expand(c,l,u,f){(!this.model.top||c<this.top)&&(this.top=c),(!this.model.left||l<this.left)&&(this.left=l),(!this.model.bottom||u>this.bottom)&&(this.bottom=u),(!this.model.right||f>this.right)&&(this.right=f)}expandRow(c){if(c){const{dimensions:l,number:u}=c;l&&this.expand(u,l.min,u,l.max)}}expandToAddress(c){const l=i.decodeEx(c);this.expand(l.row,l.col,l.row,l.col)}get tl(){return i.n2l(this.left)+this.top}get $t$l(){return`$${i.n2l(this.left)}$${this.top}`}get br(){return i.n2l(this.right)+this.bottom}get $b$r(){return`$${i.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(c){return(!c.sheetName||!this.sheetName||c.sheetName===this.sheetName)&&!(c.bottom<this.top)&&!(c.top>this.bottom)&&!(c.right<this.left)&&!(c.left>this.right)}contains(c){const l=i.decodeEx(c);return this.containsEx(l)}containsEx(c){return(!c.sheetName||!this.sheetName||c.sheetName===this.sheetName)&&c.row>=this.top&&c.row<=this.bottom&&c.col>=this.left&&c.col<=this.right}forEachAddress(c){for(let l=this.left;l<=this.right;l++)for(let u=this.top;u<=this.bottom;u++)c(i.encodeAddress(u,l),u,l)}}n.exports=a},{"../utils/col-cache":19}],11:[function(r,n,o){const i=r("../utils/under-dash"),a=r("./enums"),s=r("../utils/col-cache"),c=r("./cell");n.exports=class{constructor(l,u){this._worksheet=l,this._number=u,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(l){return this._cells[l-1]}getCellEx(l){let u=this._cells[l.col-1];if(!u){const f=this._worksheet.getColumn(l.col);u=new c(this,f,l.address),this._cells[l.col-1]=u}return u}getCell(l){if(typeof l=="string"){const u=this._worksheet.getColumnKey(l);l=u?u.number:s.l2n(l)}return this._cells[l-1]||this.getCellEx({address:s.encodeAddress(this._number,l),row:this._number,col:l})}splice(l,u){const f=l+u;for(var d=arguments.length,h=new Array(d>2?d-2:0),p=2;p<d;p++)h[p-2]=arguments[p];const g=h.length-u,m=this._cells.length;let v,y,b;if(g<0)for(v=l+h.length;v<=m;v++)b=this._cells[v-1],y=this._cells[v-g-1],y?(b=this.getCell(v),b.value=y.value,b.style=y.style,b._comment=y._comment):b&&(b.value=null,b.style={},b._comment=void 0);else if(g>0)for(v=m;v>=f;v--)y=this._cells[v-1],y?(b=this.getCell(v+g),b.value=y.value,b.style=y.style,b._comment=y._comment):this._cells[v+g-1]=void 0;for(v=0;v<h.length;v++)b=this.getCell(l+v),b.value=h[v],b.style={},b._comment=void 0}eachCell(l,u){if(u||(u=l,l=null),l&&l.includeEmpty){const f=this._cells.length;for(let d=1;d<=f;d++)u(this.getCell(d),d)}else this._cells.forEach((f,d)=>{f&&f.type!==a.ValueType.Null&&u(f,d+1)})}addPageBreak(l,u){const f=this._worksheet,d=Math.max(0,l-1)||0,h=Math.max(0,u-1)||16838,p={id:this._number,max:h,man:1};d&&(p.min=d),f.rowBreaks.push(p)}get values(){const l=[];return this._cells.forEach(u=>{u&&u.type!==a.ValueType.Null&&(l[u.col]=u.value)}),l}set values(l){if(this._cells=[],l)if(l instanceof Array){let u=0;l.hasOwnProperty("0")&&(u=1),l.forEach((f,d)=>{f!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,d+u),row:this._number,col:d+u}).value=f)})}else this._worksheet.eachColumnKey((u,f)=>{l[f]!==void 0&&(this.getCellEx({address:s.encodeAddress(this._number,u.number),row:this._number,col:u.number}).value=l[f])})}get hasValues(){return i.some(this._cells,l=>l&&l.type!==a.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let l=0;return this.eachCell(()=>{l++}),l}get dimensions(){let l=0,u=0;return this._cells.forEach(f=>{f&&f.type!==a.ValueType.Null&&((!l||l>f.col)&&(l=f.col),u<f.col&&(u=f.col))}),l>0?{min:l,max:u}:null}_applyStyle(l,u){return this.style[l]=u,this._cells.forEach(f=>{f&&(f[l]=u)}),u}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)}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.outlineLevelRow)}get model(){const l=[];let u=0,f=0;return this._cells.forEach(d=>{if(d){const h=d.model;h&&((!u||u>d.col)&&(u=d.col),f<d.col&&(f=d.col),l.push(h))}}),this.height||l.length?{cells:l,number:this.number,min:u,max:f,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(l){if(l.number!==this._number)throw new Error("Invalid row number in model");let u;this._cells=[],l.cells.forEach(f=>{switch(f.type){case c.Types.Merge:break;default:{let d;if(f.address)d=s.decodeAddress(f.address);else if(u){const{row:h}=u,p=u.col+1;d={row:h,col:p,address:s.encodeAddress(h,p),$col$row:`$${s.n2l(p)}$${h}`}}u=d,this.getCellEx(d).model=f;break}}}),l.height?this.height=l.height:delete this.height,this.hidden=l.hidden,this.outlineLevel=l.outlineLevel||0,this.style=l.style&&JSON.parse(JSON.stringify(l.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(r,n,o){const i=r("../utils/col-cache");class a{constructor(c,l,u){this.table=c,this.column=l,this.index=u}_set(c,l){this.table.cacheState(),this.column[c]=l}get name(){return this.column.name}set name(c){this._set("name",c)}get filterButton(){return this.column.filterButton}set filterButton(c){this.column.filterButton=c}get style(){return this.column.style}set style(c){this.column.style=c}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(c){this._set("totalsRowLabel",c)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(c){this._set("totalsRowFunction",c)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(c){this._set("totalsRowResult",c)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(c){this._set("totalsRowFormula",c)}}n.exports=class{constructor(s,c){this.worksheet=s,c&&(this.table=c,this.validate(),this.store())}getFormula(s){switch(s.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${s.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${s.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${s.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${s.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${s.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${s.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${s.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${s.name}])`;case"custom":return s.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+s.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:s}=this,c=(g,m,v)=>{g[m]===void 0&&(g[m]=v)};c(s,"headerRow",!0),c(s,"totalsRow",!1),c(s,"style",{}),c(s.style,"theme","TableStyleMedium2"),c(s.style,"showFirstColumn",!1),c(s.style,"showLastColumn",!1),c(s.style,"showRowStripes",!1),c(s.style,"showColumnStripes",!1);const l=(g,m)=>{if(!g)throw new Error(m)};l(s.ref,"Table must have ref"),l(s.columns,"Table must have column definitions"),l(s.rows,"Table must have row definitions"),s.tl=i.decodeAddress(s.ref);const{row:u,col:f}=s.tl;l(u>0,"Table must be on valid row"),l(f>0,"Table must be on valid col");const{width:d,filterHeight:h,tableHeight:p}=this;s.autoFilterRef=i.encode(u,f,u+h-1,f+d-1),s.tableRef=i.encode(u,f,u+p-1,f+d-1),s.columns.forEach((g,m)=>{l(g.name,`Column ${m} must have a name`),m===0?c(g,"totalsRowLabel","Total"):(c(g,"totalsRowFunction","none"),g.totalsRowFormula=this.getFormula(g))})}store(){const s=(h,p)=>{p&&Object.keys(p).forEach(g=>{h[g]=p[g]})},{worksheet:c,table:l}=this,{row:u,col:f}=l.tl;let d=0;if(l.headerRow){const h=c.getRow(u+d++);l.columns.forEach((p,g)=>{const{style:m,name:v}=p,y=h.getCell(f+g);y.value=v,s(y,m)})}if(l.rows.forEach(h=>{const p=c.getRow(u+d++);h.forEach((g,m)=>{const v=p.getCell(f+m);v.value=g,s(v,l.columns[m].style)})}),l.totalsRow){const h=c.getRow(u+d++);l.columns.forEach((p,g)=>{const m=h.getCell(f+g);if(g===0)m.value=p.totalsRowLabel;else{const v=this.getFormula(p);m.value=v?{formula:p.totalsRowFormula,result:p.totalsRowResult}:null}s(m,p.style)})}}load(s){const{table:c}=this,{row:l,col:u}=c.tl;let f=0;if(c.headerRow){const d=s.getRow(l+f++);c.columns.forEach((h,p)=>{d.getCell(u+p).value=h.name})}if(c.rows.forEach(d=>{const h=s.getRow(l+f++);d.forEach((p,g)=>{h.getCell(u+g).value=p})}),c.totalsRow){const d=s.getRow(l+f++);c.columns.forEach((h,p)=>{const g=d.getCell(u+p);p===0?g.value=h.totalsRowLabel:this.getFormula(h)&&(g.value={formula:h.totalsRowFormula,result:h.totalsRowResult})})}}get model(){return this.table}set model(s){this.table=s}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const s=i.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let c=0;c<this._cache.tableHeight;c++){const l=this.worksheet.getRow(s.row+c);for(let u=0;u<this._cache.width;u++)l.getCell(s.col+u).value=null}else{for(let c=this.tableHeight;c<this._cache.tableHeight;c++){const l=this.worksheet.getRow(s.row+c);for(let u=0;u<this._cache.width;u++)l.getCell(s.col+u).value=null}for(let c=0;c<this.tableHeight;c++){const l=this.worksheet.getRow(s.row+c);for(let u=this.width;u<this._cache.width;u++)l.getCell(s.col+u).value=null}}this.store()}addRow(s,c){this.cacheState(),c===void 0?this.table.rows.push(s):this.table.rows.splice(c,0,s)}removeRows(s){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(s,c)}getColumn(s){const c=this.table.columns[s];return new a(this,c,s)}addColumn(s,c,l){this.cacheState(),l===void 0?(this.table.columns.push(s),this.table.rows.forEach((u,f)=>{u.push(c[f])})):(this.table.columns.splice(l,0,s),this.table.rows.forEach((u,f)=>{u.splice(l,0,c[f])}))}removeColumns(s){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(s,c),this.table.rows.forEach(l=>{l.splice(s,c)})}_assign(s,c,l){this.cacheState(),s[c]=l}get ref(){return this.table.ref}set ref(s){this._assign(this.table,"ref",s)}get name(){return this.table.name}set name(s){this.table.name=s}get displayName(){return this.table.displyName||this.table.name}set displayNamename(s){this.table.displayName=s}get headerRow(){return this.table.headerRow}set headerRow(s){this._assign(this.table,"headerRow",s)}get totalsRow(){return this.table.totalsRow}set totalsRow(s){this._assign(this.table,"totalsRow",s)}get theme(){return this.table.style.name}set theme(s){this.table.style.name=s}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(s){this.table.style.showFirstColumn=s}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(s){this.table.style.showLastColumn=s}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(s){this.table.style.showRowStripes=s}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(s){this.table.style.showColumnStripes=s}}},{"../utils/col-cache":19}],13:[function(r,n,o){const i=r("./worksheet"),a=r("./defined-names"),s=r("../xlsx/xlsx"),c=r("../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 a}get xlsx(){return this._xlsx||(this._xlsx=new s(this)),this._xlsx}get csv(){return this._csv||(this._csv=new c(this)),this._csv}get nextId(){for(let l=1;l<this._worksheets.length;l++)if(!this._worksheets[l])return l;return this._worksheets.length||1}addWorksheet(l,u){const f=this.nextId;u&&(typeof u=="string"?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),u={properties:{tabColor:{argb:u}}}):(u.argb||u.theme||u.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),u={properties:{tabColor:u}}));const d=this._worksheets.reduce((g,m)=>(m&&m.orderNo)>g?m.orderNo:g,0),h=Object.assign({},u,{id:f,name:l,orderNo:d+1,workbook:this}),p=new i(h);return this._worksheets[f]=p,p}removeWorksheetEx(l){delete this._worksheets[l.id]}removeWorksheet(l){const u=this.getWorksheet(l);u&&u.destroy()}getWorksheet(l){return l===void 0?this._worksheets.find(Boolean):typeof l=="number"?this._worksheets[l]:typeof l=="string"?this._worksheets.find(u=>u&&u.name===l):void 0}get worksheets(){return this._worksheets.slice(1).sort((l,u)=>l.orderNo-u.orderNo).filter(Boolean)}eachSheet(l){this.worksheets.forEach(u=>{l(u,u.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(l){const u=this.media.length;return this.media.push(Object.assign({},l,{type:"image"})),u}getImage(l){return this.media[l]}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(l=>l.model),sheets:this.worksheets.map(l=>l.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(l){this.creator=l.creator,this.lastModifiedBy=l.lastModifiedBy,this.lastPrinted=l.lastPrinted,this.created=l.created,this.modified=l.modified,this.company=l.company,this.manager=l.manager,this.title=l.title,this.subject=l.subject,this.keywords=l.keywords,this.category=l.category,this.description=l.description,this.language=l.language,this.revision=l.revision,this.contentStatus=l.contentStatus,this.properties=l.properties,this.calcProperties=l.calcProperties,this._worksheets=[],l.worksheets.forEach(u=>{const{id:f,name:d,state:h}=u,p=l.sheets&&l.sheets.findIndex(g=>g.id===f);(this._worksheets[f]=new i({id:f,name:d,orderNo:p,state:h,workbook:this})).model=u}),this._definedNames.model=l.definedNames,this.views=l.views,this._themes=l.themes,this.media=l.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(r,n,o){const i=r("../utils/under-dash"),a=r("../utils/col-cache"),s=r("./range"),c=r("./row"),l=r("./column"),u=r("./enums"),f=r("./image"),d=r("./table"),h=r("./data-validations"),p=r("../utils/encryptor"),{copyStyle:g}=r("../utils/copy-style");n.exports=class{constructor(m){m=m||{},this._workbook=m.workbook,this.id=m.id,this.orderNo=m.orderNo,this.name=m.name,this.state=m.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},m.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:!(!m.pageSetup||!m.pageSetup.fitToWidth&&!m.pageSetup.fitToHeight||m.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},m.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},m.headerFooter),this.dataValidations=new h,this.views=m.views||[],this.autoFilter=m.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(m){if(m===void 0&&(m="sheet"+this.id),this._name!==m){if(typeof m!="string")throw new Error("The name has to be a string.");if(m==="")throw new Error("The name can't be empty.");if(m==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(m))throw new Error(`Worksheet name ${m} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(m))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+m);if(m&&m.length>31&&(console.warn(`Worksheet name ${m} exceeds 31 chars. This will be truncated`),m=m.substring(0,31)),this._workbook._worksheets.find(v=>v&&v.name.toLowerCase()===m.toLowerCase()))throw new Error("Worksheet name already exists: "+m);this._name=m}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const m=new s;return this._rows.forEach(v=>{if(v){const y=v.dimensions;y&&m.expand(v.number,y.min,v.number,y.max)}}),m}get columns(){return this._columns}set columns(m){this._headerRowCount=m.reduce((b,w)=>{const E=(w.header?1:w.headers&&w.headers.length)||0;return Math.max(b,E)},0);let v=1;const y=this._columns=[];m.forEach(b=>{const w=new l(this,v++,!1);y.push(w),w.defn=b})}getColumnKey(m){return this._keys[m]}setColumnKey(m,v){this._keys[m]=v}deleteColumnKey(m){delete this._keys[m]}eachColumnKey(m){i.each(this._keys,m)}getColumn(m){if(typeof m=="string"){const v=this._keys[m];if(v)return v;m=a.l2n(m)}if(this._columns||(this._columns=[]),m>this._columns.length){let v=this._columns.length+1;for(;v<=m;)this._columns.push(new l(this,v++))}return this._columns[m-1]}spliceColumns(m,v){const y=this._rows.length;for(var b=arguments.length,w=new Array(b>2?b-2:0),E=2;E<b;E++)w[E-2]=arguments[E];if(w.length>0)for(let N=0;N<y;N++){const U=[m,v];w.forEach(F=>{U.push(F[N]||null)});const B=this.getRow(N+1);B.splice.apply(B,U)}else this._rows.forEach(N=>{N&&N.splice(m,v)});const I=w.length-v,O=m+v,D=this._columns.length;if(I<0)for(let N=m+w.length;N<=D;N++)this.getColumn(N).defn=this.getColumn(N-I).defn;else if(I>0)for(let N=D;N>=O;N--)this.getColumn(N+I).defn=this.getColumn(N).defn;for(let N=m;N<m+w.length;N++)this.getColumn(N).defn=null;this.workbook.definedNames.spliceColumns(this.name,m,v,w.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let m=0;return this.eachRow(v=>{m=Math.max(m,v.cellCount)}),m}get actualColumnCount(){const m=[];let v=0;return this.eachRow(y=>{y.eachCell(b=>{let{col:w}=b;m[w]||(m[w]=!0,v++)})}),v}_commitRow(){}get _lastRowNumber(){const m=this._rows;let v=m.length;for(;v>0&&m[v-1]===void 0;)v--;return v}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(m){return this._rows[m-1]}findRows(m,v){return this._rows.slice(m-1,m-1+v)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let m=0;return this.eachRow(()=>{m++}),m}getRow(m){let v=this._rows[m-1];return v||(v=this._rows[m-1]=new c(this,m)),v}getRows(m,v){if(v<1)return;const y=[];for(let b=m;b<m+v;b++)y.push(this.getRow(b));return y}addRow(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const y=this._nextRow,b=this.getRow(y);return b.values=m,this._setStyleOption(y,v[0]==="i"?v:"n"),b}addRows(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const y=[];return m.forEach(b=>{y.push(this.addRow(b,v))}),y}insertRow(m,v){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(m,0,v),this._setStyleOption(m,y),this.getRow(m)}insertRows(m,v){let y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(m,0,...v),y!=="n")for(let b=0;b<v.length;b++)y[0]==="o"&&this.findRow(v.length+m+b)!==void 0?this._copyStyle(v.length+m+b,m+b,y[1]==="+"):y[0]==="i"&&this.findRow(m-1)!==void 0&&this._copyStyle(m-1,m+b,y[1]==="+");return this.getRows(m,v.length)}_setStyleOption(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";v[0]==="o"&&this.findRow(m+1)!==void 0?this._copyStyle(m+1,m,v[1]==="+"):v[0]==="i"&&this.findRow(m-1)!==void 0&&this._copyStyle(m-1,m,v[1]==="+")}_copyStyle(m,v){let y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const b=this.getRow(m),w=this.getRow(v);w.style=g(b.style),b.eachCell({includeEmpty:y},(E,I)=>{w.getCell(I).style=g(E.style)}),w.height=b.height}duplicateRow(m,v){let y=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const b=this._rows[m-1],w=new Array(v).fill(b.values);this.spliceRows(m+1,y?0:v,...w);for(let E=0;E<v;E++){const I=this._rows[m+E];I.style=b.style,I.height=b.height,b.eachCell({includeEmpty:!0},(O,D)=>{I.getCell(D).style=O.style})}}spliceRows(m,v){const y=m+v;for(var b=arguments.length,w=new Array(b>2?b-2:0),E=2;E<b;E++)w[E-2]=arguments[E];const I=w.length,O=I-v,D=this._rows.length;let N,U;if(O<0)for(m===D&&(this._rows[D-1]=void 0),N=y;N<=D;N++)if(U=this._rows[N-1],U){const B=this.getRow(N+O);B.values=U.values,B.style=U.style,B.height=U.height,U.eachCell({includeEmpty:!0},(F,T)=>{B.getCell(T).style=F.style}),this._rows[N-1]=void 0}else this._rows[N+O-1]=void 0;else if(O>0)for(N=D;N>=y;N--)if(U=this._rows[N-1],U){const B=this.getRow(N+O);B.values=U.values,B.style=U.style,B.height=U.height,U.eachCell({includeEmpty:!0},(F,T)=>{if(B.getCell(T).style=F.style,F._value.constructor.name==="MergeValue"){const P=this.getRow(F._row._number+I).getCell(T),_=F._value._master,C=this.getRow(_._row._number+I).getCell(_._column._number);P.merge(C)}})}else this._rows[N+O-1]=void 0;for(N=0;N<I;N++){const B=this.getRow(m+N);B.style={},B.values=w[N]}this.workbook.definedNames.spliceRows(this.name,m,v,I)}eachRow(m,v){if(v||(v=m,m=void 0),m&&m.includeEmpty){const y=this._rows.length;for(let b=1;b<=y;b++)v(this.getRow(b),b)}else this._rows.forEach(y=>{y&&y.hasValues&&v(y,y.number)})}getSheetValues(){const m=[];return this._rows.forEach(v=>{v&&(m[v.number]=v.values)}),m}findCell(m,v){const y=a.getAddress(m,v),b=this._rows[y.row-1];return b?b.findCell(y.col):void 0}getCell(m,v){const y=a.getAddress(m,v);return this.getRow(y.row).getCellEx(y)}mergeCells(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];const b=new s(v);this._mergeCellsInternal(b)}mergeCellsWithoutStyle(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];const b=new s(v);this._mergeCellsInternal(b,!0)}_mergeCellsInternal(m,v){i.each(this._merges,b=>{if(b.intersects(m))throw new Error("Cannot merge already merged cells")});const y=this.getCell(m.top,m.left);for(let b=m.top;b<=m.bottom;b++)for(let w=m.left;w<=m.right;w++)(b>m.top||w>m.left)&&this.getCell(b,w).merge(y,v);this._merges[y.address]=m}_unMergeMaster(m){const v=this._merges[m.address];if(v){for(let y=v.top;y<=v.bottom;y++)for(let b=v.left;b<=v.right;b++)this.getCell(y,b).unmerge();delete this._merges[m.address]}}get hasMerges(){return i.some(this._merges,Boolean)}unMergeCells(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];const b=new s(v);for(let w=b.top;w<=b.bottom;w++)for(let E=b.left;E<=b.right;E++){const I=this.findCell(w,E);I&&(I.type===u.ValueType.Merge?this._unMergeMaster(I.master):this._merges[I.address]&&this._unMergeMaster(I))}}fillFormula(m,v,y){let b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const w=a.decode(m),{top:E,left:I,bottom:O,right:D}=w,N=D-I+1,U=a.encodeAddress(E,I),B=b==="shared";let F;F=typeof y=="function"?y:Array.isArray(y)?Array.isArray(y[0])?(P,_)=>y[P-E][_-I]:(P,_)=>y[(P-E)*N+(_-I)]:()=>{};let T=!0;for(let P=E;P<=O;P++)for(let _=I;_<=D;_++)T?(this.getCell(P,_).value={shareType:b,formula:v,ref:m,result:F(P,_)},T=!1):this.getCell(P,_).value=B?{sharedFormula:U,result:F(P,_)}:F(P,_)}addImage(m,v){const y={type:"image",imageId:m,range:v};this._media.push(new f(this,y))}getImages(){return this._media.filter(m=>m.type==="image")}addBackgroundImage(m){const v={type:"background",imageId:m};this._media.push(new f(this,v))}getBackgroundImageId(){const m=this._media.find(v=>v.type==="background");return m&&m.imageId}protect(m,v){return new Promise(y=>{this.sheetProtection={sheet:!0},v&&"spinCount"in v&&(v.spinCount=Number.isFinite(v.spinCount)?Math.round(Math.max(0,v.spinCount)):1e5),m&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=p.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=v&&"spinCount"in v?v.spinCount:1e5,this.sheetProtection.hashValue=p.convertPasswordToHash(m,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),v&&(this.sheetProtection=Object.assign(this.sheetProtection,v),!m&&"spinCount"in v&&delete this.sheetProtection.spinCount),y()})}unprotect(){this.sheetProtection=null}addTable(m){const v=new d(this,m);return this.tables[m.name]=v,v}getTable(m){return this.tables[m]}removeTable(m){delete this.tables[m]}getTables(){return Object.values(this.tables)}addConditionalFormatting(m){this.conditionalFormattings.push(m)}removeConditionalFormatting(m){typeof m=="number"?this.conditionalFormattings.splice(m,1):this.conditionalFormattings=m instanceof Function?this.conditionalFormattings.filter(m):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(m){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=m}get model(){const m={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};m.cols=l.toModel(this.columns);const v=m.rows=[],y=m.dimensions=new s;return this._rows.forEach(b=>{const w=b&&b.model;w&&(y.expand(w.number,w.min,w.number,w.max),v.push(w))}),m.merges=[],i.each(this._merges,b=>{m.merges.push(b.range)}),m}_parseRows(m){this._rows=[],m.rows.forEach(v=>{const y=new c(this,v.number);this._rows[y.number-1]=y,y.model=v})}_parseMergeCells(m){i.each(m.mergeCells,v=>{this.mergeCellsWithoutStyle(v)})}set model(m){this.name=m.name,this._columns=l.fromModel(this,m.cols),this._parseRows(m),this._parseMergeCells(m),this.dataValidations=new h(m.dataValidations),this.properties=m.properties,this.pageSetup=m.pageSetup,this.headerFooter=m.headerFooter,this.views=m.views,this.autoFilter=m.autoFilter,this._media=m.media.map(v=>new f(this,v)),this.sheetProtection=m.sheetProtection,this.tables=m.tables.reduce((v,y)=>{const b=new d;return b.model=y,v[y.name]=b,v},{}),this.conditionalFormattings=m.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(r,n,o){r("core-js/modules/es.promise"),r("core-js/modules/es.promise.finally"),r("core-js/modules/es.object.assign"),r("core-js/modules/es.object.keys"),r("core-js/modules/es.object.values"),r("core-js/modules/es.symbol"),r("core-js/modules/es.symbol.async-iterator"),r("core-js/modules/es.array.iterator"),r("core-js/modules/es.array.includes"),r("core-js/modules/es.array.find-index"),r("core-js/modules/es.array.find"),r("core-js/modules/es.string.from-code-point"),r("core-js/modules/es.string.includes"),r("core-js/modules/es.number.is-nan"),r("regenerator-runtime/runtime");const i={Workbook:r("./doc/workbook")},a=r("./doc/enums");Object.keys(a).forEach(s=>{i[s]=a[s]}),n.exports=i},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(r,n,o){const i=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");o.bufferToString=function(a){return typeof a=="string"?a:i?i.decode(a):a.toString()}},{}],17:[function(r,n,o){const i=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:a}=r("buffer");o.stringToBuffer=function(s){return typeof s!="string"?s:i?a.from(i.encode(s).buffer):a.from(s)}},{buffer:220}],18:[function(r,n,o){const i=r("./under-dash"),a=r("./col-cache");n.exports=class{constructor(s){this.template=s,this.sheets={}}addCell(s){this.addCellEx(a.decodeEx(s))}getCell(s){return this.findCellEx(a.decodeEx(s),!0)}findCell(s){return this.findCellEx(a.decodeEx(s),!1)}findCellAt(s,c,l){const u=this.sheets[s],f=u&&u[c];return f&&f[l]}addCellEx(s){if(s.top)for(let c=s.top;c<=s.bottom;c++)for(let l=s.left;l<=s.right;l++)this.getCellAt(s.sheetName,c,l);else this.findCellEx(s,!0)}getCellEx(s){return this.findCellEx(s,!0)}findCellEx(s,c){const l=this.findSheet(s,c),u=this.findSheetRow(l,s,c);return this.findRowCell(u,s,c)}getCellAt(s,c,l){const u=this.sheets[s]||(this.sheets[s]=[]),f=u[c]||(u[c]=[]);return f[l]||(f[l]={sheetName:s,address:a.n2l(l)+c,row:c,col:l})}removeCellEx(s){const c=this.findSheet(s);if(!c)return;const l=this.findSheetRow(c,s);l&&delete l[s.col]}forEachInSheet(s,c){const l=this.sheets[s];l&&l.forEach((u,f)=>{u&&u.forEach((d,h)=>{d&&c(d,f,h)})})}forEach(s){i.each(this.sheets,(c,l)=>{this.forEachInSheet(l,s)})}map(s){const c=[];return this.forEach(l=>{c.push(s(l))}),c}findSheet(s,c){const l=s.sheetName;return this.sheets[l]?this.sheets[l]:c?this.sheets[l]=[]:void 0}findSheetRow(s,c,l){const{row:u}=c;return s&&s[u]?s[u]:l?s[u]=[]:void 0}findRowCell(s,c,l){const{col:u}=c;return s&&s[u]?s[u]:l?s[u]=this.template?Object.assign(c,JSON.parse(JSON.stringify(this.template))):c:void 0}spliceRows(s,c,l,u){const f=this.sheets[s];if(f){const d=[];for(let h=0;h<u;h++)d.push([]);f.splice(c,l,...d)}}spliceColumns(s,c,l,u){const f=this.sheets[s];if(f){const d=[];for(let h=0;h<u;h++)d.push(null);i.each(f,h=>{h.splice(c,l,...d)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(r,n,o){const i=/^[A-Z]+\d+$/,a={_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:s=>s<=26?1:s<=676?2:3,_fill(s){let c,l,u,f,d,h=1;if(s>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&s>=1){for(;h<=26;)c=this._dictionary[h-1],this._n2l[h]=c,this._l2n[c]=h,h++;this._l2nFill=1}if(this._l2nFill<2&&s>=2){for(h=27;h<=702;)l=h-27,u=l%26,f=Math.floor(l/26),c=this._dictionary[f]+this._dictionary[u],this._n2l[h]=c,this._l2n[c]=h,h++;this._l2nFill=2}if(this._l2nFill<3&&s>=3){for(h=703;h<=16384;)l=h-703,u=l%26,f=Math.floor(l/26)%26,d=Math.floor(l/676),c=this._dictionary[d]+this._dictionary[f]+this._dictionary[u],this._n2l[h]=c,this._l2n[c]=h,h++;this._l2nFill=3}},l2n(s){if(this._l2n[s]||this._fill(s.length),!this._l2n[s])throw new Error("Out of bounds. Invalid column letter: "+s);return this._l2n[s]},n2l(s){if(s<1||s>16384)throw new Error(s+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[s]||this._fill(this._level(s)),this._n2l[s]},_hash:{},validateAddress(s){if(!i.test(s))throw new Error("Invalid Address: "+s);return!0},decodeAddress(s){const c=s.length<5&&this._hash[s];if(c)return c;let l=!1,u="",f=0,d=!1,h="",p=0;for(let m,v=0;v<s.length;v++)if(m=s.charCodeAt(v),!d&&m>=65&&m<=90)l=!0,u+=s[v],f=26*f+m-64;else if(m>=48&&m<=57)d=!0,h+=s[v],p=10*p+m-48;else if(d&&l&&m!==36)break;if(l){if(f>16384)throw new Error("Out of bounds. Invalid column letter: "+u)}else f=void 0;d||(p=void 0);const g={address:s=u+h,col:f,row:p,$col$row:`$${u}$${h}`};return f<=100&&p<=100&&(this._hash[s]=g,this._hash[g.$col$row]=g),g},getAddress(s,c){if(c){const l=this.n2l(c)+s;return this.decodeAddress(l)}return this.decodeAddress(s)},decode(s){const c=s.split(":");if(c.length===2){const l=this.decodeAddress(c[0]),u=this.decodeAddress(c[1]),f={top:Math.min(l.row,u.row),left:Math.min(l.col,u.col),bottom:Math.max(l.row,u.row),right:Math.max(l.col,u.col)};return f.tl=this.n2l(f.left)+f.top,f.br=this.n2l(f.right)+f.bottom,f.dimensions=`${f.tl}:${f.br}`,f}return this.decodeAddress(s)},decodeEx(s){const c=s.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),l=c[1]||c[2],u=c[3],f=u.split(":");if(f.length>1){let h=this.decodeAddress(f[0]),p=this.decodeAddress(f[1]);const g=Math.min(h.row,p.row),m=Math.min(h.col,p.col),v=Math.max(h.row,p.row),y=Math.max(h.col,p.col);return h=this.n2l(m)+g,p=this.n2l(y)+v,{top:g,left:m,bottom:v,right:y,sheetName:l,tl:{address:h,col:m,row:g,$col$row:`$${this.n2l(m)}$${g}`,sheetName:l},br:{address:p,col:y,row:v,$col$row:`$${this.n2l(y)}$${v}`,sheetName:l},dimensions:`${h}:${p}`}}if(u.startsWith("#"))return l?{sheetName:l,error:u}:{error:u};const d=this.decodeAddress(u);return l?{sheetName:l,...d}:d},encodeAddress:(s,c)=>a.n2l(c)+s,encode(){switch(arguments.length){case 2:return a.encodeAddress(arguments[0],arguments[1]);case 4:return`${a.encodeAddress(arguments[0],arguments[1])}:${a.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(s,c){const[l,u,,f,d]=s,[h,p]=c;return h>=l&&h<=f&&p>=u&&p<=d}};n.exports=a},{}],20:[function(r,n,o){const i=(s,c)=>({...s,...c.reduce((l,u)=>(s[u]&&(l[u]={...s[u]}),l),{})}),a=function(s,c,l){let u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];s[l]&&(c[l]=i(s[l],u))};o.copyStyle=s=>{if(!s)return s;if(c=s,Object.keys(c).length===0)return{};var c;const l={...s};return a(s,l,"font",["color"]),a(s,l,"alignment"),a(s,l,"protection"),s.border&&(a(s,l,"border"),a(s.border,l.border,"top",["color"]),a(s.border,l.border,"left",["color"]),a(s.border,l.border,"bottom",["color"]),a(s.border,l.border,"right",["color"]),a(s.border,l.border,"diagonal",["color"])),s.fill&&(a(s,l,"fill",["fgColor","bgColor","center"]),s.fill.stops&&(l.fill.stops=s.fill.stops.map(u=>i(u,["color"])))),l}},{}],21:[function(r,n,o){(function(i){(function(){const a=r("crypto"),s={hash(c){const l=a.createHash(c);for(var u=arguments.length,f=new Array(u>1?u-1:0),d=1;d<u;d++)f[d-1]=arguments[d];return l.update(i.concat(f)),l.digest()},convertPasswordToHash(c,l,u,f){if(l=l.toLowerCase(),a.getHashes().indexOf(l)<0)throw new Error(`Hash algorithm '${l}' not supported!`);const d=i.from(c,"utf16le");let h=this.hash(l,i.from(u,"base64"),d);for(let p=0;p<f;p++){const g=i.alloc(4);g.writeUInt32LE(p,0),h=this.hash(l,h,g)}return h.toString("base64")},randomBytes:c=>a.randomBytes(c)};n.exports=s}).call(this)}).call(this,r("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(r,n,o){const{SaxesParser:i}=r("saxes"),{PassThrough:a}=r("readable-stream"),{bufferToString:s}=r("./browser-buffer-decode");n.exports=async function*(c){c.pipe&&!c[Symbol.asyncIterator]&&(c=c.pipe(new a));const l=new i;let u;l.on("error",d=>{u=d});let f=[];l.on("opentag",d=>f.push({eventType:"opentag",value:d})),l.on("text",d=>f.push({eventType:"text",value:d})),l.on("closetag",d=>f.push({eventType:"closetag",value:d}));for await(const d of c){if(l.write(s(d)),u)throw u;yield f,f=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(r,n,o){const i=r("./col-cache"),a=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,s=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;n.exports={slideFormula:function(c,l,u){const f=i.decode(l),d=i.decode(u);return c.replace(a,(h,p,g,m,v)=>{if(v)return h;const y=s.exec(m);if(y){const b=y[1],w=y[2].toUpperCase(),E=y[3],I=y[4];if(w.length>3||w.length===3&&w>"XFD")return h;let O=i.l2n(w),D=parseInt(I,10);return b||(O+=d.col-f.col),E||(D+=d.row-f.row),(p||"")+(b||"")+i.n2l(O)+(E||"")+D}return h})}}},{"./col-cache":19}],24:[function(r,n,o){(function(i,a){(function(){const s=r("readable-stream"),c=r("./utils"),l=r("./string-buf");class u{constructor(m,v){this._data=m,this._encoding=v}get length(){return this.toBuffer().length}copy(m,v,y,b){return this.toBuffer().copy(m,v,y,b)}toBuffer(){return this._buffer||(this._buffer=a.from(this._data,this._encoding)),this._buffer}}class f{constructor(m){this._data=m}get length(){return this._data.length}copy(m,v,y,b){return this._data._buf.copy(m,v,y,b)}toBuffer(){return this._data.toBuffer()}}class d{constructor(m){this._data=m}get length(){return this._data.length}copy(m,v,y,b){this._data.copy(m,v,y,b)}toBuffer(){return this._data}}class h{constructor(m){this.size=m,this.buffer=a.alloc(m),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const m=a.alloc(this.iWrite-this.iRead);return this.buffer.copy(m,0,this.iRead,this.iWrite),m}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(m){let v;return m===0?null:m===void 0||m>=this.length?(v=this.toBuffer(),this.iRead=this.iWrite,v):(v=a.alloc(m),this.buffer.copy(v,0,this.iRead,m),this.iRead+=m,v)}write(m,v,y){const b=Math.min(y,this.size-this.iWrite);return m.copy(this.buffer,this.iWrite,v,v+b),this.iWrite+=b,b}}const p=function(g){g=g||{},this.bufSize=g.bufSize||1048576,this.buffers=[],this.batch=g.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};c.inherits(p,s.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return a.concat(this.buffers.map(g=>g.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const m=this.buffers[this.buffers.length-1];if(!m.full)return m}const g=new h(this.bufSize);return this.buffers.push(g),g},async _pipe(g){await Promise.all(this.pipes.map(function(m){return new Promise(v=>{m.write(g.toBuffer(),()=>{v()})})}))},_writeToBuffers(g){let m=0;const v=g.length;for(;m<v;)m+=this._getWritableBuffer().write(g,m,v-m)},async write(g,m,v){let y;if(m instanceof Function&&(v=m,m="utf8"),v=v||c.nop,g instanceof l)y=new f(g);else if(g instanceof a)y=new d(g);else{if(!(typeof g=="string"||g instanceof String||g instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");y=new u(g,m)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(y);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(y),i.nextTick(v)):(await this._pipe(y),v());else this.paused||this.emit("data",y.toBuffer()),this._writeToBuffers(y),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(g,m,v){const y=b=>{b?v(b):(this._flush(),this.pipes.forEach(w=>{w.end()}),this.emit("finish"))};g?this.write(g,m,y):y()},read(g){let m;if(g){for(m=[];g&&this.buffers.length&&!this.buffers[0].eod;){const v=this.buffers[0],y=v.read(g);g-=y.length,m.push(y),v.eod&&v.full&&this.buffers.shift()}return a.concat(m)}return m=this.buffers.map(v=>v.toBuffer()).filter(Boolean),this.buffers=[],a.concat(m)},setEncoding(g){this.encoding=g},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(g){this.pipes.push(g),!this.paused&&this.buffers.length&&this.end()},unpipe(g){this.pipes=this.pipes.filter(m=>m!==g)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),n.exports=p}).call(this)}).call(this,r("_process"),r("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(r,n,o){(function(i){(function(){n.exports=class{constructor(a){this._buf=i.alloc(a&&a.size||16384),this._encoding=a&&a.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=i.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(a){a=a||0,this._buffer=void 0,this._inPos=a}_grow(a){let s=2*this._buf.length;for(;s<a;)s*=2;const c=i.alloc(s);this._buf.copy(c,0),this._buf=c}addText(a){this._buffer=void 0;let s=this._inPos+this._buf.write(a,this._inPos,this._encoding);for(;s>=this._buf.length-4;)this._grow(this._inPos+a.length),s=this._inPos+this._buf.write(a,this._inPos,this._encoding);this._inPos=s}addStringBuf(a){a.length&&(this._buffer=void 0,this.length+a.length>this.capacity&&this._grow(this.length+a.length),a._buf.copy(this._buf,this._inPos,0,a.length),this._inPos+=a.length)}}}).call(this)}).call(this,r("buffer").Buffer)},{buffer:220}],26:[function(r,n,o){const{toString:i}=Object.prototype,a=/["&<>]/,s={each:function(c,l){c&&(Array.isArray(c)?c.forEach(l):Object.keys(c).forEach(u=>{l(c[u],u)}))},some:function(c,l){return!!c&&(Array.isArray(c)?c.some(l):Object.keys(c).some(u=>l(c[u],u)))},every:function(c,l){return!c||(Array.isArray(c)?c.every(l):Object.keys(c).every(u=>l(c[u],u)))},map:function(c,l){return c?Array.isArray(c)?c.map(l):Object.keys(c).map(u=>l(c[u],u)):[]},keyBy:(c,l)=>c.reduce((u,f)=>(u[f[l]]=f,u),{}),isEqual:function(c,l){const u=typeof c,f=typeof l,d=Array.isArray(c),h=Array.isArray(l);let p;if(u!==f)return!1;switch(typeof c){case"object":if(d||h)return!(!d||!h)&&c.length===l.length&&c.every((g,m)=>{const v=l[m];return s.isEqual(g,v)});if(c===null||l===null)return c===l;if(p=Object.keys(c),Object.keys(l).length!==p.length)return!1;for(const g of p)if(!l.hasOwnProperty(g))return!1;return s.every(c,(g,m)=>{const v=l[m];return s.isEqual(g,v)});default:return c===l}},escapeHtml(c){const l=a.exec(c);if(!l)return c;let u="",f="",d=0,h=l.index;for(;h<c.length;h++){switch(c.charAt(h)){case'"':f="&quot;";break;case"&":f="&amp;";break;case"'":f="&apos;";break;case"<":f="&lt;";break;case">":f="&gt;";break;default:continue}d!==h&&(u+=c.substring(d,h)),d=h+1,u+=f}return d!==h?u+c.substring(d,h):u},strcmp:(c,l)=>c<l?-1:c>l?1:0,isUndefined:c=>i.call(c)==="[object Undefined]",isObject:c=>i.call(c)==="[object Object]",deepMerge(){const c=arguments[0]||{},{length:l}=arguments;let u,f,d;function h(p,g){u=c[g],d=Array.isArray(p),s.isObject(p)||d?(d?(d=!1,f=u&&Array.isArray(u)?u:[]):f=u&&s.isObject(u)?u:{},c[g]=s.deepMerge(f,p)):s.isUndefined(p)||(c[g]=p)}for(let p=0;p<l;p++)s.each(arguments[p],h);return c}};n.exports=s},{}],27:[function(r,n,o){(function(i,a){(function(){const s=r("fs"),c=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,l={nop(){},promiseImmediate:u=>new Promise(f=>{i.setImmediate?a(()=>{f(u)}):setTimeout(()=>{f(u)},1)}),inherits:function(u,f,d,h){u.super_=f,h||(h=d,d=null),d&&Object.keys(d).forEach(g=>{Object.defineProperty(u,g,Object.getOwnPropertyDescriptor(d,g))});const p={constructor:{value:u,enumerable:!1,writable:!1,configurable:!0}};h&&Object.keys(h).forEach(g=>{p[g]=Object.getOwnPropertyDescriptor(h,g)}),u.prototype=Object.create(f.prototype,p)},dateToExcel:(u,f)=>25569+u.getTime()/864e5-(f?1462:0),excelToDate(u,f){const d=Math.round(24*(u-25569+(f?1462:0))*3600*1e3);return new Date(d)},parsePath(u){const f=u.lastIndexOf("/");return{path:u.substring(0,f),name:u.substring(f+1)}},getRelsPath(u){const f=l.parsePath(u);return`${f.path}/_rels/${f.name}.rels`},xmlEncode(u){const f=c.exec(u);if(!f)return u;let d="",h="",p=0,g=f.index;for(;g<u.length;g++){const m=u.charCodeAt(g);switch(m){case 34:h="&quot;";break;case 38:h="&amp;";break;case 39:h="&apos;";break;case 60:h="&lt;";break;case 62:h="&gt;";break;case 127:h="";break;default:if(m<=31&&(m<=8||m>=11&&m!==13)){h="";break}continue}p!==g&&(d+=u.substring(p,g)),p=g+1,h&&(d+=h)}return p!==g?d+u.substring(p,g):d},xmlDecode:u=>u.replace(/&([a-z]*);/g,f=>{switch(f){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return f}}),validInt(u){const f=parseInt(u,10);return Number.isNaN(f)?0:f},isDateFmt(u){return u?(u=(u=u.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:u=>new Promise(f=>{s.access(u,s.constants.F_OK,d=>{f(!d)})})},toIsoDateString:u=>u.toIsoString().subsstr(0,10),parseBoolean:u=>u===!0||u==="true"||u===1||u==="1"};n.exports=l}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{},r("timers").setImmediate)},{fs:216,timers:523}],28:[function(r,n,o){const i=r("./under-dash"),a=r("./utils");function s(u,f,d){u.push(` ${f}="${a.xmlEncode(d.toString())}"`)}function c(u,f){if(f){const d=[];i.each(f,(h,p)=>{h!==void 0&&s(d,p,h)}),u.push(d.join(""))}}class l{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(f){const d=this._xml;d.push("<?xml"),c(d,f),d.push(`?>
`)}openNode(f,d){const h=this.tos,p=this._xml;h&&this.open&&p.push(">"),this._stack.push(f),p.push("<"),p.push(f),c(p,d),this.leaf=!0,this.open=!0}addAttribute(f,d){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");d!==void 0&&s(this._xml,f,d)}addAttributes(f){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");c(this._xml,f)}writeText(f){const d=this._xml;this.open&&(d.push(">"),this.open=!1),this.leaf=!1,d.push(a.xmlEncode(f.toString()))}writeXml(f){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(f)}closeNode(){const f=this._stack.pop(),d=this._xml;this.leaf?d.push("/>"):(d.push("</"),d.push(f),d.push(">")),this.open=!1,this.leaf=!1}leafNode(f,d,h){this.openNode(f,d),h!==void 0&&this.writeText(h),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const f=this._rollbacks.pop();this._xml.length>f.xml&&this._xml.splice(f.xml,this._xml.length-f.xml),this._stack.length>f.stack&&this._stack.splice(f.stack,this._stack.length-f.stack),this.leaf=f.leaf,this.open=f.open}get xml(){return this.closeAll(),this._xml.join("")}}l.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},n.exports=l},{"./under-dash":26,"./utils":27}],29:[function(r,n,o){(function(i){(function(){const a=r("events"),s=r("jszip"),c=r("./stream-buf"),{stringToBuffer:l}=r("./browser-buffer-encode");class u extends a.EventEmitter{constructor(d){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},d),this.zip=new s,this.stream=new c}append(d,h){h.hasOwnProperty("base64")&&h.base64?this.zip.file(h.name,d,{base64:!0}):(i.browser&&typeof d=="string"&&(d=l(d)),this.zip.file(h.name,d))}async finalize(){const d=await this.zip.generateAsync(this.options);this.stream.end(d),this.emit("finish")}read(d){return this.stream.read(d)}setEncoding(d){return this.stream.setEncoding(d)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(d,h){return this.stream.pipe(d,h)}unpipe(d){return this.stream.unpipe(d)}unshift(d){return this.stream.unshift(d)}wrap(d){return this.stream.wrap(d)}}n.exports={ZipWriter:u}}).call(this)}).call(this,r("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(r,n,o){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(r,n,o){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(r,n,o){const i=r("../../utils/parse-sax"),a=r("../../utils/xml-stream");class s{prepare(){}render(){}parseOpen(l){}parseText(l){}parseClose(l){}reconcile(l,u){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(l=>{l instanceof s?l.reset():l.xform&&l.xform.reset()})}mergeModel(l){this.model=Object.assign(this.model||{},l)}async parse(l){for await(const u of l)for(const{eventType:f,value:d}of u)if(f==="opentag")this.parseOpen(d);else if(f==="text")this.parseText(d);else if(f==="closetag"&&!this.parseClose(d.name))return this.model;return this.model}async parseStream(l){return this.parse(i(l))}get xml(){return this.toXml(this.model)}toXml(l){const u=new a;return this.render(u,l),u.xml}static toAttribute(l,u){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(l===void 0){if(f)return u}else if(f||l!==u)return l.toString()}static toStringAttribute(l,u){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(l,u,f)}static toStringValue(l,u){return l===void 0?u:l}static toBoolAttribute(l,u){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(l===void 0){if(f)return u}else if(f||l!==u)return l?"1":"0"}static toBoolValue(l,u){return l===void 0?u:l==="1"}static toIntAttribute(l,u){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(l,u,f)}static toIntValue(l,u){return l===void 0?u:parseInt(l,10)}static toFloatAttribute(l,u){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return s.toAttribute(l,u,f)}static toFloatValue(l,u){return l===void 0?u:parseFloat(l)}}n.exports=s},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(r,n,o){const i=r("../base-xform"),a=r("../../../utils/col-cache");function s(l){try{return a.decodeEx(l),!0}catch{return!1}}function c(l){const u=[];let f=!1,d="";return l.split(",").forEach(h=>{if(!h)return;const p=(h.match(/'/g)||[]).length;if(!p)return void(f?d+=h+",":s(h)&&u.push(h));const g=p%2==0;!f&&g&&s(h)?u.push(h):f&&!g?(f=!1,s(d+h)&&u.push(d+h),d=""):(f=!0,d+=h+",")}),u}n.exports=class extends i{render(l,u){l.openNode("definedName",{name:u.name,localSheetId:u.localSheetId}),l.writeText(u.ranges.join(",")),l.closeNode()}parseOpen(l){switch(l.name){case"definedName":return this._parsedName=l.attributes.name,this._parsedLocalSheetId=l.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(l){this._parsedText.push(l)}parseClose(){return this.model={name:this._parsedName,ranges:c(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(r,n,o){const i=r("../../../utils/utils"),a=r("../base-xform");n.exports=class extends a{render(s,c){s.leafNode("sheet",{sheetId:c.id,name:c.name,state:c.state,"r:id":c.rId})}parseOpen(s){return s.name==="sheet"&&(this.model={name:i.xmlDecode(s.attributes.name),id:parseInt(s.attributes.sheetId,10),state:s.attributes.state,rId:s.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{render(a,s){a.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:s.fullCalcOnLoad?1:void 0})}parseOpen(a){return a.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{render(a,s){a.leafNode("workbookPr",{date1904:s.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(a){return a.name==="workbookPr"&&(this.model={date1904:a.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{render(a,s){const c={xWindow:s.x||0,yWindow:s.y||0,windowWidth:s.width||12e3,windowHeight:s.height||24e3,firstSheet:s.firstSheet,activeTab:s.activeTab};s.visibility&&s.visibility!=="visible"&&(c.visibility=s.visibility),a.leafNode("workbookView",c)}parseOpen(a){if(a.name==="workbookView"){const s=this.model={},c=function(u,f,d){const h=f!==void 0?s[u]=f:d;h!==void 0&&(s[u]=h)},l=function(u,f,d){const h=f!==void 0?s[u]=parseInt(f,10):d;h!==void 0&&(s[u]=h)};return l("x",a.attributes.xWindow,0),l("y",a.attributes.yWindow,0),l("width",a.attributes.windowWidth,25e3),l("height",a.attributes.windowHeight,1e4),c("visibility",a.attributes.visibility,"visible"),l("activeTab",a.attributes.activeTab,void 0),l("firstSheet",a.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../../../utils/col-cache"),s=r("../../../utils/xml-stream"),c=r("../base-xform"),l=r("../static-xform"),u=r("../list-xform"),f=r("./defined-name-xform"),d=r("./sheet-xform"),h=r("./workbook-view-xform"),p=r("./workbook-properties-xform"),g=r("./workbook-calc-properties-xform");class m extends c{constructor(){super(),this.map={fileVersion:m.STATIC_XFORMS.fileVersion,workbookPr:new p,bookViews:new u({tag:"bookViews",count:!1,childXform:new h}),sheets:new u({tag:"sheets",count:!1,childXform:new d}),definedNames:new u({tag:"definedNames",count:!1,childXform:new f}),calcPr:new g}}prepare(y){y.sheets=y.worksheets;const b=[];let w=0;y.sheets.forEach(E=>{if(E.pageSetup&&E.pageSetup.printArea&&E.pageSetup.printArea.split("&&").forEach(I=>{const O=I.split(":"),D={name:"_xlnm.Print_Area",ranges:[`'${E.name}'!$${O[0]}:$${O[1]}`],localSheetId:w};b.push(D)}),E.pageSetup&&(E.pageSetup.printTitlesRow||E.pageSetup.printTitlesColumn)){const I=[];if(E.pageSetup.printTitlesColumn){const D=E.pageSetup.printTitlesColumn.split(":");I.push(`'${E.name}'!$${D[0]}:$${D[1]}`)}if(E.pageSetup.printTitlesRow){const D=E.pageSetup.printTitlesRow.split(":");I.push(`'${E.name}'!$${D[0]}:$${D[1]}`)}const O={name:"_xlnm.Print_Titles",ranges:I,localSheetId:w};b.push(O)}w++}),b.length&&(y.definedNames=y.definedNames.concat(b)),(y.media||[]).forEach((E,I)=>{E.name=E.type+(I+1)})}render(y,b){y.openXml(s.StdDocAttributes),y.openNode("workbook",m.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(y),this.map.workbookPr.render(y,b.properties),this.map.bookViews.render(y,b.views),this.map.sheets.render(y,b.sheets),this.map.definedNames.render(y,b.definedNames),this.map.calcPr.render(y,b.calcProperties),y.closeNode()}parseOpen(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case"workbook":return!0;default:return this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y),!0}}parseText(y){this.parser&&this.parser.parseText(y)}parseClose(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(y){const b=(y.workbookRels||[]).reduce((D,N)=>(D[N.Id]=N,D),{}),w=[];let E,I=0;(y.sheets||[]).forEach(D=>{const N=b[D.rId];N&&(E=y.worksheetHash["xl/"+N.Target.replace(/^(\s|\/xl\/)+/,"")],E&&(E.name=D.name,E.id=D.id,E.state=D.state,w[I++]=E))});const O=[];i.each(y.definedNames,D=>{if(D.name==="_xlnm.Print_Area"){if(E=w[D.localSheetId],E){E.pageSetup||(E.pageSetup={});const N=a.decodeEx(D.ranges[0]);E.pageSetup.printArea=E.pageSetup.printArea?`${E.pageSetup.printArea}&&${N.dimensions}`:N.dimensions}}else if(D.name==="_xlnm.Print_Titles"){if(E=w[D.localSheetId],E){E.pageSetup||(E.pageSetup={});const N=D.ranges.join(","),U=/\$/g,B=/\$\d+:\$\d+/,F=N.match(B);if(F&&F.length){const _=F[0];E.pageSetup.printTitlesRow=_.replace(U,"")}const T=/\$[A-Z]+:\$[A-Z]+/,P=N.match(T);if(P&&P.length){const _=P[0];E.pageSetup.printTitlesColumn=_.replace(U,"")}}}else O.push(D)}),y.definedNames=O,y.media.forEach((D,N)=>{D.index=N})}}m.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"},m.STATIC_XFORMS={fileVersion:new l({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},n.exports=m},{"../../../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(r,n,o){const i=r("../strings/rich-text-xform"),a=r("../../../utils/utils"),s=r("../base-xform"),c=n.exports=function(l){this.model=l};a.inherits(c,s,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new i),this._richTextXform},render(l,u){u=u||this.model,l.openNode("comment",{ref:u.ref,authorId:0}),l.openNode("text"),u&&u.note&&u.note.texts&&u.note.texts.forEach(f=>{this.richTextXform.render(l,f)}),l.closeNode(),l.closeNode()},parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"comment":return this.model={type:"note",note:{texts:[]},...l.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(l),!0;default:return!1}},parseText(l){this.parser&&this.parser.parseText(l)},parseClose(l){switch(l){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(l),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../../../utils/utils"),s=r("../base-xform"),c=r("./comment-xform"),l=n.exports=function(){this.map={comment:new c}};a.inherits(l,s,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(u,f){f=f||this.model,u.openXml(i.StdDocAttributes),u.openNode("comments",l.COMMENTS_ATTRIBUTES),u.openNode("authors"),u.leafNode("author",null,"Author"),u.closeNode(),u.openNode("commentList"),f.comments.forEach(d=>{this.map.comment.render(u,d)}),u.closeNode(),u.closeNode()},parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(u),!0;default:return!1}},parseText(u){this.parser&&this.parser.parseText(u)},parseClose(u){switch(u){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(r,n,o){const i=r("../../base-xform");n.exports=class extends i{constructor(a){super(),this._model=a}get tag(){return this._model&&this._model.tag}render(a,s,c){(s===c[2]||this.tag==="x:SizeWithCells"&&s===c[1])&&a.leafNode(this.tag)}parseOpen(a){switch(a.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(r,n,o){const i=r("../../base-xform");n.exports=class extends i{constructor(a){super(),this._model=a}get tag(){return this._model&&this._model.tag}render(a,s){a.leafNode(this.tag,null,s)}parseOpen(a){switch(a.name){case this.tag:return this.text="",!0;default:return!1}}parseText(a){this.text=a}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"x:Anchor"}getAnchorRect(a){const s=Math.floor(a.left),c=Math.floor(68*(a.left-s)),l=Math.floor(a.top),u=Math.floor(18*(a.top-l)),f=Math.floor(a.right),d=Math.floor(68*(a.right-f)),h=Math.floor(a.bottom);return[s,c,l,u,f,d,h,Math.floor(18*(a.bottom-h))]}getDefaultRect(a){const s=a.col,c=Math.max(a.row-2,0);return[s,6,c,14,s+2,2,c+4,16]}render(a,s){const c=s.anchor?this.getAnchorRect(s.anchor):this.getDefaultRect(s.refAddress);a.leafNode("x:Anchor",null,c.join(", "))}parseOpen(a){switch(a.name){case this.tag:return this.text="",!0;default:return!1}}parseText(a){this.text=a}parseClose(){return!1}}},{"../base-xform":32}],44:[function(r,n,o){const i=r("../base-xform"),a=r("./vml-anchor-xform"),s=r("./style/vml-protection-xform"),c=r("./style/vml-position-xform"),l=["twoCells","oneCells","absolute"];n.exports=class extends i{constructor(){super(),this.map={"x:Anchor":new a,"x:Locked":new s({tag:"x:Locked"}),"x:LockText":new s({tag:"x:LockText"}),"x:SizeWithCells":new c({tag:"x:SizeWithCells"}),"x:MoveWithCells":new c({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(u,f){const{protection:d,editAs:h}=f.note;u.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(u,h,l),this.map["x:SizeWithCells"].render(u,h,l),this.map["x:Anchor"].render(u,f),this.map["x:Locked"].render(u,d.locked),u.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(u,d.lockText),u.leafNode("x:Row",null,f.refAddress.row-1),u.leafNode("x:Column",null,f.refAddress.col-1),u.closeNode()}parseOpen(u){switch(u.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const u=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),f=Object.keys(u).length;this.model.editAs=l[f],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(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform"),s=r("./vml-shape-xform");class c extends a{constructor(){super(),this.map={"v:shape":new s}}get tag(){return"xml"}render(u,f){u.openXml(i.StdDocAttributes),u.openNode(this.tag,c.DRAWING_ATTRIBUTES),u.openNode("o:shapelayout",{"v:ext":"edit"}),u.leafNode("o:idmap",{"v:ext":"edit",data:1}),u.closeNode(),u.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),u.leafNode("v:stroke",{joinstyle:"miter"}),u.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),u.closeNode(),f.comments.forEach((d,h)=>{this.map["v:shape"].render(u,d,h)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}reconcile(u,f){u.anchors.forEach(d=>{d.br?this.map["xdr:twoCellAnchor"].reconcile(d,f):this.map["xdr:oneCellAnchor"].reconcile(d,f)})}}c.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=c},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(r,n,o){const i=r("../base-xform"),a=r("./vml-textbox-xform"),s=r("./vml-client-data-xform");class c extends i{constructor(){super(),this.map={"v:textbox":new a,"x:ClientData":new s}}get tag(){return"v:shape"}render(u,f,d){u.openNode("v:shape",c.V_SHAPE_ATTRIBUTES(f,d)),u.leafNode("v:fill",{color2:"infoBackground [80]"}),u.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),u.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(u,f),this.map["x:ClientData"].render(u,f),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset(),this.model={margins:{insetmode:u.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}c.V_SHAPE_ATTRIBUTES=(l,u)=>({id:"_x0000_s"+(1025+u),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":l.note.margins&&l.note.margins.insetmode}),n.exports=c},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"v:textbox"}conversionUnit(a,s,c){return`${parseFloat(a)*s.toFixed(2)}${c}`}reverseConversionUnit(a){return(a||"").split(",").map(s=>Number(parseFloat(this.conversionUnit(parseFloat(s),.1,"")).toFixed(2)))}render(a,s){const c={style:"mso-direction-alt:auto"};if(s&&s.note){let{inset:l}=s.note&&s.note.margins;Array.isArray(l)&&(l=l.map(u=>this.conversionUnit(u,10,"mm")).join(",")),l&&(c.inset=l)}a.openNode("v:textbox",c),a.leafNode("div",{style:"text-align:left"}),a.closeNode()}parseOpen(a){switch(a.name){case this.tag:return this.model={inset:this.reverseConversionUnit(a.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(a){switch(a){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(r,n,o){const i=r("./base-xform");n.exports=class extends i{createNewModel(a){return{}}parseOpen(a){return this.parser=this.parser||this.map[a.name],this.parser?(this.parser.parseOpen(a),!0):a.name===this.tag&&(this.model=this.createNewModel(a),!0)}parseText(a){this.parser&&this.parser.parseText(a)}onParserClose(a,s){this.model[a]=s.model}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.onParserClose(a,this.parser),this.parser=void 0),!0):a!==this.tag}}},{"./base-xform":32}],49:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{render(a,s){a.openNode("HeadingPairs"),a.openNode("vt:vector",{size:2,baseType:"variant"}),a.openNode("vt:variant"),a.leafNode("vt:lpstr",void 0,"Worksheets"),a.closeNode(),a.openNode("vt:variant"),a.leafNode("vt:i4",void 0,s.length),a.closeNode(),a.closeNode(),a.closeNode()}parseOpen(a){return a.name==="HeadingPairs"}parseText(){}parseClose(a){return a!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{render(a,s){a.openNode("TitlesOfParts"),a.openNode("vt:vector",{size:s.length,baseType:"lpstr"}),s.forEach(c=>{a.leafNode("vt:lpstr",void 0,c.name)}),a.closeNode(),a.closeNode()}parseOpen(a){return a.name==="TitlesOfParts"}parseText(){}parseClose(a){return a!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform"),s=r("../simple/string-xform"),c=r("./app-heading-pairs-xform"),l=r("./app-titles-of-parts-xform");class u extends a{constructor(){super(),this.map={Company:new s({tag:"Company"}),Manager:new s({tag:"Manager"}),HeadingPairs:new c,TitleOfParts:new l}}render(d,h){d.openXml(i.StdDocAttributes),d.openNode("Properties",u.PROPERTY_ATTRIBUTES),d.leafNode("Application",void 0,"Microsoft Excel"),d.leafNode("DocSecurity",void 0,"0"),d.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(d,h.worksheets),this.map.TitleOfParts.render(d,h.worksheets),this.map.Company.render(d,h.company||""),this.map.Manager.render(d,h.manager),d.leafNode("LinksUpToDate",void 0,"false"),d.leafNode("SharedDoc",void 0,"false"),d.leafNode("HyperlinksChanged",void 0,"false"),d.leafNode("AppVersion",void 0,"16.0300"),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"Properties":return!0;default:return this.parser=this.map[d.name],!!this.parser&&(this.parser.parseOpen(d),!0)}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}u.DateFormat=function(f){return f.toISOString().replace(/[.]\d{3,6}/,"")},u.DateAttrs={"xsi:type":"dcterms:W3CDTF"},u.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},n.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform");class s extends a{render(l,u){l.openXml(i.StdDocAttributes),l.openNode("Types",s.PROPERTY_ATTRIBUTES);const f={};(u.media||[]).forEach(d=>{if(d.type==="image"){const h=d.extension;f[h]||(f[h]=!0,l.leafNode("Default",{Extension:h,ContentType:"image/"+h}))}}),l.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),l.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),l.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),u.worksheets.forEach(d=>{const h=`/xl/worksheets/sheet${d.id}.xml`;l.leafNode("Override",{PartName:h,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),l.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),l.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),u.sharedStrings&&u.sharedStrings.count&&l.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),u.tables&&u.tables.forEach(d=>{l.leafNode("Override",{PartName:"/xl/tables/"+d.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),u.drawings&&u.drawings.forEach(d=>{l.leafNode("Override",{PartName:`/xl/drawings/${d.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),u.commentRefs&&(l.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),u.commentRefs.forEach(d=>{let{commentName:h}=d;l.leafNode("Override",{PartName:`/xl/${h}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),l.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),l.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),l.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}s.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},n.exports=s},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform"),s=r("../simple/date-xform"),c=r("../simple/string-xform"),l=r("../simple/integer-xform");class u extends a{constructor(){super(),this.map={"dc:creator":new c({tag:"dc:creator"}),"dc:title":new c({tag:"dc:title"}),"dc:subject":new c({tag:"dc:subject"}),"dc:description":new c({tag:"dc:description"}),"dc:identifier":new c({tag:"dc:identifier"}),"dc:language":new c({tag:"dc:language"}),"cp:keywords":new c({tag:"cp:keywords"}),"cp:category":new c({tag:"cp:category"}),"cp:lastModifiedBy":new c({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new s({tag:"cp:lastPrinted",format:u.DateFormat}),"cp:revision":new l({tag:"cp:revision"}),"cp:version":new c({tag:"cp:version"}),"cp:contentStatus":new c({tag:"cp:contentStatus"}),"cp:contentType":new c({tag:"cp:contentType"}),"dcterms:created":new s({tag:"dcterms:created",attrs:u.DateAttrs,format:u.DateFormat}),"dcterms:modified":new s({tag:"dcterms:modified",attrs:u.DateAttrs,format:u.DateFormat})}}render(d,h){d.openXml(i.StdDocAttributes),d.openNode("cp:coreProperties",u.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(d,h.creator),this.map["dc:title"].render(d,h.title),this.map["dc:subject"].render(d,h.subject),this.map["dc:description"].render(d,h.description),this.map["dc:identifier"].render(d,h.identifier),this.map["dc:language"].render(d,h.language),this.map["cp:keywords"].render(d,h.keywords),this.map["cp:category"].render(d,h.category),this.map["cp:lastModifiedBy"].render(d,h.lastModifiedBy),this.map["cp:lastPrinted"].render(d,h.lastPrinted),this.map["cp:revision"].render(d,h.revision),this.map["cp:version"].render(d,h.version),this.map["cp:contentStatus"].render(d,h.contentStatus),this.map["cp:contentType"].render(d,h.contentType),this.map["dcterms:created"].render(d,h.created),this.map["dcterms:modified"].render(d,h.modified),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[d.name],this.parser)return this.parser.parseOpen(d),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(d))}}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"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: "+d)}}}u.DateFormat=function(f){return f.toISOString().replace(/[.]\d{3}/,"")},u.DateAttrs={"xsi:type":"dcterms:W3CDTF"},u.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},n.exports=u},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{render(a,s){a.leafNode("Relationship",s)}parseOpen(a){switch(a.name){case"Relationship":return this.model=a.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform"),s=r("./relationship-xform");class c extends a{constructor(){super(),this.map={Relationship:new s}}render(u,f){f=f||this._values,u.openXml(i.StdDocAttributes),u.openNode("Relationships",c.RELATIONSHIPS_ATTRIBUTES),f.forEach(d=>{this.map.Relationship.render(u,d)}),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[u.name],this.parser)return this.parser.parseOpen(u),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(u))}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(u){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+u)}}}c.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},n.exports=c},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset(),this.model={range:{editAs:a.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}reconcilePicture(a,s){if(a&&a.rId){const c=s.rels[a.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(c){const l=c[1],u=s.mediaIndex[l];return s.media[u]}}}}},{"../base-xform":32}],57:[function(r,n,o){const i=r("../base-xform"),a=r("./blip-xform");n.exports=class extends i{constructor(){super(),this.map={"a:blip":new a}}get tag(){return"xdr:blipFill"}render(s,c){s.openNode(this.tag),this.map["a:blip"].render(s,c),s.openNode("a:stretch"),s.leafNode("a:fillRect"),s.closeNode(),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!0}parseText(){}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.parser=void 0),!0;switch(s){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"a:blip"}render(a,s){a.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":s.rId,cstate:"print"})}parseOpen(a){switch(a.name){case this.tag:return this.model={rId:a.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(a){switch(a){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"xdr:cNvPicPr"}render(a){a.openNode(this.tag),a.leafNode("a:picLocks",{noChangeAspect:"1"}),a.closeNode()}parseOpen(a){switch(a.name){case this.tag:default:return!0}}parseText(){}parseClose(a){switch(a){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(r,n,o){const i=r("../base-xform"),a=r("./hlink-click-xform"),s=r("./ext-lst-xform");n.exports=class extends i{constructor(){super(),this.map={"a:hlinkClick":new a,"a:extLst":new s}}get tag(){return"xdr:cNvPr"}render(c,l){c.openNode(this.tag,{id:l.index,name:"Picture "+l.index}),this.map["a:hlinkClick"].render(c,l),this.map["a:extLst"].render(c,l),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:this.reset();break;default:this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)}return!0}parseText(){}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){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(r,n,o){const i=r("../base-xform"),a=r("../simple/integer-xform");n.exports=class extends i{constructor(s){super(),this.tag=s.tag,this.map={"xdr:col":new a({tag:"xdr:col",zero:!0}),"xdr:colOff":new a({tag:"xdr:colOff",zero:!0}),"xdr:row":new a({tag:"xdr:row",zero:!0}),"xdr:rowOff":new a({tag:"xdr:rowOff",zero:!0})}}render(s,c){s.openNode(this.tag),this.map["xdr:col"].render(s,c.nativeCol),this.map["xdr:colOff"].render(s,c.nativeColOff),this.map["xdr:row"].render(s,c.nativeRow),this.map["xdr:rowOff"].render(s,c.nativeRowOff),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:this.reset();break;default:this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)}return!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 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(r,n,o){const i=r("../../../utils/col-cache"),a=r("../../../utils/xml-stream"),s=r("../base-xform"),c=r("./two-cell-anchor-xform"),l=r("./one-cell-anchor-xform");class u extends s{constructor(){super(),this.map={"xdr:twoCellAnchor":new c,"xdr:oneCellAnchor":new l}}prepare(d){d.anchors.forEach((h,p)=>{h.anchorType=function(g){return(typeof g.range=="string"?i.decode(g.range):g.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(h),this.map[h.anchorType].prepare(h,{index:p})})}get tag(){return"xdr:wsDr"}render(d,h){d.openXml(a.StdDocAttributes),d.openNode(this.tag,u.DRAWING_ATTRIBUTES),h.anchors.forEach(p=>{this.map[p.anchorType].render(d,p)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:this.reset(),this.model={anchors:[]};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.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(d){case this.tag:return!1;default:return!0}}reconcile(d,h){d.anchors.forEach(p=>{p.br?this.map["xdr:twoCellAnchor"].reconcile(p,h):this.map["xdr:oneCellAnchor"].reconcile(p,h)})}}u.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},n.exports=u},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"a:extLst"}render(a){a.openNode(this.tag),a.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),a.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),a.closeNode(),a.closeNode()}parseOpen(a){switch(a.name){case this.tag:default:return!0}}parseText(){}parseClose(a){switch(a){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{constructor(a){super(),this.tag=a.tag,this.map={}}render(a,s){a.openNode(this.tag);const c=Math.floor(9525*s.width),l=Math.floor(9525*s.height);a.addAttribute("cx",c),a.addAttribute("cy",l),a.closeNode()}parseOpen(a){return a.name===this.tag&&(this.model={width:parseInt(a.attributes.cx||"0",10)/9525,height:parseInt(a.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"a:hlinkClick"}render(a,s){s.hyperlinks&&s.hyperlinks.rId&&a.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":s.hyperlinks.rId,tooltip:s.hyperlinks.tooltip})}parseOpen(a){switch(a.name){case this.tag:return this.model={hyperlinks:{rId:a.attributes["r:id"],tooltip:a.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(r,n,o){const i=r("../base-xform"),a=r("./c-nv-pr-xform"),s=r("./c-nv-pic-pr-xform");n.exports=class extends i{constructor(){super(),this.map={"xdr:cNvPr":new a,"xdr:cNvPicPr":new s}}get tag(){return"xdr:nvPicPr"}render(c,l){c.openNode(this.tag),this.map["xdr:cNvPr"].render(c,l),this.map["xdr:cNvPicPr"].render(c,l),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case this.tag:this.reset();break;default:this.parser=this.map[c.name],this.parser&&this.parser.parseOpen(c)}return!0}parseText(){}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.parser=void 0),!0;switch(c){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(r,n,o){const i=r("./base-cell-anchor-xform"),a=r("../static-xform"),s=r("./cell-position-xform"),c=r("./ext-xform"),l=r("./pic-xform");n.exports=class extends i{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:ext":new c({tag:"xdr:ext"}),"xdr:pic":new l,"xdr:clientData":new a({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(u,f){this.map["xdr:pic"].prepare(u.picture,f)}render(u,f){u.openNode(this.tag,{editAs:f.range.editAs||"oneCell"}),this.map["xdr:from"].render(u,f.range.tl),this.map["xdr:ext"].render(u,f.range.ext),this.map["xdr:pic"].render(u,f.picture),this.map["xdr:clientData"].render(u,{}),u.closeNode()}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.parser=void 0),!0;switch(u){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(u,f){u.medium=this.reconcilePicture(u.picture,f)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(r,n,o){const i=r("../base-xform"),a=r("../static-xform"),s=r("./blip-fill-xform"),c=r("./nv-pic-pr-xform"),l=r("./sp-pr");n.exports=class extends i{constructor(){super(),this.map={"xdr:nvPicPr":new c,"xdr:blipFill":new s,"xdr:spPr":new a(l)}}get tag(){return"xdr:pic"}prepare(u,f){u.index=f.index+1}render(u,f){u.openNode(this.tag),this.map["xdr:nvPicPr"].render(u,f),this.map["xdr:blipFill"].render(u,f),this.map["xdr:spPr"].render(u,f),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.tag:this.reset();break;default:this.parser=this.map[u.name],this.parser&&this.parser.parseOpen(u)}return!0}parseText(){}parseClose(u){if(this.parser)return this.parser.parseClose(u)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(u){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(r,n,o){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(r,n,o){const i=r("./base-cell-anchor-xform"),a=r("../static-xform"),s=r("./cell-position-xform"),c=r("./pic-xform");n.exports=class extends i{constructor(){super(),this.map={"xdr:from":new s({tag:"xdr:from"}),"xdr:to":new s({tag:"xdr:to"}),"xdr:pic":new c,"xdr:clientData":new a({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(l,u){this.map["xdr:pic"].prepare(l.picture,u)}render(l,u){l.openNode(this.tag,{editAs:u.range.editAs||"oneCell"}),this.map["xdr:from"].render(l,u.range.tl),this.map["xdr:to"].render(l,u.range.br),this.map["xdr:pic"].render(l,u.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.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(l,u){l.medium=this.reconcilePicture(l.picture,u)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(r,n,o){const i=r("./base-xform");n.exports=class extends i{constructor(a){super(),this.tag=a.tag,this.always=!!a.always,this.count=a.count,this.empty=a.empty,this.$count=a.$count||"count",this.$=a.$,this.childXform=a.childXform,this.maxItems=a.maxItems}prepare(a,s){const{childXform:c}=this;a&&a.forEach((l,u)=>{s.index=u,c.prepare(l,s)})}render(a,s){if(this.always||s&&s.length){a.openNode(this.tag,this.$),this.count&&a.addAttribute(this.$count,s&&s.length||0);const{childXform:c}=this;(s||[]).forEach((l,u)=>{c.render(a,l,u)}),a.closeNode()}else this.empty&&a.leafNode(this.tag)}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(a)&&(this.parser=this.childXform,!0)}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser){if(!this.parser.parseClose(a)&&(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(a,s){if(a){const{childXform:c}=this;a.forEach(l=>{c.reconcile(l,s)})}}}},{"./base-xform":32}],72:[function(r,n,o){const i=r("../../../utils/col-cache"),a=r("../base-xform");n.exports=class extends a{get tag(){return"autoFilter"}render(s,c){if(c)if(typeof c=="string")s.leafNode("autoFilter",{ref:c});else{const l=function(d){return typeof d=="string"?d:i.getAddress(d.row,d.column).address},u=l(c.from),f=l(c.to);u&&f&&s.leafNode("autoFilter",{ref:`${u}:${f}`})}}parseOpen(s){s.name==="autoFilter"&&(this.model=s.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(r,n,o){const i=r("../../../utils/utils"),a=r("../base-xform"),s=r("../../../doc/range"),c=r("../../../doc/enums"),l=r("../strings/rich-text-xform");function u(f){if(f==null)return c.ValueType.Null;if(f instanceof String||typeof f=="string")return c.ValueType.String;if(typeof f=="number")return c.ValueType.Number;if(typeof f=="boolean")return c.ValueType.Boolean;if(f instanceof Date)return c.ValueType.Date;if(f.text&&f.hyperlink)return c.ValueType.Hyperlink;if(f.formula)return c.ValueType.Formula;if(f.error)return c.ValueType.Error;throw new Error("I could not understand type of value")}n.exports=class extends a{constructor(){super(),this.richTextXForm=new l}get tag(){return"c"}prepare(f,d){const h=d.styles.addStyleModel(f.style||{},function(p){switch(p.type){case c.ValueType.Formula:return u(p.result);default:return p.type}}(f));switch(h&&(f.styleId=h),f.comment&&d.comments.push({...f.comment,ref:f.address}),f.type){case c.ValueType.String:case c.ValueType.RichText:d.sharedStrings&&(f.ssId=d.sharedStrings.add(f.value));break;case c.ValueType.Date:d.date1904&&(f.date1904=!0);break;case c.ValueType.Hyperlink:d.sharedStrings&&f.text!==void 0&&f.text!==null&&(f.ssId=d.sharedStrings.add(f.text)),d.hyperlinks.push({address:f.address,target:f.hyperlink,tooltip:f.tooltip});break;case c.ValueType.Merge:d.merges.add(f);break;case c.ValueType.Formula:if(d.date1904&&(f.date1904=!0),f.shareType==="shared"&&(f.si=d.siFormulae++),f.formula)d.formulae[f.address]=f;else if(f.sharedFormula){const p=d.formulae[f.sharedFormula];if(!p)throw new Error("Shared Formula master must exist above and or left of clone for cell "+f.address);p.si===void 0?(p.shareType="shared",p.si=d.siFormulae++,p.range=new s(p.address,f.address)):p.range&&p.range.expandToAddress(f.address),f.si=p.si}}}renderFormula(f,d){let h=null;switch(d.shareType){case"shared":h={t:"shared",ref:d.ref||d.range.range,si:d.si};break;case"array":h={t:"array",ref:d.ref};break;default:d.si!==void 0&&(h={t:"shared",si:d.si})}switch(u(d.result)){case c.ValueType.Null:f.leafNode("f",h,d.formula);break;case c.ValueType.String:f.addAttribute("t","str"),f.leafNode("f",h,d.formula),f.leafNode("v",null,d.result);break;case c.ValueType.Number:f.leafNode("f",h,d.formula),f.leafNode("v",null,d.result);break;case c.ValueType.Boolean:f.addAttribute("t","b"),f.leafNode("f",h,d.formula),f.leafNode("v",null,d.result?1:0);break;case c.ValueType.Error:f.addAttribute("t","e"),f.leafNode("f",h,d.formula),f.leafNode("v",null,d.result.error);break;case c.ValueType.Date:f.leafNode("f",h,d.formula),f.leafNode("v",null,i.dateToExcel(d.result,d.date1904));break;default:throw new Error("I could not understand type of value")}}render(f,d){if(d.type!==c.ValueType.Null||d.styleId){switch(f.openNode("c"),f.addAttribute("r",d.address),d.styleId&&f.addAttribute("s",d.styleId),d.type){case c.ValueType.Null:break;case c.ValueType.Number:f.leafNode("v",null,d.value);break;case c.ValueType.Boolean:f.addAttribute("t","b"),f.leafNode("v",null,d.value?"1":"0");break;case c.ValueType.Error:f.addAttribute("t","e"),f.leafNode("v",null,d.value.error);break;case c.ValueType.String:case c.ValueType.RichText:d.ssId!==void 0?(f.addAttribute("t","s"),f.leafNode("v",null,d.ssId)):d.value&&d.value.richText?(f.addAttribute("t","inlineStr"),f.openNode("is"),d.value.richText.forEach(h=>{this.richTextXForm.render(f,h)}),f.closeNode("is")):(f.addAttribute("t","str"),f.leafNode("v",null,d.value));break;case c.ValueType.Date:f.leafNode("v",null,i.dateToExcel(d.value,d.date1904));break;case c.ValueType.Hyperlink:d.ssId!==void 0?(f.addAttribute("t","s"),f.leafNode("v",null,d.ssId)):(f.addAttribute("t","str"),f.leafNode("v",null,d.text));break;case c.ValueType.Formula:this.renderFormula(f,d);break;case c.ValueType.Merge:}f.closeNode()}}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"c":return this.model={address:f.attributes.r},this.t=f.attributes.t,f.attributes.s&&(this.model.styleId=parseInt(f.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=f.attributes.si,this.model.shareType=f.attributes.t,this.model.ref=f.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(f),!0;default:return!1}}parseText(f){if(this.parser)this.parser.parseText(f);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+f:f;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+f:f:this.model.value=this.model.value?this.model.value+f:f}}parseClose(f){switch(f){case"c":{const{model:d}=this;if(d.formula||d.shareType)d.type=c.ValueType.Formula,d.value&&(this.t==="str"?d.result=i.xmlDecode(d.value):this.t==="b"?d.result=parseInt(d.value,10)!==0:this.t==="e"?d.result={error:d.value}:d.result=parseFloat(d.value),d.value=void 0);else if(d.value!==void 0)switch(this.t){case"s":d.type=c.ValueType.String,d.value=parseInt(d.value,10);break;case"str":d.type=c.ValueType.String,d.value=i.xmlDecode(d.value);break;case"inlineStr":d.type=c.ValueType.String;break;case"b":d.type=c.ValueType.Boolean,d.value=parseInt(d.value,10)!==0;break;case"e":d.type=c.ValueType.Error,d.value={error:d.value};break;default:d.type=c.ValueType.Number,d.value=parseFloat(d.value)}else d.styleId?d.type=c.ValueType.Null:d.type=c.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(f),!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(f),!0)}}reconcile(f,d){const h=f.styleId&&d.styles&&d.styles.getStyleModel(f.styleId);switch(h&&(f.style=h),f.styleId!==void 0&&(f.styleId=void 0),f.type){case c.ValueType.String:typeof f.value=="number"&&d.sharedStrings&&(f.value=d.sharedStrings.getString(f.value)),f.value.richText&&(f.type=c.ValueType.RichText);break;case c.ValueType.Number:h&&i.isDateFmt(h.numFmt)&&(f.type=c.ValueType.Date,f.value=i.excelToDate(f.value,d.date1904));break;case c.ValueType.Formula:f.result!==void 0&&h&&i.isDateFmt(h.numFmt)&&(f.result=i.excelToDate(f.result,d.date1904)),f.shareType==="shared"&&(f.ref?d.formulae[f.si]=f.address:(f.sharedFormula=d.formulae[f.si],delete f.shareType),delete f.si)}const p=d.hyperlinkMap[f.address];p&&(f.type===c.ValueType.Formula?(f.text=f.result,f.result=void 0):(f.text=f.value,f.value=void 0),f.type=c.ValueType.Hyperlink,f.hyperlink=p);const g=d.commentsMap&&d.commentsMap[f.address];g&&(f.comment=g)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(r,n,o){const i=r("../../base-xform");n.exports=class extends i{get tag(){return"x14:cfIcon"}render(a,s){a.leafNode(this.tag,{iconSet:s.iconSet,iconId:s.iconId})}parseOpen(a){let{attributes:s}=a;this.model={iconSet:s.iconSet,iconId:i.toIntValue(s.iconId)}}parseClose(a){return a!==this.tag}}},{"../../base-xform":32}],75:[function(r,n,o){const{v4:i}=r("uuid"),a=r("../../base-xform"),s=r("../../composite-xform"),c=r("./databar-ext-xform"),l=r("./icon-set-ext-xform"),u={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class f extends s{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new c,"x14:iconSet":this.iconSetXform=new l}}get tag(){return"x14:cfRule"}static isExt(h){return h.type==="dataBar"?c.isExt(h):!(h.type!=="iconSet"||!h.custom&&!u[h.iconSet])}prepare(h){f.isExt(h)&&(h.x14Id=`{${i()}}`.toUpperCase())}render(h,p){if(f.isExt(p))switch(p.type){case"dataBar":this.renderDataBar(h,p);break;case"iconSet":this.renderIconSet(h,p)}}renderDataBar(h,p){h.openNode(this.tag,{type:"dataBar",id:p.x14Id}),this.databarXform.render(h,p),h.closeNode()}renderIconSet(h,p){h.openNode(this.tag,{type:"iconSet",priority:p.priority,id:p.x14Id||`{${i()}}`}),this.iconSetXform.render(h,p),h.closeNode()}createNewModel(h){let{attributes:p}=h;return{type:p.type,x14Id:p.id,priority:a.toIntValue(p.priority)}}onParserClose(h,p){Object.assign(this.model,p.model)}}n.exports=f},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(r,n,o){const i=r("../../composite-xform"),a=r("./f-ext-xform");n.exports=class extends i{constructor(){super(),this.map={"xm:f":this.fExtXform=new a}}get tag(){return"x14:cfvo"}render(s,c){s.openNode(this.tag,{type:c.type}),c.value!==void 0&&this.fExtXform.render(s,c.value),s.closeNode()}createNewModel(s){return{type:s.attributes.type}}onParserClose(s,c){switch(s){case"xm:f":this.model.value=c.model?parseFloat(c.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(r,n,o){const i=r("../../composite-xform"),a=r("./sqref-ext-xform"),s=r("./cf-rule-ext-xform");n.exports=class extends i{constructor(){super(),this.map={"xm:sqref":this.sqRef=new a,"x14:cfRule":this.cfRule=new s}}get tag(){return"x14:conditionalFormatting"}prepare(c,l){c.rules.forEach(u=>{this.cfRule.prepare(u,l)})}render(c,l){l.rules.some(s.isExt)&&(c.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),l.rules.filter(s.isExt).forEach(u=>this.cfRule.render(c,u)),this.sqRef.render(c,l.ref),c.closeNode())}createNewModel(){return{rules:[]}}onParserClose(c,l){switch(c){case"xm:sqref":this.model.ref=l.model;break;case"x14:cfRule":this.model.rules.push(l.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(r,n,o){const i=r("../../composite-xform"),a=r("./cf-rule-ext-xform"),s=r("./conditional-formatting-ext-xform");n.exports=class extends i{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new s}}get tag(){return"x14:conditionalFormattings"}hasContent(c){return c.hasExtContent===void 0&&(c.hasExtContent=c.some(l=>l.rules.some(a.isExt))),c.hasExtContent}prepare(c,l){c.forEach(u=>{this.cfXform.prepare(u,l)})}render(c,l){this.hasContent(l)&&(c.openNode(this.tag),l.forEach(u=>this.cfXform.render(c,u)),c.closeNode())}createNewModel(){return[]}onParserClose(c,l){this.model.push(l.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(r,n,o){const i=r("../../base-xform"),a=r("../../composite-xform"),s=r("../../style/color-xform"),c=r("./cfvo-ext-xform");n.exports=class extends a{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new c,"x14:borderColor":this.borderColorXform=new s("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new s("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new s("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new s("x14:axisColor")}}static isExt(l){return!l.gradient}get tag(){return"x14:dataBar"}render(l,u){l.openNode(this.tag,{minLength:i.toIntAttribute(u.minLength,0,!0),maxLength:i.toIntAttribute(u.maxLength,100,!0),border:i.toBoolAttribute(u.border,!1),gradient:i.toBoolAttribute(u.gradient,!0),negativeBarColorSameAsPositive:i.toBoolAttribute(u.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolAttribute(u.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toAttribute(u.axisPosition,"auto"),direction:i.toAttribute(u.direction,"leftToRight")}),u.cfvo.forEach(f=>{this.cfvoXform.render(l,f)}),this.borderColorXform.render(l,u.borderColor),this.negativeBorderColorXform.render(l,u.negativeBorderColor),this.negativeFillColorXform.render(l,u.negativeFillColor),this.axisColorXform.render(l,u.axisColor),l.closeNode()}createNewModel(l){let{attributes:u}=l;return{cfvo:[],minLength:i.toIntValue(u.minLength,0),maxLength:i.toIntValue(u.maxLength,100),border:i.toBoolValue(u.border,!1),gradient:i.toBoolValue(u.gradient,!0),negativeBarColorSameAsPositive:i.toBoolValue(u.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:i.toBoolValue(u.negativeBarBorderColorSameAsPositive,!0),axisPosition:i.toStringValue(u.axisPosition,"auto"),direction:i.toStringValue(u.direction,"leftToRight")}}onParserClose(l,u){const[,f]=l.split(":");switch(f){case"cfvo":this.model.cfvo.push(u.model);break;default:this.model[f]=u.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(r,n,o){const i=r("../../base-xform");n.exports=class extends i{get tag(){return"xm:f"}render(a,s){a.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(a){this.model+=a}parseClose(a){return a!==this.tag}}},{"../../base-xform":32}],81:[function(r,n,o){const i=r("../../base-xform"),a=r("../../composite-xform"),s=r("./cfvo-ext-xform"),c=r("./cf-icon-ext-xform");n.exports=class extends a{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new s,"x14:cfIcon":this.cfIconXform=new c}}get tag(){return"x14:iconSet"}render(l,u){l.openNode(this.tag,{iconSet:i.toStringAttribute(u.iconSet),reverse:i.toBoolAttribute(u.reverse,!1),showValue:i.toBoolAttribute(u.showValue,!0),custom:i.toBoolAttribute(u.icons,!1)}),u.cfvo.forEach(f=>{this.cfvoXform.render(l,f)}),u.icons&&u.icons.forEach((f,d)=>{f.iconId=d,this.cfIconXform.render(l,f)}),l.closeNode()}createNewModel(l){let{attributes:u}=l;return{cfvo:[],iconSet:i.toStringValue(u.iconSet,"3TrafficLights"),reverse:i.toBoolValue(u.reverse,!1),showValue:i.toBoolValue(u.showValue,!0)}}onParserClose(l,u){const[,f]=l.split(":");switch(f){case"cfvo":this.model.cfvo.push(u.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(u.model);break;default:this.model[f]=u.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(r,n,o){const i=r("../../base-xform");n.exports=class extends i{get tag(){return"xm:sqref"}render(a,s){a.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(a){this.model+=a}parseClose(a){return a!==this.tag}}},{"../../base-xform":32}],83:[function(r,n,o){const i=r("../../base-xform"),a=r("../../composite-xform"),s=r("../../../../doc/range"),c=r("./databar-xform"),l=r("./ext-lst-ref-xform"),u=r("./formula-xform"),f=r("./color-scale-xform"),d=r("./icon-set-xform"),h={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},p=m=>{const{type:v,operator:y}=m;switch(v){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:v};default:return{type:v,operator:y}}};class g extends a{constructor(){super(),this.map={dataBar:this.databarXform=new c,extLst:this.extLstRefXform=new l,formula:this.formulaXform=new u,colorScale:this.colorScaleXform=new f,iconSet:this.iconSetXform=new d}}get tag(){return"cfRule"}static isPrimitive(v){return v.type!=="iconSet"||!v.custom&&!h[v.iconSet]}render(v,y){switch(y.type){case"expression":this.renderExpression(v,y);break;case"cellIs":this.renderCellIs(v,y);break;case"top10":this.renderTop10(v,y);break;case"aboveAverage":this.renderAboveAverage(v,y);break;case"dataBar":this.renderDataBar(v,y);break;case"colorScale":this.renderColorScale(v,y);break;case"iconSet":this.renderIconSet(v,y);break;case"containsText":this.renderText(v,y);break;case"timePeriod":this.renderTimePeriod(v,y)}}renderExpression(v,y){v.openNode(this.tag,{type:"expression",dxfId:y.dxfId,priority:y.priority}),this.formulaXform.render(v,y.formulae[0]),v.closeNode()}renderCellIs(v,y){v.openNode(this.tag,{type:"cellIs",dxfId:y.dxfId,priority:y.priority,operator:y.operator}),y.formulae.forEach(b=>{this.formulaXform.render(v,b)}),v.closeNode()}renderTop10(v,y){v.leafNode(this.tag,{type:"top10",dxfId:y.dxfId,priority:y.priority,percent:i.toBoolAttribute(y.percent,!1),bottom:i.toBoolAttribute(y.bottom,!1),rank:i.toIntValue(y.rank,10,!0)})}renderAboveAverage(v,y){v.leafNode(this.tag,{type:"aboveAverage",dxfId:y.dxfId,priority:y.priority,aboveAverage:i.toBoolAttribute(y.aboveAverage,!0)})}renderDataBar(v,y){v.openNode(this.tag,{type:"dataBar",priority:y.priority}),this.databarXform.render(v,y),this.extLstRefXform.render(v,y),v.closeNode()}renderColorScale(v,y){v.openNode(this.tag,{type:"colorScale",priority:y.priority}),this.colorScaleXform.render(v,y),v.closeNode()}renderIconSet(v,y){g.isPrimitive(y)&&(v.openNode(this.tag,{type:"iconSet",priority:y.priority}),this.iconSetXform.render(v,y),v.closeNode())}renderText(v,y){v.openNode(this.tag,{type:y.operator,dxfId:y.dxfId,priority:y.priority,operator:i.toStringAttribute(y.operator,"containsText")});const b=(w=>{if(w.formulae&&w.formulae[0])return w.formulae[0];const E=new s(w.ref),{tl:I}=E;switch(w.operator){case"containsText":return`NOT(ISERROR(SEARCH("${w.text}",${I})))`;case"containsBlanks":return`LEN(TRIM(${I}))=0`;case"notContainsBlanks":return`LEN(TRIM(${I}))>0`;case"containsErrors":return`ISERROR(${I})`;case"notContainsErrors":return`NOT(ISERROR(${I}))`;default:return}})(y);b&&this.formulaXform.render(v,b),v.closeNode()}renderTimePeriod(v,y){v.openNode(this.tag,{type:"timePeriod",dxfId:y.dxfId,priority:y.priority,timePeriod:y.timePeriod});const b=(w=>{if(w.formulae&&w.formulae[0])return w.formulae[0];const E=new s(w.ref),{tl:I}=E;switch(w.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${I},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${I},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${I},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${I},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${I},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${I},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${I},1)=TODAY()-1`;case"today":return`FLOOR(${I},1)=TODAY()`;case"tomorrow":return`FLOOR(${I},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${I},1)<=6,FLOOR(${I},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${I})=MONTH(EDATE(TODAY(),0-1)),YEAR(${I})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${I})=MONTH(TODAY()),YEAR(${I})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${I})=MONTH(EDATE(TODAY(),0+1)),YEAR(${I})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(y);b&&this.formulaXform.render(v,b),v.closeNode()}createNewModel(v){let{attributes:y}=v;return{...p(y),dxfId:i.toIntValue(y.dxfId),priority:i.toIntValue(y.priority),timePeriod:y.timePeriod,percent:i.toBoolValue(y.percent),bottom:i.toBoolValue(y.bottom),rank:i.toIntValue(y.rank),aboveAverage:i.toBoolValue(y.aboveAverage)}}onParserClose(v,y){switch(v){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,y.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(y.model)}}}n.exports=g},{"../../../../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(r,n,o){const i=r("../../base-xform");n.exports=class extends i{get tag(){return"cfvo"}render(a,s){a.leafNode(this.tag,{type:s.type,val:s.value})}parseOpen(a){this.model={type:a.attributes.type,value:i.toFloatValue(a.attributes.val)}}parseClose(a){return a!==this.tag}}},{"../../base-xform":32}],85:[function(r,n,o){const i=r("../../composite-xform"),a=r("../../style/color-xform"),s=r("./cfvo-xform");n.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new a}}get tag(){return"colorScale"}render(c,l){c.openNode(this.tag),l.cfvo.forEach(u=>{this.cfvoXform.render(c,u)}),l.color.forEach(u=>{this.colorXform.render(c,u)}),c.closeNode()}createNewModel(c){return{cfvo:[],color:[]}}onParserClose(c,l){this.model[c].push(l.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(r,n,o){const i=r("../../composite-xform"),a=r("./cf-rule-xform");n.exports=class extends i{constructor(){super(),this.map={cfRule:new a}}get tag(){return"conditionalFormatting"}render(s,c){c.rules.some(a.isPrimitive)&&(s.openNode(this.tag,{sqref:c.ref}),c.rules.forEach(l=>{a.isPrimitive(l)&&(l.ref=c.ref,this.map.cfRule.render(s,l))}),s.closeNode())}createNewModel(s){let{attributes:c}=s;return{ref:c.sqref,rules:[]}}onParserClose(s,c){this.model.rules.push(c.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(r,n,o){const i=r("../../base-xform"),a=r("./conditional-formatting-xform");n.exports=class extends i{constructor(){super(),this.cfXform=new a}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(s,c){let l=s.reduce((u,f)=>Math.max(u,...f.rules.map(d=>d.priority||0)),1);s.forEach(u=>{u.rules.forEach(f=>{f.priority||(f.priority=l++),f.style&&(f.dxfId=c.styles.addDxfStyle(f.style))})})}render(s,c){c.forEach(l=>{this.cfXform.render(s,l)})}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(s),!0;default:return!1}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return!!this.parser&&(!!this.parser.parseClose(s)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(s,c){s.forEach(l=>{l.rules.forEach(u=>{u.dxfId!==void 0&&(u.style=c.styles.getDxfStyle(u.dxfId),delete u.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(r,n,o){const i=r("../../composite-xform"),a=r("../../style/color-xform"),s=r("./cfvo-xform");n.exports=class extends i{constructor(){super(),this.map={cfvo:this.cfvoXform=new s,color:this.colorXform=new a}}get tag(){return"dataBar"}render(c,l){c.openNode(this.tag),l.cfvo.forEach(u=>{this.cfvoXform.render(c,u)}),this.colorXform.render(c,l.color),c.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(c,l){switch(c){case"cfvo":this.model.cfvo.push(l.model);break;case"color":this.model.color=l.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(r,n,o){const i=r("../../base-xform"),a=r("../../composite-xform");class s extends i{get tag(){return"x14:id"}render(u,f){u.leafNode(this.tag,null,f)}parseOpen(){this.model=""}parseText(u){this.model+=u}parseClose(u){return u!==this.tag}}class c extends a{constructor(){super(),this.map={"x14:id":this.idXform=new s}}get tag(){return"ext"}render(u,f){u.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(u,f.x14Id),u.closeNode()}createNewModel(){return{}}onParserClose(u,f){this.model.x14Id=f.model}}n.exports=class extends a{constructor(){super(),this.map={ext:new c}}get tag(){return"extLst"}render(l,u){l.openNode(this.tag),this.map.ext.render(l,u),l.closeNode()}createNewModel(){return{}}onParserClose(l,u){Object.assign(this.model,u.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(r,n,o){const i=r("../../base-xform");n.exports=class extends i{get tag(){return"formula"}render(a,s){a.leafNode(this.tag,null,s)}parseOpen(){this.model=""}parseText(a){this.model+=a}parseClose(a){return a!==this.tag}}},{"../../base-xform":32}],91:[function(r,n,o){const i=r("../../base-xform"),a=r("../../composite-xform"),s=r("./cfvo-xform");n.exports=class extends a{constructor(){super(),this.map={cfvo:this.cfvoXform=new s}}get tag(){return"iconSet"}render(c,l){c.openNode(this.tag,{iconSet:i.toStringAttribute(l.iconSet,"3TrafficLights"),reverse:i.toBoolAttribute(l.reverse,!1),showValue:i.toBoolAttribute(l.showValue,!0)}),l.cfvo.forEach(u=>{this.cfvoXform.render(c,u)}),c.closeNode()}createNewModel(c){let{attributes:l}=c;return{iconSet:i.toStringValue(l.iconSet,"3TrafficLights"),reverse:i.toBoolValue(l.reverse),showValue:i.toBoolValue(l.showValue),cfvo:[]}}onParserClose(c,l){this.model[c].push(l.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(r,n,o){const i=r("../../../utils/utils"),a=r("../base-xform");n.exports=class extends a{get tag(){return"col"}prepare(s,c){const l=c.styles.addStyleModel(s.style||{});l&&(s.styleId=l)}render(s,c){s.openNode("col"),s.addAttribute("min",c.min),s.addAttribute("max",c.max),c.width&&s.addAttribute("width",c.width),c.styleId&&s.addAttribute("style",c.styleId),c.hidden&&s.addAttribute("hidden","1"),c.bestFit&&s.addAttribute("bestFit","1"),c.outlineLevel&&s.addAttribute("outlineLevel",c.outlineLevel),c.collapsed&&s.addAttribute("collapsed","1"),s.addAttribute("customWidth","1"),s.closeNode()}parseOpen(s){if(s.name==="col"){const c=this.model={min:parseInt(s.attributes.min||"0",10),max:parseInt(s.attributes.max||"0",10),width:s.attributes.width===void 0?void 0:parseFloat(s.attributes.width||"0")};return s.attributes.style&&(c.styleId=parseInt(s.attributes.style,10)),i.parseBoolean(s.attributes.hidden)&&(c.hidden=!0),i.parseBoolean(s.attributes.bestFit)&&(c.bestFit=!0),s.attributes.outlineLevel&&(c.outlineLevel=parseInt(s.attributes.outlineLevel,10)),i.parseBoolean(s.attributes.collapsed)&&(c.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(s,c){s.styleId&&(s.style=c.styles.getStyleModel(s.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../../../utils/utils"),s=r("../../../utils/col-cache"),c=r("../base-xform"),l=r("../../../doc/range");function u(d,h,p,g){const m=h[p];m!==void 0?d[p]=m:g!==void 0&&(d[p]=g)}function f(d,h,p,g){const m=h[p];m!==void 0?d[p]=a.parseBoolean(m):g!==void 0&&(d[p]=g)}n.exports=class extends c{get tag(){return"dataValidations"}render(d,h){const p=function(g){const m=i.map(g,(b,w)=>({address:w,dataValidation:b,marked:!1})).sort((b,w)=>i.strcmp(b.address,w.address)),v=i.keyBy(m,"address"),y=(b,w,E)=>{for(let I=0;I<w;I++){const O=s.encodeAddress(b.row+I,E);if(!g[O]||!i.isEqual(g[b.address],g[O]))return!1}return!0};return m.map(b=>{if(!b.marked){const w=s.decodeEx(b.address);if(w.dimensions)return v[w.dimensions].marked=!0,{...b.dataValidation,sqref:b.address};let E=1,I=s.encodeAddress(w.row+E,w.col);for(;g[I]&&i.isEqual(b.dataValidation,g[I]);)E++,I=s.encodeAddress(w.row+E,w.col);let O=1;for(;y(w,E,w.col+O);)O++;for(let D=0;D<E;D++)for(let N=0;N<O;N++)I=s.encodeAddress(w.row+D,w.col+N),v[I].marked=!0;if(E>1||O>1){const D=w.row+(E-1),N=w.col+(O-1);return{...b.dataValidation,sqref:`${b.address}:${s.encodeAddress(D,N)}`}}return{...b.dataValidation,sqref:b.address}}return null}).filter(Boolean)}(h);p.length&&(d.openNode("dataValidations",{count:p.length}),p.forEach(g=>{d.openNode("dataValidation"),g.type!=="any"&&(d.addAttribute("type",g.type),g.operator&&g.type!=="list"&&g.operator!=="between"&&d.addAttribute("operator",g.operator),g.allowBlank&&d.addAttribute("allowBlank","1")),g.showInputMessage&&d.addAttribute("showInputMessage","1"),g.promptTitle&&d.addAttribute("promptTitle",g.promptTitle),g.prompt&&d.addAttribute("prompt",g.prompt),g.showErrorMessage&&d.addAttribute("showErrorMessage","1"),g.errorStyle&&d.addAttribute("errorStyle",g.errorStyle),g.errorTitle&&d.addAttribute("errorTitle",g.errorTitle),g.error&&d.addAttribute("error",g.error),d.addAttribute("sqref",g.sqref),(g.formulae||[]).forEach((m,v)=>{d.openNode("formula"+(v+1)),g.type==="date"?d.writeText(a.dateToExcel(new Date(m))):d.writeText(m),d.closeNode()}),d.closeNode()}),d.closeNode())}parseOpen(d){switch(d.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=d.attributes.sqref;const h={type:d.attributes.type||"any",formulae:[]};switch(d.attributes.type&&f(h,d.attributes,"allowBlank"),f(h,d.attributes,"showInputMessage"),f(h,d.attributes,"showErrorMessage"),h.type){case"any":case"list":case"custom":break;default:u(h,d.attributes,"operator","between")}return u(h,d.attributes,"promptTitle"),u(h,d.attributes,"prompt"),u(h,d.attributes,"errorStyle"),u(h,d.attributes,"errorTitle"),u(h,d.attributes,"error"),this._dataValidation=h,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(d){this._formula&&this._formula.push(d)}parseClose(d){switch(d){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(h=>{h.includes(":")?new l(h).forEachAddress(p=>{this.model[p]=this._dataValidation}):this.model[h]=this._dataValidation}),!0;case"formula1":case"formula2":{let h=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":h=parseInt(h,10);break;case"decimal":h=parseFloat(h);break;case"date":h=a.excelToDate(parseFloat(h))}return this._dataValidation.formulae.push(h),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"dimension"}render(a,s){s&&a.leafNode("dimension",{ref:s})}parseOpen(a){return a.name==="dimension"&&(this.model=a.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"drawing"}render(a,s){s&&a.leafNode(this.tag,{"r:id":s.rId})}parseOpen(a){switch(a.name){case this.tag:return this.model={rId:a.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(r,n,o){const i=r("../composite-xform"),a=r("./cf-ext/conditional-formattings-ext-xform");class s extends i{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new a}}get tag(){return"ext"}hasContent(l){return this.conditionalFormattings.hasContent(l.conditionalFormattings)}prepare(l,u){this.conditionalFormattings.prepare(l.conditionalFormattings,u)}render(l,u){l.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(l,u.conditionalFormattings),l.closeNode()}createNewModel(){return{}}onParserClose(l,u){this.model[l]=u.model}}n.exports=class extends i{constructor(){super(),this.map={ext:this.ext=new s}}get tag(){return"extLst"}prepare(c,l){this.ext.prepare(c,l)}hasContent(c){return this.ext.hasContent(c)}render(c,l){this.hasContent(l)&&(c.openNode("extLst"),this.ext.render(c,l),c.closeNode())}createNewModel(){return{}}onParserClose(c,l){Object.assign(this.model,l.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"headerFooter"}render(a,s){if(s){a.addRollback();let c=!1;a.openNode("headerFooter"),s.differentFirst&&(a.addAttribute("differentFirst","1"),c=!0),s.differentOddEven&&(a.addAttribute("differentOddEven","1"),c=!0),s.oddHeader&&typeof s.oddHeader=="string"&&(a.leafNode("oddHeader",null,s.oddHeader),c=!0),s.oddFooter&&typeof s.oddFooter=="string"&&(a.leafNode("oddFooter",null,s.oddFooter),c=!0),s.evenHeader&&typeof s.evenHeader=="string"&&(a.leafNode("evenHeader",null,s.evenHeader),c=!0),s.evenFooter&&typeof s.evenFooter=="string"&&(a.leafNode("evenFooter",null,s.evenFooter),c=!0),s.firstHeader&&typeof s.firstHeader=="string"&&(a.leafNode("firstHeader",null,s.firstHeader),c=!0),s.firstFooter&&typeof s.firstFooter=="string"&&(a.leafNode("firstFooter",null,s.firstFooter),c=!0),c?(a.closeNode(),a.commit()):a.rollback()}}parseOpen(a){switch(a.name){case"headerFooter":return this.model={},a.attributes.differentFirst&&(this.model.differentFirst=parseInt(a.attributes.differentFirst,0)===1),a.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(a.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(a){switch(this.currentNode){case"oddHeader":this.model.oddHeader=a;break;case"oddFooter":this.model.oddFooter=a;break;case"evenHeader":this.model.evenHeader=a;break;case"evenFooter":this.model.evenFooter=a;break;case"firstHeader":this.model.firstHeader=a;break;case"firstFooter":this.model.firstFooter=a}}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(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"hyperlink"}render(a,s){this.isInternalLink(s)?a.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip,location:s.target}):a.leafNode("hyperlink",{ref:s.address,"r:id":s.rId,tooltip:s.tooltip})}parseOpen(a){return a.name==="hyperlink"&&(this.model={address:a.attributes.ref,rId:a.attributes["r:id"],tooltip:a.attributes.tooltip},a.attributes.location&&(this.model.target=a.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(a){return a.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(a.target)}}},{"../base-xform":32}],99:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"mergeCell"}render(a,s){a.leafNode("mergeCell",{ref:s})}parseOpen(a){return a.name==="mergeCell"&&(this.model=a.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../../../doc/range"),s=r("../../../utils/col-cache"),c=r("../../../doc/enums");n.exports=class{constructor(){this.merges={}}add(l){if(this.merges[l.master])this.merges[l.master].expandToAddress(l.address);else{const u=`${l.master}:${l.address}`;this.merges[l.master]=new a(u)}}get mergeCells(){return i.map(this.merges,l=>l.range)}reconcile(l,u){i.each(l,f=>{const d=s.decode(f);for(let h=d.top;h<=d.bottom;h++){const p=u[h-1];for(let g=d.left;g<=d.right;g++){const m=p.cells[g-1];m?m.type===c.ValueType.Merge&&(m.master=d.tl):p.cells[g]={type:c.ValueType.Null,address:s.encodeAddress(h,g)}}}})}getMasterAddress(l){const u=this.hash[l];return u&&u.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(r,n,o){const i=r("../base-xform"),a=s=>s!==void 0;n.exports=class extends i{get tag(){return"outlinePr"}render(s,c){return!(!c||!a(c.summaryBelow)&&!a(c.summaryRight))&&(s.leafNode(this.tag,{summaryBelow:a(c.summaryBelow)?Number(c.summaryBelow):void 0,summaryRight:a(c.summaryRight)?Number(c.summaryRight):void 0}),!0)}parseOpen(s){return s.name===this.tag&&(this.model={summaryBelow:a(s.attributes.summaryBelow)?!!Number(s.attributes.summaryBelow):void 0,summaryRight:a(s.attributes.summaryRight)?!!Number(s.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"brk"}render(a,s){a.leafNode("brk",s)}parseOpen(a){return a.name==="brk"&&(this.model=a.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../base-xform");n.exports=class extends a{get tag(){return"pageMargins"}render(s,c){if(c){const l={left:c.left,right:c.right,top:c.top,bottom:c.bottom,header:c.header,footer:c.footer};i.some(l,u=>u!==void 0)&&s.leafNode(this.tag,l)}}parseOpen(s){switch(s.name){case this.tag:return this.model={left:parseFloat(s.attributes.left||.7),right:parseFloat(s.attributes.right||.7),top:parseFloat(s.attributes.top||.75),bottom:parseFloat(s.attributes.bottom||.75),header:parseFloat(s.attributes.header||.3),footer:parseFloat(s.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"pageSetUpPr"}render(a,s){return!(!s||!s.fitToPage)&&(a.leafNode(this.tag,{fitToPage:s.fitToPage?"1":void 0}),!0)}parseOpen(a){return a.name===this.tag&&(this.model={fitToPage:a.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../base-xform");function s(f){return f?"1":void 0}function c(f){switch(f){case"overThenDown":return f;default:return}}function l(f){switch(f){case"atEnd":case"asDisplyed":return f;default:return}}function u(f){switch(f){case"dash":case"blank":case"NA":return f;default:return}}n.exports=class extends a{get tag(){return"pageSetup"}render(f,d){if(d){const h={paperSize:d.paperSize,orientation:d.orientation,horizontalDpi:d.horizontalDpi,verticalDpi:d.verticalDpi,pageOrder:c(d.pageOrder),blackAndWhite:s(d.blackAndWhite),draft:s(d.draft),cellComments:l(d.cellComments),errors:u(d.errors),scale:d.scale,fitToWidth:d.fitToWidth,fitToHeight:d.fitToHeight,firstPageNumber:d.firstPageNumber,useFirstPageNumber:s(d.firstPageNumber),usePrinterDefaults:s(d.usePrinterDefaults),copies:d.copies};i.some(h,p=>p!==void 0)&&f.leafNode(this.tag,h)}}parseOpen(f){switch(f.name){case this.tag:return this.model={paperSize:(d=f.attributes.paperSize,d!==void 0?parseInt(d,10):void 0),orientation:f.attributes.orientation||"portrait",horizontalDpi:parseInt(f.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(f.attributes.verticalDpi||"4294967295",10),pageOrder:f.attributes.pageOrder||"downThenOver",blackAndWhite:f.attributes.blackAndWhite==="1",draft:f.attributes.draft==="1",cellComments:f.attributes.cellComments||"None",errors:f.attributes.errors||"displayed",scale:parseInt(f.attributes.scale||"100",10),fitToWidth:parseInt(f.attributes.fitToWidth||"1",10),fitToHeight:parseInt(f.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(f.attributes.firstPageNumber||"1",10),useFirstPageNumber:f.attributes.useFirstPageNumber==="1",usePrinterDefaults:f.attributes.usePrinterDefaults==="1",copies:parseInt(f.attributes.copies||"1",10)},!0;default:return!1}var d}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"picture"}render(a,s){s&&a.leafNode(this.tag,{"r:id":s.rId})}parseOpen(a){switch(a.name){case this.tag:return this.model={rId:a.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../base-xform");function s(c){return c?"1":void 0}n.exports=class extends a{get tag(){return"printOptions"}render(c,l){if(l){const u={headings:s(l.showRowColHeaders),gridLines:s(l.showGridLines),horizontalCentered:s(l.horizontalCentered),verticalCentered:s(l.verticalCentered)};i.some(u,f=>f!==void 0)&&c.leafNode(this.tag,u)}}parseOpen(c){switch(c.name){case this.tag:return this.model={showRowColHeaders:c.attributes.headings==="1",showGridLines:c.attributes.gridLines==="1",horizontalCentered:c.attributes.horizontalCentered==="1",verticalCentered:c.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(r,n,o){const i=r("./page-breaks-xform"),a=r("../list-xform");n.exports=class extends a{constructor(){super({tag:"rowBreaks",count:!0,childXform:new i})}render(s,c){if(c&&c.length){s.openNode(this.tag,this.$),this.count&&(s.addAttribute(this.$count,c.length),s.addAttribute("manualBreakCount",c.length));const{childXform:l}=this;c.forEach(u=>{l.render(s,u)}),s.closeNode()}else this.empty&&s.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(r,n,o){const i=r("../base-xform"),a=r("../../../utils/utils"),s=r("./cell-xform");n.exports=class extends i{constructor(c){super(),this.maxItems=c&&c.maxItems,this.map={c:new s}}get tag(){return"row"}prepare(c,l){const u=l.styles.addStyleModel(c.style);u&&(c.styleId=u);const f=this.map.c;c.cells.forEach(d=>{f.prepare(d,l)})}render(c,l,u){c.openNode("row"),c.addAttribute("r",l.number),l.height&&(c.addAttribute("ht",l.height),c.addAttribute("customHeight","1")),l.hidden&&c.addAttribute("hidden","1"),l.min>0&&l.max>0&&l.min<=l.max&&c.addAttribute("spans",`${l.min}:${l.max}`),l.styleId&&(c.addAttribute("s",l.styleId),c.addAttribute("customFormat","1")),c.addAttribute("x14ac:dyDescent","0.25"),l.outlineLevel&&c.addAttribute("outlineLevel",l.outlineLevel),l.collapsed&&c.addAttribute("collapsed","1");const f=this.map.c;l.cells.forEach(d=>{f.render(c,d,u)}),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;if(c.name==="row"){this.numRowsSeen+=1;const l=c.attributes.spans?c.attributes.spans.split(":").map(f=>parseInt(f,10)):[void 0,void 0],u=this.model={number:parseInt(c.attributes.r,10),min:l[0],max:l[1],cells:[]};return c.attributes.s&&(u.styleId=parseInt(c.attributes.s,10)),a.parseBoolean(c.attributes.hidden)&&(u.hidden=!0),a.parseBoolean(c.attributes.bestFit)&&(u.bestFit=!0),c.attributes.ht&&(u.height=parseFloat(c.attributes.ht)),c.attributes.outlineLevel&&(u.outlineLevel=parseInt(c.attributes.outlineLevel,10)),a.parseBoolean(c.attributes.collapsed)&&(u.collapsed=!0),!0}return this.parser=this.map[c.name],!!this.parser&&(this.parser.parseOpen(c),!0)}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser){if(!this.parser.parseClose(c)){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(c,l){c.style=c.styleId?l.styles.getStyleModel(c.styleId):{},c.styleId!==void 0&&(c.styleId=void 0);const u=this.map.c;c.cells.forEach(f=>{u.reconcile(f,l)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../base-xform");n.exports=class extends a{get tag(){return"sheetFormatPr"}render(s,c){if(c){const l={defaultRowHeight:c.defaultRowHeight,outlineLevelRow:c.outlineLevelRow,outlineLevelCol:c.outlineLevelCol,"x14ac:dyDescent":c.dyDescent};c.defaultColWidth&&(l.defaultColWidth=c.defaultColWidth),c.defaultRowHeight&&c.defaultRowHeight===15||(l.customHeight="1"),i.some(l,u=>u!==void 0)&&s.leafNode("sheetFormatPr",l)}}parseOpen(s){return s.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(s.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(s.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(s.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(s.attributes.outlineLevelCol||"0",10)},s.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(s.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(r,n,o){const i=r("../base-xform"),a=r("../style/color-xform"),s=r("./page-setup-properties-xform"),c=r("./outline-properties-xform");n.exports=class extends i{constructor(){super(),this.map={tabColor:new a("tabColor"),pageSetUpPr:new s,outlinePr:new c}}get tag(){return"sheetPr"}render(l,u){if(u){l.addRollback(),l.openNode("sheetPr");let f=!1;f=this.map.tabColor.render(l,u.tabColor)||f,f=this.map.pageSetUpPr.render(l,u.pageSetup)||f,f=this.map.outlinePr.render(l,u.outlineProperties)||f,f?(l.closeNode(),l.commit()):l.rollback()}}parseOpen(l){return this.parser?(this.parser.parseOpen(l),!0):l.name===this.tag?(this.reset(),!0):!!this.map[l.name]&&(this.parser=this.map[l.name],this.parser.parseOpen(l),!0)}parseText(l){return!!this.parser&&(this.parser.parseText(l),!0)}parseClose(l){return this.parser?(this.parser.parseClose(l)||(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(r,n,o){const i=r("../../../utils/under-dash"),a=r("../base-xform");function s(l,u){return l?u:void 0}function c(l,u){return l===u||void 0}n.exports=class extends a{get tag(){return"sheetProtection"}render(l,u){if(u){const f={sheet:s(u.sheet,"1"),selectLockedCells:u.selectLockedCells===!1?"1":void 0,selectUnlockedCells:u.selectUnlockedCells===!1?"1":void 0,formatCells:s(u.formatCells,"0"),formatColumns:s(u.formatColumns,"0"),formatRows:s(u.formatRows,"0"),insertColumns:s(u.insertColumns,"0"),insertRows:s(u.insertRows,"0"),insertHyperlinks:s(u.insertHyperlinks,"0"),deleteColumns:s(u.deleteColumns,"0"),deleteRows:s(u.deleteRows,"0"),sort:s(u.sort,"0"),autoFilter:s(u.autoFilter,"0"),pivotTables:s(u.pivotTables,"0")};u.sheet&&(f.algorithmName=u.algorithmName,f.hashValue=u.hashValue,f.saltValue=u.saltValue,f.spinCount=u.spinCount,f.objects=s(u.objects===!1,"1"),f.scenarios=s(u.scenarios===!1,"1")),i.some(f,d=>d!==void 0)&&l.leafNode(this.tag,f)}}parseOpen(l){switch(l.name){case this.tag:return this.model={sheet:c(l.attributes.sheet,"1"),objects:l.attributes.objects!=="1"&&void 0,scenarios:l.attributes.scenarios!=="1"&&void 0,selectLockedCells:l.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:l.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:c(l.attributes.formatCells,"0"),formatColumns:c(l.attributes.formatColumns,"0"),formatRows:c(l.attributes.formatRows,"0"),insertColumns:c(l.attributes.insertColumns,"0"),insertRows:c(l.attributes.insertRows,"0"),insertHyperlinks:c(l.attributes.insertHyperlinks,"0"),deleteColumns:c(l.attributes.deleteColumns,"0"),deleteRows:c(l.attributes.deleteRows,"0"),sort:c(l.attributes.sort,"0"),autoFilter:c(l.attributes.autoFilter,"0"),pivotTables:c(l.attributes.pivotTables,"0")},l.attributes.algorithmName&&(this.model.algorithmName=l.attributes.algorithmName,this.model.hashValue=l.attributes.hashValue,this.model.saltValue=l.attributes.saltValue,this.model.spinCount=parseInt(l.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(r,n,o){const i=r("../../../utils/col-cache"),a=r("../base-xform"),s={frozen:"frozen",frozenSplit:"frozen",split:"split"};n.exports=class extends a{get tag(){return"sheetView"}prepare(c){switch(c.state){case"frozen":case"split":break;default:c.state="normal"}}render(c,l){c.openNode("sheetView",{workbookViewId:l.workbookViewId||0});const u=function(g,m,v){v&&c.addAttribute(g,m)};let f,d,h,p;switch(u("rightToLeft","1",l.rightToLeft===!0),u("tabSelected","1",l.tabSelected),u("showRuler","0",l.showRuler===!1),u("showRowColHeaders","0",l.showRowColHeaders===!1),u("showGridLines","0",l.showGridLines===!1),u("zoomScale",l.zoomScale,l.zoomScale),u("zoomScaleNormal",l.zoomScaleNormal,l.zoomScaleNormal),u("view",l.style,l.style),l.state){case"frozen":d=l.xSplit||0,h=l.ySplit||0,f=l.topLeftCell||i.getAddress(h+1,d+1).address,p=(l.xSplit&&l.ySplit?"bottomRight":l.xSplit&&"topRight")||"bottomLeft",c.leafNode("pane",{xSplit:l.xSplit||void 0,ySplit:l.ySplit||void 0,topLeftCell:f,activePane:p,state:"frozen"}),c.leafNode("selection",{pane:p,activeCell:l.activeCell,sqref:l.activeCell});break;case"split":l.activePane==="topLeft"&&(l.activePane=void 0),c.leafNode("pane",{xSplit:l.xSplit||void 0,ySplit:l.ySplit||void 0,topLeftCell:l.topLeftCell,activePane:l.activePane}),c.leafNode("selection",{pane:l.activePane,activeCell:l.activeCell,sqref:l.activeCell});break;case"normal":l.activeCell&&c.leafNode("selection",{activeCell:l.activeCell,sqref:l.activeCell})}c.closeNode()}parseOpen(c){switch(c.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(c.attributes.workbookViewId,10),rightToLeft:c.attributes.rightToLeft==="1",tabSelected:c.attributes.tabSelected==="1",showRuler:c.attributes.showRuler!=="0",showRowColHeaders:c.attributes.showRowColHeaders!=="0",showGridLines:c.attributes.showGridLines!=="0",zoomScale:parseInt(c.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(c.attributes.zoomScaleNormal||"100",10),style:c.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(c.attributes.xSplit||"0",10),ySplit:parseInt(c.attributes.ySplit||"0",10),topLeftCell:c.attributes.topLeftCell,activePane:c.attributes.activePane||"topLeft",state:c.attributes.state},!0;case"selection":{const l=c.attributes.pane||"topLeft";return this.selections[l]={pane:l,activeCell:c.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(c){let l,u;switch(c){case"sheetView":return this.sheetView&&this.pane?(l=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:s[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"&&(l.activePane=this.pane.activePane),u=this.selections[this.pane.activePane],u&&u.activeCell&&(l.activeCell=u.activeCell),this.sheetView.style&&(l.style=this.sheetView.style)):(l=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},u=this.selections.topLeft,u&&u.activeCell&&(l.activeCell=u.activeCell),this.sheetView.style&&(l.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"tablePart"}render(a,s){s&&a.leafNode(this.tag,{"r:id":s.rId})}parseOpen(a){switch(a.name){case this.tag:return this.model={rId:a.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(r,n,o){const i=r("../../../utils/under-dash"),a=r("../../../utils/col-cache"),s=r("../../../utils/xml-stream"),c=r("../../rel-type"),l=r("./merges"),u=r("../base-xform"),f=r("../list-xform"),d=r("./row-xform"),h=r("./col-xform"),p=r("./dimension-xform"),g=r("./hyperlink-xform"),m=r("./merge-cell-xform"),v=r("./data-validations-xform"),y=r("./sheet-properties-xform"),b=r("./sheet-format-properties-xform"),w=r("./sheet-view-xform"),E=r("./sheet-protection-xform"),I=r("./page-margins-xform"),O=r("./page-setup-xform"),D=r("./print-options-xform"),N=r("./auto-filter-xform"),U=r("./picture-xform"),B=r("./drawing-xform"),F=r("./table-part-xform"),T=r("./row-breaks-xform"),P=r("./header-footer-xform"),_=r("./cf/conditional-formattings-xform"),C=r("./ext-lst-xform"),S=(k,L)=>{if(!L||!L.length)return k;if(!k||!k.length)return L;const j={},z={};return k.forEach(Y=>{j[Y.ref]=Y,Y.rules.forEach(K=>{const{x14Id:Q}=K;Q&&(z[Q]=K)})}),L.forEach(Y=>{Y.rules.forEach(K=>{const Q=z[K.x14Id];Q?((q,J)=>{Object.keys(J).forEach(G=>{const V=q[G],X=J[G];V===void 0&&X!==void 0&&(q[G]=X)})})(Q,K):j[Y.ref]?j[Y.ref].rules.push(K):k.push({ref:Y.ref,rules:[K]})})}),k};class x extends u{constructor(L){super();const{maxRows:j,maxCols:z,ignoreNodes:Y}=L||{};this.ignoreNodes=Y||[],this.map={sheetPr:new y,dimension:new p,sheetViews:new f({tag:"sheetViews",count:!1,childXform:new w}),sheetFormatPr:new b,cols:new f({tag:"cols",count:!1,childXform:new h}),sheetData:new f({tag:"sheetData",count:!1,empty:!0,childXform:new d({maxItems:z}),maxItems:j}),autoFilter:new N,mergeCells:new f({tag:"mergeCells",count:!0,childXform:new m}),rowBreaks:new T,hyperlinks:new f({tag:"hyperlinks",count:!1,childXform:new g}),pageMargins:new I,dataValidations:new v,pageSetup:new O,headerFooter:new P,printOptions:new D,picture:new U,drawing:new B,sheetProtection:new E,tableParts:new f({tag:"tableParts",count:!0,childXform:new F}),conditionalFormatting:new _,extLst:new C}}prepare(L,j){j.merges=new l,L.hyperlinks=j.hyperlinks=[],L.comments=j.comments=[],j.formulae={},j.siFormulae=0,this.map.cols.prepare(L.cols,j),this.map.sheetData.prepare(L.rows,j),this.map.conditionalFormatting.prepare(L.conditionalFormattings,j),L.mergeCells=j.merges.mergeCells;const z=L.rels=[];function Y(q){return"rId"+(q.length+1)}if(L.hyperlinks.forEach(q=>{const J=Y(z);q.rId=J,z.push({Id:J,Type:c.Hyperlink,Target:q.target,TargetMode:"External"})}),L.comments.length>0){const q={Id:Y(z),Type:c.Comments,Target:`../comments${L.id}.xml`};z.push(q);const J={Id:Y(z),Type:c.VmlDrawing,Target:`../drawings/vmlDrawing${L.id}.vml`};z.push(J),L.comments.forEach(G=>{G.refAddress=a.decodeAddress(G.ref)}),j.commentRefs.push({commentName:"comments"+L.id,vmlDrawing:"vmlDrawing"+L.id})}const K=[];let Q;L.media.forEach(q=>{if(q.type==="background"){const J=Y(z);Q=j.media[q.imageId],z.push({Id:J,Type:c.Image,Target:`../media/${Q.name}.${Q.extension}`}),L.background={rId:J},L.image=j.media[q.imageId]}else if(q.type==="image"){let{drawing:J}=L;Q=j.media[q.imageId],J||(J=L.drawing={rId:Y(z),name:"drawing"+ ++j.drawingsCount,anchors:[],rels:[]},j.drawings.push(J),z.push({Id:J.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${J.name}.xml`}));let G=this.preImageId===q.imageId?K[q.imageId]:K[J.rels.length];G||(G=Y(J.rels),K[J.rels.length]=G,J.rels.push({Id:G,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${Q.name}.${Q.extension}`}));const V={picture:{rId:G},range:q.range};if(q.hyperlinks&&q.hyperlinks.hyperlink){const X=Y(J.rels);K[J.rels.length]=X,V.picture.hyperlinks={tooltip:q.hyperlinks.tooltip,rId:X},J.rels.push({Id:X,Type:c.Hyperlink,Target:q.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=q.imageId,J.anchors.push(V)}}),L.tables.forEach(q=>{const J=Y(z);q.rId=J,z.push({Id:J,Type:c.Table,Target:"../tables/"+q.target}),q.columns.forEach(G=>{const{style:V}=G;V&&(G.dxfId=j.styles.addDxfStyle(V))})}),this.map.extLst.prepare(L,j)}render(L,j){L.openXml(s.StdDocAttributes),L.openNode("worksheet",x.WORKSHEET_ATTRIBUTES);const z=j.properties?{defaultRowHeight:j.properties.defaultRowHeight,dyDescent:j.properties.dyDescent,outlineLevelCol:j.properties.outlineLevelCol,outlineLevelRow:j.properties.outlineLevelRow}:void 0;j.properties&&j.properties.defaultColWidth&&(z.defaultColWidth=j.properties.defaultColWidth);const Y={outlineProperties:j.properties&&j.properties.outlineProperties,tabColor:j.properties&&j.properties.tabColor,pageSetup:j.pageSetup&&j.pageSetup.fitToPage?{fitToPage:j.pageSetup.fitToPage}:void 0},K=j.pageSetup&&j.pageSetup.margins,Q={showRowColHeaders:j.pageSetup&&j.pageSetup.showRowColHeaders,showGridLines:j.pageSetup&&j.pageSetup.showGridLines,horizontalCentered:j.pageSetup&&j.pageSetup.horizontalCentered,verticalCentered:j.pageSetup&&j.pageSetup.verticalCentered},q=j.sheetProtection;this.map.sheetPr.render(L,Y),this.map.dimension.render(L,j.dimensions),this.map.sheetViews.render(L,j.views),this.map.sheetFormatPr.render(L,z),this.map.cols.render(L,j.cols),this.map.sheetData.render(L,j.rows),this.map.sheetProtection.render(L,q),this.map.autoFilter.render(L,j.autoFilter),this.map.mergeCells.render(L,j.mergeCells),this.map.conditionalFormatting.render(L,j.conditionalFormattings),this.map.dataValidations.render(L,j.dataValidations),this.map.hyperlinks.render(L,j.hyperlinks),this.map.printOptions.render(L,Q),this.map.pageMargins.render(L,K),this.map.pageSetup.render(L,j.pageSetup),this.map.headerFooter.render(L,j.headerFooter),this.map.rowBreaks.render(L,j.rowBreaks),this.map.drawing.render(L,j.drawing),this.map.picture.render(L,j.background),this.map.tableParts.render(L,j.tables),this.map.extLst.render(L,j),j.rels&&j.rels.forEach(J=>{J.Type===c.VmlDrawing&&L.leafNode("legacyDrawing",{"r:id":J.Id})}),L.closeNode()}parseOpen(L){return this.parser?(this.parser.parseOpen(L),!0):L.name==="worksheet"?(i.each(this.map,j=>{j.reset()}),!0):(this.map[L.name]&&!this.ignoreNodes.includes(L.name)&&(this.parser=this.map[L.name],this.parser.parseOpen(L)),!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"worksheet":{const j=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(j.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(j.outlineProperties=this.map.sheetPr.model.outlineProperties);const z={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(z,this.map.pageSetup.model,this.map.printOptions.model),K=S(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:j,views:this.map.sheetViews.model,pageSetup: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(L,j){const z=(L.relationships||[]).reduce((K,Q)=>{if(K[Q.Id]=Q,Q.Type===c.Comments&&(L.comments=j.comments[Q.Target].comments),Q.Type===c.VmlDrawing&&L.comments&&L.comments.length){const q=j.vmlDrawings[Q.Target].comments;L.comments.forEach((J,G)=>{J.note=Object.assign({},J.note,q[G])})}return K},{});if(j.commentsMap=(L.comments||[]).reduce((K,Q)=>(Q.ref&&(K[Q.ref]=Q),K),{}),j.hyperlinkMap=(L.hyperlinks||[]).reduce((K,Q)=>(Q.rId&&(K[Q.address]=z[Q.rId].Target),K),{}),j.formulae={},L.rows=L.rows&&L.rows.filter(Boolean)||[],L.rows.forEach(K=>{K.cells=K.cells&&K.cells.filter(Boolean)||[]}),this.map.cols.reconcile(L.cols,j),this.map.sheetData.reconcile(L.rows,j),this.map.conditionalFormatting.reconcile(L.conditionalFormattings,j),L.media=[],L.drawing){const K=z[L.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(K){const Q=K[1];j.drawings[Q].anchors.forEach(q=>{if(q.medium){const J={type:"image",imageId:q.medium.index,range:q.range,hyperlinks:q.picture.hyperlinks};L.media.push(J)}})}}const Y=L.background&&z[L.background.rId];if(Y){const K=Y.Target.split("/media/")[1],Q=j.mediaIndex&&j.mediaIndex[K];Q!==void 0&&L.media.push({type:"background",imageId:Q})}L.tables=(L.tables||[]).map(K=>{const Q=z[K.rId];return j.tables[Q.Target]}),delete L.relationships,delete L.hyperlinks,delete L.comments}}x.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=x},{"../../../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(r,n,o){const i=r("../base-xform");n.exports=class extends i{constructor(a){super(),this.tag=a.tag,this.attr=a.attr}render(a,s){s&&(a.openNode(this.tag),a.closeNode())}parseOpen(a){a.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{constructor(a){super(),this.tag=a.tag,this.attr=a.attr,this.attrs=a.attrs,this._format=a.format||function(s){try{return Number.isNaN(s.getTime())?"":s.toISOString()}catch{return""}},this._parse=a.parse||function(s){return new Date(s)}}render(a,s){s&&(a.openNode(this.tag),this.attrs&&a.addAttributes(this.attrs),this.attr?a.addAttribute(this.attr,this._format(s)):a.writeText(this._format(s)),a.closeNode())}parseOpen(a){a.name===this.tag&&(this.attr?this.model=this._parse(a.attributes[this.attr]):this.text=[])}parseText(a){this.attr||this.text.push(a)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{constructor(a){super(),this.tag=a.tag,this.attr=a.attr,this.attrs=a.attrs,this.zero=a.zero}render(a,s){(s||this.zero)&&(a.openNode(this.tag),this.attrs&&a.addAttributes(this.attrs),this.attr?a.addAttribute(this.attr,s):a.writeText(s),a.closeNode())}parseOpen(a){return a.name===this.tag&&(this.attr?this.model=parseInt(a.attributes[this.attr],10):this.text=[],!0)}parseText(a){this.attr||this.text.push(a)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{constructor(a){super(),this.tag=a.tag,this.attr=a.attr,this.attrs=a.attrs}render(a,s){s!==void 0&&(a.openNode(this.tag),this.attrs&&a.addAttributes(this.attrs),this.attr?a.addAttribute(this.attr,s):a.writeText(s),a.closeNode())}parseOpen(a){a.name===this.tag&&(this.attr?this.model=a.attributes[this.attr]:this.text=[])}parseText(a){this.attr||this.text.push(a)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(r,n,o){const i=r("./base-xform"),a=r("../../utils/xml-stream");n.exports=class extends i{constructor(s){super(),this._model=s}render(s){if(!this._xml){const c=new a;(function l(u,f){u.openNode(f.tag,f.$),f.c&&f.c.forEach(d=>{l(u,d)}),f.t&&u.writeText(f.t),u.closeNode()})(c,this._model),this._xml=c.xml}s.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(s){switch(s){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(r,n,o){const i=r("./text-xform"),a=r("./rich-text-xform"),s=r("../base-xform");n.exports=class extends s{constructor(){super(),this.map={r:new a,t:new i}}get tag(){return"rPh"}render(c,l){if(c.openNode(this.tag,{sb:l.sb||0,eb:l.eb||0}),l&&l.hasOwnProperty("richText")&&l.richText){const{r:u}=this.map;l.richText.forEach(f=>{u.render(c,f)})}else l&&this.map.t.render(c,l.text);c.closeNode()}parseOpen(c){const{name:l}=c;return this.parser?(this.parser.parseOpen(c),!0):l===this.tag?(this.model={sb:parseInt(c.attributes.sb,10),eb:parseInt(c.attributes.eb,10)},!0):(this.parser=this.map[l],!!this.parser&&(this.parser.parseOpen(c),!0))}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser){if(!this.parser.parseClose(c)){switch(c){case"r":{let l=this.model.richText;l||(l=this.model.richText=[]),l.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(c){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(r,n,o){const i=r("./text-xform"),a=r("../style/font-xform"),s=r("../base-xform");class c extends s{constructor(u){super(),this.model=u}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new i)}get fontXform(){return this._fontXform||(this._fontXform=new a(c.FONT_OPTIONS))}render(u,f){f=f||this.model,u.openNode("r"),f.font&&this.fontXform.render(u,f.font),this.textXform.render(u,f.text),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(u),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){switch(u){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(u),!0}}}c.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},n.exports=c},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(r,n,o){const i=r("./text-xform"),a=r("./rich-text-xform"),s=r("./phonetic-text-xform"),c=r("../base-xform");n.exports=class extends c{constructor(l){super(),this.model=l,this.map={r:new a,t:new i,rPh:new s}}get tag(){return"si"}render(l,u){l.openNode(this.tag),u&&u.hasOwnProperty("richText")&&u.richText?u.richText.length?u.richText.forEach(f=>{this.map.r.render(l,f)}):this.map.t.render(l,""):u!=null&&this.map.t.render(l,u),l.closeNode()}parseOpen(l){const{name:u}=l;return this.parser?(this.parser.parseOpen(l),!0):u===this.tag?(this.model={},!0):(this.parser=this.map[u],!!this.parser&&(this.parser.parseOpen(l),!0))}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser){if(!this.parser.parseClose(l)){switch(l){case"r":{let u=this.model.richText;u||(u=this.model.richText=[]),u.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(l){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform"),s=r("./shared-string-xform");n.exports=class extends a{constructor(c){super(),this.model=c||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new s)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(c){return this.model.values[c]}add(c){return c.richText?this.addRichText(c):this.addText(c)}addText(c){let l=this.hash[c];return l===void 0&&(l=this.hash[c]=this.model.values.length,this.model.values.push(c)),this.model.count++,l}addRichText(c){const l=this.sharedStringXform.toXml(c);let u=this.rich[l];return u===void 0&&(u=this.rich[l]=this.model.values.length,this.model.values.push(c)),this.model.count++,u}render(c,l){l=l||this._values,c.openXml(i.StdDocAttributes),c.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:l.count,uniqueCount:l.values.length});const u=this.sharedStringXform;l.values.forEach(f=>{u.render(c,f)}),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(c),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(c))}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser)return this.parser.parseClose(c)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(c){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+c)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"t"}render(a,s){a.openNode("t"),/^\s|\n|\s$/.test(s)&&a.addAttribute("xml:space","preserve"),a.writeText(s),a.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(a,s)=>String.fromCharCode(parseInt(s,16)))}parseOpen(a){switch(a.name){case"t":return this._text=[],!0;default:return!1}}parseText(a){this._text.push(a)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(r,n,o){const i=r("../../../doc/enums"),a=r("../../../utils/utils"),s=r("../base-xform"),c={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((u,f)=>(u[f]=!0,u),{}),horizontal(u){return this.horizontalValues[u]?u:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((u,f)=>(u[f]=!0,u),{}),vertical(u){return u==="middle"?"center":this.verticalValues[u]?u:void 0},wrapText:u=>!!u||void 0,shrinkToFit:u=>!!u||void 0,textRotation(u){switch(u){case"vertical":return u;default:return(u=a.validInt(u))>=-90&&u<=90?u:void 0}},indent:u=>(u=a.validInt(u),Math.max(0,u)),readingOrder(u){switch(u){case"ltr":return i.ReadingOrder.LeftToRight;case"rtl":return i.ReadingOrder.RightToLeft;default:return}}},l={toXml(u){if(u=c.textRotation(u)){if(u==="vertical")return 255;const f=Math.round(u);if(f>=0&&f<=90)return f;if(f<0&&f>=-90)return 90-f}},toModel(u){const f=a.validInt(u);if(f!==void 0){if(f===255)return"vertical";if(f>=0&&f<=90)return f;if(f>90&&f<=180)return 90-f}}};n.exports=class extends s{get tag(){return"alignment"}render(u,f){u.addRollback(),u.openNode("alignment");let d=!1;function h(p,g){g&&(u.addAttribute(p,g),d=!0)}h("horizontal",c.horizontal(f.horizontal)),h("vertical",c.vertical(f.vertical)),h("wrapText",!!c.wrapText(f.wrapText)&&"1"),h("shrinkToFit",!!c.shrinkToFit(f.shrinkToFit)&&"1"),h("indent",c.indent(f.indent)),h("textRotation",l.toXml(f.textRotation)),h("readingOrder",c.readingOrder(f.readingOrder)),u.closeNode(),d?u.commit():u.rollback()}parseOpen(u){const f={};let d=!1;function h(p,g,m){p&&(f[g]=m,d=!0)}h(u.attributes.horizontal,"horizontal",u.attributes.horizontal),h(u.attributes.vertical,"vertical",u.attributes.vertical==="center"?"middle":u.attributes.vertical),h(u.attributes.wrapText,"wrapText",a.parseBoolean(u.attributes.wrapText)),h(u.attributes.shrinkToFit,"shrinkToFit",a.parseBoolean(u.attributes.shrinkToFit)),h(u.attributes.indent,"indent",parseInt(u.attributes.indent,10)),h(u.attributes.textRotation,"textRotation",l.toModel(u.attributes.textRotation)),h(u.attributes.readingOrder,"readingOrder",u.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=d?f:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(r,n,o){const i=r("../base-xform"),a=r("../../../utils/utils"),s=r("./color-xform");class c extends i{constructor(u){super(),this.name=u,this.map={color:new s}}get tag(){return this.name}render(u,f,d){const h=f&&f.color||d||this.defaultColor;u.openNode(this.name),f&&f.style&&(u.addAttribute("style",f.style),h&&this.map.color.render(u,h)),u.closeNode()}parseOpen(u){if(this.parser)return this.parser.parseOpen(u),!0;switch(u.name){case this.name:{const{style:f}=u.attributes;return this.model=f?{style:f}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(u),!0;default:return!1}}parseText(u){this.parser&&this.parser.parseText(u)}parseClose(u){return this.parser?(this.parser.parseClose(u)||(this.parser=void 0),!0):(u===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(u){return c.validStyleValues[u]}}c.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((l,u)=>(l[u]=!0,l),{}),n.exports=class extends i{constructor(){super(),this.map={top:new c("top"),left:new c("left"),bottom:new c("bottom"),right:new c("right"),diagonal:new c("diagonal")}}render(l,u){const{color:f}=u;function d(h,p){h&&!h.color&&u.color&&(h={...h,color:u.color}),p.render(l,h,f)}l.openNode("border"),u.diagonal&&u.diagonal.style&&(u.diagonal.up&&l.addAttribute("diagonalUp","1"),u.diagonal.down&&l.addAttribute("diagonalDown","1")),d(u.left,this.map.left),d(u.right,this.map.right),d(u.top,this.map.top),d(u.bottom,this.map.bottom),d(u.diagonal,this.map.diagonal),l.closeNode()}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"border":return this.reset(),this.diagonalUp=a.parseBoolean(l.attributes.diagonalUp),this.diagonalDown=a.parseBoolean(l.attributes.diagonalDown),!0;default:return this.parser=this.map[l.name],!!this.parser&&(this.parser.parseOpen(l),!0)}}parseText(l){this.parser&&this.parser.parseText(l)}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;if(l==="border"){const u=this.model={},f=function(d,h,p){h&&(p&&Object.assign(h,p),u[d]=h)};f("left",this.map.left.model),f("right",this.map.right.model),f("top",this.map.top.model),f("bottom",this.map.bottom.model),f("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{constructor(a){super(),this.name=a||"color"}get tag(){return this.name}render(a,s){return!!s&&(a.openNode(this.name),s.argb?a.addAttribute("rgb",s.argb):s.theme!==void 0?(a.addAttribute("theme",s.theme),s.tint!==void 0&&a.addAttribute("tint",s.tint)):s.indexed!==void 0?a.addAttribute("indexed",s.indexed):a.addAttribute("auto","1"),a.closeNode(),!0)}parseOpen(a){return a.name===this.name&&(a.attributes.rgb?this.model={argb:a.attributes.rgb}:a.attributes.theme?(this.model={theme:parseInt(a.attributes.theme,10)},a.attributes.tint&&(this.model.tint=parseFloat(a.attributes.tint))):a.attributes.indexed?this.model={indexed:parseInt(a.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(r,n,o){const i=r("../base-xform"),a=r("./alignment-xform"),s=r("./border-xform"),c=r("./fill-xform"),l=r("./font-xform"),u=r("./numfmt-xform"),f=r("./protection-xform");n.exports=class extends i{constructor(){super(),this.map={alignment:new a,border:new s,fill:new c,font:new l,numFmt:new u,protection:new f}}get tag(){return"dxf"}render(d,h){if(d.openNode(this.tag),h.font&&this.map.font.render(d,h.font),h.numFmt&&h.numFmtId){const p={id:h.numFmtId,formatCode:h.numFmt};this.map.numFmt.render(d,p)}h.fill&&this.map.fill.render(d,h.fill),h.alignment&&this.map.alignment.render(d,h.alignment),h.border&&this.map.border.render(d,h.border),h.protection&&this.map.protection.render(d,h.protection),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d),!0}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return this.parser?(this.parser.parseClose(d)||(this.parser=void 0),!0):d!==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(r,n,o){const i=r("../base-xform"),a=r("./color-xform");class s extends i{constructor(){super(),this.map={color:new a}}get tag(){return"stop"}render(d,h){d.openNode("stop"),d.addAttribute("position",h.position),this.map.color.render(d,h.color),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"stop":return this.model={position:parseFloat(d.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(d),!0;default:return!1}}parseText(){}parseClose(d){return!!this.parser&&(this.parser.parseClose(d)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class c extends i{constructor(){super(),this.map={fgColor:new a("fgColor"),bgColor:new a("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(d,h){d.openNode("patternFill"),d.addAttribute("patternType",h.pattern),h.fgColor&&this.map.fgColor.render(d,h.fgColor),h.bgColor&&this.map.bgColor.render(d,h.bgColor),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"patternFill":return this.model={type:"pattern",pattern:d.attributes.patternType},!0;default:return this.parser=this.map[d.name],!!this.parser&&(this.parser.parseOpen(d),!0)}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return!!this.parser&&(this.parser.parseClose(d)||(this.parser.model&&(this.model[d]=this.parser.model),this.parser=void 0),!0)}}class l extends i{constructor(){super(),this.map={stop:new s}}get name(){return"gradient"}get tag(){return"gradientFill"}render(d,h){switch(d.openNode("gradientFill"),h.gradient){case"angle":d.addAttribute("degree",h.degree);break;case"path":d.addAttribute("type","path"),h.center.left&&(d.addAttribute("left",h.center.left),h.center.right===void 0&&d.addAttribute("right",h.center.left)),h.center.right&&d.addAttribute("right",h.center.right),h.center.top&&(d.addAttribute("top",h.center.top),h.center.bottom===void 0&&d.addAttribute("bottom",h.center.top)),h.center.bottom&&d.addAttribute("bottom",h.center.bottom)}const p=this.map.stop;h.stops.forEach(g=>{p.render(d,g)}),d.closeNode()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"gradientFill":{const h=this.model={stops:[]};return d.attributes.degree?(h.gradient="angle",h.degree=parseInt(d.attributes.degree,10)):d.attributes.type==="path"&&(h.gradient="path",h.center={left:d.attributes.left?parseFloat(d.attributes.left):0,top:d.attributes.top?parseFloat(d.attributes.top):0},d.attributes.right!==d.attributes.left&&(h.center.right=d.attributes.right?parseFloat(d.attributes.right):0),d.attributes.bottom!==d.attributes.top&&(h.center.bottom=d.attributes.bottom?parseFloat(d.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(d),!0;default:return!1}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return!!this.parser&&(this.parser.parseClose(d)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class u extends i{constructor(){super(),this.map={patternFill:new c,gradientFill:new l}}get tag(){return"fill"}render(d,h){switch(d.addRollback(),d.openNode("fill"),h.type){case"pattern":this.map.patternFill.render(d,h);break;case"gradient":this.map.gradientFill.render(d,h);break;default:return void d.rollback()}d.closeNode(),d.commit()}parseOpen(d){if(this.parser)return this.parser.parseOpen(d),!0;switch(d.name){case"fill":return this.model={},!0;default:return this.parser=this.map[d.name],!!this.parser&&(this.parser.parseOpen(d),!0)}}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return!!this.parser&&(this.parser.parseClose(d)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(d){return u.validPatternValues[d]}}u.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((f,d)=>(f[d]=!0,f),{}),u.StopXform=s,u.PatternFillXform=c,u.GradientFillXform=l,n.exports=u},{"../base-xform":32,"./color-xform":128}],131:[function(r,n,o){const i=r("./color-xform"),a=r("../simple/boolean-xform"),s=r("../simple/integer-xform"),c=r("../simple/string-xform"),l=r("./underline-xform"),u=r("../../../utils/under-dash"),f=r("../base-xform");class d extends f{constructor(p){super(),this.options=p||d.OPTIONS,this.map={b:{prop:"bold",xform:new a({tag:"b",attr:"val"})},i:{prop:"italic",xform:new a({tag:"i",attr:"val"})},u:{prop:"underline",xform:new l},charset:{prop:"charset",xform:new s({tag:"charset",attr:"val"})},color:{prop:"color",xform:new i},condense:{prop:"condense",xform:new a({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new a({tag:"extend",attr:"val"})},family:{prop:"family",xform:new s({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new a({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new c({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new c({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new a({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new a({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new s({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new c({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(p,g){const{map:m}=this;p.openNode(this.options.tagName),u.each(this.map,(v,y)=>{m[y].xform.render(p,g[v.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 g=this.map[p];return this.parser.model&&(this.model[g.prop]=this.parser.model),this.parser=void 0,!0}switch(p){case this.options.tagName:return!1;default:return!0}}}d.OPTIONS={tagName:"font",fontNameTag:"name"},n.exports=d},{"../../../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(r,n,o){const i=r("../../../utils/under-dash"),a=r("../../defaultnumformats"),s=r("../base-xform"),c=function(){const u={};return i.each(a,(f,d)=>{f.f&&(u[f.f]=parseInt(d,10))}),u}();class l extends s{constructor(f,d){super(),this.id=f,this.formatCode=d}get tag(){return"numFmt"}render(f,d){f.leafNode("numFmt",{numFmtId:d.id,formatCode:d.formatCode})}parseOpen(f){switch(f.name){case"numFmt":return this.model={id:parseInt(f.attributes.numFmtId,10),formatCode:f.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}l.getDefaultFmtId=function(u){return c[u]},l.getDefaultFmtCode=function(u){return a[u]&&a[u].f},n.exports=l},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(r,n,o){const i=r("../base-xform"),a={boolean:(s,c)=>s===void 0?c:s};n.exports=class extends i{get tag(){return"protection"}render(s,c){s.addRollback(),s.openNode("protection");let l=!1;function u(f,d){d!==void 0&&(s.addAttribute(f,d),l=!0)}u("locked",a.boolean(c.locked,!0)?void 0:"0"),u("hidden",a.boolean(c.hidden,!1)?"1":void 0),s.closeNode(),l?s.commit():s.rollback()}parseOpen(s){const c={locked:s.attributes.locked!=="0",hidden:s.attributes.hidden==="1"},l=!c.locked||c.hidden;this.model=l?c:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(r,n,o){const i=r("../base-xform"),a=r("./alignment-xform"),s=r("./protection-xform");n.exports=class extends i{constructor(c){super(),this.xfId=!(!c||!c.xfId),this.map={alignment:new a,protection:new s}}get tag(){return"xf"}render(c,l){c.openNode("xf",{numFmtId:l.numFmtId||0,fontId:l.fontId||0,fillId:l.fillId||0,borderId:l.borderId||0}),this.xfId&&c.addAttribute("xfId",l.xfId||0),l.numFmtId&&c.addAttribute("applyNumberFormat","1"),l.fontId&&c.addAttribute("applyFont","1"),l.fillId&&c.addAttribute("applyFill","1"),l.borderId&&c.addAttribute("applyBorder","1"),l.alignment&&c.addAttribute("applyAlignment","1"),l.protection&&c.addAttribute("applyProtection","1"),l.alignment&&this.map.alignment.render(c,l.alignment),l.protection&&this.map.protection.render(c,l.protection),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;switch(c.name){case"xf":return this.model={numFmtId:parseInt(c.attributes.numFmtId,10),fontId:parseInt(c.attributes.fontId,10),fillId:parseInt(c.attributes.fillId,10),borderId:parseInt(c.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(c.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(c),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(c),!0;default:return!1}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){return this.parser?(this.parser.parseClose(c)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):c!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(r,n,o){const i=r("../../../doc/enums"),a=r("../../../utils/xml-stream"),s=r("../base-xform"),c=r("../static-xform"),l=r("../list-xform"),u=r("./font-xform"),f=r("./fill-xform"),d=r("./border-xform"),h=r("./numfmt-xform"),p=r("./style-xform"),g=r("./dxf-xform");class m extends s{constructor(y){super(),this.map={numFmts:new l({tag:"numFmts",count:!0,childXform:new h}),fonts:new l({tag:"fonts",count:!0,childXform:new u,$:{"x14ac:knownFonts":1}}),fills:new l({tag:"fills",count:!0,childXform:new f}),borders:new l({tag:"borders",count:!0,childXform:new d}),cellStyleXfs:new l({tag:"cellStyleXfs",count:!0,childXform:new p}),cellXfs:new l({tag:"cellXfs",count:!0,childXform:new p({xfId:!0})}),dxfs:new l({tag:"dxfs",always:!0,count:!0,childXform:new g}),numFmt:new h,font:new u,fill:new f,border:new d,style:new p({xfId:!0}),cellStyles:m.STATIC_XFORMS.cellStyles,tableStyles:m.STATIC_XFORMS.tableStyles,extLst:m.STATIC_XFORMS.extLst},y&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(y,b){b=b||this.model,y.openXml(a.StdDocAttributes),y.openNode("styleSheet",m.STYLESHEET_ATTRIBUTES),this.index?(b.numFmts&&b.numFmts.length&&(y.openNode("numFmts",{count:b.numFmts.length}),b.numFmts.forEach(w=>{y.writeXml(w)}),y.closeNode()),b.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),y.openNode("fonts",{count:b.fonts.length,"x14ac:knownFonts":1}),b.fonts.forEach(w=>{y.writeXml(w)}),y.closeNode(),y.openNode("fills",{count:b.fills.length}),b.fills.forEach(w=>{y.writeXml(w)}),y.closeNode(),y.openNode("borders",{count:b.borders.length}),b.borders.forEach(w=>{y.writeXml(w)}),y.closeNode(),this.map.cellStyleXfs.render(y,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),y.openNode("cellXfs",{count:b.styles.length}),b.styles.forEach(w=>{y.writeXml(w)}),y.closeNode()):(this.map.numFmts.render(y,b.numFmts),this.map.fonts.render(y,b.fonts),this.map.fills.render(y,b.fills),this.map.borders.render(y,b.borders),this.map.cellStyleXfs.render(y,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(y,b.styles)),m.STATIC_XFORMS.cellStyles.render(y),this.map.dxfs.render(y,b.dxfs),m.STATIC_XFORMS.tableStyles.render(y),m.STATIC_XFORMS.extLst.render(y),y.closeNode()}parseOpen(y){if(this.parser)return this.parser.parseOpen(y),!0;switch(y.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[y.name],this.parser&&this.parser.parseOpen(y),!0}}parseText(y){this.parser&&this.parser.parseText(y)}parseClose(y){if(this.parser)return this.parser.parseClose(y)||(this.parser=void 0),!0;switch(y){case"styleSheet":{this.model={};const b=(w,E)=>{E.model&&E.model.length&&(this.model[w]=E.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 w=this.index.numFmt;this.model.numFmts.forEach(E=>{w[E.id]=E.formatCode})}return!1}default:return!0}}addStyleModel(y,b){if(!y)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(y))return this.weakMap.get(y);const w={};if(b=b||i.ValueType.Number,y.numFmt)w.numFmtId=this._addNumFmtStr(y.numFmt);else switch(b){case i.ValueType.Number:w.numFmtId=this._addNumFmtStr("General");break;case i.ValueType.Date:w.numFmtId=this._addNumFmtStr("mm-dd-yy")}y.font&&(w.fontId=this._addFont(y.font)),y.border&&(w.borderId=this._addBorder(y.border)),y.fill&&(w.fillId=this._addFill(y.fill)),y.alignment&&(w.alignment=y.alignment),y.protection&&(w.protection=y.protection);const E=this._addStyle(w);return this.weakMap&&this.weakMap.set(y,E),E}getStyleModel(y){const b=this.model.styles[y];if(!b)return null;let w=this.index.model[y];if(w)return w;if(w=this.index.model[y]={},b.numFmtId){const I=this.index.numFmt[b.numFmtId]||h.getDefaultFmtCode(b.numFmtId);I&&(w.numFmt=I)}function E(I,O,D){if(D||D===0){const N=O[D];N&&(w[I]=N)}}return E("font",this.model.fonts,b.fontId),E("border",this.model.borders,b.borderId),E("fill",this.model.fills,b.fillId),b.alignment&&(w.alignment=b.alignment),b.protection&&(w.protection=b.protection),w}addDxfStyle(y){return y.numFmt&&(y.numFmtId=this._addNumFmtStr(y.numFmt)),this.model.dxfs.push(y),this.model.dxfs.length-1}getDxfStyle(y){return this.model.dxfs[y]}_addStyle(y){const b=this.map.style.toXml(y);let w=this.index.style[b];return w===void 0&&(w=this.index.style[b]=this.model.styles.length,this.model.styles.push(b)),w}_addNumFmtStr(y){let b=h.getDefaultFmtId(y);if(b!==void 0||(b=this.index.numFmt[y],b!==void 0))return b;b=this.index.numFmt[y]=164+this.model.numFmts.length;const w=this.map.numFmt.toXml({id:b,formatCode:y});return this.model.numFmts.push(w),b}_addFont(y){const b=this.map.font.toXml(y);let w=this.index.font[b];return w===void 0&&(w=this.index.font[b]=this.model.fonts.length,this.model.fonts.push(b)),w}_addBorder(y){const b=this.map.border.toXml(y);let w=this.index.border[b];return w===void 0&&(w=this.index.border[b]=this.model.borders.length,this.model.borders.push(b)),w}_addFill(y){const b=this.map.fill.toXml(y);let w=this.index.fill[b];return w===void 0&&(w=this.index.fill[b]=this.model.fills.length,this.model.fills.push(b)),w}}m.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"},m.STATIC_XFORMS={cellStyles:new c({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new c({tag:"dxfs",$:{count:0}}),tableStyles:new c({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new c({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"}}]}]})},m.Mock=class extends m{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(v){return v.autodrain(),Promise.resolve()}addStyleModel(v,y){switch(y){case i.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const v={numFmtId:h.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(v)}return this._dateStyleId}getStyleModel(){return{}}},n.exports=m},{"../../../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(r,n,o){const i=r("../base-xform");class a extends i{constructor(c){super(),this.model=c}get tag(){return"u"}render(c,l){if((l=l||this.model)===!0)c.leafNode("u");else{const u=a.Attributes[l];u&&c.leafNode("u",u)}}parseOpen(c){c.name==="u"&&(this.model=c.attributes.val||!0)}parseText(){}parseClose(){return!1}}a.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},n.exports=a},{"../base-xform":32}],137:[function(r,n,o){const i=r("../base-xform"),a=r("./filter-column-xform");n.exports=class extends i{constructor(){super(),this.map={filterColumn:new a}}get tag(){return"autoFilter"}prepare(s){s.columns.forEach((c,l)=>{this.map.filterColumn.prepare(c,{index:l})})}render(s,c){return s.openNode(this.tag,{ref:c.autoFilterRef}),c.columns.forEach(l=>{this.map.filterColumn.render(s,l)}),s.closeNode(),!0}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;switch(s.name){case this.tag:return this.model={autoFilterRef:s.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[s.name],this.parser)return this.parseOpen(s),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(s))}}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){if(this.parser)return this.parser.parseClose(s)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(s){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+s)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"customFilter"}render(a,s){a.leafNode(this.tag,{val:s.val,operator:s.operator})}parseOpen(a){return a.name===this.tag&&(this.model={val:a.attributes.val,operator:a.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(r,n,o){const i=r("../base-xform"),a=r("../list-xform"),s=r("./custom-filter-xform"),c=r("./filter-xform");n.exports=class extends i{constructor(){super(),this.map={customFilters:new a({tag:"customFilters",count:!1,empty:!0,childXform:new s}),filters:new a({tag:"filters",count:!1,empty:!0,childXform:new c})}}get tag(){return"filterColumn"}prepare(l,u){l.colId=u.index.toString()}render(l,u){return u.customFilters?(l.openNode(this.tag,{colId:u.colId,hiddenButton:u.filterButton?"0":"1"}),this.map.customFilters.render(l,u.customFilters),l.closeNode(),!0):(l.leafNode(this.tag,{colId:u.colId,hiddenButton:u.filterButton?"0":"1"}),!0)}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;const{attributes:u}=l;switch(l.name){case this.tag:return this.model={filterButton:u.hiddenButton==="0"},!0;default:if(this.parser=this.map[l.name],this.parser)return this.parseOpen(l),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(l))}}parseText(){}parseClose(l){if(this.parser)return this.parser.parseClose(l)||(this.parser=void 0),!0;switch(l){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(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"filter"}render(a,s){a.leafNode(this.tag,{val:s.val})}parseOpen(a){return a.name===this.tag&&(this.model={val:a.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"tableColumn"}prepare(a,s){a.id=s.index+1}render(a,s){return a.leafNode(this.tag,{id:s.id.toString(),name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId}),!0}parseOpen(a){if(a.name===this.tag){const{attributes:s}=a;return this.model={name:s.name,totalsRowLabel:s.totalsRowLabel,totalsRowFunction:s.totalsRowFunction,dxfId:s.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(r,n,o){const i=r("../base-xform");n.exports=class extends i{get tag(){return"tableStyleInfo"}render(a,s){return a.leafNode(this.tag,{name:s.theme?s.theme:void 0,showFirstColumn:s.showFirstColumn?"1":"0",showLastColumn:s.showLastColumn?"1":"0",showRowStripes:s.showRowStripes?"1":"0",showColumnStripes:s.showColumnStripes?"1":"0"}),!0}parseOpen(a){if(a.name===this.tag){const{attributes:s}=a;return this.model={theme:s.name?s.name:null,showFirstColumn:s.showFirstColumn==="1",showLastColumn:s.showLastColumn==="1",showRowStripes:s.showRowStripes==="1",showColumnStripes:s.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(r,n,o){const i=r("../../../utils/xml-stream"),a=r("../base-xform"),s=r("../list-xform"),c=r("./auto-filter-xform"),l=r("./table-column-xform"),u=r("./table-style-info-xform");class f extends a{constructor(){super(),this.map={autoFilter:new c,tableColumns:new s({tag:"tableColumns",count:!0,empty:!0,childXform:new l}),tableStyleInfo:new u}}prepare(h,p){this.map.autoFilter.prepare(h),this.map.tableColumns.prepare(h.columns,p)}get tag(){return"table"}render(h,p){h.openXml(i.StdDocAttributes),h.openNode(this.tag,{...f.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(h,p),this.map.tableColumns.render(h,p.columns),this.map.tableStyleInfo.render(h,p.style),h.closeNode()}parseOpen(h){if(this.parser)return this.parser.parseOpen(h),!0;const{name:p,attributes:g}=h;switch(p){case this.tag:this.reset(),this.model={name:g.name,displayName:g.displayName||g.name,tableRef:g.ref,totalsRow:g.totalsRowCount==="1",headerRow:g.headerRowCount==="1"};break;default:this.parser=this.map[h.name],this.parser&&this.parser.parseOpen(h)}return!0}parseText(h){this.parser&&this.parser.parseText(h)}parseClose(h){if(this.parser)return this.parser.parseClose(h)||(this.parser=void 0),!0;switch(h){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((p,g)=>{this.model.columns[g].filterButton=p.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(h,p){h.columns.forEach(g=>{g.dxfId!==void 0&&(g.style=p.styles.getDxfStyle(g.dxfId))})}}f.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=f},{"../../../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(r,n,o){(function(i,a){(function(){const s=r("fs"),c=r("jszip"),{PassThrough:l}=r("readable-stream"),u=r("../utils/zip-stream"),f=r("../utils/stream-buf"),d=r("../utils/utils"),h=r("../utils/xml-stream"),{bufferToString:p}=r("../utils/browser-buffer-decode"),g=r("./xform/style/styles-xform"),m=r("./xform/core/core-xform"),v=r("./xform/strings/shared-strings-xform"),y=r("./xform/core/relationships-xform"),b=r("./xform/core/content-types-xform"),w=r("./xform/core/app-xform"),E=r("./xform/book/workbook-xform"),I=r("./xform/sheet/worksheet-xform"),O=r("./xform/drawing/drawing-xform"),D=r("./xform/table/table-xform"),N=r("./xform/comment/comments-xform"),U=r("./xform/comment/vml-notes-xform"),B=r("./xml/theme1");class F{constructor(P){this.workbook=P}async readFile(P,_){if(!await d.fs.exists(P))throw new Error("File not found: "+P);const C=s.createReadStream(P);try{const S=await this.read(C,_);return C.close(),S}catch(S){throw C.close(),S}}parseRels(P){return new y().parseStream(P)}parseWorkbook(P){return new E().parseStream(P)}parseSharedStrings(P){return new v().parseStream(P)}reconcile(P,_){const C=new E,S=new I(_),x=new O,k=new D;C.reconcile(P);const L={media:P.media,mediaIndex:P.mediaIndex};Object.keys(P.drawings).forEach(Y=>{const K=P.drawings[Y],Q=P.drawingRels[Y];Q&&(L.rels=Q.reduce((q,J)=>(q[J.Id]=J,q),{}),(K.anchors||[]).forEach(q=>{const J=q.picture&&q.picture.hyperlinks;J&&L.rels[J.rId]&&(J.hyperlink=L.rels[J.rId].Target,delete J.rId)}),x.reconcile(K,L))});const j={styles:P.styles};Object.values(P.tables).forEach(Y=>{k.reconcile(Y,j)});const z={styles:P.styles,sharedStrings:P.sharedStrings,media:P.media,mediaIndex:P.mediaIndex,date1904:P.properties&&P.properties.date1904,drawings:P.drawings,comments:P.comments,tables:P.tables,vmlDrawings:P.vmlDrawings};P.worksheets.forEach(Y=>{Y.relationships=P.worksheetRels[Y.sheetNo],S.reconcile(Y,z)}),delete P.worksheetHash,delete P.worksheetRels,delete P.globalRels,delete P.sharedStrings,delete P.workbookRels,delete P.sheetDefs,delete P.styles,delete P.mediaIndex,delete P.drawings,delete P.drawingRels,delete P.vmlDrawings}async _processWorksheetEntry(P,_,C,S,x){const k=new I(S),L=await k.parseStream(P);L.sheetNo=C,_.worksheetHash[x]=L,_.worksheets.push(L)}async _processCommentEntry(P,_,C){const S=new N,x=await S.parseStream(P);_.comments[`../${C}.xml`]=x}async _processTableEntry(P,_,C){const S=new D,x=await S.parseStream(P);_.tables[`../tables/${C}.xml`]=x}async _processWorksheetRelsEntry(P,_,C){const S=new y,x=await S.parseStream(P);_.worksheetRels[C]=x}async _processMediaEntry(P,_,C){const S=C.lastIndexOf(".");if(S>=1){const x=C.substr(S+1),k=C.substr(0,S);await new Promise((L,j)=>{const z=new f;z.on("finish",()=>{_.mediaIndex[C]=_.media.length,_.mediaIndex[k]=_.media.length;const Y={type:"image",name:k,extension:x,buffer:z.toBuffer()};_.media.push(Y),L()}),P.on("error",Y=>{j(Y)}),P.pipe(z)})}}async _processDrawingEntry(P,_,C){const S=new O,x=await S.parseStream(P);_.drawings[C]=x}async _processDrawingRelsEntry(P,_,C){const S=new y,x=await S.parseStream(P);_.drawingRels[C]=x}async _processVmlDrawingEntry(P,_,C){const S=new U,x=await S.parseStream(P);_.vmlDrawings[`../drawings/${C}.vml`]=x}async _processThemeEntry(P,_,C){await new Promise((S,x)=>{const k=new f;P.on("error",x),k.on("error",x),k.on("finish",()=>{_.themes[C]=k.read().toString(),S()}),P.pipe(k)})}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(P,_){!P[Symbol.asyncIterator]&&P.pipe&&(P=P.pipe(new l));const C=[];for await(const S of P)C.push(S);return this.load(a.concat(C),_)}async load(P,_){let C;C=_&&_.base64?a.from(P.toString(),"base64"):P;const S={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},x=await c.loadAsync(C);for(const k of Object.values(x.files))if(!k.dir){let L,j=k.name;if(j[0]==="/"&&(j=j.substr(1)),j.match(/xl\/media\//)||j.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))L=new l,L.write(await k.async("nodebuffer"));else{let z;L=new l({writableObjectMode:!0,readableObjectMode:!0}),z=i.browser?p(await k.async("nodebuffer")):await k.async("string");const Y=16384;for(let K=0;K<z.length;K+=Y)L.write(z.substring(K,K+Y))}switch(L.end(),j){case"_rels/.rels":S.globalRels=await this.parseRels(L);break;case"xl/workbook.xml":{const z=await this.parseWorkbook(L);S.sheets=z.sheets,S.definedNames=z.definedNames,S.views=z.views,S.properties=z.properties,S.calcProperties=z.calcProperties;break}case"xl/_rels/workbook.xml.rels":S.workbookRels=await this.parseRels(L);break;case"xl/sharedStrings.xml":S.sharedStrings=new v,await S.sharedStrings.parseStream(L);break;case"xl/styles.xml":S.styles=new g,await S.styles.parseStream(L);break;case"docProps/app.xml":{const z=new w,Y=await z.parseStream(L);S.company=Y.company,S.manager=Y.manager;break}case"docProps/core.xml":{const z=new m,Y=await z.parseStream(L);Object.assign(S,Y);break}default:{let z=j.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(z){await this._processWorksheetEntry(L,S,z[1],_,j);break}if(z=j.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),z){await this._processWorksheetRelsEntry(L,S,z[1]);break}if(z=j.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),z){await this._processThemeEntry(L,S,z[1]);break}if(z=j.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),z){await this._processMediaEntry(L,S,z[1]);break}if(z=j.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),z){await this._processDrawingEntry(L,S,z[1]);break}if(z=j.match(/xl\/(comments\d+)[.]xml/),z){await this._processCommentEntry(L,S,z[1]);break}if(z=j.match(/xl\/tables\/(table\d+)[.]xml/),z){await this._processTableEntry(L,S,z[1]);break}if(z=j.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),z){await this._processDrawingRelsEntry(L,S,z[1]);break}if(z=j.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),z){await this._processVmlDrawingEntry(L,S,z[1]);break}}}}return this.reconcile(S,_),this.workbook.model=S,this.workbook}async addMedia(P,_){await Promise.all(_.media.map(async C=>{if(C.type==="image"){const S=`xl/media/${C.name}.${C.extension}`;if(C.filename){const x=await function(k,L){return new Promise((j,z)=>{s.readFile(k,L,(Y,K)=>{Y?z(Y):j(K)})})}(C.filename);return P.append(x,{name:S})}if(C.buffer)return P.append(C.buffer,{name:S});if(C.base64){const x=C.base64,k=x.substring(x.indexOf(",")+1);return P.append(k,{name:S,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(P,_){const C=new O,S=new y;_.worksheets.forEach(x=>{const{drawing:k}=x;if(k){C.prepare(k,{});let L=C.toXml(k);P.append(L,{name:`xl/drawings/${k.name}.xml`}),L=S.toXml(k.rels),P.append(L,{name:`xl/drawings/_rels/${k.name}.xml.rels`})}})}addTables(P,_){const C=new D;_.worksheets.forEach(S=>{const{tables:x}=S;x.forEach(k=>{C.prepare(k,{});const L=C.toXml(k);P.append(L,{name:"xl/tables/"+k.target})})})}async addContentTypes(P,_){const C=new b().toXml(_);P.append(C,{name:"[Content_Types].xml"})}async addApp(P,_){const C=new w().toXml(_);P.append(C,{name:"docProps/app.xml"})}async addCore(P,_){const C=new m;P.append(C.toXml(_),{name:"docProps/core.xml"})}async addThemes(P,_){const C=_.themes||{theme1:B};Object.keys(C).forEach(S=>{const x=C[S],k=`xl/theme/${S}.xml`;P.append(x,{name:k})})}async addOfficeRels(P){const _=new y().toXml([{Id:"rId1",Type:F.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:F.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:F.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);P.append(_,{name:"_rels/.rels"})}async addWorkbookRels(P,_){let C=1;const S=[{Id:"rId"+C++,Type:F.RelType.Styles,Target:"styles.xml"},{Id:"rId"+C++,Type:F.RelType.Theme,Target:"theme/theme1.xml"}];_.sharedStrings.count&&S.push({Id:"rId"+C++,Type:F.RelType.SharedStrings,Target:"sharedStrings.xml"}),_.worksheets.forEach(k=>{k.rId="rId"+C++,S.push({Id:k.rId,Type:F.RelType.Worksheet,Target:`worksheets/sheet${k.id}.xml`})});const x=new y().toXml(S);P.append(x,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(P,_){_.sharedStrings&&_.sharedStrings.count&&P.append(_.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(P,_){const{xml:C}=_.styles;C&&P.append(C,{name:"xl/styles.xml"})}async addWorkbook(P,_){const C=new E;P.append(C.toXml(_),{name:"xl/workbook.xml"})}async addWorksheets(P,_){const C=new I,S=new y,x=new N,k=new U;_.worksheets.forEach(L=>{let j=new h;C.render(j,L),P.append(j.xml,{name:`xl/worksheets/sheet${L.id}.xml`}),L.rels&&L.rels.length&&(j=new h,S.render(j,L.rels),P.append(j.xml,{name:`xl/worksheets/_rels/sheet${L.id}.xml.rels`})),L.comments.length>0&&(j=new h,x.render(j,L),P.append(j.xml,{name:`xl/comments${L.id}.xml`}),j=new h,k.render(j,L),P.append(j.xml,{name:`xl/drawings/vmlDrawing${L.id}.vml`}))})}_finalize(P){return new Promise((_,C)=>{P.on("finish",()=>{_(this)}),P.on("error",C),P.finalize()})}prepareModel(P,_){P.creator=P.creator||"ExcelJS",P.lastModifiedBy=P.lastModifiedBy||"ExcelJS",P.created=P.created||new Date,P.modified=P.modified||new Date,P.useSharedStrings=_.useSharedStrings===void 0||_.useSharedStrings,P.useStyles=_.useStyles===void 0||_.useStyles,P.sharedStrings=new v,P.styles=P.useStyles?new g(!0):new g.Mock;const C=new E,S=new I;C.prepare(P);const x={sharedStrings:P.sharedStrings,styles:P.styles,date1904:P.properties.date1904,drawingsCount:0,media:P.media};x.drawings=P.drawings=[],x.commentRefs=P.commentRefs=[];let k=0;P.tables=[],P.worksheets.forEach(L=>{L.tables.forEach(j=>{k++,j.target=`table${k}.xml`,j.id=k,P.tables.push(j)}),S.prepare(L,x)})}async write(P,_){_=_||{};const{model:C}=this.workbook,S=new u.ZipWriter(_.zip);return S.pipe(P),this.prepareModel(C,_),await this.addContentTypes(S,C),await this.addOfficeRels(S,C),await this.addWorkbookRels(S,C),await this.addWorksheets(S,C),await this.addSharedStrings(S,C),await this.addDrawings(S,C),await this.addTables(S,C),await Promise.all([this.addThemes(S,C),this.addStyles(S,C)]),await this.addMedia(S,C),await Promise.all([this.addApp(S,C),this.addCore(S,C)]),await this.addWorkbook(S,C),this._finalize(S)}writeFile(P,_){const C=s.createWriteStream(P);return new Promise((S,x)=>{C.on("finish",()=>{S()}),C.on("error",k=>{x(k)}),this.write(C,_).then(()=>{C.end()}).catch(k=>{x(k)})})}async writeBuffer(P){const _=new f;return await this.write(_,P),_.read()}}F.RelType=r("./rel-type"),n.exports=F}).call(this)}).call(this,r("_process"),r("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(r,n,o){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(r,n,o){(function(i){(function(){Object.defineProperty(o,"__esModule",{value:!0}),o.CsvFormatterStream=void 0;const a=r("stream"),s=r("./formatter");class c extends a.Transform{constructor(u){super({writableObjectMode:u.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=u,this.rowFormatter=new s.RowFormatter(u),this.hasWrittenBOM=!u.writeBOM}transform(u){return this.rowFormatter.rowTransform=u,this}_transform(u,f,d){let h=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(u,(p,g)=>p?(h=!0,d(p)):(g&&g.forEach(m=>{this.push(i.from(m,"utf8"))}),h=!0,d()))}catch(p){if(h)throw p;d(p)}}_flush(u){this.rowFormatter.finish((f,d)=>f?u(f):(d&&d.forEach(h=>{this.push(i.from(h,"utf8"))}),u()))}}o.CsvFormatterStream=c}).call(this)}).call(this,r("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.FormatterOptions=void 0,o.FormatterOptions=class{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var a;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,i||{}),(i==null?void 0:i.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(i==null?void 0:i.quote)===!0?this.quote='"':(i==null?void 0:i.quote)===!1&&(this.quote=""),typeof(i==null?void 0:i.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((a=i.writeHeaders)===null||a===void 0||a),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(r,n,o){var i=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(o,"__esModule",{value:!0}),o.FieldFormatter=void 0;const a=i(r("lodash.isboolean")),s=i(r("lodash.isnil")),c=i(r("lodash.escaperegexp"));o.FieldFormatter=class{constructor(l){this._headers=null,this.formatterOptions=l,l.headers!==null&&(this.headers=l.headers),this.REPLACE_REGEXP=new RegExp(l.quote,"g");const u=`[${l.delimiter}${c.default(l.rowDelimiter)}|\r|
]`;this.ESCAPE_REGEXP=new RegExp(u)}set headers(l){this._headers=l}shouldQuote(l,u){const f=u?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return a.default(f)?f:Array.isArray(f)?f[l]:this._headers!==null&&f[this._headers[l]]}format(l,u,f){const d=(""+(s.default(l)?"":l)).replace(/\0/g,""),{formatterOptions:h}=this;return h.quote!==""&&d.indexOf(h.quote)!==-1?this.quoteField(d.replace(this.REPLACE_REGEXP,h.escapedQuote)):d.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(u,f)?this.quoteField(d):d}quoteField(l){const{quote:u}=this.formatterOptions;return`${u}${l}${u}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(r,n,o){var i=function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(o,"__esModule",{value:!0}),o.RowFormatter=void 0;const a=i(r("lodash.isfunction")),s=i(r("lodash.isequal")),c=r("./FieldFormatter"),l=r("../types");class u{constructor(d){this.rowCount=0,this.formatterOptions=d,this.fieldFormatter=new c.FieldFormatter(d),this.headers=d.headers,this.shouldWriteHeaders=d.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),d.transform&&(this.rowTransform=d.transform)}static isRowHashArray(d){return!!Array.isArray(d)&&Array.isArray(d[0])&&d[0].length===2}static isRowArray(d){return Array.isArray(d)&&!this.isRowHashArray(d)}static gatherHeaders(d){return u.isRowHashArray(d)?d.map(h=>h[0]):Array.isArray(d)?d:Object.keys(d)}static createTransform(d){return l.isSyncTransform(d)?(h,p)=>{let g=null;try{g=d(h)}catch(m){return p(m)}return p(null,g)}:(h,p)=>{d(h,p)}}set rowTransform(d){if(!a.default(d))throw new TypeError("The transform should be a function");this._rowTransform=u.createTransform(d)}format(d,h){this.callTransformer(d,(p,g)=>{if(p)return h(p);if(!d)return h(null);const m=[];if(g){const{shouldFormatColumns:v,headers:y}=this.checkHeaders(g);if(this.shouldWriteHeaders&&y&&!this.hasWrittenHeaders&&(m.push(this.formatColumns(y,!0)),this.hasWrittenHeaders=!0),v){const b=this.gatherColumns(g);m.push(this.formatColumns(b,!1))}}return h(null,m)})}finish(d){const h=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return d(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));h.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&h.push(this.formatterOptions.rowDelimiter),d(null,h)}checkHeaders(d){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const h=u.gatherHeaders(d);return this.headers=h,this.fieldFormatter.headers=h,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(h,d),headers:h}:{shouldFormatColumns:!0,headers:null}}gatherColumns(d){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(d)?u.isRowHashArray(d)?this.headers.map((h,p)=>{const g=d[p];return g?g[1]:""}):u.isRowArray(d)&&!this.shouldWriteHeaders?d:this.headers.map((h,p)=>d[p]):this.headers.map(h=>d[h])}callTransformer(d,h){return this._rowTransform?this._rowTransform(d,h):h(null,d)}formatColumns(d,h){const p=d.map((m,v)=>this.fieldFormatter.format(m,v,h)).join(this.formatterOptions.delimiter),{rowCount:g}=this;return this.rowCount+=1,g?[this.formatterOptions.rowDelimiter,p].join(""):p}}o.RowFormatter=u},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.FieldFormatter=o.RowFormatter=void 0;var i=r("./RowFormatter");Object.defineProperty(o,"RowFormatter",{enumerable:!0,get:function(){return i.RowFormatter}});var a=r("./FieldFormatter");Object.defineProperty(o,"FieldFormatter",{enumerable:!0,get:function(){return a.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(r,n,o){(function(i){(function(){var a=Object.create?function(v,y,b,w){w===void 0&&(w=b),Object.defineProperty(v,w,{enumerable:!0,get:function(){return y[b]}})}:function(v,y,b,w){w===void 0&&(w=b),v[w]=y[b]},s=Object.create?function(v,y){Object.defineProperty(v,"default",{enumerable:!0,value:y})}:function(v,y){v.default=y},c=function(v){if(v&&v.__esModule)return v;var y={};if(v!=null)for(var b in v)b!=="default"&&Object.prototype.hasOwnProperty.call(v,b)&&a(y,v,b);return s(y,v),y},l=function(v,y){for(var b in v)b==="default"||Object.prototype.hasOwnProperty.call(y,b)||a(y,v,b)};Object.defineProperty(o,"__esModule",{value:!0}),o.writeToPath=o.writeToString=o.writeToBuffer=o.writeToStream=o.write=o.format=o.FormatterOptions=o.CsvFormatterStream=void 0;const u=r("util"),f=r("stream"),d=c(r("fs")),h=r("./FormatterOptions"),p=r("./CsvFormatterStream");l(r("./types"),o);var g=r("./CsvFormatterStream");Object.defineProperty(o,"CsvFormatterStream",{enumerable:!0,get:function(){return g.CsvFormatterStream}});var m=r("./FormatterOptions");Object.defineProperty(o,"FormatterOptions",{enumerable:!0,get:function(){return m.FormatterOptions}}),o.format=v=>new p.CsvFormatterStream(new h.FormatterOptions(v)),o.write=(v,y)=>{const b=o.format(y),w=u.promisify((E,I)=>{b.write(E,void 0,I)});return v.reduce((E,I)=>E.then(()=>w(I)),Promise.resolve()).then(()=>b.end()).catch(E=>{b.emit("error",E)}),b},o.writeToStream=(v,y,b)=>o.write(y,b).pipe(v),o.writeToBuffer=function(v){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const b=[],w=new f.Writable({write(E,I,O){b.push(E),O()}});return new Promise((E,I)=>{w.on("error",I).on("finish",()=>E(i.concat(b))),o.write(v,y).pipe(w)})},o.writeToString=(v,y)=>o.writeToBuffer(v,y).then(b=>b.toString()),o.writeToPath=(v,y,b)=>{const w=d.createWriteStream(v,{encoding:"utf8"});return o.write(y,b).pipe(w)}}).call(this)}).call(this,r("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.isSyncTransform=void 0,o.isSyncTransform=i=>i.length===1},{}],153:[function(r,n,o){(function(i){(function(){Object.defineProperty(o,"__esModule",{value:!0}),o.CsvParserStream=void 0;const a=r("string_decoder"),s=r("stream"),c=r("./transforms"),l=r("./parser");class u extends s.Transform{constructor(d){super({objectMode:d.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=d,this.parser=new l.Parser(d),this.headerTransformer=new c.HeaderTransformer(d),this.decoder=new a.StringDecoder(d.encoding),this.rowTransformerValidator=new c.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(d){return this.rowTransformerValidator.rowTransform=d,this}validate(d){return this.rowTransformerValidator.rowValidator=d,this}emit(d){if(d==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var h=arguments.length,p=new Array(h>1?h-1:0),g=1;g<h;g++)p[g-1]=arguments[g];return super.emit(d,...p)}_transform(d,h,p){if(this.hasHitRowLimit)return p();const g=u.wrapDoneCallback(p);try{const{lines:m}=this,v=m+this.decoder.write(d),y=this.parse(v,!0);return this.processRows(y,g)}catch(m){return g(m)}}_flush(d){const h=u.wrapDoneCallback(d);if(this.hasHitRowLimit)return h();try{const p=this.lines+this.decoder.end(),g=this.parse(p,!1);return this.processRows(g,h)}catch(p){return h(p)}}parse(d,h){if(!d)return[];const{line:p,rows:g}=this.parser.parse(d,h);return this.lines=p,g}processRows(d,h){const p=d.length,g=m=>{const v=w=>w?h(w):m%100!=0?g(m+1):void i(()=>g(m+1));if(this.checkAndEmitHeaders(),m>=p||this.hasHitRowLimit)return h();if(this.parsedLineCount+=1,this.shouldSkipLine)return v();const y=d[m];this.rowCount+=1,this.parsedRowCount+=1;const b=this.rowCount;return this.transformRow(y,(w,E)=>{if(w)return this.rowCount-=1,v(w);if(!E)return v(new Error("expected transform result"));if(E.isValid){if(E.row)return this.pushRow(E.row,v)}else this.emit("data-invalid",E.row,b,E.reason);return v()})};g(0)}transformRow(d,h){try{this.headerTransformer.transform(d,(p,g)=>p?h(p):g?g.isValid?g.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(g.row,h):this.skipRow(h):(this.rowCount-=1,this.parsedRowCount-=1,h(null,{row:null,isValid:!0})):this.shouldEmitRows?h(null,{isValid:!1,row:d}):this.skipRow(h):h(new Error("Expected result from header transform")))}catch(p){h(p)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(d){return this.rowCount-=1,d(null,{row:null,isValid:!0})}pushRow(d,h){try{this.parserOptions.objectMode?this.push(d):this.push(JSON.stringify(d)),h()}catch(p){h(p)}}static wrapDoneCallback(d){let h=!1;return function(p){if(p){if(h)throw p;return h=!0,void d(p)}for(var g=arguments.length,m=new Array(g>1?g-1:0),v=1;v<g;v++)m[v-1]=arguments[v];d(...m)}}}o.CsvParserStream=u}).call(this)}).call(this,r("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(r,n,o){var i=function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(o,"__esModule",{value:!0}),o.ParserOptions=void 0;const a=i(r("lodash.escaperegexp")),s=i(r("lodash.isnil"));o.ParserOptions=class{constructor(c){var l;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,c||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=a.default(this.delimiter),this.escapeChar=(l=this.escape)!==null&&l!==void 0?l:this.quote,this.supportsComments=!s.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(r,n,o){var i=Object.create?function(g,m,v,y){y===void 0&&(y=v),Object.defineProperty(g,y,{enumerable:!0,get:function(){return m[v]}})}:function(g,m,v,y){y===void 0&&(y=v),g[y]=m[v]},a=Object.create?function(g,m){Object.defineProperty(g,"default",{enumerable:!0,value:m})}:function(g,m){g.default=m},s=function(g){if(g&&g.__esModule)return g;var m={};if(g!=null)for(var v in g)v!=="default"&&Object.prototype.hasOwnProperty.call(g,v)&&i(m,g,v);return a(m,g),m},c=function(g,m){for(var v in g)v==="default"||Object.prototype.hasOwnProperty.call(m,v)||i(m,g,v)};Object.defineProperty(o,"__esModule",{value:!0}),o.parseString=o.parseFile=o.parseStream=o.parse=o.ParserOptions=o.CsvParserStream=void 0;const l=s(r("fs")),u=r("stream"),f=r("./ParserOptions"),d=r("./CsvParserStream");c(r("./types"),o);var h=r("./CsvParserStream");Object.defineProperty(o,"CsvParserStream",{enumerable:!0,get:function(){return h.CsvParserStream}});var p=r("./ParserOptions");Object.defineProperty(o,"ParserOptions",{enumerable:!0,get:function(){return p.ParserOptions}}),o.parse=g=>new d.CsvParserStream(new f.ParserOptions(g)),o.parseStream=(g,m)=>g.pipe(new d.CsvParserStream(new f.ParserOptions(m))),o.parseFile=function(g){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return l.createReadStream(g).pipe(new d.CsvParserStream(new f.ParserOptions(m)))},o.parseString=(g,m)=>{const v=new u.Readable;return v.push(g),v.push(null),v.pipe(new d.CsvParserStream(new f.ParserOptions(m)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Parser=void 0;const i=r("./Scanner"),a=r("./RowParser"),s=r("./Token");class c{constructor(u){this.parserOptions=u,this.rowParser=new a.RowParser(this.parserOptions)}static removeBOM(u){return u&&u.charCodeAt(0)===65279?u.slice(1):u}parse(u,f){const d=new i.Scanner({line:c.removeBOM(u),parserOptions:this.parserOptions,hasMoreData:f});return this.parserOptions.supportsComments?this.parseWithComments(d):this.parseWithoutComments(d)}parseWithoutComments(u){const f=[];let d=!0;for(;d;)d=this.parseRow(u,f);return{line:u.line,rows:f}}parseWithComments(u){const{parserOptions:f}=this,d=[];for(let h=u.nextCharacterToken;h!==null;h=u.nextCharacterToken)if(s.Token.isTokenComment(h,f)){if(u.advancePastLine()===null)return{line:u.lineFromCursor,rows:d};if(!u.hasMoreCharacters)return{line:u.lineFromCursor,rows:d};u.truncateToCursor()}else if(!this.parseRow(u,d))break;return{line:u.line,rows:d}}parseRow(u,f){if(!u.nextNonSpaceToken)return!1;const d=this.rowParser.parse(u);return d!==null&&(this.parserOptions.ignoreEmpty&&a.RowParser.isEmptyRow(d)||f.push(d),!0)}}o.Parser=c},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.RowParser=void 0;const i=r("./column"),a=r("./Token");o.RowParser=class{constructor(s){this.parserOptions=s,this.columnParser=new i.ColumnParser(s)}static isEmptyRow(s){return s.join("").replace(/\s+/g,"")===""}parse(s){const{parserOptions:c}=this,{hasMoreData:l}=s,u=s,f=[];let d=this.getStartToken(u,f);for(;d;){if(a.Token.isTokenRowDelimiter(d))return u.advancePastToken(d),!u.hasMoreCharacters&&a.Token.isTokenCarriageReturn(d,c)&&l?null:(u.truncateToCursor(),f);if(!this.shouldSkipColumnParse(u,d,f)){const h=this.columnParser.parse(u);if(h===null)return null;f.push(h)}d=u.nextNonSpaceToken}return l?null:(u.truncateToCursor(),f)}getStartToken(s,c){const l=s.nextNonSpaceToken;return l!==null&&a.Token.isTokenDelimiter(l,this.parserOptions)?(c.push(""),s.nextNonSpaceToken):l}shouldSkipColumnParse(s,c,l){const{parserOptions:u}=this;if(a.Token.isTokenDelimiter(c,u)){s.advancePastToken(c);const f=s.nextCharacterToken;if(!s.hasMoreCharacters||f!==null&&a.Token.isTokenRowDelimiter(f)||f!==null&&a.Token.isTokenDelimiter(f,u))return l.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Scanner=void 0;const i=r("./Token"),a=/((?:\r\n)|\n|\r)/;o.Scanner=class{constructor(s){this.cursor=0,this.line=s.line,this.lineLength=this.line.length,this.parserOptions=s.parserOptions,this.hasMoreData=s.hasMoreData,this.cursor=s.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:s}=this,c=this.parserOptions.NEXT_TOKEN_REGEXP;if(s.search(c)===-1)return null;const l=c.exec(s);if(l==null)return null;const u=l[1],f=this.cursor+(l.index||0);return new i.Token({token:u,startCursor:f,endCursor:f+u.length-1})}get nextCharacterToken(){const{cursor:s,lineLength:c}=this;return c<=s?null:new i.Token({token:this.line[s],startCursor:s,endCursor:s})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const s=a.exec(this.lineFromCursor);return s?(this.cursor+=(s.index||0)+s[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(s){return this.cursor=s,this}advanceToToken(s){return this.cursor=s.startCursor,this}advancePastToken(s){return this.cursor=s.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Token=void 0,o.Token=class{constructor(i){this.token=i.token,this.startCursor=i.startCursor,this.endCursor=i.endCursor}static isTokenRowDelimiter(i){const a=i.token;return a==="\r"||a===`
`||a===`\r
`}static isTokenCarriageReturn(i,a){return i.token===a.carriageReturn}static isTokenComment(i,a){return a.supportsComments&&!!i&&i.token===a.comment}static isTokenEscapeCharacter(i,a){return i.token===a.escapeChar}static isTokenQuote(i,a){return i.token===a.quote}static isTokenDelimiter(i,a){return i.token===a.delimiter}}},{}],160:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.ColumnFormatter=void 0,o.ColumnFormatter=class{constructor(i){i.trim?this.format=a=>a.trim():i.ltrim?this.format=a=>a.trimLeft():i.rtrim?this.format=a=>a.trimRight():this.format=a=>a}}},{}],161:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.ColumnParser=void 0;const i=r("./NonQuotedColumnParser"),a=r("./QuotedColumnParser"),s=r("../Token");o.ColumnParser=class{constructor(c){this.parserOptions=c,this.quotedColumnParser=new a.QuotedColumnParser(c),this.nonQuotedColumnParser=new i.NonQuotedColumnParser(c)}parse(c){const{nextNonSpaceToken:l}=c;return l!==null&&s.Token.isTokenQuote(l,this.parserOptions)?(c.advanceToToken(l),this.quotedColumnParser.parse(c)):this.nonQuotedColumnParser.parse(c)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.NonQuotedColumnParser=void 0;const i=r("./ColumnFormatter"),a=r("../Token");o.NonQuotedColumnParser=class{constructor(s){this.parserOptions=s,this.columnFormatter=new i.ColumnFormatter(s)}parse(s){if(!s.hasMoreCharacters)return null;const{parserOptions:c}=this,l=[];let u=s.nextCharacterToken;for(;u&&!a.Token.isTokenDelimiter(u,c)&&!a.Token.isTokenRowDelimiter(u);u=s.nextCharacterToken)l.push(u.token),s.advancePastToken(u);return this.columnFormatter.format(l.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.QuotedColumnParser=void 0;const i=r("./ColumnFormatter"),a=r("../Token");o.QuotedColumnParser=class{constructor(s){this.parserOptions=s,this.columnFormatter=new i.ColumnFormatter(s)}parse(s){if(!s.hasMoreCharacters)return null;const c=s.cursor,{foundClosingQuote:l,col:u}=this.gatherDataBetweenQuotes(s);if(!l){if(s.advanceTo(c),!s.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${s.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(s),u}gatherDataBetweenQuotes(s){const{parserOptions:c}=this;let l=!1,u=!1;const f=[];let d=s.nextCharacterToken;for(;!u&&d!==null;d=s.nextCharacterToken){const h=a.Token.isTokenQuote(d,c);if(!l&&h)l=!0;else if(l)if(a.Token.isTokenEscapeCharacter(d,c)){s.advancePastToken(d);const p=s.nextCharacterToken;p!==null&&(a.Token.isTokenQuote(p,c)||a.Token.isTokenEscapeCharacter(p,c))?(f.push(p.token),d=p):h?u=!0:f.push(d.token)}else h?u=!0:f.push(d.token);s.advancePastToken(d)}return{col:this.columnFormatter.format(f.join("")),foundClosingQuote:u}}checkForMalformedColumn(s){const{parserOptions:c}=this,{nextNonSpaceToken:l}=s;if(l){const u=a.Token.isTokenDelimiter(l,c),f=a.Token.isTokenRowDelimiter(l);if(!u&&!f){const d=s.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${c.escapedDelimiter}' OR new line got: '${l.token}'. at '${d}`)}s.advanceToToken(l)}else s.hasMoreData||s.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.ColumnFormatter=o.QuotedColumnParser=o.NonQuotedColumnParser=o.ColumnParser=void 0;var i=r("./ColumnParser");Object.defineProperty(o,"ColumnParser",{enumerable:!0,get:function(){return i.ColumnParser}});var a=r("./NonQuotedColumnParser");Object.defineProperty(o,"NonQuotedColumnParser",{enumerable:!0,get:function(){return a.NonQuotedColumnParser}});var s=r("./QuotedColumnParser");Object.defineProperty(o,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}});var c=r("./ColumnFormatter");Object.defineProperty(o,"ColumnFormatter",{enumerable:!0,get:function(){return c.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.QuotedColumnParser=o.NonQuotedColumnParser=o.ColumnParser=o.Token=o.Scanner=o.RowParser=o.Parser=void 0;var i=r("./Parser");Object.defineProperty(o,"Parser",{enumerable:!0,get:function(){return i.Parser}});var a=r("./RowParser");Object.defineProperty(o,"RowParser",{enumerable:!0,get:function(){return a.RowParser}});var s=r("./Scanner");Object.defineProperty(o,"Scanner",{enumerable:!0,get:function(){return s.Scanner}});var c=r("./Token");Object.defineProperty(o,"Token",{enumerable:!0,get:function(){return c.Token}});var l=r("./column");Object.defineProperty(o,"ColumnParser",{enumerable:!0,get:function(){return l.ColumnParser}}),Object.defineProperty(o,"NonQuotedColumnParser",{enumerable:!0,get:function(){return l.NonQuotedColumnParser}}),Object.defineProperty(o,"QuotedColumnParser",{enumerable:!0,get:function(){return l.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(r,n,o){var i=function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(o,"__esModule",{value:!0}),o.HeaderTransformer=void 0;const a=i(r("lodash.isundefined")),s=i(r("lodash.isfunction")),c=i(r("lodash.uniq")),l=i(r("lodash.groupby"));o.HeaderTransformer=class{constructor(u){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=u,u.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(u.headers)?this.setHeaders(u.headers):s.default(u.headers)&&(this.headersTransform=u.headers)}transform(u,f){return this.shouldMapRow(u)?f(null,this.processRow(u)):f(null,{row:null,isValid:!0})}shouldMapRow(u){const{parserOptions:f}=this;if(!this.headersTransform&&f.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(u)){if(this.headersTransform)this.setHeaders(this.headersTransform(u));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(u)}return!1}return!0}processRow(u){if(!this.headers)return{row:u,isValid:!0};const{parserOptions:f}=this;if(!f.discardUnmappedColumns&&u.length>this.headersLength){if(!f.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${u.length}`);return{row:u,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${u.length}`}}return f.strictColumnHandling&&u.length<this.headersLength?{row:u,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${u.length}`}:{row:this.mapHeaders(u),isValid:!0}}mapHeaders(u){const f={},{headers:d,headersLength:h}=this;for(let p=0;p<h;p+=1){const g=d[p];if(!a.default(g)){const m=u[p];a.default(m)?f[g]="":f[g]=m}}return f}setHeaders(u){var f;const d=u.filter(h=>!!h);if(c.default(d).length!==d.length){const h=l.default(d),p=Object.keys(h).filter(g=>h[g].length>1);throw new Error("Duplicate headers found "+JSON.stringify(p))}this.headers=u,this.receivedHeaders=!0,this.headersLength=((f=this.headers)===null||f===void 0?void 0:f.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(r,n,o){var i=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(o,"__esModule",{value:!0}),o.RowTransformerValidator=void 0;const a=i(r("lodash.isfunction")),s=r("../types");class c{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(u){return s.isSyncTransform(u)?(f,d)=>{let h=null;try{h=u(f)}catch(p){return d(p)}return d(null,h)}:u}static createValidator(u){return s.isSyncValidate(u)?(f,d)=>{d(null,{row:f,isValid:u(f)})}:(f,d)=>{u(f,(h,p,g)=>h?d(h):d(null,p?{row:f,isValid:p,reason:g}:{row:f,isValid:!1,reason:g}))}}set rowTransform(u){if(!a.default(u))throw new TypeError("The transform should be a function");this._rowTransform=c.createTransform(u)}set rowValidator(u){if(!a.default(u))throw new TypeError("The validate should be a function");this._rowValidator=c.createValidator(u)}transformAndValidate(u,f){return this.callTransformer(u,(d,h)=>d?f(d):h?this.callValidator(h,(p,g)=>p?f(p):g&&!g.isValid?f(null,{row:h,isValid:!1,reason:g.reason}):f(null,{row:h,isValid:!0})):f(null,{row:null,isValid:!0}))}callTransformer(u,f){return this._rowTransform?this._rowTransform(u,f):f(null,u)}callValidator(u,f){return this._rowValidator?this._rowValidator(u,f):f(null,{row:u,isValid:!0})}}o.RowTransformerValidator=c},{"../types":169,"lodash.isfunction":446}],168:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.HeaderTransformer=o.RowTransformerValidator=void 0;var i=r("./RowTransformerValidator");Object.defineProperty(o,"RowTransformerValidator",{enumerable:!0,get:function(){return i.RowTransformerValidator}});var a=r("./HeaderTransformer");Object.defineProperty(o,"HeaderTransformer",{enumerable:!0,get:function(){return a.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.isSyncValidate=o.isSyncTransform=void 0,o.isSyncTransform=i=>i.length===1,o.isSyncValidate=i=>i.length===1},{}],170:[function(r,n,o){const i=o;i.bignum=r("bn.js"),i.define=r("./asn1/api").define,i.base=r("./asn1/base"),i.constants=r("./asn1/constants"),i.decoders=r("./asn1/decoders"),i.encoders=r("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(r,n,o){const i=r("./encoders"),a=r("./decoders"),s=r("inherits");function c(l,u){this.name=l,this.body=u,this.decoders={},this.encoders={}}o.define=function(l,u){return new c(l,u)},c.prototype._createNamed=function(l){const u=this.name;function f(d){this._initNamed(d,u)}return s(f,l),f.prototype._initNamed=function(d,h){l.call(this,d,h)},new f(this)},c.prototype._getDecoder=function(l){return l=l||"der",this.decoders.hasOwnProperty(l)||(this.decoders[l]=this._createNamed(a[l])),this.decoders[l]},c.prototype.decode=function(l,u,f){return this._getDecoder(u).decode(l,f)},c.prototype._getEncoder=function(l){return l=l||"der",this.encoders.hasOwnProperty(l)||(this.encoders[l]=this._createNamed(i[l])),this.encoders[l]},c.prototype.encode=function(l,u,f){return this._getEncoder(u).encode(l,f)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(r,n,o){const i=r("inherits"),a=r("../base/reporter").Reporter,s=r("safer-buffer").Buffer;function c(u,f){a.call(this,f),s.isBuffer(u)?(this.base=u,this.offset=0,this.length=u.length):this.error("Input not Buffer")}function l(u,f){if(Array.isArray(u))this.length=0,this.value=u.map(function(d){return l.isEncoderBuffer(d)||(d=new l(d,f)),this.length+=d.length,d},this);else if(typeof u=="number"){if(!(0<=u&&u<=255))return f.error("non-byte EncoderBuffer value");this.value=u,this.length=1}else if(typeof u=="string")this.value=u,this.length=s.byteLength(u);else{if(!s.isBuffer(u))return f.error("Unsupported type: "+typeof u);this.value=u,this.length=u.length}}i(c,a),o.DecoderBuffer=c,c.isDecoderBuffer=function(u){return u instanceof c?!0:typeof u=="object"&&s.isBuffer(u.base)&&u.constructor.name==="DecoderBuffer"&&typeof u.offset=="number"&&typeof u.length=="number"&&typeof u.save=="function"&&typeof u.restore=="function"&&typeof u.isEmpty=="function"&&typeof u.readUInt8=="function"&&typeof u.skip=="function"&&typeof u.raw=="function"},c.prototype.save=function(){return{offset:this.offset,reporter:a.prototype.save.call(this)}},c.prototype.restore=function(u){const f=new c(this.base);return f.offset=u.offset,f.length=this.offset,this.offset=u.offset,a.prototype.restore.call(this,u.reporter),f},c.prototype.isEmpty=function(){return this.offset===this.length},c.prototype.readUInt8=function(u){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(u||"DecoderBuffer overrun")},c.prototype.skip=function(u,f){if(!(this.offset+u<=this.length))return this.error(f||"DecoderBuffer overrun");const d=new c(this.base);return d._reporterState=this._reporterState,d.offset=this.offset,d.length=this.offset+u,this.offset+=u,d},c.prototype.raw=function(u){return this.base.slice(u?u.offset:this.offset,this.length)},o.EncoderBuffer=l,l.isEncoderBuffer=function(u){return u instanceof l?!0:typeof u=="object"&&u.constructor.name==="EncoderBuffer"&&typeof u.length=="number"&&typeof u.join=="function"},l.prototype.join=function(u,f){return u||(u=s.alloc(this.length)),f||(f=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(d){d.join(u,f),f+=d.length}):(typeof this.value=="number"?u[f]=this.value:typeof this.value=="string"?u.write(this.value,f):s.isBuffer(this.value)&&this.value.copy(u,f),f+=this.length)),u}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(r,n,o){const i=o;i.Reporter=r("./reporter").Reporter,i.DecoderBuffer=r("./buffer").DecoderBuffer,i.EncoderBuffer=r("./buffer").EncoderBuffer,i.Node=r("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(r,n,o){const i=r("../base/reporter").Reporter,a=r("../base/buffer").EncoderBuffer,s=r("../base/buffer").DecoderBuffer,c=r("minimalistic-assert"),l=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l);function f(h,p,g){const m={};this._baseState=m,m.name=g,m.enc=h,m.parent=p||null,m.children=null,m.tag=null,m.args=null,m.reverseArgs=null,m.choice=null,m.optional=!1,m.any=!1,m.obj=!1,m.use=null,m.useDecoder=null,m.key=null,m.default=null,m.explicit=null,m.implicit=null,m.contains=null,m.parent||(m.children=[],this._wrap())}n.exports=f;const d=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const h=this._baseState,p={};d.forEach(function(m){p[m]=h[m]});const g=new this.constructor(p.parent);return g._baseState=p,g},f.prototype._wrap=function(){const h=this._baseState;u.forEach(function(p){this[p]=function(){const g=new this.constructor(this);return h.children.push(g),g[p].apply(g,arguments)}},this)},f.prototype._init=function(h){const p=this._baseState;c(p.parent===null),h.call(this),p.children=p.children.filter(function(g){return g._baseState.parent===this},this),c.equal(p.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(h){const p=this._baseState,g=h.filter(function(m){return m instanceof this.constructor},this);h=h.filter(function(m){return!(m instanceof this.constructor)},this),g.length!==0&&(c(p.children===null),p.children=g,g.forEach(function(m){m._baseState.parent=this},this)),h.length!==0&&(c(p.args===null),p.args=h,p.reverseArgs=h.map(function(m){if(typeof m!="object"||m.constructor!==Object)return m;const v={};return Object.keys(m).forEach(function(y){y==(0|y)&&(y|=0);const b=m[y];v[b]=y}),v}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(h){f.prototype[h]=function(){const p=this._baseState;throw new Error(h+" not implemented for encoding: "+p.enc)}}),l.forEach(function(h){f.prototype[h]=function(){const p=this._baseState,g=Array.prototype.slice.call(arguments);return c(p.tag===null),p.tag=h,this._useArgs(g),this}}),f.prototype.use=function(h){c(h);const p=this._baseState;return c(p.use===null),p.use=h,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(h){const p=this._baseState;return c(p.default===null),p.default=h,p.optional=!0,this},f.prototype.explicit=function(h){const p=this._baseState;return c(p.explicit===null&&p.implicit===null),p.explicit=h,this},f.prototype.implicit=function(h){const p=this._baseState;return c(p.explicit===null&&p.implicit===null),p.implicit=h,this},f.prototype.obj=function(){const h=this._baseState,p=Array.prototype.slice.call(arguments);return h.obj=!0,p.length!==0&&this._useArgs(p),this},f.prototype.key=function(h){const p=this._baseState;return c(p.key===null),p.key=h,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(h){const p=this._baseState;return c(p.choice===null),p.choice=h,this._useArgs(Object.keys(h).map(function(g){return h[g]})),this},f.prototype.contains=function(h){const p=this._baseState;return c(p.use===null),p.contains=h,this},f.prototype._decode=function(h,p){const g=this._baseState;if(g.parent===null)return h.wrapResult(g.children[0]._decode(h,p));let m,v=g.default,y=!0,b=null;if(g.key!==null&&(b=h.enterKey(g.key)),g.optional){let w=null;if(g.explicit!==null?w=g.explicit:g.implicit!==null?w=g.implicit:g.tag!==null&&(w=g.tag),w!==null||g.any){if(y=this._peekTag(h,w,g.any),h.isError(y))return y}else{const E=h.save();try{g.choice===null?this._decodeGeneric(g.tag,h,p):this._decodeChoice(h,p),y=!0}catch{y=!1}h.restore(E)}}if(g.obj&&y&&(m=h.enterObject()),y){if(g.explicit!==null){const E=this._decodeTag(h,g.explicit);if(h.isError(E))return E;h=E}const w=h.offset;if(g.use===null&&g.choice===null){let E;g.any&&(E=h.save());const I=this._decodeTag(h,g.implicit!==null?g.implicit:g.tag,g.any);if(h.isError(I))return I;g.any?v=h.raw(E):h=I}if(p&&p.track&&g.tag!==null&&p.track(h.path(),w,h.length,"tagged"),p&&p.track&&g.tag!==null&&p.track(h.path(),h.offset,h.length,"content"),g.any||(v=g.choice===null?this._decodeGeneric(g.tag,h,p):this._decodeChoice(h,p)),h.isError(v))return v;if(g.any||g.choice!==null||g.children===null||g.children.forEach(function(E){E._decode(h,p)}),g.contains&&(g.tag==="octstr"||g.tag==="bitstr")){const E=new s(v);v=this._getUse(g.contains,h._reporterState.obj)._decode(E,p)}}return g.obj&&y&&(v=h.leaveObject(m)),g.key===null||v===null&&y!==!0?b!==null&&h.exitKey(b):h.leaveKey(b,g.key,v),v},f.prototype._decodeGeneric=function(h,p,g){const m=this._baseState;return h==="seq"||h==="set"?null:h==="seqof"||h==="setof"?this._decodeList(p,h,m.args[0],g):/str$/.test(h)?this._decodeStr(p,h,g):h==="objid"&&m.args?this._decodeObjid(p,m.args[0],m.args[1],g):h==="objid"?this._decodeObjid(p,null,null,g):h==="gentime"||h==="utctime"?this._decodeTime(p,h,g):h==="null_"?this._decodeNull(p,g):h==="bool"?this._decodeBool(p,g):h==="objDesc"?this._decodeStr(p,h,g):h==="int"||h==="enum"?this._decodeInt(p,m.args&&m.args[0],g):m.use!==null?this._getUse(m.use,p._reporterState.obj)._decode(p,g):p.error("unknown tag: "+h)},f.prototype._getUse=function(h,p){const g=this._baseState;return g.useDecoder=this._use(h,p),c(g.useDecoder._baseState.parent===null),g.useDecoder=g.useDecoder._baseState.children[0],g.implicit!==g.useDecoder._baseState.implicit&&(g.useDecoder=g.useDecoder.clone(),g.useDecoder._baseState.implicit=g.implicit),g.useDecoder},f.prototype._decodeChoice=function(h,p){const g=this._baseState;let m=null,v=!1;return Object.keys(g.choice).some(function(y){const b=h.save(),w=g.choice[y];try{const E=w._decode(h,p);if(h.isError(E))return!1;m={type:y,value:E},v=!0}catch{return h.restore(b),!1}return!0},this),v?m:h.error("Choice not matched")},f.prototype._createEncoderBuffer=function(h){return new a(h,this.reporter)},f.prototype._encode=function(h,p,g){const m=this._baseState;if(m.default!==null&&m.default===h)return;const v=this._encodeValue(h,p,g);return v===void 0||this._skipDefault(v,p,g)?void 0:v},f.prototype._encodeValue=function(h,p,g){const m=this._baseState;if(m.parent===null)return m.children[0]._encode(h,p||new i);let v=null;if(this.reporter=p,m.optional&&h===void 0){if(m.default===null)return;h=m.default}let y=null,b=!1;if(m.any)v=this._createEncoderBuffer(h);else if(m.choice)v=this._encodeChoice(h,p);else if(m.contains)y=this._getUse(m.contains,g)._encode(h,p),b=!0;else if(m.children)y=m.children.map(function(w){if(w._baseState.tag==="null_")return w._encode(null,p,h);if(w._baseState.key===null)return p.error("Child should have a key");const E=p.enterKey(w._baseState.key);if(typeof h!="object")return p.error("Child expected, but input is not object");const I=w._encode(h[w._baseState.key],p,h);return p.leaveKey(E),I},this).filter(function(w){return w}),y=this._createEncoderBuffer(y);else if(m.tag==="seqof"||m.tag==="setof"){if(!m.args||m.args.length!==1)return p.error("Too many args for : "+m.tag);if(!Array.isArray(h))return p.error("seqof/setof, but data is not Array");const w=this.clone();w._baseState.implicit=null,y=this._createEncoderBuffer(h.map(function(E){const I=this._baseState;return this._getUse(I.args[0],h)._encode(E,p)},w))}else m.use!==null?v=this._getUse(m.use,g)._encode(h,p):(y=this._encodePrimitive(m.tag,h),b=!0);if(!m.any&&m.choice===null){const w=m.implicit!==null?m.implicit:m.tag,E=m.implicit===null?"universal":"context";w===null?m.use===null&&p.error("Tag could be omitted only for .use()"):m.use===null&&(v=this._encodeComposite(w,b,E,y))}return m.explicit!==null&&(v=this._encodeComposite(m.explicit,!1,"context",v)),v},f.prototype._encodeChoice=function(h,p){const g=this._baseState,m=g.choice[h.type];return m||c(!1,h.type+" not found in "+JSON.stringify(Object.keys(g.choice))),m._encode(h.value,p)},f.prototype._encodePrimitive=function(h,p){const g=this._baseState;if(/str$/.test(h))return this._encodeStr(p,h);if(h==="objid"&&g.args)return this._encodeObjid(p,g.reverseArgs[0],g.args[1]);if(h==="objid")return this._encodeObjid(p,null,null);if(h==="gentime"||h==="utctime")return this._encodeTime(p,h);if(h==="null_")return this._encodeNull();if(h==="int"||h==="enum")return this._encodeInt(p,g.args&&g.reverseArgs[0]);if(h==="bool")return this._encodeBool(p);if(h==="objDesc")return this._encodeStr(p,h);throw new Error("Unsupported tag: "+h)},f.prototype._isNumstr=function(h){return/^[0-9 ]*$/.test(h)},f.prototype._isPrintstr=function(h){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(h)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(r,n,o){const i=r("inherits");function a(c){this._reporterState={obj:null,path:[],options:c||{},errors:[]}}function s(c,l){this.path=c,this.rethrow(l)}o.Reporter=a,a.prototype.isError=function(c){return c instanceof s},a.prototype.save=function(){const c=this._reporterState;return{obj:c.obj,pathLen:c.path.length}},a.prototype.restore=function(c){const l=this._reporterState;l.obj=c.obj,l.path=l.path.slice(0,c.pathLen)},a.prototype.enterKey=function(c){return this._reporterState.path.push(c)},a.prototype.exitKey=function(c){const l=this._reporterState;l.path=l.path.slice(0,c-1)},a.prototype.leaveKey=function(c,l,u){const f=this._reporterState;this.exitKey(c),f.obj!==null&&(f.obj[l]=u)},a.prototype.path=function(){return this._reporterState.path.join("/")},a.prototype.enterObject=function(){const c=this._reporterState,l=c.obj;return c.obj={},l},a.prototype.leaveObject=function(c){const l=this._reporterState,u=l.obj;return l.obj=c,u},a.prototype.error=function(c){let l;const u=this._reporterState,f=c instanceof s;if(l=f?c:new s(u.path.map(function(d){return"["+JSON.stringify(d)+"]"}).join(""),c.message||c,c.stack),!u.options.partial)throw l;return f||u.errors.push(l),l},a.prototype.wrapResult=function(c){const l=this._reporterState;return l.options.partial?{result:this.isError(c)?null:c,errors:l.errors}:c},i(s,Error),s.prototype.rethrow=function(c){if(this.message=c+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(l){this.stack=l.stack}return this}},{inherits:440}],176:[function(r,n,o){function i(a){const s={};return Object.keys(a).forEach(function(c){(0|c)==c&&(c|=0);const l=a[c];s[l]=c}),s}o.tagClass={0:"universal",1:"application",2:"context",3:"private"},o.tagClassByName=i(o.tagClass),o.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"},o.tagByName=i(o.tag)},{}],177:[function(r,n,o){const i=o;i._reverse=function(a){const s={};return Object.keys(a).forEach(function(c){(0|c)==c&&(c|=0);const l=a[c];s[l]=c}),s},i.der=r("./der")},{"./der":176}],178:[function(r,n,o){const i=r("inherits"),a=r("bn.js"),s=r("../base/buffer").DecoderBuffer,c=r("../base/node"),l=r("../constants/der");function u(p){this.enc="der",this.name=p.name,this.entity=p,this.tree=new f,this.tree._init(p.body)}function f(p){c.call(this,"der",p)}function d(p,g){let m=p.readUInt8(g);if(p.isError(m))return m;const v=l.tagClass[m>>6],y=(32&m)==0;if((31&m)==31){let b=m;for(m=0;(128&b)==128;){if(b=p.readUInt8(g),p.isError(b))return b;m<<=7,m|=127&b}}else m&=31;return{cls:v,primitive:y,tag:m,tagStr:l.tag[m]}}function h(p,g,m){let v=p.readUInt8(m);if(p.isError(v))return v;if(!g&&v===128)return null;if(!(128&v))return v;const y=127&v;if(y>4)return p.error("length octect is too long");v=0;for(let b=0;b<y;b++){v<<=8;const w=p.readUInt8(m);if(p.isError(w))return w;v|=w}return v}n.exports=u,u.prototype.decode=function(p,g){return s.isDecoderBuffer(p)||(p=new s(p,g)),this.tree._decode(p,g)},i(f,c),f.prototype._peekTag=function(p,g,m){if(p.isEmpty())return!1;const v=p.save(),y=d(p,'Failed to peek tag: "'+g+'"');return p.isError(y)?y:(p.restore(v),y.tag===g||y.tagStr===g||y.tagStr+"of"===g||m)},f.prototype._decodeTag=function(p,g,m){const v=d(p,'Failed to decode tag of "'+g+'"');if(p.isError(v))return v;let y=h(p,v.primitive,'Failed to get length of "'+g+'"');if(p.isError(y))return y;if(!m&&v.tag!==g&&v.tagStr!==g&&v.tagStr+"of"!==g)return p.error('Failed to match tag: "'+g+'"');if(v.primitive||y!==null)return p.skip(y,'Failed to match body of: "'+g+'"');const b=p.save(),w=this._skipUntilEnd(p,'Failed to skip indefinite length body: "'+this.tag+'"');return p.isError(w)?w:(y=p.offset-b.offset,p.restore(b),p.skip(y,'Failed to match body of: "'+g+'"'))},f.prototype._skipUntilEnd=function(p,g){for(;;){const m=d(p,g);if(p.isError(m))return m;const v=h(p,m.primitive,g);if(p.isError(v))return v;let y;if(y=m.primitive||v!==null?p.skip(v):this._skipUntilEnd(p,g),p.isError(y))return y;if(m.tagStr==="end")break}},f.prototype._decodeList=function(p,g,m,v){const y=[];for(;!p.isEmpty();){const b=this._peekTag(p,"end");if(p.isError(b))return b;const w=m.decode(p,"der",v);if(p.isError(w)&&b)break;y.push(w)}return y},f.prototype._decodeStr=function(p,g){if(g==="bitstr"){const m=p.readUInt8();return p.isError(m)?m:{unused:m,data:p.raw()}}if(g==="bmpstr"){const m=p.raw();if(m.length%2==1)return p.error("Decoding of string type: bmpstr length mismatch");let v="";for(let y=0;y<m.length/2;y++)v+=String.fromCharCode(m.readUInt16BE(2*y));return v}if(g==="numstr"){const m=p.raw().toString("ascii");return this._isNumstr(m)?m:p.error("Decoding of string type: numstr unsupported characters")}if(g==="octstr"||g==="objDesc")return p.raw();if(g==="printstr"){const m=p.raw().toString("ascii");return this._isPrintstr(m)?m:p.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(g)?p.raw().toString():p.error("Decoding of string type: "+g+" unsupported")},f.prototype._decodeObjid=function(p,g,m){let v;const y=[];let b=0,w=0;for(;!p.isEmpty();)w=p.readUInt8(),b<<=7,b|=127&w,!(128&w)&&(y.push(b),b=0);128&w&&y.push(b);const E=y[0]/40|0,I=y[0]%40;if(v=m?y:[E,I].concat(y.slice(1)),g){let O=g[v.join(" ")];O===void 0&&(O=g[v.join(".")]),O!==void 0&&(v=O)}return v},f.prototype._decodeTime=function(p,g){const m=p.raw().toString();let v,y,b,w,E,I;if(g==="gentime")v=0|m.slice(0,4),y=0|m.slice(4,6),b=0|m.slice(6,8),w=0|m.slice(8,10),E=0|m.slice(10,12),I=0|m.slice(12,14);else{if(g!=="utctime")return p.error("Decoding "+g+" time is not supported yet");v=0|m.slice(0,2),y=0|m.slice(2,4),b=0|m.slice(4,6),w=0|m.slice(6,8),E=0|m.slice(8,10),I=0|m.slice(10,12),v=v<70?2e3+v:1900+v}return Date.UTC(v,y-1,b,w,E,I,0)},f.prototype._decodeNull=function(){return null},f.prototype._decodeBool=function(p){const g=p.readUInt8();return p.isError(g)?g:g!==0},f.prototype._decodeInt=function(p,g){const m=p.raw();let v=new a(m);return g&&(v=g[v.toString(10)]||v),v},f.prototype._use=function(p,g){return typeof p=="function"&&(p=p(g)),p._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(r,n,o){const i=o;i.der=r("./der"),i.pem=r("./pem")},{"./der":178,"./pem":180}],180:[function(r,n,o){const i=r("inherits"),a=r("safer-buffer").Buffer,s=r("./der");function c(l){s.call(this,l),this.enc="pem"}i(c,s),n.exports=c,c.prototype.decode=function(l,u){const f=l.toString().split(/[\r\n]+/g),d=u.label.toUpperCase(),h=/^-----(BEGIN|END) ([^-]+)-----$/;let p=-1,g=-1;for(let y=0;y<f.length;y++){const b=f[y].match(h);if(b!==null&&b[2]===d){if(p!==-1){if(b[1]!=="END")break;g=y;break}if(b[1]!=="BEGIN")break;p=y}}if(p===-1||g===-1)throw new Error("PEM section not found for: "+d);const m=f.slice(p+1,g).join("");m.replace(/[^a-z0-9+/=]+/gi,"");const v=a.from(m,"base64");return s.prototype.decode.call(this,v,u)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(r,n,o){const i=r("inherits"),a=r("safer-buffer").Buffer,s=r("../base/node"),c=r("../constants/der");function l(d){this.enc="der",this.name=d.name,this.entity=d,this.tree=new u,this.tree._init(d.body)}function u(d){s.call(this,"der",d)}function f(d){return d<10?"0"+d:d}n.exports=l,l.prototype.encode=function(d,h){return this.tree._encode(d,h).join()},i(u,s),u.prototype._encodeComposite=function(d,h,p,g){const m=function(b,w,E,I){let O;if(b==="seqof"?b="seq":b==="setof"&&(b="set"),c.tagByName.hasOwnProperty(b))O=c.tagByName[b];else{if(typeof b!="number"||(0|b)!==b)return I.error("Unknown tag: "+b);O=b}return O>=31?I.error("Multi-octet tag encoding unsupported"):(w||(O|=32),O|=c.tagClassByName[E||"universal"]<<6,O)}(d,h,p,this.reporter);if(g.length<128){const b=a.alloc(2);return b[0]=m,b[1]=g.length,this._createEncoderBuffer([b,g])}let v=1;for(let b=g.length;b>=256;b>>=8)v++;const y=a.alloc(2+v);y[0]=m,y[1]=128|v;for(let b=1+v,w=g.length;w>0;b--,w>>=8)y[b]=255&w;return this._createEncoderBuffer([y,g])},u.prototype._encodeStr=function(d,h){if(h==="bitstr")return this._createEncoderBuffer([0|d.unused,d.data]);if(h==="bmpstr"){const p=a.alloc(2*d.length);for(let g=0;g<d.length;g++)p.writeUInt16BE(d.charCodeAt(g),2*g);return this._createEncoderBuffer(p)}return h==="numstr"?this._isNumstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: numstr supports only digits and space"):h==="printstr"?this._isPrintstr(d)?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(h)||h==="objDesc"?this._createEncoderBuffer(d):this.reporter.error("Encoding of string type: "+h+" unsupported")},u.prototype._encodeObjid=function(d,h,p){if(typeof d=="string"){if(!h)return this.reporter.error("string objid given, but no values map found");if(!h.hasOwnProperty(d))return this.reporter.error("objid not found in values map");d=h[d].split(/[\s.]+/g);for(let y=0;y<d.length;y++)d[y]|=0}else if(Array.isArray(d)){d=d.slice();for(let y=0;y<d.length;y++)d[y]|=0}if(!Array.isArray(d))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(d));if(!p){if(d[1]>=40)return this.reporter.error("Second objid identifier OOB");d.splice(0,2,40*d[0]+d[1])}let g=0;for(let y=0;y<d.length;y++){let b=d[y];for(g++;b>=128;b>>=7)g++}const m=a.alloc(g);let v=m.length-1;for(let y=d.length-1;y>=0;y--){let b=d[y];for(m[v--]=127&b;(b>>=7)>0;)m[v--]=128|127&b}return this._createEncoderBuffer(m)},u.prototype._encodeTime=function(d,h){let p;const g=new Date(d);return h==="gentime"?p=[f(g.getUTCFullYear()),f(g.getUTCMonth()+1),f(g.getUTCDate()),f(g.getUTCHours()),f(g.getUTCMinutes()),f(g.getUTCSeconds()),"Z"].join(""):h==="utctime"?p=[f(g.getUTCFullYear()%100),f(g.getUTCMonth()+1),f(g.getUTCDate()),f(g.getUTCHours()),f(g.getUTCMinutes()),f(g.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+h+" time is not supported yet"),this._encodeStr(p,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(d,h){if(typeof d=="string"){if(!h)return this.reporter.error("String int or enum given, but no values map");if(!h.hasOwnProperty(d))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(d));d=h[d]}if(typeof d!="number"&&!a.isBuffer(d)){const m=d.toArray();!d.sign&&128&m[0]&&m.unshift(0),d=a.from(m)}if(a.isBuffer(d)){let m=d.length;d.length===0&&m++;const v=a.alloc(m);return d.copy(v),d.length===0&&(v[0]=0),this._createEncoderBuffer(v)}if(d<128)return this._createEncoderBuffer(d);if(d<256)return this._createEncoderBuffer([0,d]);let p=1;for(let m=d;m>=256;m>>=8)p++;const g=new Array(p);for(let m=g.length-1;m>=0;m--)g[m]=255&d,d>>=8;return 128&g[0]&&g.unshift(0),this._createEncoderBuffer(a.from(g))},u.prototype._encodeBool=function(d){return this._createEncoderBuffer(d?255:0)},u.prototype._use=function(d,h){return typeof d=="function"&&(d=d(h)),d._getEncoder("der").tree},u.prototype._skipDefault=function(d,h,p){const g=this._baseState;let m;if(g.default===null)return!1;const v=d.join();if(g.defaultBuffer===void 0&&(g.defaultBuffer=this._encodeValue(g.default,h,p).join()),v.length!==g.defaultBuffer.length)return!1;for(m=0;m<v.length;m++)if(v[m]!==g.defaultBuffer[m])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(r,n,o){const i=o;i.der=r("./der"),i.pem=r("./pem")},{"./der":181,"./pem":183}],183:[function(r,n,o){const i=r("inherits"),a=r("./der");function s(c){a.call(this,c),this.enc="pem"}i(s,a),n.exports=s,s.prototype.encode=function(c,l){const u=a.prototype.encode.call(this,c).toString("base64"),f=["-----BEGIN "+l.label+"-----"];for(let d=0;d<u.length;d+=64)f.push(u.slice(d,d+64));return f.push("-----END "+l.label+"-----"),f.join(`
`)}},{"./der":181,inherits:440}],184:[function(r,n,o){(function(i,a){function s(T,P){if(!T)throw new Error(P||"Assertion failed")}function c(T,P){T.super_=P;var _=function(){};_.prototype=P.prototype,T.prototype=new _,T.prototype.constructor=T}function l(T,P,_){if(l.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&(P!=="le"&&P!=="be"||(_=P,P=10),this._init(T||0,P||10,_||"be"))}var u;typeof i=="object"?i.exports=l:(void 0).BN=l,l.BN=l,l.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:r("buffer").Buffer}catch{}function f(T,P){var _=T.charCodeAt(P);return _>=65&&_<=70?_-55:_>=97&&_<=102?_-87:_-48&15}function d(T,P,_){var C=f(T,_);return _-1>=P&&(C|=f(T,_-1)<<4),C}function h(T,P,_,C){for(var S=0,x=Math.min(T.length,_),k=P;k<x;k++){var L=T.charCodeAt(k)-48;S*=C,S+=L>=49?L-49+10:L>=17?L-17+10:L}return S}l.isBN=function(T){return T instanceof l||T!==null&&typeof T=="object"&&T.constructor.wordSize===l.wordSize&&Array.isArray(T.words)},l.max=function(T,P){return T.cmp(P)>0?T:P},l.min=function(T,P){return T.cmp(P)<0?T:P},l.prototype._init=function(T,P,_){if(typeof T=="number")return this._initNumber(T,P,_);if(typeof T=="object")return this._initArray(T,P,_);P==="hex"&&(P=16),s(P===(0|P)&&P>=2&&P<=36);var C=0;(T=T.toString().replace(/\s+/g,""))[0]==="-"&&(C++,this.negative=1),C<T.length&&(P===16?this._parseHex(T,C,_):(this._parseBase(T,P,C),_==="le"&&this._initArray(this.toArray(),P,_)))},l.prototype._initNumber=function(T,P,_){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):(s(T<9007199254740992),this.words=[67108863&T,T/67108864&67108863,1],this.length=3),_==="le"&&this._initArray(this.toArray(),P,_)},l.prototype._initArray=function(T,P,_){if(s(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 C=0;C<this.length;C++)this.words[C]=0;var S,x,k=0;if(_==="be")for(C=T.length-1,S=0;C>=0;C-=3)x=T[C]|T[C-1]<<8|T[C-2]<<16,this.words[S]|=x<<k&67108863,this.words[S+1]=x>>>26-k&67108863,(k+=24)>=26&&(k-=26,S++);else if(_==="le")for(C=0,S=0;C<T.length;C+=3)x=T[C]|T[C+1]<<8|T[C+2]<<16,this.words[S]|=x<<k&67108863,this.words[S+1]=x>>>26-k&67108863,(k+=24)>=26&&(k-=26,S++);return this.strip()},l.prototype._parseHex=function(T,P,_){this.length=Math.ceil((T.length-P)/6),this.words=new Array(this.length);for(var C=0;C<this.length;C++)this.words[C]=0;var S,x=0,k=0;if(_==="be")for(C=T.length-1;C>=P;C-=2)S=d(T,P,C)<<x,this.words[k]|=67108863&S,x>=18?(x-=18,k+=1,this.words[k]|=S>>>26):x+=8;else for(C=(T.length-P)%2==0?P+1:P;C<T.length;C+=2)S=d(T,P,C)<<x,this.words[k]|=67108863&S,x>=18?(x-=18,k+=1,this.words[k]|=S>>>26):x+=8;this.strip()},l.prototype._parseBase=function(T,P,_){this.words=[0],this.length=1;for(var C=0,S=1;S<=67108863;S*=P)C++;C--,S=S/P|0;for(var x=T.length-_,k=x%C,L=Math.min(x,x-k)+_,j=0,z=_;z<L;z+=C)j=h(T,z,z+C,P),this.imuln(S),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(k!==0){var Y=1;for(j=h(T,z,T.length,P),z=0;z<k;z++)Y*=P;this.imuln(Y),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}this.strip()},l.prototype.copy=function(T){T.words=new Array(this.length);for(var P=0;P<this.length;P++)T.words[P]=this.words[P];T.length=this.length,T.negative=this.negative,T.red=this.red},l.prototype.clone=function(){var T=new l(null);return this.copy(T),T},l.prototype._expand=function(T){for(;this.length<T;)this.words[this.length++]=0;return this},l.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},l.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"],g=[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],m=[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 v(T,P,_){_.negative=P.negative^T.negative;var C=T.length+P.length|0;_.length=C,C=C-1|0;var S=0|T.words[0],x=0|P.words[0],k=S*x,L=67108863&k,j=k/67108864|0;_.words[0]=L;for(var z=1;z<C;z++){for(var Y=j>>>26,K=67108863&j,Q=Math.min(z,P.length-1),q=Math.max(0,z-T.length+1);q<=Q;q++){var J=z-q|0;Y+=(k=(S=0|T.words[J])*(x=0|P.words[q])+K)/67108864|0,K=67108863&k}_.words[z]=0|K,j=0|Y}return j!==0?_.words[z]=0|j:_.length--,_.strip()}l.prototype.toString=function(T,P){var _;if(P=0|P||1,(T=T||10)===16||T==="hex"){_="";for(var C=0,S=0,x=0;x<this.length;x++){var k=this.words[x],L=(16777215&(k<<C|S)).toString(16);_=(S=k>>>24-C&16777215)!==0||x!==this.length-1?p[6-L.length]+L+_:L+_,(C+=2)>=26&&(C-=26,x--)}for(S!==0&&(_=S.toString(16)+_);_.length%P!=0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}if(T===(0|T)&&T>=2&&T<=36){var j=g[T],z=m[T];_="";var Y=this.clone();for(Y.negative=0;!Y.isZero();){var K=Y.modn(z).toString(T);_=(Y=Y.idivn(z)).isZero()?K+_:p[j-K.length]+K+_}for(this.isZero()&&(_="0"+_);_.length%P!=0;)_="0"+_;return this.negative!==0&&(_="-"+_),_}s(!1,"Base should be between 2 and 36")},l.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&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-T:T},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(T,P){return s(u!==void 0),this.toArrayLike(u,T,P)},l.prototype.toArray=function(T,P){return this.toArrayLike(Array,T,P)},l.prototype.toArrayLike=function(T,P,_){var C=this.byteLength(),S=_||Math.max(1,C);s(C<=S,"byte array longer than desired length"),s(S>0,"Requested array length <= 0"),this.strip();var x,k,L=P==="le",j=new T(S),z=this.clone();if(L){for(k=0;!z.isZero();k++)x=z.andln(255),z.iushrn(8),j[k]=x;for(;k<S;k++)j[k]=0}else{for(k=0;k<S-C;k++)j[k]=0;for(k=0;!z.isZero();k++)x=z.andln(255),z.iushrn(8),j[S-k-1]=x}return j},Math.clz32?l.prototype._countBits=function(T){return 32-Math.clz32(T)}:l.prototype._countBits=function(T){var P=T,_=0;return P>=4096&&(_+=13,P>>>=13),P>=64&&(_+=7,P>>>=7),P>=8&&(_+=4,P>>>=4),P>=2&&(_+=2,P>>>=2),_+P},l.prototype._zeroBits=function(T){if(T===0)return 26;var P=T,_=0;return!(8191&P)&&(_+=13,P>>>=13),!(127&P)&&(_+=7,P>>>=7),!(15&P)&&(_+=4,P>>>=4),!(3&P)&&(_+=2,P>>>=2),!(1&P)&&_++,_},l.prototype.bitLength=function(){var T=this.words[this.length-1],P=this._countBits(T);return 26*(this.length-1)+P},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var T=0,P=0;P<this.length;P++){var _=this._zeroBits(this.words[P]);if(T+=_,_!==26)break}return T},l.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},l.prototype.toTwos=function(T){return this.negative!==0?this.abs().inotn(T).iaddn(1):this.clone()},l.prototype.fromTwos=function(T){return this.testn(T-1)?this.notn(T).iaddn(1).ineg():this.clone()},l.prototype.isNeg=function(){return this.negative!==0},l.prototype.neg=function(){return this.clone().ineg()},l.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},l.prototype.iuor=function(T){for(;this.length<T.length;)this.words[this.length++]=0;for(var P=0;P<T.length;P++)this.words[P]=this.words[P]|T.words[P];return this.strip()},l.prototype.ior=function(T){return s((this.negative|T.negative)==0),this.iuor(T)},l.prototype.or=function(T){return this.length>T.length?this.clone().ior(T):T.clone().ior(this)},l.prototype.uor=function(T){return this.length>T.length?this.clone().iuor(T):T.clone().iuor(this)},l.prototype.iuand=function(T){var P;P=this.length>T.length?T:this;for(var _=0;_<P.length;_++)this.words[_]=this.words[_]&T.words[_];return this.length=P.length,this.strip()},l.prototype.iand=function(T){return s((this.negative|T.negative)==0),this.iuand(T)},l.prototype.and=function(T){return this.length>T.length?this.clone().iand(T):T.clone().iand(this)},l.prototype.uand=function(T){return this.length>T.length?this.clone().iuand(T):T.clone().iuand(this)},l.prototype.iuxor=function(T){var P,_;this.length>T.length?(P=this,_=T):(P=T,_=this);for(var C=0;C<_.length;C++)this.words[C]=P.words[C]^_.words[C];if(this!==P)for(;C<P.length;C++)this.words[C]=P.words[C];return this.length=P.length,this.strip()},l.prototype.ixor=function(T){return s((this.negative|T.negative)==0),this.iuxor(T)},l.prototype.xor=function(T){return this.length>T.length?this.clone().ixor(T):T.clone().ixor(this)},l.prototype.uxor=function(T){return this.length>T.length?this.clone().iuxor(T):T.clone().iuxor(this)},l.prototype.inotn=function(T){s(typeof T=="number"&&T>=0);var P=0|Math.ceil(T/26),_=T%26;this._expand(P),_>0&&P--;for(var C=0;C<P;C++)this.words[C]=67108863&~this.words[C];return _>0&&(this.words[C]=~this.words[C]&67108863>>26-_),this.strip()},l.prototype.notn=function(T){return this.clone().inotn(T)},l.prototype.setn=function(T,P){s(typeof T=="number"&&T>=0);var _=T/26|0,C=T%26;return this._expand(_+1),this.words[_]=P?this.words[_]|1<<C:this.words[_]&~(1<<C),this.strip()},l.prototype.iadd=function(T){var P,_,C;if(this.negative!==0&&T.negative===0)return this.negative=0,P=this.isub(T),this.negative^=1,this._normSign();if(this.negative===0&&T.negative!==0)return T.negative=0,P=this.isub(T),T.negative=1,P._normSign();this.length>T.length?(_=this,C=T):(_=T,C=this);for(var S=0,x=0;x<C.length;x++)P=(0|_.words[x])+(0|C.words[x])+S,this.words[x]=67108863&P,S=P>>>26;for(;S!==0&&x<_.length;x++)P=(0|_.words[x])+S,this.words[x]=67108863&P,S=P>>>26;if(this.length=_.length,S!==0)this.words[this.length]=S,this.length++;else if(_!==this)for(;x<_.length;x++)this.words[x]=_.words[x];return this},l.prototype.add=function(T){var P;return T.negative!==0&&this.negative===0?(T.negative=0,P=this.sub(T),T.negative^=1,P):T.negative===0&&this.negative!==0?(this.negative=0,P=T.sub(this),this.negative=1,P):this.length>T.length?this.clone().iadd(T):T.clone().iadd(this)},l.prototype.isub=function(T){if(T.negative!==0){T.negative=0;var P=this.iadd(T);return T.negative=1,P._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(T),this.negative=1,this._normSign();var _,C,S=this.cmp(T);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;S>0?(_=this,C=T):(_=T,C=this);for(var x=0,k=0;k<C.length;k++)x=(P=(0|_.words[k])-(0|C.words[k])+x)>>26,this.words[k]=67108863&P;for(;x!==0&&k<_.length;k++)x=(P=(0|_.words[k])+x)>>26,this.words[k]=67108863&P;if(x===0&&k<_.length&&_!==this)for(;k<_.length;k++)this.words[k]=_.words[k];return this.length=Math.max(this.length,k),_!==this&&(this.negative=1),this.strip()},l.prototype.sub=function(T){return this.clone().isub(T)};var y=function(T,P,_){var C,S,x,k=T.words,L=P.words,j=_.words,z=0,Y=0|k[0],K=8191&Y,Q=Y>>>13,q=0|k[1],J=8191&q,G=q>>>13,V=0|k[2],X=8191&V,te=V>>>13,ee=0|k[3],re=8191&ee,se=ee>>>13,pe=0|k[4],ce=8191&pe,ne=pe>>>13,he=0|k[5],oe=8191&he,le=he>>>13,de=0|k[6],ve=8191&de,we=de>>>13,ie=0|k[7],ge=8191&ie,Pe=ie>>>13,Fe=0|k[8],Ie=8191&Fe,Oe=Fe>>>13,$e=0|k[9],et=8191&$e,Ze=$e>>>13,Ne=0|L[0],Qe=8191&Ne,Xe=Ne>>>13,rt=0|L[1],ht=8191&rt,At=rt>>>13,Qt=0|L[2],Nt=8191&Qt,Ue=Qt>>>13,Ye=0|L[3],tt=8191&Ye,st=Ye>>>13,mt=0|L[4],_t=8191&mt,Pt=mt>>>13,Ut=0|L[5],wt=8191&Ut,Dt=Ut>>>13,qt=0|L[6],Tt=8191&qt,Me=qt>>>13,Ge=0|L[7],nt=8191&Ge,fe=Ge>>>13,ke=0|L[8],be=8191&ke,Ce=ke>>>13,Ee=0|L[9],me=8191&Ee,_e=Ee>>>13;_.negative=T.negative^P.negative,_.length=19;var Be=(z+(C=Math.imul(K,Qe))|0)+((8191&(S=(S=Math.imul(K,Xe))+Math.imul(Q,Qe)|0))<<13)|0;z=((x=Math.imul(Q,Xe))+(S>>>13)|0)+(Be>>>26)|0,Be&=67108863,C=Math.imul(J,Qe),S=(S=Math.imul(J,Xe))+Math.imul(G,Qe)|0,x=Math.imul(G,Xe);var De=(z+(C=C+Math.imul(K,ht)|0)|0)+((8191&(S=(S=S+Math.imul(K,At)|0)+Math.imul(Q,ht)|0))<<13)|0;z=((x=x+Math.imul(Q,At)|0)+(S>>>13)|0)+(De>>>26)|0,De&=67108863,C=Math.imul(X,Qe),S=(S=Math.imul(X,Xe))+Math.imul(te,Qe)|0,x=Math.imul(te,Xe),C=C+Math.imul(J,ht)|0,S=(S=S+Math.imul(J,At)|0)+Math.imul(G,ht)|0,x=x+Math.imul(G,At)|0;var je=(z+(C=C+Math.imul(K,Nt)|0)|0)+((8191&(S=(S=S+Math.imul(K,Ue)|0)+Math.imul(Q,Nt)|0))<<13)|0;z=((x=x+Math.imul(Q,Ue)|0)+(S>>>13)|0)+(je>>>26)|0,je&=67108863,C=Math.imul(re,Qe),S=(S=Math.imul(re,Xe))+Math.imul(se,Qe)|0,x=Math.imul(se,Xe),C=C+Math.imul(X,ht)|0,S=(S=S+Math.imul(X,At)|0)+Math.imul(te,ht)|0,x=x+Math.imul(te,At)|0,C=C+Math.imul(J,Nt)|0,S=(S=S+Math.imul(J,Ue)|0)+Math.imul(G,Nt)|0,x=x+Math.imul(G,Ue)|0;var Le=(z+(C=C+Math.imul(K,tt)|0)|0)+((8191&(S=(S=S+Math.imul(K,st)|0)+Math.imul(Q,tt)|0))<<13)|0;z=((x=x+Math.imul(Q,st)|0)+(S>>>13)|0)+(Le>>>26)|0,Le&=67108863,C=Math.imul(ce,Qe),S=(S=Math.imul(ce,Xe))+Math.imul(ne,Qe)|0,x=Math.imul(ne,Xe),C=C+Math.imul(re,ht)|0,S=(S=S+Math.imul(re,At)|0)+Math.imul(se,ht)|0,x=x+Math.imul(se,At)|0,C=C+Math.imul(X,Nt)|0,S=(S=S+Math.imul(X,Ue)|0)+Math.imul(te,Nt)|0,x=x+Math.imul(te,Ue)|0,C=C+Math.imul(J,tt)|0,S=(S=S+Math.imul(J,st)|0)+Math.imul(G,tt)|0,x=x+Math.imul(G,st)|0;var lt=(z+(C=C+Math.imul(K,_t)|0)|0)+((8191&(S=(S=S+Math.imul(K,Pt)|0)+Math.imul(Q,_t)|0))<<13)|0;z=((x=x+Math.imul(Q,Pt)|0)+(S>>>13)|0)+(lt>>>26)|0,lt&=67108863,C=Math.imul(oe,Qe),S=(S=Math.imul(oe,Xe))+Math.imul(le,Qe)|0,x=Math.imul(le,Xe),C=C+Math.imul(ce,ht)|0,S=(S=S+Math.imul(ce,At)|0)+Math.imul(ne,ht)|0,x=x+Math.imul(ne,At)|0,C=C+Math.imul(re,Nt)|0,S=(S=S+Math.imul(re,Ue)|0)+Math.imul(se,Nt)|0,x=x+Math.imul(se,Ue)|0,C=C+Math.imul(X,tt)|0,S=(S=S+Math.imul(X,st)|0)+Math.imul(te,tt)|0,x=x+Math.imul(te,st)|0,C=C+Math.imul(J,_t)|0,S=(S=S+Math.imul(J,Pt)|0)+Math.imul(G,_t)|0,x=x+Math.imul(G,Pt)|0;var vt=(z+(C=C+Math.imul(K,wt)|0)|0)+((8191&(S=(S=S+Math.imul(K,Dt)|0)+Math.imul(Q,wt)|0))<<13)|0;z=((x=x+Math.imul(Q,Dt)|0)+(S>>>13)|0)+(vt>>>26)|0,vt&=67108863,C=Math.imul(ve,Qe),S=(S=Math.imul(ve,Xe))+Math.imul(we,Qe)|0,x=Math.imul(we,Xe),C=C+Math.imul(oe,ht)|0,S=(S=S+Math.imul(oe,At)|0)+Math.imul(le,ht)|0,x=x+Math.imul(le,At)|0,C=C+Math.imul(ce,Nt)|0,S=(S=S+Math.imul(ce,Ue)|0)+Math.imul(ne,Nt)|0,x=x+Math.imul(ne,Ue)|0,C=C+Math.imul(re,tt)|0,S=(S=S+Math.imul(re,st)|0)+Math.imul(se,tt)|0,x=x+Math.imul(se,st)|0,C=C+Math.imul(X,_t)|0,S=(S=S+Math.imul(X,Pt)|0)+Math.imul(te,_t)|0,x=x+Math.imul(te,Pt)|0,C=C+Math.imul(J,wt)|0,S=(S=S+Math.imul(J,Dt)|0)+Math.imul(G,wt)|0,x=x+Math.imul(G,Dt)|0;var Bt=(z+(C=C+Math.imul(K,Tt)|0)|0)+((8191&(S=(S=S+Math.imul(K,Me)|0)+Math.imul(Q,Tt)|0))<<13)|0;z=((x=x+Math.imul(Q,Me)|0)+(S>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,C=Math.imul(ge,Qe),S=(S=Math.imul(ge,Xe))+Math.imul(Pe,Qe)|0,x=Math.imul(Pe,Xe),C=C+Math.imul(ve,ht)|0,S=(S=S+Math.imul(ve,At)|0)+Math.imul(we,ht)|0,x=x+Math.imul(we,At)|0,C=C+Math.imul(oe,Nt)|0,S=(S=S+Math.imul(oe,Ue)|0)+Math.imul(le,Nt)|0,x=x+Math.imul(le,Ue)|0,C=C+Math.imul(ce,tt)|0,S=(S=S+Math.imul(ce,st)|0)+Math.imul(ne,tt)|0,x=x+Math.imul(ne,st)|0,C=C+Math.imul(re,_t)|0,S=(S=S+Math.imul(re,Pt)|0)+Math.imul(se,_t)|0,x=x+Math.imul(se,Pt)|0,C=C+Math.imul(X,wt)|0,S=(S=S+Math.imul(X,Dt)|0)+Math.imul(te,wt)|0,x=x+Math.imul(te,Dt)|0,C=C+Math.imul(J,Tt)|0,S=(S=S+Math.imul(J,Me)|0)+Math.imul(G,Tt)|0,x=x+Math.imul(G,Me)|0;var Se=(z+(C=C+Math.imul(K,nt)|0)|0)+((8191&(S=(S=S+Math.imul(K,fe)|0)+Math.imul(Q,nt)|0))<<13)|0;z=((x=x+Math.imul(Q,fe)|0)+(S>>>13)|0)+(Se>>>26)|0,Se&=67108863,C=Math.imul(Ie,Qe),S=(S=Math.imul(Ie,Xe))+Math.imul(Oe,Qe)|0,x=Math.imul(Oe,Xe),C=C+Math.imul(ge,ht)|0,S=(S=S+Math.imul(ge,At)|0)+Math.imul(Pe,ht)|0,x=x+Math.imul(Pe,At)|0,C=C+Math.imul(ve,Nt)|0,S=(S=S+Math.imul(ve,Ue)|0)+Math.imul(we,Nt)|0,x=x+Math.imul(we,Ue)|0,C=C+Math.imul(oe,tt)|0,S=(S=S+Math.imul(oe,st)|0)+Math.imul(le,tt)|0,x=x+Math.imul(le,st)|0,C=C+Math.imul(ce,_t)|0,S=(S=S+Math.imul(ce,Pt)|0)+Math.imul(ne,_t)|0,x=x+Math.imul(ne,Pt)|0,C=C+Math.imul(re,wt)|0,S=(S=S+Math.imul(re,Dt)|0)+Math.imul(se,wt)|0,x=x+Math.imul(se,Dt)|0,C=C+Math.imul(X,Tt)|0,S=(S=S+Math.imul(X,Me)|0)+Math.imul(te,Tt)|0,x=x+Math.imul(te,Me)|0,C=C+Math.imul(J,nt)|0,S=(S=S+Math.imul(J,fe)|0)+Math.imul(G,nt)|0,x=x+Math.imul(G,fe)|0;var He=(z+(C=C+Math.imul(K,be)|0)|0)+((8191&(S=(S=S+Math.imul(K,Ce)|0)+Math.imul(Q,be)|0))<<13)|0;z=((x=x+Math.imul(Q,Ce)|0)+(S>>>13)|0)+(He>>>26)|0,He&=67108863,C=Math.imul(et,Qe),S=(S=Math.imul(et,Xe))+Math.imul(Ze,Qe)|0,x=Math.imul(Ze,Xe),C=C+Math.imul(Ie,ht)|0,S=(S=S+Math.imul(Ie,At)|0)+Math.imul(Oe,ht)|0,x=x+Math.imul(Oe,At)|0,C=C+Math.imul(ge,Nt)|0,S=(S=S+Math.imul(ge,Ue)|0)+Math.imul(Pe,Nt)|0,x=x+Math.imul(Pe,Ue)|0,C=C+Math.imul(ve,tt)|0,S=(S=S+Math.imul(ve,st)|0)+Math.imul(we,tt)|0,x=x+Math.imul(we,st)|0,C=C+Math.imul(oe,_t)|0,S=(S=S+Math.imul(oe,Pt)|0)+Math.imul(le,_t)|0,x=x+Math.imul(le,Pt)|0,C=C+Math.imul(ce,wt)|0,S=(S=S+Math.imul(ce,Dt)|0)+Math.imul(ne,wt)|0,x=x+Math.imul(ne,Dt)|0,C=C+Math.imul(re,Tt)|0,S=(S=S+Math.imul(re,Me)|0)+Math.imul(se,Tt)|0,x=x+Math.imul(se,Me)|0,C=C+Math.imul(X,nt)|0,S=(S=S+Math.imul(X,fe)|0)+Math.imul(te,nt)|0,x=x+Math.imul(te,fe)|0,C=C+Math.imul(J,be)|0,S=(S=S+Math.imul(J,Ce)|0)+Math.imul(G,be)|0,x=x+Math.imul(G,Ce)|0;var ct=(z+(C=C+Math.imul(K,me)|0)|0)+((8191&(S=(S=S+Math.imul(K,_e)|0)+Math.imul(Q,me)|0))<<13)|0;z=((x=x+Math.imul(Q,_e)|0)+(S>>>13)|0)+(ct>>>26)|0,ct&=67108863,C=Math.imul(et,ht),S=(S=Math.imul(et,At))+Math.imul(Ze,ht)|0,x=Math.imul(Ze,At),C=C+Math.imul(Ie,Nt)|0,S=(S=S+Math.imul(Ie,Ue)|0)+Math.imul(Oe,Nt)|0,x=x+Math.imul(Oe,Ue)|0,C=C+Math.imul(ge,tt)|0,S=(S=S+Math.imul(ge,st)|0)+Math.imul(Pe,tt)|0,x=x+Math.imul(Pe,st)|0,C=C+Math.imul(ve,_t)|0,S=(S=S+Math.imul(ve,Pt)|0)+Math.imul(we,_t)|0,x=x+Math.imul(we,Pt)|0,C=C+Math.imul(oe,wt)|0,S=(S=S+Math.imul(oe,Dt)|0)+Math.imul(le,wt)|0,x=x+Math.imul(le,Dt)|0,C=C+Math.imul(ce,Tt)|0,S=(S=S+Math.imul(ce,Me)|0)+Math.imul(ne,Tt)|0,x=x+Math.imul(ne,Me)|0,C=C+Math.imul(re,nt)|0,S=(S=S+Math.imul(re,fe)|0)+Math.imul(se,nt)|0,x=x+Math.imul(se,fe)|0,C=C+Math.imul(X,be)|0,S=(S=S+Math.imul(X,Ce)|0)+Math.imul(te,be)|0,x=x+Math.imul(te,Ce)|0;var xt=(z+(C=C+Math.imul(J,me)|0)|0)+((8191&(S=(S=S+Math.imul(J,_e)|0)+Math.imul(G,me)|0))<<13)|0;z=((x=x+Math.imul(G,_e)|0)+(S>>>13)|0)+(xt>>>26)|0,xt&=67108863,C=Math.imul(et,Nt),S=(S=Math.imul(et,Ue))+Math.imul(Ze,Nt)|0,x=Math.imul(Ze,Ue),C=C+Math.imul(Ie,tt)|0,S=(S=S+Math.imul(Ie,st)|0)+Math.imul(Oe,tt)|0,x=x+Math.imul(Oe,st)|0,C=C+Math.imul(ge,_t)|0,S=(S=S+Math.imul(ge,Pt)|0)+Math.imul(Pe,_t)|0,x=x+Math.imul(Pe,Pt)|0,C=C+Math.imul(ve,wt)|0,S=(S=S+Math.imul(ve,Dt)|0)+Math.imul(we,wt)|0,x=x+Math.imul(we,Dt)|0,C=C+Math.imul(oe,Tt)|0,S=(S=S+Math.imul(oe,Me)|0)+Math.imul(le,Tt)|0,x=x+Math.imul(le,Me)|0,C=C+Math.imul(ce,nt)|0,S=(S=S+Math.imul(ce,fe)|0)+Math.imul(ne,nt)|0,x=x+Math.imul(ne,fe)|0,C=C+Math.imul(re,be)|0,S=(S=S+Math.imul(re,Ce)|0)+Math.imul(se,be)|0,x=x+Math.imul(se,Ce)|0;var Zt=(z+(C=C+Math.imul(X,me)|0)|0)+((8191&(S=(S=S+Math.imul(X,_e)|0)+Math.imul(te,me)|0))<<13)|0;z=((x=x+Math.imul(te,_e)|0)+(S>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,C=Math.imul(et,tt),S=(S=Math.imul(et,st))+Math.imul(Ze,tt)|0,x=Math.imul(Ze,st),C=C+Math.imul(Ie,_t)|0,S=(S=S+Math.imul(Ie,Pt)|0)+Math.imul(Oe,_t)|0,x=x+Math.imul(Oe,Pt)|0,C=C+Math.imul(ge,wt)|0,S=(S=S+Math.imul(ge,Dt)|0)+Math.imul(Pe,wt)|0,x=x+Math.imul(Pe,Dt)|0,C=C+Math.imul(ve,Tt)|0,S=(S=S+Math.imul(ve,Me)|0)+Math.imul(we,Tt)|0,x=x+Math.imul(we,Me)|0,C=C+Math.imul(oe,nt)|0,S=(S=S+Math.imul(oe,fe)|0)+Math.imul(le,nt)|0,x=x+Math.imul(le,fe)|0,C=C+Math.imul(ce,be)|0,S=(S=S+Math.imul(ce,Ce)|0)+Math.imul(ne,be)|0,x=x+Math.imul(ne,Ce)|0;var Rt=(z+(C=C+Math.imul(re,me)|0)|0)+((8191&(S=(S=S+Math.imul(re,_e)|0)+Math.imul(se,me)|0))<<13)|0;z=((x=x+Math.imul(se,_e)|0)+(S>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,C=Math.imul(et,_t),S=(S=Math.imul(et,Pt))+Math.imul(Ze,_t)|0,x=Math.imul(Ze,Pt),C=C+Math.imul(Ie,wt)|0,S=(S=S+Math.imul(Ie,Dt)|0)+Math.imul(Oe,wt)|0,x=x+Math.imul(Oe,Dt)|0,C=C+Math.imul(ge,Tt)|0,S=(S=S+Math.imul(ge,Me)|0)+Math.imul(Pe,Tt)|0,x=x+Math.imul(Pe,Me)|0,C=C+Math.imul(ve,nt)|0,S=(S=S+Math.imul(ve,fe)|0)+Math.imul(we,nt)|0,x=x+Math.imul(we,fe)|0,C=C+Math.imul(oe,be)|0,S=(S=S+Math.imul(oe,Ce)|0)+Math.imul(le,be)|0,x=x+Math.imul(le,Ce)|0;var Ht=(z+(C=C+Math.imul(ce,me)|0)|0)+((8191&(S=(S=S+Math.imul(ce,_e)|0)+Math.imul(ne,me)|0))<<13)|0;z=((x=x+Math.imul(ne,_e)|0)+(S>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,C=Math.imul(et,wt),S=(S=Math.imul(et,Dt))+Math.imul(Ze,wt)|0,x=Math.imul(Ze,Dt),C=C+Math.imul(Ie,Tt)|0,S=(S=S+Math.imul(Ie,Me)|0)+Math.imul(Oe,Tt)|0,x=x+Math.imul(Oe,Me)|0,C=C+Math.imul(ge,nt)|0,S=(S=S+Math.imul(ge,fe)|0)+Math.imul(Pe,nt)|0,x=x+Math.imul(Pe,fe)|0,C=C+Math.imul(ve,be)|0,S=(S=S+Math.imul(ve,Ce)|0)+Math.imul(we,be)|0,x=x+Math.imul(we,Ce)|0;var Nr=(z+(C=C+Math.imul(oe,me)|0)|0)+((8191&(S=(S=S+Math.imul(oe,_e)|0)+Math.imul(le,me)|0))<<13)|0;z=((x=x+Math.imul(le,_e)|0)+(S>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,C=Math.imul(et,Tt),S=(S=Math.imul(et,Me))+Math.imul(Ze,Tt)|0,x=Math.imul(Ze,Me),C=C+Math.imul(Ie,nt)|0,S=(S=S+Math.imul(Ie,fe)|0)+Math.imul(Oe,nt)|0,x=x+Math.imul(Oe,fe)|0,C=C+Math.imul(ge,be)|0,S=(S=S+Math.imul(ge,Ce)|0)+Math.imul(Pe,be)|0,x=x+Math.imul(Pe,Ce)|0;var kr=(z+(C=C+Math.imul(ve,me)|0)|0)+((8191&(S=(S=S+Math.imul(ve,_e)|0)+Math.imul(we,me)|0))<<13)|0;z=((x=x+Math.imul(we,_e)|0)+(S>>>13)|0)+(kr>>>26)|0,kr&=67108863,C=Math.imul(et,nt),S=(S=Math.imul(et,fe))+Math.imul(Ze,nt)|0,x=Math.imul(Ze,fe),C=C+Math.imul(Ie,be)|0,S=(S=S+Math.imul(Ie,Ce)|0)+Math.imul(Oe,be)|0,x=x+Math.imul(Oe,Ce)|0;var _r=(z+(C=C+Math.imul(ge,me)|0)|0)+((8191&(S=(S=S+Math.imul(ge,_e)|0)+Math.imul(Pe,me)|0))<<13)|0;z=((x=x+Math.imul(Pe,_e)|0)+(S>>>13)|0)+(_r>>>26)|0,_r&=67108863,C=Math.imul(et,be),S=(S=Math.imul(et,Ce))+Math.imul(Ze,be)|0,x=Math.imul(Ze,Ce);var br=(z+(C=C+Math.imul(Ie,me)|0)|0)+((8191&(S=(S=S+Math.imul(Ie,_e)|0)+Math.imul(Oe,me)|0))<<13)|0;z=((x=x+Math.imul(Oe,_e)|0)+(S>>>13)|0)+(br>>>26)|0,br&=67108863;var qr=(z+(C=Math.imul(et,me))|0)+((8191&(S=(S=Math.imul(et,_e))+Math.imul(Ze,me)|0))<<13)|0;return z=((x=Math.imul(Ze,_e))+(S>>>13)|0)+(qr>>>26)|0,qr&=67108863,j[0]=Be,j[1]=De,j[2]=je,j[3]=Le,j[4]=lt,j[5]=vt,j[6]=Bt,j[7]=Se,j[8]=He,j[9]=ct,j[10]=xt,j[11]=Zt,j[12]=Rt,j[13]=Ht,j[14]=Nr,j[15]=kr,j[16]=_r,j[17]=br,j[18]=qr,z!==0&&(j[19]=z,_.length++),_};function b(T,P,_){return new w().mulp(T,P,_)}function w(T,P){this.x=T,this.y=P}Math.imul||(y=v),l.prototype.mulTo=function(T,P){var _=this.length+T.length;return this.length===10&&T.length===10?y(this,T,P):_<63?v(this,T,P):_<1024?function(C,S,x){x.negative=S.negative^C.negative,x.length=C.length+S.length;for(var k=0,L=0,j=0;j<x.length-1;j++){var z=L;L=0;for(var Y=67108863&k,K=Math.min(j,S.length-1),Q=Math.max(0,j-C.length+1);Q<=K;Q++){var q=j-Q,J=(0|C.words[q])*(0|S.words[Q]),G=67108863&J;Y=67108863&(G=G+Y|0),L+=(z=(z=z+(J/67108864|0)|0)+(G>>>26)|0)>>>26,z&=67108863}x.words[j]=Y,k=z,z=L}return k!==0?x.words[j]=k:x.length--,x.strip()}(this,T,P):b(this,T,P)},w.prototype.makeRBT=function(T){for(var P=new Array(T),_=l.prototype._countBits(T)-1,C=0;C<T;C++)P[C]=this.revBin(C,_,T);return P},w.prototype.revBin=function(T,P,_){if(T===0||T===_-1)return T;for(var C=0,S=0;S<P;S++)C|=(1&T)<<P-S-1,T>>=1;return C},w.prototype.permute=function(T,P,_,C,S,x){for(var k=0;k<x;k++)C[k]=P[T[k]],S[k]=_[T[k]]},w.prototype.transform=function(T,P,_,C,S,x){this.permute(x,T,P,_,C,S);for(var k=1;k<S;k<<=1)for(var L=k<<1,j=Math.cos(2*Math.PI/L),z=Math.sin(2*Math.PI/L),Y=0;Y<S;Y+=L)for(var K=j,Q=z,q=0;q<k;q++){var J=_[Y+q],G=C[Y+q],V=_[Y+q+k],X=C[Y+q+k],te=K*V-Q*X;X=K*X+Q*V,V=te,_[Y+q]=J+V,C[Y+q]=G+X,_[Y+q+k]=J-V,C[Y+q+k]=G-X,q!==L&&(te=j*K-z*Q,Q=j*Q+z*K,K=te)}},w.prototype.guessLen13b=function(T,P){var _=1|Math.max(P,T),C=1&_,S=0;for(_=_/2|0;_;_>>>=1)S++;return 1<<S+1+C},w.prototype.conjugate=function(T,P,_){if(!(_<=1))for(var C=0;C<_/2;C++){var S=T[C];T[C]=T[_-C-1],T[_-C-1]=S,S=P[C],P[C]=-P[_-C-1],P[_-C-1]=-S}},w.prototype.normalize13b=function(T,P){for(var _=0,C=0;C<P/2;C++){var S=8192*Math.round(T[2*C+1]/P)+Math.round(T[2*C]/P)+_;T[C]=67108863&S,_=S<67108864?0:S/67108864|0}return T},w.prototype.convert13b=function(T,P,_,C){for(var S=0,x=0;x<P;x++)S+=0|T[x],_[2*x]=8191&S,S>>>=13,_[2*x+1]=8191&S,S>>>=13;for(x=2*P;x<C;++x)_[x]=0;s(S===0),s((-8192&S)==0)},w.prototype.stub=function(T){for(var P=new Array(T),_=0;_<T;_++)P[_]=0;return P},w.prototype.mulp=function(T,P,_){var C=2*this.guessLen13b(T.length,P.length),S=this.makeRBT(C),x=this.stub(C),k=new Array(C),L=new Array(C),j=new Array(C),z=new Array(C),Y=new Array(C),K=new Array(C),Q=_.words;Q.length=C,this.convert13b(T.words,T.length,k,C),this.convert13b(P.words,P.length,z,C),this.transform(k,x,L,j,C,S),this.transform(z,x,Y,K,C,S);for(var q=0;q<C;q++){var J=L[q]*Y[q]-j[q]*K[q];j[q]=L[q]*K[q]+j[q]*Y[q],L[q]=J}return this.conjugate(L,j,C),this.transform(L,j,Q,x,C,S),this.conjugate(Q,x,C),this.normalize13b(Q,C),_.negative=T.negative^P.negative,_.length=T.length+P.length,_.strip()},l.prototype.mul=function(T){var P=new l(null);return P.words=new Array(this.length+T.length),this.mulTo(T,P)},l.prototype.mulf=function(T){var P=new l(null);return P.words=new Array(this.length+T.length),b(this,T,P)},l.prototype.imul=function(T){return this.clone().mulTo(T,this)},l.prototype.imuln=function(T){s(typeof T=="number"),s(T<67108864);for(var P=0,_=0;_<this.length;_++){var C=(0|this.words[_])*T,S=(67108863&C)+(67108863&P);P>>=26,P+=C/67108864|0,P+=S>>>26,this.words[_]=67108863&S}return P!==0&&(this.words[_]=P,this.length++),this},l.prototype.muln=function(T){return this.clone().imuln(T)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(T){var P=function(x){for(var k=new Array(x.bitLength()),L=0;L<k.length;L++){var j=L/26|0,z=L%26;k[L]=(x.words[j]&1<<z)>>>z}return k}(T);if(P.length===0)return new l(1);for(var _=this,C=0;C<P.length&&P[C]===0;C++,_=_.sqr());if(++C<P.length)for(var S=_.sqr();C<P.length;C++,S=S.sqr())P[C]!==0&&(_=_.mul(S));return _},l.prototype.iushln=function(T){s(typeof T=="number"&&T>=0);var P,_=T%26,C=(T-_)/26,S=67108863>>>26-_<<26-_;if(_!==0){var x=0;for(P=0;P<this.length;P++){var k=this.words[P]&S,L=(0|this.words[P])-k<<_;this.words[P]=L|x,x=k>>>26-_}x&&(this.words[P]=x,this.length++)}if(C!==0){for(P=this.length-1;P>=0;P--)this.words[P+C]=this.words[P];for(P=0;P<C;P++)this.words[P]=0;this.length+=C}return this.strip()},l.prototype.ishln=function(T){return s(this.negative===0),this.iushln(T)},l.prototype.iushrn=function(T,P,_){var C;s(typeof T=="number"&&T>=0),C=P?(P-P%26)/26:0;var S=T%26,x=Math.min((T-S)/26,this.length),k=67108863^67108863>>>S<<S,L=_;if(C-=x,C=Math.max(0,C),L){for(var j=0;j<x;j++)L.words[j]=this.words[j];L.length=x}if(x!==0)if(this.length>x)for(this.length-=x,j=0;j<this.length;j++)this.words[j]=this.words[j+x];else this.words[0]=0,this.length=1;var z=0;for(j=this.length-1;j>=0&&(z!==0||j>=C);j--){var Y=0|this.words[j];this.words[j]=z<<26-S|Y>>>S,z=Y&k}return L&&z!==0&&(L.words[L.length++]=z),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(T,P,_){return s(this.negative===0),this.iushrn(T,P,_)},l.prototype.shln=function(T){return this.clone().ishln(T)},l.prototype.ushln=function(T){return this.clone().iushln(T)},l.prototype.shrn=function(T){return this.clone().ishrn(T)},l.prototype.ushrn=function(T){return this.clone().iushrn(T)},l.prototype.testn=function(T){s(typeof T=="number"&&T>=0);var P=T%26,_=(T-P)/26,C=1<<P;return!(this.length<=_)&&!!(this.words[_]&C)},l.prototype.imaskn=function(T){s(typeof T=="number"&&T>=0);var P=T%26,_=(T-P)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=_)return this;if(P!==0&&_++,this.length=Math.min(_,this.length),P!==0){var C=67108863^67108863>>>P<<P;this.words[this.length-1]&=C}return this.strip()},l.prototype.maskn=function(T){return this.clone().imaskn(T)},l.prototype.iaddn=function(T){return s(typeof T=="number"),s(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)},l.prototype._iaddn=function(T){this.words[0]+=T;for(var P=0;P<this.length&&this.words[P]>=67108864;P++)this.words[P]-=67108864,P===this.length-1?this.words[P+1]=1:this.words[P+1]++;return this.length=Math.max(this.length,P+1),this},l.prototype.isubn=function(T){if(s(typeof T=="number"),s(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 P=0;P<this.length&&this.words[P]<0;P++)this.words[P]+=67108864,this.words[P+1]-=1;return this.strip()},l.prototype.addn=function(T){return this.clone().iaddn(T)},l.prototype.subn=function(T){return this.clone().isubn(T)},l.prototype.iabs=function(){return this.negative=0,this},l.prototype.abs=function(){return this.clone().iabs()},l.prototype._ishlnsubmul=function(T,P,_){var C,S,x=T.length+_;this._expand(x);var k=0;for(C=0;C<T.length;C++){S=(0|this.words[C+_])+k;var L=(0|T.words[C])*P;k=((S-=67108863&L)>>26)-(L/67108864|0),this.words[C+_]=67108863&S}for(;C<this.length-_;C++)k=(S=(0|this.words[C+_])+k)>>26,this.words[C+_]=67108863&S;if(k===0)return this.strip();for(s(k===-1),k=0,C=0;C<this.length;C++)k=(S=-(0|this.words[C])+k)>>26,this.words[C]=67108863&S;return this.negative=1,this.strip()},l.prototype._wordDiv=function(T,P){var _=(this.length,T.length),C=this.clone(),S=T,x=0|S.words[S.length-1];(_=26-this._countBits(x))!==0&&(S=S.ushln(_),C.iushln(_),x=0|S.words[S.length-1]);var k,L=C.length-S.length;if(P!=="mod"){(k=new l(null)).length=L+1,k.words=new Array(k.length);for(var j=0;j<k.length;j++)k.words[j]=0}var z=C.clone()._ishlnsubmul(S,1,L);z.negative===0&&(C=z,k&&(k.words[L]=1));for(var Y=L-1;Y>=0;Y--){var K=67108864*(0|C.words[S.length+Y])+(0|C.words[S.length+Y-1]);for(K=Math.min(K/x|0,67108863),C._ishlnsubmul(S,K,Y);C.negative!==0;)K--,C.negative=0,C._ishlnsubmul(S,1,Y),C.isZero()||(C.negative^=1);k&&(k.words[Y]=K)}return k&&k.strip(),C.strip(),P!=="div"&&_!==0&&C.iushrn(_),{div:k||null,mod:C}},l.prototype.divmod=function(T,P,_){return s(!T.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:this.negative!==0&&T.negative===0?(x=this.neg().divmod(T,P),P!=="mod"&&(C=x.div.neg()),P!=="div"&&(S=x.mod.neg(),_&&S.negative!==0&&S.iadd(T)),{div:C,mod:S}):this.negative===0&&T.negative!==0?(x=this.divmod(T.neg(),P),P!=="mod"&&(C=x.div.neg()),{div:C,mod:x.mod}):this.negative&T.negative?(x=this.neg().divmod(T.neg(),P),P!=="div"&&(S=x.mod.neg(),_&&S.negative!==0&&S.isub(T)),{div:x.div,mod:S}):T.length>this.length||this.cmp(T)<0?{div:new l(0),mod:this}:T.length===1?P==="div"?{div:this.divn(T.words[0]),mod:null}:P==="mod"?{div:null,mod:new l(this.modn(T.words[0]))}:{div:this.divn(T.words[0]),mod:new l(this.modn(T.words[0]))}:this._wordDiv(T,P);var C,S,x},l.prototype.div=function(T){return this.divmod(T,"div",!1).div},l.prototype.mod=function(T){return this.divmod(T,"mod",!1).mod},l.prototype.umod=function(T){return this.divmod(T,"mod",!0).mod},l.prototype.divRound=function(T){var P=this.divmod(T);if(P.mod.isZero())return P.div;var _=P.div.negative!==0?P.mod.isub(T):P.mod,C=T.ushrn(1),S=T.andln(1),x=_.cmp(C);return x<0||S===1&&x===0?P.div:P.div.negative!==0?P.div.isubn(1):P.div.iaddn(1)},l.prototype.modn=function(T){s(T<=67108863);for(var P=(1<<26)%T,_=0,C=this.length-1;C>=0;C--)_=(P*_+(0|this.words[C]))%T;return _},l.prototype.idivn=function(T){s(T<=67108863);for(var P=0,_=this.length-1;_>=0;_--){var C=(0|this.words[_])+67108864*P;this.words[_]=C/T|0,P=C%T}return this.strip()},l.prototype.divn=function(T){return this.clone().idivn(T)},l.prototype.egcd=function(T){s(T.negative===0),s(!T.isZero());var P=this,_=T.clone();P=P.negative!==0?P.umod(T):P.clone();for(var C=new l(1),S=new l(0),x=new l(0),k=new l(1),L=0;P.isEven()&&_.isEven();)P.iushrn(1),_.iushrn(1),++L;for(var j=_.clone(),z=P.clone();!P.isZero();){for(var Y=0,K=1;!(P.words[0]&K)&&Y<26;++Y,K<<=1);if(Y>0)for(P.iushrn(Y);Y-- >0;)(C.isOdd()||S.isOdd())&&(C.iadd(j),S.isub(z)),C.iushrn(1),S.iushrn(1);for(var Q=0,q=1;!(_.words[0]&q)&&Q<26;++Q,q<<=1);if(Q>0)for(_.iushrn(Q);Q-- >0;)(x.isOdd()||k.isOdd())&&(x.iadd(j),k.isub(z)),x.iushrn(1),k.iushrn(1);P.cmp(_)>=0?(P.isub(_),C.isub(x),S.isub(k)):(_.isub(P),x.isub(C),k.isub(S))}return{a:x,b:k,gcd:_.iushln(L)}},l.prototype._invmp=function(T){s(T.negative===0),s(!T.isZero());var P=this,_=T.clone();P=P.negative!==0?P.umod(T):P.clone();for(var C,S=new l(1),x=new l(0),k=_.clone();P.cmpn(1)>0&&_.cmpn(1)>0;){for(var L=0,j=1;!(P.words[0]&j)&&L<26;++L,j<<=1);if(L>0)for(P.iushrn(L);L-- >0;)S.isOdd()&&S.iadd(k),S.iushrn(1);for(var z=0,Y=1;!(_.words[0]&Y)&&z<26;++z,Y<<=1);if(z>0)for(_.iushrn(z);z-- >0;)x.isOdd()&&x.iadd(k),x.iushrn(1);P.cmp(_)>=0?(P.isub(_),S.isub(x)):(_.isub(P),x.isub(S))}return(C=P.cmpn(1)===0?S:x).cmpn(0)<0&&C.iadd(T),C},l.prototype.gcd=function(T){if(this.isZero())return T.abs();if(T.isZero())return this.abs();var P=this.clone(),_=T.clone();P.negative=0,_.negative=0;for(var C=0;P.isEven()&&_.isEven();C++)P.iushrn(1),_.iushrn(1);for(;;){for(;P.isEven();)P.iushrn(1);for(;_.isEven();)_.iushrn(1);var S=P.cmp(_);if(S<0){var x=P;P=_,_=x}else if(S===0||_.cmpn(1)===0)break;P.isub(_)}return _.iushln(C)},l.prototype.invm=function(T){return this.egcd(T).a.umod(T)},l.prototype.isEven=function(){return(1&this.words[0])==0},l.prototype.isOdd=function(){return(1&this.words[0])==1},l.prototype.andln=function(T){return this.words[0]&T},l.prototype.bincn=function(T){s(typeof T=="number");var P=T%26,_=(T-P)/26,C=1<<P;if(this.length<=_)return this._expand(_+1),this.words[_]|=C,this;for(var S=C,x=_;S!==0&&x<this.length;x++){var k=0|this.words[x];S=(k+=S)>>>26,k&=67108863,this.words[x]=k}return S!==0&&(this.words[x]=S,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(T){var P,_=T<0;if(this.negative!==0&&!_)return-1;if(this.negative===0&&_)return 1;if(this.strip(),this.length>1)P=1;else{_&&(T=-T),s(T<=67108863,"Number is too big");var C=0|this.words[0];P=C===T?0:C<T?-1:1}return this.negative!==0?0|-P:P},l.prototype.cmp=function(T){if(this.negative!==0&&T.negative===0)return-1;if(this.negative===0&&T.negative!==0)return 1;var P=this.ucmp(T);return this.negative!==0?0|-P:P},l.prototype.ucmp=function(T){if(this.length>T.length)return 1;if(this.length<T.length)return-1;for(var P=0,_=this.length-1;_>=0;_--){var C=0|this.words[_],S=0|T.words[_];if(C!==S){C<S?P=-1:C>S&&(P=1);break}}return P},l.prototype.gtn=function(T){return this.cmpn(T)===1},l.prototype.gt=function(T){return this.cmp(T)===1},l.prototype.gten=function(T){return this.cmpn(T)>=0},l.prototype.gte=function(T){return this.cmp(T)>=0},l.prototype.ltn=function(T){return this.cmpn(T)===-1},l.prototype.lt=function(T){return this.cmp(T)===-1},l.prototype.lten=function(T){return this.cmpn(T)<=0},l.prototype.lte=function(T){return this.cmp(T)<=0},l.prototype.eqn=function(T){return this.cmpn(T)===0},l.prototype.eq=function(T){return this.cmp(T)===0},l.red=function(T){return new B(T)},l.prototype.toRed=function(T){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),T.convertTo(this)._forceRed(T)},l.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(T){return this.red=T,this},l.prototype.forceRed=function(T){return s(!this.red,"Already a number in reduction context"),this._forceRed(T)},l.prototype.redAdd=function(T){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,T)},l.prototype.redIAdd=function(T){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,T)},l.prototype.redSub=function(T){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,T)},l.prototype.redISub=function(T){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,T)},l.prototype.redShl=function(T){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,T)},l.prototype.redMul=function(T){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,T),this.red.mul(this,T)},l.prototype.redIMul=function(T){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,T),this.red.imul(this,T)},l.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(T){return s(this.red&&!T.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,T)};var E={k256:null,p224:null,p192:null,p25519:null};function I(T,P){this.name=T,this.p=new l(P,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function O(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function D(){I.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function N(){I.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function U(){I.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function B(T){if(typeof T=="string"){var P=l._prime(T);this.m=P.p,this.prime=P}else s(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}function F(T){B.call(this,T),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}I.prototype._tmp=function(){var T=new l(null);return T.words=new Array(Math.ceil(this.n/13)),T},I.prototype.ireduce=function(T){var P,_=T;do this.split(_,this.tmp),P=(_=(_=this.imulK(_)).iadd(this.tmp)).bitLength();while(P>this.n);var C=P<this.n?-1:_.ucmp(this.p);return C===0?(_.words[0]=0,_.length=1):C>0?_.isub(this.p):_.strip!==void 0?_.strip():_._strip(),_},I.prototype.split=function(T,P){T.iushrn(this.n,0,P)},I.prototype.imulK=function(T){return T.imul(this.k)},c(O,I),O.prototype.split=function(T,P){for(var _=Math.min(T.length,9),C=0;C<_;C++)P.words[C]=T.words[C];if(P.length=_,T.length<=9)return T.words[0]=0,void(T.length=1);var S=T.words[9];for(P.words[P.length++]=4194303&S,C=10;C<T.length;C++){var x=0|T.words[C];T.words[C-10]=(4194303&x)<<4|S>>>22,S=x}S>>>=22,T.words[C-10]=S,S===0&&T.length>10?T.length-=10:T.length-=9},O.prototype.imulK=function(T){T.words[T.length]=0,T.words[T.length+1]=0,T.length+=2;for(var P=0,_=0;_<T.length;_++){var C=0|T.words[_];P+=977*C,T.words[_]=67108863&P,P=64*C+(P/67108864|0)}return T.words[T.length-1]===0&&(T.length--,T.words[T.length-1]===0&&T.length--),T},c(D,I),c(N,I),c(U,I),U.prototype.imulK=function(T){for(var P=0,_=0;_<T.length;_++){var C=19*(0|T.words[_])+P,S=67108863&C;C>>>=26,T.words[_]=S,P=C}return P!==0&&(T.words[T.length++]=P),T},l._prime=function(T){if(E[T])return E[T];var P;if(T==="k256")P=new O;else if(T==="p224")P=new D;else if(T==="p192")P=new N;else{if(T!=="p25519")throw new Error("Unknown prime "+T);P=new U}return E[T]=P,P},B.prototype._verify1=function(T){s(T.negative===0,"red works only with positives"),s(T.red,"red works only with red numbers")},B.prototype._verify2=function(T,P){s((T.negative|P.negative)==0,"red works only with positives"),s(T.red&&T.red===P.red,"red works only with red numbers")},B.prototype.imod=function(T){return this.prime?this.prime.ireduce(T)._forceRed(this):T.umod(this.m)._forceRed(this)},B.prototype.neg=function(T){return T.isZero()?T.clone():this.m.sub(T)._forceRed(this)},B.prototype.add=function(T,P){this._verify2(T,P);var _=T.add(P);return _.cmp(this.m)>=0&&_.isub(this.m),_._forceRed(this)},B.prototype.iadd=function(T,P){this._verify2(T,P);var _=T.iadd(P);return _.cmp(this.m)>=0&&_.isub(this.m),_},B.prototype.sub=function(T,P){this._verify2(T,P);var _=T.sub(P);return _.cmpn(0)<0&&_.iadd(this.m),_._forceRed(this)},B.prototype.isub=function(T,P){this._verify2(T,P);var _=T.isub(P);return _.cmpn(0)<0&&_.iadd(this.m),_},B.prototype.shl=function(T,P){return this._verify1(T),this.imod(T.ushln(P))},B.prototype.imul=function(T,P){return this._verify2(T,P),this.imod(T.imul(P))},B.prototype.mul=function(T,P){return this._verify2(T,P),this.imod(T.mul(P))},B.prototype.isqr=function(T){return this.imul(T,T.clone())},B.prototype.sqr=function(T){return this.mul(T,T)},B.prototype.sqrt=function(T){if(T.isZero())return T.clone();var P=this.m.andln(3);if(s(P%2==1),P===3){var _=this.m.add(new l(1)).iushrn(2);return this.pow(T,_)}for(var C=this.m.subn(1),S=0;!C.isZero()&&C.andln(1)===0;)S++,C.iushrn(1);s(!C.isZero());var x=new l(1).toRed(this),k=x.redNeg(),L=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new l(2*j*j).toRed(this);this.pow(j,L).cmp(k)!==0;)j.redIAdd(k);for(var z=this.pow(j,C),Y=this.pow(T,C.addn(1).iushrn(1)),K=this.pow(T,C),Q=S;K.cmp(x)!==0;){for(var q=K,J=0;q.cmp(x)!==0;J++)q=q.redSqr();s(J<Q);var G=this.pow(z,new l(1).iushln(Q-J-1));Y=Y.redMul(G),z=G.redSqr(),K=K.redMul(z),Q=J}return Y},B.prototype.invm=function(T){var P=T._invmp(this.m);return P.negative!==0?(P.negative=0,this.imod(P).redNeg()):this.imod(P)},B.prototype.pow=function(T,P){if(P.isZero())return new l(1).toRed(this);if(P.cmpn(1)===0)return T.clone();var _=new Array(16);_[0]=new l(1).toRed(this),_[1]=T;for(var C=2;C<_.length;C++)_[C]=this.mul(_[C-1],T);var S=_[0],x=0,k=0,L=P.bitLength()%26;for(L===0&&(L=26),C=P.length-1;C>=0;C--){for(var j=P.words[C],z=L-1;z>=0;z--){var Y=j>>z&1;S!==_[0]&&(S=this.sqr(S)),Y!==0||x!==0?(x<<=1,x|=Y,(++k===4||C===0&&z===0)&&(S=this.mul(S,_[x]),k=0,x=0)):k=0}L=26}return S},B.prototype.convertTo=function(T){var P=T.umod(this.m);return P===T?P.clone():P},B.prototype.convertFrom=function(T){var P=T.clone();return P.red=null,P},l.mont=function(T){return new F(T)},c(F,B),F.prototype.convertTo=function(T){return this.imod(T.ushln(this.shift))},F.prototype.convertFrom=function(T){var P=this.imod(T.mul(this.rinv));return P.red=null,P},F.prototype.imul=function(T,P){if(T.isZero()||P.isZero())return T.words[0]=0,T.length=1,T;var _=T.imul(P),C=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=_.isub(C).iushrn(this.shift),x=S;return S.cmp(this.m)>=0?x=S.isub(this.m):S.cmpn(0)<0&&(x=S.iadd(this.m)),x._forceRed(this)},F.prototype.mul=function(T,P){if(T.isZero()||P.isZero())return new l(0)._forceRed(this);var _=T.mul(P),C=_.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),S=_.isub(C).iushrn(this.shift),x=S;return S.cmp(this.m)>=0?x=S.isub(this.m):S.cmpn(0)<0&&(x=S.iadd(this.m)),x._forceRed(this)},F.prototype.invm=function(T){return this.imod(T._invmp(this.m).mul(this.r2))._forceRed(this)}})(n===void 0||n)},{buffer:188}],185:[function(r,n,o){o.byteLength=function(h){var p=f(h),g=p[0],m=p[1];return 3*(g+m)/4-m},o.toByteArray=function(h){var p,g,m=f(h),v=m[0],y=m[1],b=new s(function(I,O,D){return 3*(O+D)/4-D}(0,v,y)),w=0,E=y>0?v-4:v;for(g=0;g<E;g+=4)p=a[h.charCodeAt(g)]<<18|a[h.charCodeAt(g+1)]<<12|a[h.charCodeAt(g+2)]<<6|a[h.charCodeAt(g+3)],b[w++]=p>>16&255,b[w++]=p>>8&255,b[w++]=255&p;return y===2&&(p=a[h.charCodeAt(g)]<<2|a[h.charCodeAt(g+1)]>>4,b[w++]=255&p),y===1&&(p=a[h.charCodeAt(g)]<<10|a[h.charCodeAt(g+1)]<<4|a[h.charCodeAt(g+2)]>>2,b[w++]=p>>8&255,b[w++]=255&p),b},o.fromByteArray=function(h){for(var p,g=h.length,m=g%3,v=[],y=0,b=g-m;y<b;y+=16383)v.push(d(h,y,y+16383>b?b:y+16383));return m===1?(p=h[g-1],v.push(i[p>>2]+i[p<<4&63]+"==")):m===2&&(p=(h[g-2]<<8)+h[g-1],v.push(i[p>>10]+i[p>>4&63]+i[p<<2&63]+"=")),v.join("")};for(var i=[],a=[],s=typeof Uint8Array<"u"?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,u=c.length;l<u;++l)i[l]=c[l],a[c.charCodeAt(l)]=l;function f(h){var p=h.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=h.indexOf("=");return g===-1&&(g=p),[g,g===p?0:4-g%4]}function d(h,p,g){for(var m,v,y=[],b=p;b<g;b+=3)m=(h[b]<<16&16711680)+(h[b+1]<<8&65280)+(255&h[b+2]),y.push(i[(v=m)>>18&63]+i[v>>12&63]+i[v>>6&63]+i[63&v]);return y.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],186:[function(r,n,o){(function(i,a){function s(_,C){if(!_)throw new Error(C||"Assertion failed")}function c(_,C){_.super_=C;var S=function(){};S.prototype=C.prototype,_.prototype=new S,_.prototype.constructor=_}function l(_,C,S){if(l.isBN(_))return _;this.negative=0,this.words=null,this.length=0,this.red=null,_!==null&&(C!=="le"&&C!=="be"||(S=C,C=10),this._init(_||0,C||10,S||"be"))}var u;typeof i=="object"?i.exports=l:(void 0).BN=l,l.BN=l,l.wordSize=26;try{u=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:r("buffer").Buffer}catch{}function f(_,C){var S=_.charCodeAt(C);return S>=48&&S<=57?S-48:S>=65&&S<=70?S-55:S>=97&&S<=102?S-87:void s(!1,"Invalid character in "+_)}function d(_,C,S){var x=f(_,S);return S-1>=C&&(x|=f(_,S-1)<<4),x}function h(_,C,S,x){for(var k=0,L=0,j=Math.min(_.length,S),z=C;z<j;z++){var Y=_.charCodeAt(z)-48;k*=x,L=Y>=49?Y-49+10:Y>=17?Y-17+10:Y,s(Y>=0&&L<x,"Invalid character"),k+=L}return k}function p(_,C){_.words=C.words,_.length=C.length,_.negative=C.negative,_.red=C.red}if(l.isBN=function(_){return _ instanceof l||_!==null&&typeof _=="object"&&_.constructor.wordSize===l.wordSize&&Array.isArray(_.words)},l.max=function(_,C){return _.cmp(C)>0?_:C},l.min=function(_,C){return _.cmp(C)<0?_:C},l.prototype._init=function(_,C,S){if(typeof _=="number")return this._initNumber(_,C,S);if(typeof _=="object")return this._initArray(_,C,S);C==="hex"&&(C=16),s(C===(0|C)&&C>=2&&C<=36);var x=0;(_=_.toString().replace(/\s+/g,""))[0]==="-"&&(x++,this.negative=1),x<_.length&&(C===16?this._parseHex(_,x,S):(this._parseBase(_,C,x),S==="le"&&this._initArray(this.toArray(),C,S)))},l.prototype._initNumber=function(_,C,S){_<0&&(this.negative=1,_=-_),_<67108864?(this.words=[67108863&_],this.length=1):_<4503599627370496?(this.words=[67108863&_,_/67108864&67108863],this.length=2):(s(_<9007199254740992),this.words=[67108863&_,_/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),C,S)},l.prototype._initArray=function(_,C,S){if(s(typeof _.length=="number"),_.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(_.length/3),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var k,L,j=0;if(S==="be")for(x=_.length-1,k=0;x>=0;x-=3)L=_[x]|_[x-1]<<8|_[x-2]<<16,this.words[k]|=L<<j&67108863,this.words[k+1]=L>>>26-j&67108863,(j+=24)>=26&&(j-=26,k++);else if(S==="le")for(x=0,k=0;x<_.length;x+=3)L=_[x]|_[x+1]<<8|_[x+2]<<16,this.words[k]|=L<<j&67108863,this.words[k+1]=L>>>26-j&67108863,(j+=24)>=26&&(j-=26,k++);return this._strip()},l.prototype._parseHex=function(_,C,S){this.length=Math.ceil((_.length-C)/6),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var k,L=0,j=0;if(S==="be")for(x=_.length-1;x>=C;x-=2)k=d(_,C,x)<<L,this.words[j]|=67108863&k,L>=18?(L-=18,j+=1,this.words[j]|=k>>>26):L+=8;else for(x=(_.length-C)%2==0?C+1:C;x<_.length;x+=2)k=d(_,C,x)<<L,this.words[j]|=67108863&k,L>=18?(L-=18,j+=1,this.words[j]|=k>>>26):L+=8;this._strip()},l.prototype._parseBase=function(_,C,S){this.words=[0],this.length=1;for(var x=0,k=1;k<=67108863;k*=C)x++;x--,k=k/C|0;for(var L=_.length-S,j=L%x,z=Math.min(L,L-j)+S,Y=0,K=S;K<z;K+=x)Y=h(_,K,K+x,C),this.imuln(k),this.words[0]+Y<67108864?this.words[0]+=Y:this._iaddn(Y);if(j!==0){var Q=1;for(Y=h(_,K,_.length,C),K=0;K<j;K++)Q*=C;this.imuln(Q),this.words[0]+Y<67108864?this.words[0]+=Y:this._iaddn(Y)}this._strip()},l.prototype.copy=function(_){_.words=new Array(this.length);for(var C=0;C<this.length;C++)_.words[C]=this.words[C];_.length=this.length,_.negative=this.negative,_.red=this.red},l.prototype._move=function(_){p(_,this)},l.prototype.clone=function(){var _=new l(null);return this.copy(_),_},l.prototype._expand=function(_){for(;this.length<_;)this.words[this.length++]=0;return this},l.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{l.prototype[Symbol.for("nodejs.util.inspect.custom")]=g}catch{l.prototype.inspect=g}else l.prototype.inspect=g;function g(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],y=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];l.prototype.toString=function(_,C){var S;if(C=0|C||1,(_=_||10)===16||_==="hex"){S="";for(var x=0,k=0,L=0;L<this.length;L++){var j=this.words[L],z=(16777215&(j<<x|k)).toString(16);k=j>>>24-x&16777215,(x+=2)>=26&&(x-=26,L--),S=k!==0||L!==this.length-1?m[6-z.length]+z+S:z+S}for(k!==0&&(S=k.toString(16)+S);S.length%C!=0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(_===(0|_)&&_>=2&&_<=36){var Y=v[_],K=y[_];S="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var q=Q.modrn(K).toString(_);S=(Q=Q.idivn(K)).isZero()?q+S:m[Y-q.length]+q+S}for(this.isZero()&&(S="0"+S);S.length%C!=0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}s(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var _=this.words[0];return this.length===2?_+=67108864*this.words[1]:this.length===3&&this.words[2]===1?_+=4503599627370496+67108864*this.words[1]:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-_:_},l.prototype.toJSON=function(){return this.toString(16,2)},u&&(l.prototype.toBuffer=function(_,C){return this.toArrayLike(u,_,C)}),l.prototype.toArray=function(_,C){return this.toArrayLike(Array,_,C)};function b(_,C,S){S.negative=C.negative^_.negative;var x=_.length+C.length|0;S.length=x,x=x-1|0;var k=0|_.words[0],L=0|C.words[0],j=k*L,z=67108863&j,Y=j/67108864|0;S.words[0]=z;for(var K=1;K<x;K++){for(var Q=Y>>>26,q=67108863&Y,J=Math.min(K,C.length-1),G=Math.max(0,K-_.length+1);G<=J;G++){var V=K-G|0;Q+=(j=(k=0|_.words[V])*(L=0|C.words[G])+q)/67108864|0,q=67108863&j}S.words[K]=0|q,Y=0|Q}return Y!==0?S.words[K]=0|Y:S.length--,S._strip()}l.prototype.toArrayLike=function(_,C,S){this._strip();var x=this.byteLength(),k=S||Math.max(1,x);s(x<=k,"byte array longer than desired length"),s(k>0,"Requested array length <= 0");var L=function(j,z){return j.allocUnsafe?j.allocUnsafe(z):new j(z)}(_,k);return this["_toArrayLike"+(C==="le"?"LE":"BE")](L,x),L},l.prototype._toArrayLikeLE=function(_,C){for(var S=0,x=0,k=0,L=0;k<this.length;k++){var j=this.words[k]<<L|x;_[S++]=255&j,S<_.length&&(_[S++]=j>>8&255),S<_.length&&(_[S++]=j>>16&255),L===6?(S<_.length&&(_[S++]=j>>24&255),x=0,L=0):(x=j>>>24,L+=2)}if(S<_.length)for(_[S++]=x;S<_.length;)_[S++]=0},l.prototype._toArrayLikeBE=function(_,C){for(var S=_.length-1,x=0,k=0,L=0;k<this.length;k++){var j=this.words[k]<<L|x;_[S--]=255&j,S>=0&&(_[S--]=j>>8&255),S>=0&&(_[S--]=j>>16&255),L===6?(S>=0&&(_[S--]=j>>24&255),x=0,L=0):(x=j>>>24,L+=2)}if(S>=0)for(_[S--]=x;S>=0;)_[S--]=0},Math.clz32?l.prototype._countBits=function(_){return 32-Math.clz32(_)}:l.prototype._countBits=function(_){var C=_,S=0;return C>=4096&&(S+=13,C>>>=13),C>=64&&(S+=7,C>>>=7),C>=8&&(S+=4,C>>>=4),C>=2&&(S+=2,C>>>=2),S+C},l.prototype._zeroBits=function(_){if(_===0)return 26;var C=_,S=0;return!(8191&C)&&(S+=13,C>>>=13),!(127&C)&&(S+=7,C>>>=7),!(15&C)&&(S+=4,C>>>=4),!(3&C)&&(S+=2,C>>>=2),!(1&C)&&S++,S},l.prototype.bitLength=function(){var _=this.words[this.length-1],C=this._countBits(_);return 26*(this.length-1)+C},l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var _=0,C=0;C<this.length;C++){var S=this._zeroBits(this.words[C]);if(_+=S,S!==26)break}return _},l.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},l.prototype.toTwos=function(_){return this.negative!==0?this.abs().inotn(_).iaddn(1):this.clone()},l.prototype.fromTwos=function(_){return this.testn(_-1)?this.notn(_).iaddn(1).ineg():this.clone()},l.prototype.isNeg=function(){return this.negative!==0},l.prototype.neg=function(){return this.clone().ineg()},l.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},l.prototype.iuor=function(_){for(;this.length<_.length;)this.words[this.length++]=0;for(var C=0;C<_.length;C++)this.words[C]=this.words[C]|_.words[C];return this._strip()},l.prototype.ior=function(_){return s((this.negative|_.negative)==0),this.iuor(_)},l.prototype.or=function(_){return this.length>_.length?this.clone().ior(_):_.clone().ior(this)},l.prototype.uor=function(_){return this.length>_.length?this.clone().iuor(_):_.clone().iuor(this)},l.prototype.iuand=function(_){var C;C=this.length>_.length?_:this;for(var S=0;S<C.length;S++)this.words[S]=this.words[S]&_.words[S];return this.length=C.length,this._strip()},l.prototype.iand=function(_){return s((this.negative|_.negative)==0),this.iuand(_)},l.prototype.and=function(_){return this.length>_.length?this.clone().iand(_):_.clone().iand(this)},l.prototype.uand=function(_){return this.length>_.length?this.clone().iuand(_):_.clone().iuand(this)},l.prototype.iuxor=function(_){var C,S;this.length>_.length?(C=this,S=_):(C=_,S=this);for(var x=0;x<S.length;x++)this.words[x]=C.words[x]^S.words[x];if(this!==C)for(;x<C.length;x++)this.words[x]=C.words[x];return this.length=C.length,this._strip()},l.prototype.ixor=function(_){return s((this.negative|_.negative)==0),this.iuxor(_)},l.prototype.xor=function(_){return this.length>_.length?this.clone().ixor(_):_.clone().ixor(this)},l.prototype.uxor=function(_){return this.length>_.length?this.clone().iuxor(_):_.clone().iuxor(this)},l.prototype.inotn=function(_){s(typeof _=="number"&&_>=0);var C=0|Math.ceil(_/26),S=_%26;this._expand(C),S>0&&C--;for(var x=0;x<C;x++)this.words[x]=67108863&~this.words[x];return S>0&&(this.words[x]=~this.words[x]&67108863>>26-S),this._strip()},l.prototype.notn=function(_){return this.clone().inotn(_)},l.prototype.setn=function(_,C){s(typeof _=="number"&&_>=0);var S=_/26|0,x=_%26;return this._expand(S+1),this.words[S]=C?this.words[S]|1<<x:this.words[S]&~(1<<x),this._strip()},l.prototype.iadd=function(_){var C,S,x;if(this.negative!==0&&_.negative===0)return this.negative=0,C=this.isub(_),this.negative^=1,this._normSign();if(this.negative===0&&_.negative!==0)return _.negative=0,C=this.isub(_),_.negative=1,C._normSign();this.length>_.length?(S=this,x=_):(S=_,x=this);for(var k=0,L=0;L<x.length;L++)C=(0|S.words[L])+(0|x.words[L])+k,this.words[L]=67108863&C,k=C>>>26;for(;k!==0&&L<S.length;L++)C=(0|S.words[L])+k,this.words[L]=67108863&C,k=C>>>26;if(this.length=S.length,k!==0)this.words[this.length]=k,this.length++;else if(S!==this)for(;L<S.length;L++)this.words[L]=S.words[L];return this},l.prototype.add=function(_){var C;return _.negative!==0&&this.negative===0?(_.negative=0,C=this.sub(_),_.negative^=1,C):_.negative===0&&this.negative!==0?(this.negative=0,C=_.sub(this),this.negative=1,C):this.length>_.length?this.clone().iadd(_):_.clone().iadd(this)},l.prototype.isub=function(_){if(_.negative!==0){_.negative=0;var C=this.iadd(_);return _.negative=1,C._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(_),this.negative=1,this._normSign();var S,x,k=this.cmp(_);if(k===0)return this.negative=0,this.length=1,this.words[0]=0,this;k>0?(S=this,x=_):(S=_,x=this);for(var L=0,j=0;j<x.length;j++)L=(C=(0|S.words[j])-(0|x.words[j])+L)>>26,this.words[j]=67108863&C;for(;L!==0&&j<S.length;j++)L=(C=(0|S.words[j])+L)>>26,this.words[j]=67108863&C;if(L===0&&j<S.length&&S!==this)for(;j<S.length;j++)this.words[j]=S.words[j];return this.length=Math.max(this.length,j),S!==this&&(this.negative=1),this._strip()},l.prototype.sub=function(_){return this.clone().isub(_)};var w=function(_,C,S){var x,k,L,j=_.words,z=C.words,Y=S.words,K=0,Q=0|j[0],q=8191&Q,J=Q>>>13,G=0|j[1],V=8191&G,X=G>>>13,te=0|j[2],ee=8191&te,re=te>>>13,se=0|j[3],pe=8191&se,ce=se>>>13,ne=0|j[4],he=8191&ne,oe=ne>>>13,le=0|j[5],de=8191&le,ve=le>>>13,we=0|j[6],ie=8191&we,ge=we>>>13,Pe=0|j[7],Fe=8191&Pe,Ie=Pe>>>13,Oe=0|j[8],$e=8191&Oe,et=Oe>>>13,Ze=0|j[9],Ne=8191&Ze,Qe=Ze>>>13,Xe=0|z[0],rt=8191&Xe,ht=Xe>>>13,At=0|z[1],Qt=8191&At,Nt=At>>>13,Ue=0|z[2],Ye=8191&Ue,tt=Ue>>>13,st=0|z[3],mt=8191&st,_t=st>>>13,Pt=0|z[4],Ut=8191&Pt,wt=Pt>>>13,Dt=0|z[5],qt=8191&Dt,Tt=Dt>>>13,Me=0|z[6],Ge=8191&Me,nt=Me>>>13,fe=0|z[7],ke=8191&fe,be=fe>>>13,Ce=0|z[8],Ee=8191&Ce,me=Ce>>>13,_e=0|z[9],Be=8191&_e,De=_e>>>13;S.negative=_.negative^C.negative,S.length=19;var je=(K+(x=Math.imul(q,rt))|0)+((8191&(k=(k=Math.imul(q,ht))+Math.imul(J,rt)|0))<<13)|0;K=((L=Math.imul(J,ht))+(k>>>13)|0)+(je>>>26)|0,je&=67108863,x=Math.imul(V,rt),k=(k=Math.imul(V,ht))+Math.imul(X,rt)|0,L=Math.imul(X,ht);var Le=(K+(x=x+Math.imul(q,Qt)|0)|0)+((8191&(k=(k=k+Math.imul(q,Nt)|0)+Math.imul(J,Qt)|0))<<13)|0;K=((L=L+Math.imul(J,Nt)|0)+(k>>>13)|0)+(Le>>>26)|0,Le&=67108863,x=Math.imul(ee,rt),k=(k=Math.imul(ee,ht))+Math.imul(re,rt)|0,L=Math.imul(re,ht),x=x+Math.imul(V,Qt)|0,k=(k=k+Math.imul(V,Nt)|0)+Math.imul(X,Qt)|0,L=L+Math.imul(X,Nt)|0;var lt=(K+(x=x+Math.imul(q,Ye)|0)|0)+((8191&(k=(k=k+Math.imul(q,tt)|0)+Math.imul(J,Ye)|0))<<13)|0;K=((L=L+Math.imul(J,tt)|0)+(k>>>13)|0)+(lt>>>26)|0,lt&=67108863,x=Math.imul(pe,rt),k=(k=Math.imul(pe,ht))+Math.imul(ce,rt)|0,L=Math.imul(ce,ht),x=x+Math.imul(ee,Qt)|0,k=(k=k+Math.imul(ee,Nt)|0)+Math.imul(re,Qt)|0,L=L+Math.imul(re,Nt)|0,x=x+Math.imul(V,Ye)|0,k=(k=k+Math.imul(V,tt)|0)+Math.imul(X,Ye)|0,L=L+Math.imul(X,tt)|0;var vt=(K+(x=x+Math.imul(q,mt)|0)|0)+((8191&(k=(k=k+Math.imul(q,_t)|0)+Math.imul(J,mt)|0))<<13)|0;K=((L=L+Math.imul(J,_t)|0)+(k>>>13)|0)+(vt>>>26)|0,vt&=67108863,x=Math.imul(he,rt),k=(k=Math.imul(he,ht))+Math.imul(oe,rt)|0,L=Math.imul(oe,ht),x=x+Math.imul(pe,Qt)|0,k=(k=k+Math.imul(pe,Nt)|0)+Math.imul(ce,Qt)|0,L=L+Math.imul(ce,Nt)|0,x=x+Math.imul(ee,Ye)|0,k=(k=k+Math.imul(ee,tt)|0)+Math.imul(re,Ye)|0,L=L+Math.imul(re,tt)|0,x=x+Math.imul(V,mt)|0,k=(k=k+Math.imul(V,_t)|0)+Math.imul(X,mt)|0,L=L+Math.imul(X,_t)|0;var Bt=(K+(x=x+Math.imul(q,Ut)|0)|0)+((8191&(k=(k=k+Math.imul(q,wt)|0)+Math.imul(J,Ut)|0))<<13)|0;K=((L=L+Math.imul(J,wt)|0)+(k>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,x=Math.imul(de,rt),k=(k=Math.imul(de,ht))+Math.imul(ve,rt)|0,L=Math.imul(ve,ht),x=x+Math.imul(he,Qt)|0,k=(k=k+Math.imul(he,Nt)|0)+Math.imul(oe,Qt)|0,L=L+Math.imul(oe,Nt)|0,x=x+Math.imul(pe,Ye)|0,k=(k=k+Math.imul(pe,tt)|0)+Math.imul(ce,Ye)|0,L=L+Math.imul(ce,tt)|0,x=x+Math.imul(ee,mt)|0,k=(k=k+Math.imul(ee,_t)|0)+Math.imul(re,mt)|0,L=L+Math.imul(re,_t)|0,x=x+Math.imul(V,Ut)|0,k=(k=k+Math.imul(V,wt)|0)+Math.imul(X,Ut)|0,L=L+Math.imul(X,wt)|0;var Se=(K+(x=x+Math.imul(q,qt)|0)|0)+((8191&(k=(k=k+Math.imul(q,Tt)|0)+Math.imul(J,qt)|0))<<13)|0;K=((L=L+Math.imul(J,Tt)|0)+(k>>>13)|0)+(Se>>>26)|0,Se&=67108863,x=Math.imul(ie,rt),k=(k=Math.imul(ie,ht))+Math.imul(ge,rt)|0,L=Math.imul(ge,ht),x=x+Math.imul(de,Qt)|0,k=(k=k+Math.imul(de,Nt)|0)+Math.imul(ve,Qt)|0,L=L+Math.imul(ve,Nt)|0,x=x+Math.imul(he,Ye)|0,k=(k=k+Math.imul(he,tt)|0)+Math.imul(oe,Ye)|0,L=L+Math.imul(oe,tt)|0,x=x+Math.imul(pe,mt)|0,k=(k=k+Math.imul(pe,_t)|0)+Math.imul(ce,mt)|0,L=L+Math.imul(ce,_t)|0,x=x+Math.imul(ee,Ut)|0,k=(k=k+Math.imul(ee,wt)|0)+Math.imul(re,Ut)|0,L=L+Math.imul(re,wt)|0,x=x+Math.imul(V,qt)|0,k=(k=k+Math.imul(V,Tt)|0)+Math.imul(X,qt)|0,L=L+Math.imul(X,Tt)|0;var He=(K+(x=x+Math.imul(q,Ge)|0)|0)+((8191&(k=(k=k+Math.imul(q,nt)|0)+Math.imul(J,Ge)|0))<<13)|0;K=((L=L+Math.imul(J,nt)|0)+(k>>>13)|0)+(He>>>26)|0,He&=67108863,x=Math.imul(Fe,rt),k=(k=Math.imul(Fe,ht))+Math.imul(Ie,rt)|0,L=Math.imul(Ie,ht),x=x+Math.imul(ie,Qt)|0,k=(k=k+Math.imul(ie,Nt)|0)+Math.imul(ge,Qt)|0,L=L+Math.imul(ge,Nt)|0,x=x+Math.imul(de,Ye)|0,k=(k=k+Math.imul(de,tt)|0)+Math.imul(ve,Ye)|0,L=L+Math.imul(ve,tt)|0,x=x+Math.imul(he,mt)|0,k=(k=k+Math.imul(he,_t)|0)+Math.imul(oe,mt)|0,L=L+Math.imul(oe,_t)|0,x=x+Math.imul(pe,Ut)|0,k=(k=k+Math.imul(pe,wt)|0)+Math.imul(ce,Ut)|0,L=L+Math.imul(ce,wt)|0,x=x+Math.imul(ee,qt)|0,k=(k=k+Math.imul(ee,Tt)|0)+Math.imul(re,qt)|0,L=L+Math.imul(re,Tt)|0,x=x+Math.imul(V,Ge)|0,k=(k=k+Math.imul(V,nt)|0)+Math.imul(X,Ge)|0,L=L+Math.imul(X,nt)|0;var ct=(K+(x=x+Math.imul(q,ke)|0)|0)+((8191&(k=(k=k+Math.imul(q,be)|0)+Math.imul(J,ke)|0))<<13)|0;K=((L=L+Math.imul(J,be)|0)+(k>>>13)|0)+(ct>>>26)|0,ct&=67108863,x=Math.imul($e,rt),k=(k=Math.imul($e,ht))+Math.imul(et,rt)|0,L=Math.imul(et,ht),x=x+Math.imul(Fe,Qt)|0,k=(k=k+Math.imul(Fe,Nt)|0)+Math.imul(Ie,Qt)|0,L=L+Math.imul(Ie,Nt)|0,x=x+Math.imul(ie,Ye)|0,k=(k=k+Math.imul(ie,tt)|0)+Math.imul(ge,Ye)|0,L=L+Math.imul(ge,tt)|0,x=x+Math.imul(de,mt)|0,k=(k=k+Math.imul(de,_t)|0)+Math.imul(ve,mt)|0,L=L+Math.imul(ve,_t)|0,x=x+Math.imul(he,Ut)|0,k=(k=k+Math.imul(he,wt)|0)+Math.imul(oe,Ut)|0,L=L+Math.imul(oe,wt)|0,x=x+Math.imul(pe,qt)|0,k=(k=k+Math.imul(pe,Tt)|0)+Math.imul(ce,qt)|0,L=L+Math.imul(ce,Tt)|0,x=x+Math.imul(ee,Ge)|0,k=(k=k+Math.imul(ee,nt)|0)+Math.imul(re,Ge)|0,L=L+Math.imul(re,nt)|0,x=x+Math.imul(V,ke)|0,k=(k=k+Math.imul(V,be)|0)+Math.imul(X,ke)|0,L=L+Math.imul(X,be)|0;var xt=(K+(x=x+Math.imul(q,Ee)|0)|0)+((8191&(k=(k=k+Math.imul(q,me)|0)+Math.imul(J,Ee)|0))<<13)|0;K=((L=L+Math.imul(J,me)|0)+(k>>>13)|0)+(xt>>>26)|0,xt&=67108863,x=Math.imul(Ne,rt),k=(k=Math.imul(Ne,ht))+Math.imul(Qe,rt)|0,L=Math.imul(Qe,ht),x=x+Math.imul($e,Qt)|0,k=(k=k+Math.imul($e,Nt)|0)+Math.imul(et,Qt)|0,L=L+Math.imul(et,Nt)|0,x=x+Math.imul(Fe,Ye)|0,k=(k=k+Math.imul(Fe,tt)|0)+Math.imul(Ie,Ye)|0,L=L+Math.imul(Ie,tt)|0,x=x+Math.imul(ie,mt)|0,k=(k=k+Math.imul(ie,_t)|0)+Math.imul(ge,mt)|0,L=L+Math.imul(ge,_t)|0,x=x+Math.imul(de,Ut)|0,k=(k=k+Math.imul(de,wt)|0)+Math.imul(ve,Ut)|0,L=L+Math.imul(ve,wt)|0,x=x+Math.imul(he,qt)|0,k=(k=k+Math.imul(he,Tt)|0)+Math.imul(oe,qt)|0,L=L+Math.imul(oe,Tt)|0,x=x+Math.imul(pe,Ge)|0,k=(k=k+Math.imul(pe,nt)|0)+Math.imul(ce,Ge)|0,L=L+Math.imul(ce,nt)|0,x=x+Math.imul(ee,ke)|0,k=(k=k+Math.imul(ee,be)|0)+Math.imul(re,ke)|0,L=L+Math.imul(re,be)|0,x=x+Math.imul(V,Ee)|0,k=(k=k+Math.imul(V,me)|0)+Math.imul(X,Ee)|0,L=L+Math.imul(X,me)|0;var Zt=(K+(x=x+Math.imul(q,Be)|0)|0)+((8191&(k=(k=k+Math.imul(q,De)|0)+Math.imul(J,Be)|0))<<13)|0;K=((L=L+Math.imul(J,De)|0)+(k>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,x=Math.imul(Ne,Qt),k=(k=Math.imul(Ne,Nt))+Math.imul(Qe,Qt)|0,L=Math.imul(Qe,Nt),x=x+Math.imul($e,Ye)|0,k=(k=k+Math.imul($e,tt)|0)+Math.imul(et,Ye)|0,L=L+Math.imul(et,tt)|0,x=x+Math.imul(Fe,mt)|0,k=(k=k+Math.imul(Fe,_t)|0)+Math.imul(Ie,mt)|0,L=L+Math.imul(Ie,_t)|0,x=x+Math.imul(ie,Ut)|0,k=(k=k+Math.imul(ie,wt)|0)+Math.imul(ge,Ut)|0,L=L+Math.imul(ge,wt)|0,x=x+Math.imul(de,qt)|0,k=(k=k+Math.imul(de,Tt)|0)+Math.imul(ve,qt)|0,L=L+Math.imul(ve,Tt)|0,x=x+Math.imul(he,Ge)|0,k=(k=k+Math.imul(he,nt)|0)+Math.imul(oe,Ge)|0,L=L+Math.imul(oe,nt)|0,x=x+Math.imul(pe,ke)|0,k=(k=k+Math.imul(pe,be)|0)+Math.imul(ce,ke)|0,L=L+Math.imul(ce,be)|0,x=x+Math.imul(ee,Ee)|0,k=(k=k+Math.imul(ee,me)|0)+Math.imul(re,Ee)|0,L=L+Math.imul(re,me)|0;var Rt=(K+(x=x+Math.imul(V,Be)|0)|0)+((8191&(k=(k=k+Math.imul(V,De)|0)+Math.imul(X,Be)|0))<<13)|0;K=((L=L+Math.imul(X,De)|0)+(k>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,x=Math.imul(Ne,Ye),k=(k=Math.imul(Ne,tt))+Math.imul(Qe,Ye)|0,L=Math.imul(Qe,tt),x=x+Math.imul($e,mt)|0,k=(k=k+Math.imul($e,_t)|0)+Math.imul(et,mt)|0,L=L+Math.imul(et,_t)|0,x=x+Math.imul(Fe,Ut)|0,k=(k=k+Math.imul(Fe,wt)|0)+Math.imul(Ie,Ut)|0,L=L+Math.imul(Ie,wt)|0,x=x+Math.imul(ie,qt)|0,k=(k=k+Math.imul(ie,Tt)|0)+Math.imul(ge,qt)|0,L=L+Math.imul(ge,Tt)|0,x=x+Math.imul(de,Ge)|0,k=(k=k+Math.imul(de,nt)|0)+Math.imul(ve,Ge)|0,L=L+Math.imul(ve,nt)|0,x=x+Math.imul(he,ke)|0,k=(k=k+Math.imul(he,be)|0)+Math.imul(oe,ke)|0,L=L+Math.imul(oe,be)|0,x=x+Math.imul(pe,Ee)|0,k=(k=k+Math.imul(pe,me)|0)+Math.imul(ce,Ee)|0,L=L+Math.imul(ce,me)|0;var Ht=(K+(x=x+Math.imul(ee,Be)|0)|0)+((8191&(k=(k=k+Math.imul(ee,De)|0)+Math.imul(re,Be)|0))<<13)|0;K=((L=L+Math.imul(re,De)|0)+(k>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,x=Math.imul(Ne,mt),k=(k=Math.imul(Ne,_t))+Math.imul(Qe,mt)|0,L=Math.imul(Qe,_t),x=x+Math.imul($e,Ut)|0,k=(k=k+Math.imul($e,wt)|0)+Math.imul(et,Ut)|0,L=L+Math.imul(et,wt)|0,x=x+Math.imul(Fe,qt)|0,k=(k=k+Math.imul(Fe,Tt)|0)+Math.imul(Ie,qt)|0,L=L+Math.imul(Ie,Tt)|0,x=x+Math.imul(ie,Ge)|0,k=(k=k+Math.imul(ie,nt)|0)+Math.imul(ge,Ge)|0,L=L+Math.imul(ge,nt)|0,x=x+Math.imul(de,ke)|0,k=(k=k+Math.imul(de,be)|0)+Math.imul(ve,ke)|0,L=L+Math.imul(ve,be)|0,x=x+Math.imul(he,Ee)|0,k=(k=k+Math.imul(he,me)|0)+Math.imul(oe,Ee)|0,L=L+Math.imul(oe,me)|0;var Nr=(K+(x=x+Math.imul(pe,Be)|0)|0)+((8191&(k=(k=k+Math.imul(pe,De)|0)+Math.imul(ce,Be)|0))<<13)|0;K=((L=L+Math.imul(ce,De)|0)+(k>>>13)|0)+(Nr>>>26)|0,Nr&=67108863,x=Math.imul(Ne,Ut),k=(k=Math.imul(Ne,wt))+Math.imul(Qe,Ut)|0,L=Math.imul(Qe,wt),x=x+Math.imul($e,qt)|0,k=(k=k+Math.imul($e,Tt)|0)+Math.imul(et,qt)|0,L=L+Math.imul(et,Tt)|0,x=x+Math.imul(Fe,Ge)|0,k=(k=k+Math.imul(Fe,nt)|0)+Math.imul(Ie,Ge)|0,L=L+Math.imul(Ie,nt)|0,x=x+Math.imul(ie,ke)|0,k=(k=k+Math.imul(ie,be)|0)+Math.imul(ge,ke)|0,L=L+Math.imul(ge,be)|0,x=x+Math.imul(de,Ee)|0,k=(k=k+Math.imul(de,me)|0)+Math.imul(ve,Ee)|0,L=L+Math.imul(ve,me)|0;var kr=(K+(x=x+Math.imul(he,Be)|0)|0)+((8191&(k=(k=k+Math.imul(he,De)|0)+Math.imul(oe,Be)|0))<<13)|0;K=((L=L+Math.imul(oe,De)|0)+(k>>>13)|0)+(kr>>>26)|0,kr&=67108863,x=Math.imul(Ne,qt),k=(k=Math.imul(Ne,Tt))+Math.imul(Qe,qt)|0,L=Math.imul(Qe,Tt),x=x+Math.imul($e,Ge)|0,k=(k=k+Math.imul($e,nt)|0)+Math.imul(et,Ge)|0,L=L+Math.imul(et,nt)|0,x=x+Math.imul(Fe,ke)|0,k=(k=k+Math.imul(Fe,be)|0)+Math.imul(Ie,ke)|0,L=L+Math.imul(Ie,be)|0,x=x+Math.imul(ie,Ee)|0,k=(k=k+Math.imul(ie,me)|0)+Math.imul(ge,Ee)|0,L=L+Math.imul(ge,me)|0;var _r=(K+(x=x+Math.imul(de,Be)|0)|0)+((8191&(k=(k=k+Math.imul(de,De)|0)+Math.imul(ve,Be)|0))<<13)|0;K=((L=L+Math.imul(ve,De)|0)+(k>>>13)|0)+(_r>>>26)|0,_r&=67108863,x=Math.imul(Ne,Ge),k=(k=Math.imul(Ne,nt))+Math.imul(Qe,Ge)|0,L=Math.imul(Qe,nt),x=x+Math.imul($e,ke)|0,k=(k=k+Math.imul($e,be)|0)+Math.imul(et,ke)|0,L=L+Math.imul(et,be)|0,x=x+Math.imul(Fe,Ee)|0,k=(k=k+Math.imul(Fe,me)|0)+Math.imul(Ie,Ee)|0,L=L+Math.imul(Ie,me)|0;var br=(K+(x=x+Math.imul(ie,Be)|0)|0)+((8191&(k=(k=k+Math.imul(ie,De)|0)+Math.imul(ge,Be)|0))<<13)|0;K=((L=L+Math.imul(ge,De)|0)+(k>>>13)|0)+(br>>>26)|0,br&=67108863,x=Math.imul(Ne,ke),k=(k=Math.imul(Ne,be))+Math.imul(Qe,ke)|0,L=Math.imul(Qe,be),x=x+Math.imul($e,Ee)|0,k=(k=k+Math.imul($e,me)|0)+Math.imul(et,Ee)|0,L=L+Math.imul(et,me)|0;var qr=(K+(x=x+Math.imul(Fe,Be)|0)|0)+((8191&(k=(k=k+Math.imul(Fe,De)|0)+Math.imul(Ie,Be)|0))<<13)|0;K=((L=L+Math.imul(Ie,De)|0)+(k>>>13)|0)+(qr>>>26)|0,qr&=67108863,x=Math.imul(Ne,Ee),k=(k=Math.imul(Ne,me))+Math.imul(Qe,Ee)|0,L=Math.imul(Qe,me);var Xn=(K+(x=x+Math.imul($e,Be)|0)|0)+((8191&(k=(k=k+Math.imul($e,De)|0)+Math.imul(et,Be)|0))<<13)|0;K=((L=L+Math.imul(et,De)|0)+(k>>>13)|0)+(Xn>>>26)|0,Xn&=67108863;var fn=(K+(x=Math.imul(Ne,Be))|0)+((8191&(k=(k=Math.imul(Ne,De))+Math.imul(Qe,Be)|0))<<13)|0;return K=((L=Math.imul(Qe,De))+(k>>>13)|0)+(fn>>>26)|0,fn&=67108863,Y[0]=je,Y[1]=Le,Y[2]=lt,Y[3]=vt,Y[4]=Bt,Y[5]=Se,Y[6]=He,Y[7]=ct,Y[8]=xt,Y[9]=Zt,Y[10]=Rt,Y[11]=Ht,Y[12]=Nr,Y[13]=kr,Y[14]=_r,Y[15]=br,Y[16]=qr,Y[17]=Xn,Y[18]=fn,K!==0&&(Y[19]=K,S.length++),S};function E(_,C,S){S.negative=C.negative^_.negative,S.length=_.length+C.length;for(var x=0,k=0,L=0;L<S.length-1;L++){var j=k;k=0;for(var z=67108863&x,Y=Math.min(L,C.length-1),K=Math.max(0,L-_.length+1);K<=Y;K++){var Q=L-K,q=(0|_.words[Q])*(0|C.words[K]),J=67108863&q;z=67108863&(J=J+z|0),k+=(j=(j=j+(q/67108864|0)|0)+(J>>>26)|0)>>>26,j&=67108863}S.words[L]=z,x=j,j=k}return x!==0?S.words[L]=x:S.length--,S._strip()}function I(_,C,S){return E(_,C,S)}Math.imul||(w=b),l.prototype.mulTo=function(_,C){var S=this.length+_.length;return this.length===10&&_.length===10?w(this,_,C):S<63?b(this,_,C):S<1024?E(this,_,C):I(this,_,C)},l.prototype.mul=function(_){var C=new l(null);return C.words=new Array(this.length+_.length),this.mulTo(_,C)},l.prototype.mulf=function(_){var C=new l(null);return C.words=new Array(this.length+_.length),I(this,_,C)},l.prototype.imul=function(_){return this.clone().mulTo(_,this)},l.prototype.imuln=function(_){var C=_<0;C&&(_=-_),s(typeof _=="number"),s(_<67108864);for(var S=0,x=0;x<this.length;x++){var k=(0|this.words[x])*_,L=(67108863&k)+(67108863&S);S>>=26,S+=k/67108864|0,S+=L>>>26,this.words[x]=67108863&L}return S!==0&&(this.words[x]=S,this.length++),C?this.ineg():this},l.prototype.muln=function(_){return this.clone().imuln(_)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(_){var C=function(L){for(var j=new Array(L.bitLength()),z=0;z<j.length;z++){var Y=z/26|0,K=z%26;j[z]=L.words[Y]>>>K&1}return j}(_);if(C.length===0)return new l(1);for(var S=this,x=0;x<C.length&&C[x]===0;x++,S=S.sqr());if(++x<C.length)for(var k=S.sqr();x<C.length;x++,k=k.sqr())C[x]!==0&&(S=S.mul(k));return S},l.prototype.iushln=function(_){s(typeof _=="number"&&_>=0);var C,S=_%26,x=(_-S)/26,k=67108863>>>26-S<<26-S;if(S!==0){var L=0;for(C=0;C<this.length;C++){var j=this.words[C]&k,z=(0|this.words[C])-j<<S;this.words[C]=z|L,L=j>>>26-S}L&&(this.words[C]=L,this.length++)}if(x!==0){for(C=this.length-1;C>=0;C--)this.words[C+x]=this.words[C];for(C=0;C<x;C++)this.words[C]=0;this.length+=x}return this._strip()},l.prototype.ishln=function(_){return s(this.negative===0),this.iushln(_)},l.prototype.iushrn=function(_,C,S){var x;s(typeof _=="number"&&_>=0),x=C?(C-C%26)/26:0;var k=_%26,L=Math.min((_-k)/26,this.length),j=67108863^67108863>>>k<<k,z=S;if(x-=L,x=Math.max(0,x),z){for(var Y=0;Y<L;Y++)z.words[Y]=this.words[Y];z.length=L}if(L!==0)if(this.length>L)for(this.length-=L,Y=0;Y<this.length;Y++)this.words[Y]=this.words[Y+L];else this.words[0]=0,this.length=1;var K=0;for(Y=this.length-1;Y>=0&&(K!==0||Y>=x);Y--){var Q=0|this.words[Y];this.words[Y]=K<<26-k|Q>>>k,K=Q&j}return z&&K!==0&&(z.words[z.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},l.prototype.ishrn=function(_,C,S){return s(this.negative===0),this.iushrn(_,C,S)},l.prototype.shln=function(_){return this.clone().ishln(_)},l.prototype.ushln=function(_){return this.clone().iushln(_)},l.prototype.shrn=function(_){return this.clone().ishrn(_)},l.prototype.ushrn=function(_){return this.clone().iushrn(_)},l.prototype.testn=function(_){s(typeof _=="number"&&_>=0);var C=_%26,S=(_-C)/26,x=1<<C;return!(this.length<=S)&&!!(this.words[S]&x)},l.prototype.imaskn=function(_){s(typeof _=="number"&&_>=0);var C=_%26,S=(_-C)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(C!==0&&S++,this.length=Math.min(S,this.length),C!==0){var x=67108863^67108863>>>C<<C;this.words[this.length-1]&=x}return this._strip()},l.prototype.maskn=function(_){return this.clone().imaskn(_)},l.prototype.iaddn=function(_){return s(typeof _=="number"),s(_<67108864),_<0?this.isubn(-_):this.negative!==0?this.length===1&&(0|this.words[0])<=_?(this.words[0]=_-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(_),this.negative=1,this):this._iaddn(_)},l.prototype._iaddn=function(_){this.words[0]+=_;for(var C=0;C<this.length&&this.words[C]>=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},l.prototype.isubn=function(_){if(s(typeof _=="number"),s(_<67108864),_<0)return this.iaddn(-_);if(this.negative!==0)return this.negative=0,this.iaddn(_),this.negative=1,this;if(this.words[0]-=_,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C<this.length&&this.words[C]<0;C++)this.words[C]+=67108864,this.words[C+1]-=1;return this._strip()},l.prototype.addn=function(_){return this.clone().iaddn(_)},l.prototype.subn=function(_){return this.clone().isubn(_)},l.prototype.iabs=function(){return this.negative=0,this},l.prototype.abs=function(){return this.clone().iabs()},l.prototype._ishlnsubmul=function(_,C,S){var x,k,L=_.length+S;this._expand(L);var j=0;for(x=0;x<_.length;x++){k=(0|this.words[x+S])+j;var z=(0|_.words[x])*C;j=((k-=67108863&z)>>26)-(z/67108864|0),this.words[x+S]=67108863&k}for(;x<this.length-S;x++)j=(k=(0|this.words[x+S])+j)>>26,this.words[x+S]=67108863&k;if(j===0)return this._strip();for(s(j===-1),j=0,x=0;x<this.length;x++)j=(k=-(0|this.words[x])+j)>>26,this.words[x]=67108863&k;return this.negative=1,this._strip()},l.prototype._wordDiv=function(_,C){var S=(this.length,_.length),x=this.clone(),k=_,L=0|k.words[k.length-1];(S=26-this._countBits(L))!==0&&(k=k.ushln(S),x.iushln(S),L=0|k.words[k.length-1]);var j,z=x.length-k.length;if(C!=="mod"){(j=new l(null)).length=z+1,j.words=new Array(j.length);for(var Y=0;Y<j.length;Y++)j.words[Y]=0}var K=x.clone()._ishlnsubmul(k,1,z);K.negative===0&&(x=K,j&&(j.words[z]=1));for(var Q=z-1;Q>=0;Q--){var q=67108864*(0|x.words[k.length+Q])+(0|x.words[k.length+Q-1]);for(q=Math.min(q/L|0,67108863),x._ishlnsubmul(k,q,Q);x.negative!==0;)q--,x.negative=0,x._ishlnsubmul(k,1,Q),x.isZero()||(x.negative^=1);j&&(j.words[Q]=q)}return j&&j._strip(),x._strip(),C!=="div"&&S!==0&&x.iushrn(S),{div:j||null,mod:x}},l.prototype.divmod=function(_,C,S){return s(!_.isZero()),this.isZero()?{div:new l(0),mod:new l(0)}:this.negative!==0&&_.negative===0?(L=this.neg().divmod(_,C),C!=="mod"&&(x=L.div.neg()),C!=="div"&&(k=L.mod.neg(),S&&k.negative!==0&&k.iadd(_)),{div:x,mod:k}):this.negative===0&&_.negative!==0?(L=this.divmod(_.neg(),C),C!=="mod"&&(x=L.div.neg()),{div:x,mod:L.mod}):this.negative&_.negative?(L=this.neg().divmod(_.neg(),C),C!=="div"&&(k=L.mod.neg(),S&&k.negative!==0&&k.isub(_)),{div:L.div,mod:k}):_.length>this.length||this.cmp(_)<0?{div:new l(0),mod:this}:_.length===1?C==="div"?{div:this.divn(_.words[0]),mod:null}:C==="mod"?{div:null,mod:new l(this.modrn(_.words[0]))}:{div:this.divn(_.words[0]),mod:new l(this.modrn(_.words[0]))}:this._wordDiv(_,C);var x,k,L},l.prototype.div=function(_){return this.divmod(_,"div",!1).div},l.prototype.mod=function(_){return this.divmod(_,"mod",!1).mod},l.prototype.umod=function(_){return this.divmod(_,"mod",!0).mod},l.prototype.divRound=function(_){var C=this.divmod(_);if(C.mod.isZero())return C.div;var S=C.div.negative!==0?C.mod.isub(_):C.mod,x=_.ushrn(1),k=_.andln(1),L=S.cmp(x);return L<0||k===1&&L===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},l.prototype.modrn=function(_){var C=_<0;C&&(_=-_),s(_<=67108863);for(var S=(1<<26)%_,x=0,k=this.length-1;k>=0;k--)x=(S*x+(0|this.words[k]))%_;return C?-x:x},l.prototype.modn=function(_){return this.modrn(_)},l.prototype.idivn=function(_){var C=_<0;C&&(_=-_),s(_<=67108863);for(var S=0,x=this.length-1;x>=0;x--){var k=(0|this.words[x])+67108864*S;this.words[x]=k/_|0,S=k%_}return this._strip(),C?this.ineg():this},l.prototype.divn=function(_){return this.clone().idivn(_)},l.prototype.egcd=function(_){s(_.negative===0),s(!_.isZero());var C=this,S=_.clone();C=C.negative!==0?C.umod(_):C.clone();for(var x=new l(1),k=new l(0),L=new l(0),j=new l(1),z=0;C.isEven()&&S.isEven();)C.iushrn(1),S.iushrn(1),++z;for(var Y=S.clone(),K=C.clone();!C.isZero();){for(var Q=0,q=1;!(C.words[0]&q)&&Q<26;++Q,q<<=1);if(Q>0)for(C.iushrn(Q);Q-- >0;)(x.isOdd()||k.isOdd())&&(x.iadd(Y),k.isub(K)),x.iushrn(1),k.iushrn(1);for(var J=0,G=1;!(S.words[0]&G)&&J<26;++J,G<<=1);if(J>0)for(S.iushrn(J);J-- >0;)(L.isOdd()||j.isOdd())&&(L.iadd(Y),j.isub(K)),L.iushrn(1),j.iushrn(1);C.cmp(S)>=0?(C.isub(S),x.isub(L),k.isub(j)):(S.isub(C),L.isub(x),j.isub(k))}return{a:L,b:j,gcd:S.iushln(z)}},l.prototype._invmp=function(_){s(_.negative===0),s(!_.isZero());var C=this,S=_.clone();C=C.negative!==0?C.umod(_):C.clone();for(var x,k=new l(1),L=new l(0),j=S.clone();C.cmpn(1)>0&&S.cmpn(1)>0;){for(var z=0,Y=1;!(C.words[0]&Y)&&z<26;++z,Y<<=1);if(z>0)for(C.iushrn(z);z-- >0;)k.isOdd()&&k.iadd(j),k.iushrn(1);for(var K=0,Q=1;!(S.words[0]&Q)&&K<26;++K,Q<<=1);if(K>0)for(S.iushrn(K);K-- >0;)L.isOdd()&&L.iadd(j),L.iushrn(1);C.cmp(S)>=0?(C.isub(S),k.isub(L)):(S.isub(C),L.isub(k))}return(x=C.cmpn(1)===0?k:L).cmpn(0)<0&&x.iadd(_),x},l.prototype.gcd=function(_){if(this.isZero())return _.abs();if(_.isZero())return this.abs();var C=this.clone(),S=_.clone();C.negative=0,S.negative=0;for(var x=0;C.isEven()&&S.isEven();x++)C.iushrn(1),S.iushrn(1);for(;;){for(;C.isEven();)C.iushrn(1);for(;S.isEven();)S.iushrn(1);var k=C.cmp(S);if(k<0){var L=C;C=S,S=L}else if(k===0||S.cmpn(1)===0)break;C.isub(S)}return S.iushln(x)},l.prototype.invm=function(_){return this.egcd(_).a.umod(_)},l.prototype.isEven=function(){return(1&this.words[0])==0},l.prototype.isOdd=function(){return(1&this.words[0])==1},l.prototype.andln=function(_){return this.words[0]&_},l.prototype.bincn=function(_){s(typeof _=="number");var C=_%26,S=(_-C)/26,x=1<<C;if(this.length<=S)return this._expand(S+1),this.words[S]|=x,this;for(var k=x,L=S;k!==0&&L<this.length;L++){var j=0|this.words[L];k=(j+=k)>>>26,j&=67108863,this.words[L]=j}return k!==0&&(this.words[L]=k,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(_){var C,S=_<0;if(this.negative!==0&&!S)return-1;if(this.negative===0&&S)return 1;if(this._strip(),this.length>1)C=1;else{S&&(_=-_),s(_<=67108863,"Number is too big");var x=0|this.words[0];C=x===_?0:x<_?-1:1}return this.negative!==0?0|-C:C},l.prototype.cmp=function(_){if(this.negative!==0&&_.negative===0)return-1;if(this.negative===0&&_.negative!==0)return 1;var C=this.ucmp(_);return this.negative!==0?0|-C:C},l.prototype.ucmp=function(_){if(this.length>_.length)return 1;if(this.length<_.length)return-1;for(var C=0,S=this.length-1;S>=0;S--){var x=0|this.words[S],k=0|_.words[S];if(x!==k){x<k?C=-1:x>k&&(C=1);break}}return C},l.prototype.gtn=function(_){return this.cmpn(_)===1},l.prototype.gt=function(_){return this.cmp(_)===1},l.prototype.gten=function(_){return this.cmpn(_)>=0},l.prototype.gte=function(_){return this.cmp(_)>=0},l.prototype.ltn=function(_){return this.cmpn(_)===-1},l.prototype.lt=function(_){return this.cmp(_)===-1},l.prototype.lten=function(_){return this.cmpn(_)<=0},l.prototype.lte=function(_){return this.cmp(_)<=0},l.prototype.eqn=function(_){return this.cmpn(_)===0},l.prototype.eq=function(_){return this.cmp(_)===0},l.red=function(_){return new T(_)},l.prototype.toRed=function(_){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),_.convertTo(this)._forceRed(_)},l.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(_){return this.red=_,this},l.prototype.forceRed=function(_){return s(!this.red,"Already a number in reduction context"),this._forceRed(_)},l.prototype.redAdd=function(_){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,_)},l.prototype.redIAdd=function(_){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,_)},l.prototype.redSub=function(_){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,_)},l.prototype.redISub=function(_){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,_)},l.prototype.redShl=function(_){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,_)},l.prototype.redMul=function(_){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.mul(this,_)},l.prototype.redIMul=function(_){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,_),this.red.imul(this,_)},l.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(_){return s(this.red&&!_.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,_)};var O={k256:null,p224:null,p192:null,p25519:null};function D(_,C){this.name=_,this.p=new l(C,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function N(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function U(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function B(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function F(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(_){if(typeof _=="string"){var C=l._prime(_);this.m=C.p,this.prime=C}else s(_.gtn(1),"modulus must be greater than 1"),this.m=_,this.prime=null}function P(_){T.call(this,_),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(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)}D.prototype._tmp=function(){var _=new l(null);return _.words=new Array(Math.ceil(this.n/13)),_},D.prototype.ireduce=function(_){var C,S=_;do this.split(S,this.tmp),C=(S=(S=this.imulK(S)).iadd(this.tmp)).bitLength();while(C>this.n);var x=C<this.n?-1:S.ucmp(this.p);return x===0?(S.words[0]=0,S.length=1):x>0?S.isub(this.p):S.strip!==void 0?S.strip():S._strip(),S},D.prototype.split=function(_,C){_.iushrn(this.n,0,C)},D.prototype.imulK=function(_){return _.imul(this.k)},c(N,D),N.prototype.split=function(_,C){for(var S=Math.min(_.length,9),x=0;x<S;x++)C.words[x]=_.words[x];if(C.length=S,_.length<=9)return _.words[0]=0,void(_.length=1);var k=_.words[9];for(C.words[C.length++]=4194303&k,x=10;x<_.length;x++){var L=0|_.words[x];_.words[x-10]=(4194303&L)<<4|k>>>22,k=L}k>>>=22,_.words[x-10]=k,k===0&&_.length>10?_.length-=10:_.length-=9},N.prototype.imulK=function(_){_.words[_.length]=0,_.words[_.length+1]=0,_.length+=2;for(var C=0,S=0;S<_.length;S++){var x=0|_.words[S];C+=977*x,_.words[S]=67108863&C,C=64*x+(C/67108864|0)}return _.words[_.length-1]===0&&(_.length--,_.words[_.length-1]===0&&_.length--),_},c(U,D),c(B,D),c(F,D),F.prototype.imulK=function(_){for(var C=0,S=0;S<_.length;S++){var x=19*(0|_.words[S])+C,k=67108863&x;x>>>=26,_.words[S]=k,C=x}return C!==0&&(_.words[_.length++]=C),_},l._prime=function(_){if(O[_])return O[_];var C;if(_==="k256")C=new N;else if(_==="p224")C=new U;else if(_==="p192")C=new B;else{if(_!=="p25519")throw new Error("Unknown prime "+_);C=new F}return O[_]=C,C},T.prototype._verify1=function(_){s(_.negative===0,"red works only with positives"),s(_.red,"red works only with red numbers")},T.prototype._verify2=function(_,C){s((_.negative|C.negative)==0,"red works only with positives"),s(_.red&&_.red===C.red,"red works only with red numbers")},T.prototype.imod=function(_){return this.prime?this.prime.ireduce(_)._forceRed(this):(p(_,_.umod(this.m)._forceRed(this)),_)},T.prototype.neg=function(_){return _.isZero()?_.clone():this.m.sub(_)._forceRed(this)},T.prototype.add=function(_,C){this._verify2(_,C);var S=_.add(C);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},T.prototype.iadd=function(_,C){this._verify2(_,C);var S=_.iadd(C);return S.cmp(this.m)>=0&&S.isub(this.m),S},T.prototype.sub=function(_,C){this._verify2(_,C);var S=_.sub(C);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},T.prototype.isub=function(_,C){this._verify2(_,C);var S=_.isub(C);return S.cmpn(0)<0&&S.iadd(this.m),S},T.prototype.shl=function(_,C){return this._verify1(_),this.imod(_.ushln(C))},T.prototype.imul=function(_,C){return this._verify2(_,C),this.imod(_.imul(C))},T.prototype.mul=function(_,C){return this._verify2(_,C),this.imod(_.mul(C))},T.prototype.isqr=function(_){return this.imul(_,_.clone())},T.prototype.sqr=function(_){return this.mul(_,_)},T.prototype.sqrt=function(_){if(_.isZero())return _.clone();var C=this.m.andln(3);if(s(C%2==1),C===3){var S=this.m.add(new l(1)).iushrn(2);return this.pow(_,S)}for(var x=this.m.subn(1),k=0;!x.isZero()&&x.andln(1)===0;)k++,x.iushrn(1);s(!x.isZero());var L=new l(1).toRed(this),j=L.redNeg(),z=this.m.subn(1).iushrn(1),Y=this.m.bitLength();for(Y=new l(2*Y*Y).toRed(this);this.pow(Y,z).cmp(j)!==0;)Y.redIAdd(j);for(var K=this.pow(Y,x),Q=this.pow(_,x.addn(1).iushrn(1)),q=this.pow(_,x),J=k;q.cmp(L)!==0;){for(var G=q,V=0;G.cmp(L)!==0;V++)G=G.redSqr();s(V<J);var X=this.pow(K,new l(1).iushln(J-V-1));Q=Q.redMul(X),K=X.redSqr(),q=q.redMul(K),J=V}return Q},T.prototype.invm=function(_){var C=_._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},T.prototype.pow=function(_,C){if(C.isZero())return new l(1).toRed(this);if(C.cmpn(1)===0)return _.clone();var S=new Array(16);S[0]=new l(1).toRed(this),S[1]=_;for(var x=2;x<S.length;x++)S[x]=this.mul(S[x-1],_);var k=S[0],L=0,j=0,z=C.bitLength()%26;for(z===0&&(z=26),x=C.length-1;x>=0;x--){for(var Y=C.words[x],K=z-1;K>=0;K--){var Q=Y>>K&1;k!==S[0]&&(k=this.sqr(k)),Q!==0||L!==0?(L<<=1,L|=Q,(++j===4||x===0&&K===0)&&(k=this.mul(k,S[L]),j=0,L=0)):j=0}z=26}return k},T.prototype.convertTo=function(_){var C=_.umod(this.m);return C===_?C.clone():C},T.prototype.convertFrom=function(_){var C=_.clone();return C.red=null,C},l.mont=function(_){return new P(_)},c(P,T),P.prototype.convertTo=function(_){return this.imod(_.ushln(this.shift))},P.prototype.convertFrom=function(_){var C=this.imod(_.mul(this.rinv));return C.red=null,C},P.prototype.imul=function(_,C){if(_.isZero()||C.isZero())return _.words[0]=0,_.length=1,_;var S=_.imul(C),x=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=S.isub(x).iushrn(this.shift),L=k;return k.cmp(this.m)>=0?L=k.isub(this.m):k.cmpn(0)<0&&(L=k.iadd(this.m)),L._forceRed(this)},P.prototype.mul=function(_,C){if(_.isZero()||C.isZero())return new l(0)._forceRed(this);var S=_.mul(C),x=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),k=S.isub(x).iushrn(this.shift),L=k;return k.cmp(this.m)>=0?L=k.isub(this.m):k.cmpn(0)<0&&(L=k.iadd(this.m)),L._forceRed(this)},P.prototype.invm=function(_){return this.imod(_._invmp(this.m).mul(this.r2))._forceRed(this)}})(n===void 0||n)},{buffer:188}],187:[function(r,n,o){var i;function a(c){this.rand=c}if(n.exports=function(c){return i||(i=new a(null)),i.generate(c)},n.exports.Rand=a,a.prototype.generate=function(c){return this._rand(c)},a.prototype._rand=function(c){if(this.rand.getBytes)return this.rand.getBytes(c);for(var l=new Uint8Array(c),u=0;u<l.length;u++)l[u]=this.rand.getByte();return l},typeof self=="object")self.crypto&&self.crypto.getRandomValues?a.prototype._rand=function(c){var l=new Uint8Array(c);return self.crypto.getRandomValues(l),l}:self.msCrypto&&self.msCrypto.getRandomValues?a.prototype._rand=function(c){var l=new Uint8Array(c);return self.msCrypto.getRandomValues(l),l}:typeof window=="object"&&(a.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=r("crypto");if(typeof s.randomBytes!="function")throw new Error("Not supported");a.prototype._rand=function(c){return s.randomBytes(c)}}catch{}},{crypto:188}],188:[function(r,n,o){},{}],189:[function(r,n,o){var i=r("safe-buffer").Buffer;function a(d){i.isBuffer(d)||(d=i.from(d));for(var h=d.length/4|0,p=new Array(h),g=0;g<h;g++)p[g]=d.readUInt32BE(4*g);return p}function s(d){for(;0<d.length;d++)d[0]=0}function c(d,h,p,g,m){for(var v,y,b,w,E=p[0],I=p[1],O=p[2],D=p[3],N=d[0]^h[0],U=d[1]^h[1],B=d[2]^h[2],F=d[3]^h[3],T=4,P=1;P<m;P++)v=E[N>>>24]^I[U>>>16&255]^O[B>>>8&255]^D[255&F]^h[T++],y=E[U>>>24]^I[B>>>16&255]^O[F>>>8&255]^D[255&N]^h[T++],b=E[B>>>24]^I[F>>>16&255]^O[N>>>8&255]^D[255&U]^h[T++],w=E[F>>>24]^I[N>>>16&255]^O[U>>>8&255]^D[255&B]^h[T++],N=v,U=y,B=b,F=w;return v=(g[N>>>24]<<24|g[U>>>16&255]<<16|g[B>>>8&255]<<8|g[255&F])^h[T++],y=(g[U>>>24]<<24|g[B>>>16&255]<<16|g[F>>>8&255]<<8|g[255&N])^h[T++],b=(g[B>>>24]<<24|g[F>>>16&255]<<16|g[N>>>8&255]<<8|g[255&U])^h[T++],w=(g[F>>>24]<<24|g[N>>>16&255]<<16|g[U>>>8&255]<<8|g[255&B])^h[T++],[v>>>=0,y>>>=0,b>>>=0,w>>>=0]}var l=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var d=new Array(256),h=0;h<256;h++)d[h]=h<128?h<<1:h<<1^283;for(var p=[],g=[],m=[[],[],[],[]],v=[[],[],[],[]],y=0,b=0,w=0;w<256;++w){var E=b^b<<1^b<<2^b<<3^b<<4;E=E>>>8^255&E^99,p[y]=E,g[E]=y;var I=d[y],O=d[I],D=d[O],N=257*d[E]^16843008*E;m[0][y]=N<<24|N>>>8,m[1][y]=N<<16|N>>>16,m[2][y]=N<<8|N>>>24,m[3][y]=N,N=16843009*D^65537*O^257*I^16843008*y,v[0][E]=N<<24|N>>>8,v[1][E]=N<<16|N>>>16,v[2][E]=N<<8|N>>>24,v[3][E]=N,y===0?y=b=1:(y=I^d[d[d[D^I]]],b^=d[d[b]])}return{SBOX:p,INV_SBOX:g,SUB_MIX:m,INV_SUB_MIX:v}}();function f(d){this._key=a(d),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var d=this._key,h=d.length,p=h+6,g=4*(p+1),m=[],v=0;v<h;v++)m[v]=d[v];for(v=h;v<g;v++){var y=m[v-1];v%h==0?(y=y<<8|y>>>24,y=u.SBOX[y>>>24]<<24|u.SBOX[y>>>16&255]<<16|u.SBOX[y>>>8&255]<<8|u.SBOX[255&y],y^=l[v/h|0]<<24):h>6&&v%h==4&&(y=u.SBOX[y>>>24]<<24|u.SBOX[y>>>16&255]<<16|u.SBOX[y>>>8&255]<<8|u.SBOX[255&y]),m[v]=m[v-h]^y}for(var b=[],w=0;w<g;w++){var E=g-w,I=m[E-(w%4?0:4)];b[w]=w<4||E<=4?I:u.INV_SUB_MIX[0][u.SBOX[I>>>24]]^u.INV_SUB_MIX[1][u.SBOX[I>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[I>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&I]]}this._nRounds=p,this._keySchedule=m,this._invKeySchedule=b},f.prototype.encryptBlockRaw=function(d){return c(d=a(d),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},f.prototype.encryptBlock=function(d){var h=this.encryptBlockRaw(d),p=i.allocUnsafe(16);return p.writeUInt32BE(h[0],0),p.writeUInt32BE(h[1],4),p.writeUInt32BE(h[2],8),p.writeUInt32BE(h[3],12),p},f.prototype.decryptBlock=function(d){var h=(d=a(d))[1];d[1]=d[3],d[3]=h;var p=c(d,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),g=i.allocUnsafe(16);return g.writeUInt32BE(p[0],0),g.writeUInt32BE(p[3],4),g.writeUInt32BE(p[2],8),g.writeUInt32BE(p[1],12),g},f.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},n.exports.AES=f},{"safe-buffer":494}],190:[function(r,n,o){var i=r("./aes"),a=r("safe-buffer").Buffer,s=r("cipher-base"),c=r("inherits"),l=r("./ghash"),u=r("buffer-xor"),f=r("./incr32");function d(h,p,g,m){s.call(this);var v=a.alloc(4,0);this._cipher=new i.AES(p);var y=this._cipher.encryptBlock(v);this._ghash=new l(y),g=function(b,w,E){if(w.length===12)return b._finID=a.concat([w,a.from([0,0,0,1])]),a.concat([w,a.from([0,0,0,2])]);var I=new l(E),O=w.length,D=O%16;I.update(w),D&&(D=16-D,I.update(a.alloc(D,0))),I.update(a.alloc(8,0));var N=8*O,U=a.alloc(8);U.writeUIntBE(N,0,8),I.update(U),b._finID=I.state;var B=a.from(b._finID);return f(B),B}(this,g,y),this._prev=a.from(g),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=m,this._alen=0,this._len=0,this._mode=h,this._authTag=null,this._called=!1}c(d,s),d.prototype._update=function(h){if(!this._called&&this._alen){var p=16-this._alen%16;p<16&&(p=a.alloc(p,0),this._ghash.update(p))}this._called=!0;var g=this._mode.encrypt(this,h);return this._decrypt?this._ghash.update(h):this._ghash.update(g),this._len+=h.length,g},d.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var h=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(p,g){var m=0;p.length!==g.length&&m++;for(var v=Math.min(p.length,g.length),y=0;y<v;++y)m+=p[y]^g[y];return m}(h,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=h,this._cipher.scrub()},d.prototype.getAuthTag=function(){if(this._decrypt||!a.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},d.prototype.setAuthTag=function(h){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=h},d.prototype.setAAD=function(h){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(h),this._alen+=h.length},n.exports=d},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(r,n,o){var i=r("./encrypter"),a=r("./decrypter"),s=r("./modes/list.json");o.createCipher=o.Cipher=i.createCipher,o.createCipheriv=o.Cipheriv=i.createCipheriv,o.createDecipher=o.Decipher=a.createDecipher,o.createDecipheriv=o.Decipheriv=a.createDecipheriv,o.listCiphers=o.getCiphers=function(){return Object.keys(s)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(r,n,o){var i=r("./authCipher"),a=r("safe-buffer").Buffer,s=r("./modes"),c=r("./streamCipher"),l=r("cipher-base"),u=r("./aes"),f=r("evp_bytestokey");function d(g,m,v){l.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(m),this._prev=a.from(v),this._mode=g,this._autopadding=!0}function h(){this.cache=a.allocUnsafe(0)}function p(g,m,v){var y=s[g.toLowerCase()];if(!y)throw new TypeError("invalid suite type");if(typeof v=="string"&&(v=a.from(v)),y.mode!=="GCM"&&v.length!==y.iv)throw new TypeError("invalid iv length "+v.length);if(typeof m=="string"&&(m=a.from(m)),m.length!==y.key/8)throw new TypeError("invalid key length "+m.length);return y.type==="stream"?new c(y.module,m,v,!0):y.type==="auth"?new i(y.module,m,v,!0):new d(y.module,m,v)}r("inherits")(d,l),d.prototype._update=function(g){var m,v;this._cache.add(g);for(var y=[];m=this._cache.get(this._autopadding);)v=this._mode.decrypt(this,m),y.push(v);return a.concat(y)},d.prototype._final=function(){var g=this._cache.flush();if(this._autopadding)return function(m){var v=m[15];if(v<1||v>16)throw new Error("unable to decrypt data");for(var y=-1;++y<v;)if(m[y+(16-v)]!==v)throw new Error("unable to decrypt data");if(v!==16)return m.slice(0,16-v)}(this._mode.decrypt(this,g));if(g)throw new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(g){return this._autopadding=!!g,this},h.prototype.add=function(g){this.cache=a.concat([this.cache,g])},h.prototype.get=function(g){var m;if(g){if(this.cache.length>16)return m=this.cache.slice(0,16),this.cache=this.cache.slice(16),m}else if(this.cache.length>=16)return m=this.cache.slice(0,16),this.cache=this.cache.slice(16),m;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},o.createDecipher=function(g,m){var v=s[g.toLowerCase()];if(!v)throw new TypeError("invalid suite type");var y=f(m,!1,v.key,v.iv);return p(g,y.key,y.iv)},o.createDecipheriv=p},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(r,n,o){var i=r("./modes"),a=r("./authCipher"),s=r("safe-buffer").Buffer,c=r("./streamCipher"),l=r("cipher-base"),u=r("./aes"),f=r("evp_bytestokey");function d(m,v,y){l.call(this),this._cache=new p,this._cipher=new u.AES(v),this._prev=s.from(y),this._mode=m,this._autopadding=!0}r("inherits")(d,l),d.prototype._update=function(m){var v,y;this._cache.add(m);for(var b=[];v=this._cache.get();)y=this._mode.encrypt(this,v),b.push(y);return s.concat(b)};var h=s.alloc(16,16);function p(){this.cache=s.allocUnsafe(0)}function g(m,v,y){var b=i[m.toLowerCase()];if(!b)throw new TypeError("invalid suite type");if(typeof v=="string"&&(v=s.from(v)),v.length!==b.key/8)throw new TypeError("invalid key length "+v.length);if(typeof y=="string"&&(y=s.from(y)),b.mode!=="GCM"&&y.length!==b.iv)throw new TypeError("invalid iv length "+y.length);return b.type==="stream"?new c(b.module,v,y):b.type==="auth"?new a(b.module,v,y):new d(b.module,v,y)}d.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return m=this._mode.encrypt(this,m),this._cipher.scrub(),m;if(!m.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},d.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this},p.prototype.add=function(m){this.cache=s.concat([this.cache,m])},p.prototype.get=function(){if(this.cache.length>15){var m=this.cache.slice(0,16);return this.cache=this.cache.slice(16),m}return null},p.prototype.flush=function(){for(var m=16-this.cache.length,v=s.allocUnsafe(m),y=-1;++y<m;)v.writeUInt8(m,y);return s.concat([this.cache,v])},o.createCipheriv=g,o.createCipher=function(m,v){var y=i[m.toLowerCase()];if(!y)throw new TypeError("invalid suite type");var b=f(v,!1,y.key,y.iv);return g(m,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(r,n,o){var i=r("safe-buffer").Buffer,a=i.alloc(16,0);function s(l){var u=i.allocUnsafe(16);return u.writeUInt32BE(l[0]>>>0,0),u.writeUInt32BE(l[1]>>>0,4),u.writeUInt32BE(l[2]>>>0,8),u.writeUInt32BE(l[3]>>>0,12),u}function c(l){this.h=l,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}c.prototype.ghash=function(l){for(var u=-1;++u<l.length;)this.state[u]^=l[u];this._multiply()},c.prototype._multiply=function(){for(var l,u,f,d=[(l=this.h).readUInt32BE(0),l.readUInt32BE(4),l.readUInt32BE(8),l.readUInt32BE(12)],h=[0,0,0,0],p=-1;++p<128;){for(this.state[~~(p/8)]&1<<7-p%8&&(h[0]^=d[0],h[1]^=d[1],h[2]^=d[2],h[3]^=d[3]),f=(1&d[3])!=0,u=3;u>0;u--)d[u]=d[u]>>>1|(1&d[u-1])<<31;d[0]=d[0]>>>1,f&&(d[0]=d[0]^225<<24)}this.state=s(h)},c.prototype.update=function(l){var u;for(this.cache=i.concat([this.cache,l]);this.cache.length>=16;)u=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(u)},c.prototype.final=function(l,u){return this.cache.length&&this.ghash(i.concat([this.cache,a],16)),this.ghash(s([0,l,0,u])),this.state},n.exports=c},{"safe-buffer":494}],195:[function(r,n,o){n.exports=function(i){for(var a,s=i.length;s--;){if((a=i.readUInt8(s))!==255){a++,i.writeUInt8(a,s);break}i.writeUInt8(0,s)}}},{}],196:[function(r,n,o){var i=r("buffer-xor");o.encrypt=function(a,s){var c=i(s,a._prev);return a._prev=a._cipher.encryptBlock(c),a._prev},o.decrypt=function(a,s){var c=a._prev;a._prev=s;var l=a._cipher.decryptBlock(s);return i(l,c)}},{"buffer-xor":219}],197:[function(r,n,o){var i=r("safe-buffer").Buffer,a=r("buffer-xor");function s(c,l,u){var f=l.length,d=a(l,c._cache);return c._cache=c._cache.slice(f),c._prev=i.concat([c._prev,u?l:d]),d}o.encrypt=function(c,l,u){for(var f,d=i.allocUnsafe(0);l.length;){if(c._cache.length===0&&(c._cache=c._cipher.encryptBlock(c._prev),c._prev=i.allocUnsafe(0)),!(c._cache.length<=l.length)){d=i.concat([d,s(c,l,u)]);break}f=c._cache.length,d=i.concat([d,s(c,l.slice(0,f),u)]),l=l.slice(f)}return d}},{"buffer-xor":219,"safe-buffer":494}],198:[function(r,n,o){var i=r("safe-buffer").Buffer;function a(c,l,u){for(var f,d,h=-1,p=0;++h<8;)f=l&1<<7-h?128:0,p+=(128&(d=c._cipher.encryptBlock(c._prev)[0]^f))>>h%8,c._prev=s(c._prev,u?f:d);return p}function s(c,l){var u=c.length,f=-1,d=i.allocUnsafe(c.length);for(c=i.concat([c,i.from([l])]);++f<u;)d[f]=c[f]<<1|c[f+1]>>7;return d}o.encrypt=function(c,l,u){for(var f=l.length,d=i.allocUnsafe(f),h=-1;++h<f;)d[h]=a(c,l[h],u);return d}},{"safe-buffer":494}],199:[function(r,n,o){var i=r("safe-buffer").Buffer;function a(s,c,l){var u=s._cipher.encryptBlock(s._prev)[0]^c;return s._prev=i.concat([s._prev.slice(1),i.from([l?c:u])]),u}o.encrypt=function(s,c,l){for(var u=c.length,f=i.allocUnsafe(u),d=-1;++d<u;)f[d]=a(s,c[d],l);return f}},{"safe-buffer":494}],200:[function(r,n,o){var i=r("buffer-xor"),a=r("safe-buffer").Buffer,s=r("../incr32");function c(l){var u=l._cipher.encryptBlockRaw(l._prev);return s(l._prev),u}o.encrypt=function(l,u){var f=Math.ceil(u.length/16),d=l._cache.length;l._cache=a.concat([l._cache,a.allocUnsafe(16*f)]);for(var h=0;h<f;h++){var p=c(l),g=d+16*h;l._cache.writeUInt32BE(p[0],g+0),l._cache.writeUInt32BE(p[1],g+4),l._cache.writeUInt32BE(p[2],g+8),l._cache.writeUInt32BE(p[3],g+12)}var m=l._cache.slice(0,u.length);return l._cache=l._cache.slice(u.length),i(u,m)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(r,n,o){o.encrypt=function(i,a){return i._cipher.encryptBlock(a)},o.decrypt=function(i,a){return i._cipher.decryptBlock(a)}},{}],202:[function(r,n,o){var i={ECB:r("./ecb"),CBC:r("./cbc"),CFB:r("./cfb"),CFB8:r("./cfb8"),CFB1:r("./cfb1"),OFB:r("./ofb"),CTR:r("./ctr"),GCM:r("./ctr")},a=r("./list.json");for(var s in a)a[s].module=i[a[s].mode];n.exports=a},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(r,n,o){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(r,n,o){(function(i){(function(){var a=r("buffer-xor");function s(c){return c._prev=c._cipher.encryptBlock(c._prev),c._prev}o.encrypt=function(c,l){for(;c._cache.length<l.length;)c._cache=i.concat([c._cache,s(c)]);var u=c._cache.slice(0,l.length);return c._cache=c._cache.slice(l.length),a(l,u)}}).call(this)}).call(this,r("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(r,n,o){var i=r("./aes"),a=r("safe-buffer").Buffer,s=r("cipher-base");function c(l,u,f,d){s.call(this),this._cipher=new i.AES(u),this._prev=a.from(f),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=d,this._mode=l}r("inherits")(c,s),c.prototype._update=function(l){return this._mode.encrypt(this,l,this._decrypt)},c.prototype._final=function(){this._cipher.scrub()},n.exports=c},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(r,n,o){var i=r("browserify-des"),a=r("browserify-aes/browser"),s=r("browserify-aes/modes"),c=r("browserify-des/modes"),l=r("evp_bytestokey");function u(d,h,p){if(d=d.toLowerCase(),s[d])return a.createCipheriv(d,h,p);if(c[d])return new i({key:h,iv:p,mode:d});throw new TypeError("invalid suite type")}function f(d,h,p){if(d=d.toLowerCase(),s[d])return a.createDecipheriv(d,h,p);if(c[d])return new i({key:h,iv:p,mode:d,decrypt:!0});throw new TypeError("invalid suite type")}o.createCipher=o.Cipher=function(d,h){var p,g;if(d=d.toLowerCase(),s[d])p=s[d].key,g=s[d].iv;else{if(!c[d])throw new TypeError("invalid suite type");p=8*c[d].key,g=c[d].iv}var m=l(h,!1,p,g);return u(d,m.key,m.iv)},o.createCipheriv=o.Cipheriv=u,o.createDecipher=o.Decipher=function(d,h){var p,g;if(d=d.toLowerCase(),s[d])p=s[d].key,g=s[d].iv;else{if(!c[d])throw new TypeError("invalid suite type");p=8*c[d].key,g=c[d].iv}var m=l(h,!1,p,g);return f(d,m.key,m.iv)},o.createDecipheriv=o.Decipheriv=f,o.listCiphers=o.getCiphers=function(){return Object.keys(c).concat(a.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(r,n,o){var i=r("cipher-base"),a=r("des.js"),s=r("inherits"),c=r("safe-buffer").Buffer,l={"des-ede3-cbc":a.CBC.instantiate(a.EDE),"des-ede3":a.EDE,"des-ede-cbc":a.CBC.instantiate(a.EDE),"des-ede":a.EDE,"des-cbc":a.CBC.instantiate(a.DES),"des-ecb":a.DES};function u(f){i.call(this);var d,h=f.mode.toLowerCase(),p=l[h];d=f.decrypt?"decrypt":"encrypt";var g=f.key;c.isBuffer(g)||(g=c.from(g)),h!=="des-ede"&&h!=="des-ede-cbc"||(g=c.concat([g,g.slice(0,8)]));var m=f.iv;c.isBuffer(m)||(m=c.from(m)),this._des=p.create({key:g,iv:m,type:d})}l.des=l["des-cbc"],l.des3=l["des-ede3-cbc"],n.exports=u,s(u,i),u.prototype._update=function(f){return c.from(this._des.update(f))},u.prototype._final=function(){return c.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(r,n,o){o["des-ecb"]={key:8,iv:0},o["des-cbc"]=o.des={key:8,iv:8},o["des-ede3-cbc"]=o.des3={key:24,iv:8},o["des-ede3"]={key:24,iv:0},o["des-ede-cbc"]={key:16,iv:8},o["des-ede"]={key:16,iv:0}},{}],209:[function(r,n,o){(function(i){(function(){var a=r("bn.js"),s=r("randombytes");function c(u){var f,d=u.modulus.byteLength();do f=new a(s(d));while(f.cmp(u.modulus)>=0||!f.umod(u.prime1)||!f.umod(u.prime2));return f}function l(u,f){var d=function(O){var D=c(O);return{blinder:D.toRed(a.mont(O.modulus)).redPow(new a(O.publicExponent)).fromRed(),unblinder:D.invm(O.modulus)}}(f),h=f.modulus.byteLength(),p=new a(u).mul(d.blinder).umod(f.modulus),g=p.toRed(a.mont(f.prime1)),m=p.toRed(a.mont(f.prime2)),v=f.coefficient,y=f.prime1,b=f.prime2,w=g.redPow(f.exponent1).fromRed(),E=m.redPow(f.exponent2).fromRed(),I=w.isub(E).imul(v).umod(y).imul(b);return E.iadd(I).imul(d.unblinder).umod(f.modulus).toArrayLike(i,"be",h)}l.getr=c,n.exports=l}).call(this)}).call(this,r("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(r,n,o){n.exports=r("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(r,n,o){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(r,n,o){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(r,n,o){var i=r("safe-buffer").Buffer,a=r("create-hash"),s=r("readable-stream"),c=r("inherits"),l=r("./sign"),u=r("./verify"),f=r("./algorithms.json");function d(m){s.Writable.call(this);var v=f[m];if(!v)throw new Error("Unknown message digest");this._hashType=v.hash,this._hash=a(v.hash),this._tag=v.id,this._signType=v.sign}function h(m){s.Writable.call(this);var v=f[m];if(!v)throw new Error("Unknown message digest");this._hash=a(v.hash),this._tag=v.id,this._signType=v.sign}function p(m){return new d(m)}function g(m){return new h(m)}Object.keys(f).forEach(function(m){f[m].id=i.from(f[m].id,"hex"),f[m.toLowerCase()]=f[m]}),c(d,s.Writable),d.prototype._write=function(m,v,y){this._hash.update(m),y()},d.prototype.update=function(m,v){return typeof m=="string"&&(m=i.from(m,v)),this._hash.update(m),this},d.prototype.sign=function(m,v){this.end();var y=this._hash.digest(),b=l(y,m,this._hashType,this._signType,this._tag);return v?b.toString(v):b},c(h,s.Writable),h.prototype._write=function(m,v,y){this._hash.update(m),y()},h.prototype.update=function(m,v){return typeof m=="string"&&(m=i.from(m,v)),this._hash.update(m),this},h.prototype.verify=function(m,v,y){typeof v=="string"&&(v=i.from(v,y)),this.end();var b=this._hash.digest();return u(v,b,m,this._signType,this._tag)},n.exports={Sign:p,Verify:g,createSign:p,createVerify:g}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(r,n,o){var i=r("safe-buffer").Buffer,a=r("create-hmac"),s=r("browserify-rsa"),c=r("elliptic").ec,l=r("bn.js"),u=r("parse-asn1"),f=r("./curves.json");function d(m,v,y,b){if((m=i.from(m.toArray())).length<v.byteLength()){var w=i.alloc(v.byteLength()-m.length);m=i.concat([w,m])}var E=y.length,I=function(N,U){N=(N=h(N,U)).mod(U);var B=i.from(N.toArray());if(B.length<U.byteLength()){var F=i.alloc(U.byteLength()-B.length);B=i.concat([F,B])}return B}(y,v),O=i.alloc(E);O.fill(1);var D=i.alloc(E);return D=a(b,D).update(O).update(i.from([0])).update(m).update(I).digest(),O=a(b,D).update(O).digest(),{k:D=a(b,D).update(O).update(i.from([1])).update(m).update(I).digest(),v:O=a(b,D).update(O).digest()}}function h(m,v){var y=new l(m),b=(m.length<<3)-v.bitLength();return b>0&&y.ishrn(b),y}function p(m,v,y){var b,w;do{for(b=i.alloc(0);8*b.length<m.bitLength();)v.v=a(y,v.k).update(v.v).digest(),b=i.concat([b,v.v]);w=h(b,m),v.k=a(y,v.k).update(v.v).update(i.from([0])).digest(),v.v=a(y,v.k).update(v.v).digest()}while(w.cmp(m)!==-1);return w}function g(m,v,y,b){return m.toRed(l.mont(y)).redPow(v).fromRed().mod(b)}n.exports=function(m,v,y,b,w){var E=u(v);if(E.curve){if(b!=="ecdsa"&&b!=="ecdsa/rsa")throw new Error("wrong private key type");return function(N,U){var B=f[U.curve.join(".")];if(!B)throw new Error("unknown curve "+U.curve.join("."));var F=new c(B).keyFromPrivate(U.privateKey).sign(N);return i.from(F.toDER())}(m,E)}if(E.type==="dsa"){if(b!=="dsa")throw new Error("wrong private key type");return function(N,U,B){for(var F,T=U.params.priv_key,P=U.params.p,_=U.params.q,C=U.params.g,S=new l(0),x=h(N,_).mod(_),k=!1,L=d(T,_,N,B);k===!1;)F=p(_,L,B),S=g(C,F,P,_),(k=F.invm(_).imul(x.add(T.mul(S))).mod(_)).cmpn(0)===0&&(k=!1,S=new l(0));return function(j,z){j=j.toArray(),z=z.toArray(),128&j[0]&&(j=[0].concat(j)),128&z[0]&&(z=[0].concat(z));var Y=[48,j.length+z.length+4,2,j.length];return Y=Y.concat(j,[2,z.length],z),i.from(Y)}(S,k)}(m,E,y)}if(b!=="rsa"&&b!=="ecdsa/rsa")throw new Error("wrong private key type");m=i.concat([w,m]);for(var I=E.modulus.byteLength(),O=[0,1];m.length+O.length+1<I;)O.push(255);O.push(0);for(var D=-1;++D<m.length;)O.push(m[D]);return s(O,E)},n.exports.getKey=d,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(r,n,o){var i=r("safe-buffer").Buffer,a=r("bn.js"),s=r("elliptic").ec,c=r("parse-asn1"),l=r("./curves.json");function u(f,d){if(f.cmpn(0)<=0)throw new Error("invalid sig");if(f.cmp(d)>=d)throw new Error("invalid sig")}n.exports=function(f,d,h,p,g){var m=c(h);if(m.type==="ec"){if(p!=="ecdsa"&&p!=="ecdsa/rsa")throw new Error("wrong public key type");return function(O,D,N){var U=l[N.data.algorithm.curve.join(".")];if(!U)throw new Error("unknown curve "+N.data.algorithm.curve.join("."));var B=new s(U),F=N.data.subjectPrivateKey.data;return B.verify(D,O,F)}(f,d,m)}if(m.type==="dsa"){if(p!=="dsa")throw new Error("wrong public key type");return function(O,D,N){var U=N.data.p,B=N.data.q,F=N.data.g,T=N.data.pub_key,P=c.signature.decode(O,"der"),_=P.s,C=P.r;u(_,B),u(C,B);var S=a.mont(U),x=_.invm(B);return F.toRed(S).redPow(new a(D).mul(x).mod(B)).fromRed().mul(T.toRed(S).redPow(C.mul(x).mod(B)).fromRed()).mod(U).mod(B).cmp(C)===0}(f,d,m)}if(p!=="rsa"&&p!=="ecdsa/rsa")throw new Error("wrong public key type");d=i.concat([g,d]);for(var v=m.modulus.byteLength(),y=[1],b=0;d.length+y.length+2<v;)y.push(255),b++;y.push(0);for(var w=-1;++w<d.length;)y.push(d[w]);y=i.from(y);var E=a.mont(m.modulus);f=(f=new a(f).toRed(E)).redPow(new a(m.publicExponent)),f=i.from(f.fromRed().toArray());var I=b<8?1:0;for(v=Math.min(f.length,y.length),f.length!==y.length&&(I=1),w=-1;++w<v;)I|=f[w]^y[w];return I===0}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(r,n,o){},{}],217:[function(r,n,o){var i=r("buffer"),a=i.Buffer;function s(l,u){for(var f in l)u[f]=l[f]}function c(l,u,f){return a(l,u,f)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?n.exports=i:(s(i,o),o.Buffer=c),s(a,c),c.from=function(l,u,f){if(typeof l=="number")throw new TypeError("Argument must not be a number");return a(l,u,f)},c.alloc=function(l,u,f){if(typeof l!="number")throw new TypeError("Argument must be a number");var d=a(l);return u!==void 0?typeof f=="string"?d.fill(u,f):d.fill(u):d.fill(0),d},c.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return a(l)},c.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(l)}},{buffer:220}],218:[function(r,n,o){var i=r("safe-buffer").Buffer,a=i.isEncoding||function(m){switch((m=""+m)&&m.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 s(m){var v;switch(this.encoding=function(y){var b=function(w){if(!w)return"utf8";for(var E;;)switch(w){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 w;default:if(E)return;w=(""+w).toLowerCase(),E=!0}}(y);if(typeof b!="string"&&(i.isEncoding===a||!a(y)))throw new Error("Unknown encoding: "+y);return b||y}(m),this.encoding){case"utf16le":this.text=u,this.end=f,v=4;break;case"utf8":this.fillLast=l,v=4;break;case"base64":this.text=d,this.end=h,v=3;break;default:return this.write=p,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(v)}function c(m){return m<=127?0:m>>5==6?2:m>>4==14?3:m>>3==30?4:m>>6==2?-1:-2}function l(m){var v=this.lastTotal-this.lastNeed,y=function(b,w,E){if((192&w[0])!=128)return b.lastNeed=0,"�";if(b.lastNeed>1&&w.length>1){if((192&w[1])!=128)return b.lastNeed=1,"�";if(b.lastNeed>2&&w.length>2&&(192&w[2])!=128)return b.lastNeed=2,"�"}}(this,m);return y!==void 0?y:this.lastNeed<=m.length?(m.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(m.copy(this.lastChar,v,0,m.length),void(this.lastNeed-=m.length))}function u(m,v){if((m.length-v)%2==0){var y=m.toString("utf16le",v);if(y){var b=y.charCodeAt(y.length-1);if(b>=55296&&b<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],y.slice(0,-1)}return y}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",v,m.length-1)}function f(m){var v=m&&m.length?this.write(m):"";if(this.lastNeed){var y=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,y)}return v}function d(m,v){var y=(m.length-v)%3;return y===0?m.toString("base64",v):(this.lastNeed=3-y,this.lastTotal=3,y===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",v,m.length-y))}function h(m){var v=m&&m.length?this.write(m):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function p(m){return m.toString(this.encoding)}function g(m){return m&&m.length?this.write(m):""}o.StringDecoder=s,s.prototype.write=function(m){if(m.length===0)return"";var v,y;if(this.lastNeed){if((v=this.fillLast(m))===void 0)return"";y=this.lastNeed,this.lastNeed=0}else y=0;return y<m.length?v?v+this.text(m,y):this.text(m,y):v||""},s.prototype.end=function(m){var v=m&&m.length?this.write(m):"";return this.lastNeed?v+"�":v},s.prototype.text=function(m,v){var y=function(w,E,I){var O=E.length-1;if(O<I)return 0;var D=c(E[O]);return D>=0?(D>0&&(w.lastNeed=D-1),D):--O<I||D===-2?0:(D=c(E[O]))>=0?(D>0&&(w.lastNeed=D-2),D):--O<I||D===-2?0:(D=c(E[O]))>=0?(D>0&&(D===2?D=0:w.lastNeed=D-3),D):0}(this,m,v);if(!this.lastNeed)return m.toString("utf8",v);this.lastTotal=y;var b=m.length-(y-this.lastNeed);return m.copy(this.lastChar,0,b),m.toString("utf8",v,b)},s.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length}},{"safe-buffer":217}],219:[function(r,n,o){(function(i){(function(){n.exports=function(a,s){for(var c=Math.min(a.length,s.length),l=new i(c),u=0;u<c;++u)l[u]=a[u]^s[u];return l}}).call(this)}).call(this,r("buffer").Buffer)},{buffer:220}],220:[function(r,n,o){(function(i){(function(){var a=r("base64-js"),s=r("ieee754");o.Buffer=l,o.SlowBuffer=function(G){return+G!=G&&(G=0),l.alloc(+G)},o.INSPECT_MAX_BYTES=50;function c(G){if(G>2147483647)throw new RangeError('The value "'+G+'" is invalid for option "size"');var V=new Uint8Array(G);return V.__proto__=l.prototype,V}function l(G,V,X){if(typeof G=="number"){if(typeof V=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(G)}return u(G,V,X)}function u(G,V,X){if(typeof G=="string")return function(re,se){if(typeof se=="string"&&se!==""||(se="utf8"),!l.isEncoding(se))throw new TypeError("Unknown encoding: "+se);var pe=0|g(re,se),ce=c(pe),ne=ce.write(re,se);return ne!==pe&&(ce=ce.slice(0,ne)),ce}(G,V);if(ArrayBuffer.isView(G))return h(G);if(G==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof G);if(q(G,ArrayBuffer)||G&&q(G.buffer,ArrayBuffer))return function(re,se,pe){if(se<0||re.byteLength<se)throw new RangeError('"offset" is outside of buffer bounds');if(re.byteLength<se+(pe||0))throw new RangeError('"length" is outside of buffer bounds');var ce;return ce=se===void 0&&pe===void 0?new Uint8Array(re):pe===void 0?new Uint8Array(re,se):new Uint8Array(re,se,pe),ce.__proto__=l.prototype,ce}(G,V,X);if(typeof G=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var te=G.valueOf&&G.valueOf();if(te!=null&&te!==G)return l.from(te,V,X);var ee=function(re){if(l.isBuffer(re)){var se=0|p(re.length),pe=c(se);return pe.length===0||re.copy(pe,0,0,se),pe}if(re.length!==void 0)return typeof re.length!="number"||J(re.length)?c(0):h(re);if(re.type==="Buffer"&&Array.isArray(re.data))return h(re.data)}(G);if(ee)return ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof G[Symbol.toPrimitive]=="function")return l.from(G[Symbol.toPrimitive]("string"),V,X);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof G)}function f(G){if(typeof G!="number")throw new TypeError('"size" argument must be of type number');if(G<0)throw new RangeError('The value "'+G+'" is invalid for option "size"')}function d(G){return f(G),c(G<0?0:0|p(G))}function h(G){for(var V=G.length<0?0:0|p(G.length),X=c(V),te=0;te<V;te+=1)X[te]=255&G[te];return X}function p(G){if(G>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647 .toString(16)+" bytes");return 0|G}function g(G,V){if(l.isBuffer(G))return G.length;if(ArrayBuffer.isView(G)||q(G,ArrayBuffer))return G.byteLength;if(typeof G!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof G);var X=G.length,te=arguments.length>2&&arguments[2]===!0;if(!te&&X===0)return 0;for(var ee=!1;;)switch(V){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":return Y(G).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*X;case"hex":return X>>>1;case"base64":return K(G).length;default:if(ee)return te?-1:Y(G).length;V=(""+V).toLowerCase(),ee=!0}}function m(G,V,X){var te=!1;if((V===void 0||V<0)&&(V=0),V>this.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0)<=(V>>>=0))return"";for(G||(G="utf8");;)switch(G){case"hex":return P(this,V,X);case"utf8":case"utf-8":return B(this,V,X);case"ascii":return F(this,V,X);case"latin1":case"binary":return T(this,V,X);case"base64":return U(this,V,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,V,X);default:if(te)throw new TypeError("Unknown encoding: "+G);G=(G+"").toLowerCase(),te=!0}}function v(G,V,X){var te=G[V];G[V]=G[X],G[X]=te}function y(G,V,X,te,ee){if(G.length===0)return-1;if(typeof X=="string"?(te=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),J(X=+X)&&(X=ee?0:G.length-1),X<0&&(X=G.length+X),X>=G.length){if(ee)return-1;X=G.length-1}else if(X<0){if(!ee)return-1;X=0}if(typeof V=="string"&&(V=l.from(V,te)),l.isBuffer(V))return V.length===0?-1:b(G,V,X,te,ee);if(typeof V=="number")return V&=255,typeof Uint8Array.prototype.indexOf=="function"?ee?Uint8Array.prototype.indexOf.call(G,V,X):Uint8Array.prototype.lastIndexOf.call(G,V,X):b(G,[V],X,te,ee);throw new TypeError("val must be string, number or Buffer")}function b(G,V,X,te,ee){var re,se=1,pe=G.length,ce=V.length;if(te!==void 0&&((te=String(te).toLowerCase())==="ucs2"||te==="ucs-2"||te==="utf16le"||te==="utf-16le")){if(G.length<2||V.length<2)return-1;se=2,pe/=2,ce/=2,X/=2}function ne(de,ve){return se===1?de[ve]:de.readUInt16BE(ve*se)}if(ee){var he=-1;for(re=X;re<pe;re++)if(ne(G,re)===ne(V,he===-1?0:re-he)){if(he===-1&&(he=re),re-he+1===ce)return he*se}else he!==-1&&(re-=re-he),he=-1}else for(X+ce>pe&&(X=pe-ce),re=X;re>=0;re--){for(var oe=!0,le=0;le<ce;le++)if(ne(G,re+le)!==ne(V,le)){oe=!1;break}if(oe)return re}return-1}function w(G,V,X,te){X=Number(X)||0;var ee=G.length-X;te?(te=Number(te))>ee&&(te=ee):te=ee;var re=V.length;te>re/2&&(te=re/2);for(var se=0;se<te;++se){var pe=parseInt(V.substr(2*se,2),16);if(J(pe))return se;G[X+se]=pe}return se}function E(G,V,X,te){return Q(Y(V,G.length-X),G,X,te)}function I(G,V,X,te){return Q(function(ee){for(var re=[],se=0;se<ee.length;++se)re.push(255&ee.charCodeAt(se));return re}(V),G,X,te)}function O(G,V,X,te){return I(G,V,X,te)}function D(G,V,X,te){return Q(K(V),G,X,te)}function N(G,V,X,te){return Q(function(ee,re){for(var se,pe,ce,ne=[],he=0;he<ee.length&&!((re-=2)<0);++he)se=ee.charCodeAt(he),pe=se>>8,ce=se%256,ne.push(ce),ne.push(pe);return ne}(V,G.length-X),G,X,te)}function U(G,V,X){return V===0&&X===G.length?a.fromByteArray(G):a.fromByteArray(G.slice(V,X))}function B(G,V,X){X=Math.min(G.length,X);for(var te=[],ee=V;ee<X;){var re,se,pe,ce,ne=G[ee],he=null,oe=ne>239?4:ne>223?3:ne>191?2:1;if(ee+oe<=X)switch(oe){case 1:ne<128&&(he=ne);break;case 2:(192&(re=G[ee+1]))==128&&(ce=(31&ne)<<6|63&re)>127&&(he=ce);break;case 3:re=G[ee+1],se=G[ee+2],(192&re)==128&&(192&se)==128&&(ce=(15&ne)<<12|(63&re)<<6|63&se)>2047&&(ce<55296||ce>57343)&&(he=ce);break;case 4:re=G[ee+1],se=G[ee+2],pe=G[ee+3],(192&re)==128&&(192&se)==128&&(192&pe)==128&&(ce=(15&ne)<<18|(63&re)<<12|(63&se)<<6|63&pe)>65535&&ce<1114112&&(he=ce)}he===null?(he=65533,oe=1):he>65535&&(he-=65536,te.push(he>>>10&1023|55296),he=56320|1023&he),te.push(he),ee+=oe}return function(le){var de=le.length;if(de<=4096)return String.fromCharCode.apply(String,le);for(var ve="",we=0;we<de;)ve+=String.fromCharCode.apply(String,le.slice(we,we+=4096));return ve}(te)}o.kMaxLength=2147483647,l.TYPED_ARRAY_SUPPORT=function(){try{var G=new Uint8Array(1);return G.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},G.foo()===42}catch{return!1}}(),l.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(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),l.poolSize=8192,l.from=function(G,V,X){return u(G,V,X)},l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,l.alloc=function(G,V,X){return function(te,ee,re){return f(te),te<=0?c(te):ee!==void 0?typeof re=="string"?c(te).fill(ee,re):c(te).fill(ee):c(te)}(G,V,X)},l.allocUnsafe=function(G){return d(G)},l.allocUnsafeSlow=function(G){return d(G)},l.isBuffer=function(G){return G!=null&&G._isBuffer===!0&&G!==l.prototype},l.compare=function(G,V){if(q(G,Uint8Array)&&(G=l.from(G,G.offset,G.byteLength)),q(V,Uint8Array)&&(V=l.from(V,V.offset,V.byteLength)),!l.isBuffer(G)||!l.isBuffer(V))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(G===V)return 0;for(var X=G.length,te=V.length,ee=0,re=Math.min(X,te);ee<re;++ee)if(G[ee]!==V[ee]){X=G[ee],te=V[ee];break}return X<te?-1:te<X?1:0},l.isEncoding=function(G){switch(String(G).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}},l.concat=function(G,V){if(!Array.isArray(G))throw new TypeError('"list" argument must be an Array of Buffers');if(G.length===0)return l.alloc(0);var X;if(V===void 0)for(V=0,X=0;X<G.length;++X)V+=G[X].length;var te=l.allocUnsafe(V),ee=0;for(X=0;X<G.length;++X){var re=G[X];if(q(re,Uint8Array)&&(re=l.from(re)),!l.isBuffer(re))throw new TypeError('"list" argument must be an Array of Buffers');re.copy(te,ee),ee+=re.length}return te},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var G=this.length;if(G%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var V=0;V<G;V+=2)v(this,V,V+1);return this},l.prototype.swap32=function(){var G=this.length;if(G%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var V=0;V<G;V+=4)v(this,V,V+3),v(this,V+1,V+2);return this},l.prototype.swap64=function(){var G=this.length;if(G%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var V=0;V<G;V+=8)v(this,V,V+7),v(this,V+1,V+6),v(this,V+2,V+5),v(this,V+3,V+4);return this},l.prototype.toString=function(){var G=this.length;return G===0?"":arguments.length===0?B(this,0,G):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(G){if(!l.isBuffer(G))throw new TypeError("Argument must be a Buffer");return this===G||l.compare(this,G)===0},l.prototype.inspect=function(){var G="",V=o.INSPECT_MAX_BYTES;return G=this.toString("hex",0,V).replace(/(.{2})/g,"$1 ").trim(),this.length>V&&(G+=" ... "),"<Buffer "+G+">"},l.prototype.compare=function(G,V,X,te,ee){if(q(G,Uint8Array)&&(G=l.from(G,G.offset,G.byteLength)),!l.isBuffer(G))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof G);if(V===void 0&&(V=0),X===void 0&&(X=G?G.length:0),te===void 0&&(te=0),ee===void 0&&(ee=this.length),V<0||X>G.length||te<0||ee>this.length)throw new RangeError("out of range index");if(te>=ee&&V>=X)return 0;if(te>=ee)return-1;if(V>=X)return 1;if(this===G)return 0;for(var re=(ee>>>=0)-(te>>>=0),se=(X>>>=0)-(V>>>=0),pe=Math.min(re,se),ce=this.slice(te,ee),ne=G.slice(V,X),he=0;he<pe;++he)if(ce[he]!==ne[he]){re=ce[he],se=ne[he];break}return re<se?-1:se<re?1:0},l.prototype.includes=function(G,V,X){return this.indexOf(G,V,X)!==-1},l.prototype.indexOf=function(G,V,X){return y(this,G,V,X,!0)},l.prototype.lastIndexOf=function(G,V,X){return y(this,G,V,X,!1)},l.prototype.write=function(G,V,X,te){if(V===void 0)te="utf8",X=this.length,V=0;else if(X===void 0&&typeof V=="string")te=V,X=this.length,V=0;else{if(!isFinite(V))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");V>>>=0,isFinite(X)?(X>>>=0,te===void 0&&(te="utf8")):(te=X,X=void 0)}var ee=this.length-V;if((X===void 0||X>ee)&&(X=ee),G.length>0&&(X<0||V<0)||V>this.length)throw new RangeError("Attempt to write outside buffer bounds");te||(te="utf8");for(var re=!1;;)switch(te){case"hex":return w(this,G,V,X);case"utf8":case"utf-8":return E(this,G,V,X);case"ascii":return I(this,G,V,X);case"latin1":case"binary":return O(this,G,V,X);case"base64":return D(this,G,V,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,G,V,X);default:if(re)throw new TypeError("Unknown encoding: "+te);te=(""+te).toLowerCase(),re=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function F(G,V,X){var te="";X=Math.min(G.length,X);for(var ee=V;ee<X;++ee)te+=String.fromCharCode(127&G[ee]);return te}function T(G,V,X){var te="";X=Math.min(G.length,X);for(var ee=V;ee<X;++ee)te+=String.fromCharCode(G[ee]);return te}function P(G,V,X){var te=G.length;(!V||V<0)&&(V=0),(!X||X<0||X>te)&&(X=te);for(var ee="",re=V;re<X;++re)ee+=z(G[re]);return ee}function _(G,V,X){for(var te=G.slice(V,X),ee="",re=0;re<te.length;re+=2)ee+=String.fromCharCode(te[re]+256*te[re+1]);return ee}function C(G,V,X){if(G%1!=0||G<0)throw new RangeError("offset is not uint");if(G+V>X)throw new RangeError("Trying to access beyond buffer length")}function S(G,V,X,te,ee,re){if(!l.isBuffer(G))throw new TypeError('"buffer" argument must be a Buffer instance');if(V>ee||V<re)throw new RangeError('"value" argument is out of bounds');if(X+te>G.length)throw new RangeError("Index out of range")}function x(G,V,X,te,ee,re){if(X+te>G.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function k(G,V,X,te,ee){return V=+V,X>>>=0,ee||x(G,0,X,4),s.write(G,V,X,te,23,4),X+4}function L(G,V,X,te,ee){return V=+V,X>>>=0,ee||x(G,0,X,8),s.write(G,V,X,te,52,8),X+8}l.prototype.slice=function(G,V){var X=this.length;(G=~~G)<0?(G+=X)<0&&(G=0):G>X&&(G=X),(V=V===void 0?X:~~V)<0?(V+=X)<0&&(V=0):V>X&&(V=X),V<G&&(V=G);var te=this.subarray(G,V);return te.__proto__=l.prototype,te},l.prototype.readUIntLE=function(G,V,X){G>>>=0,V>>>=0,X||C(G,V,this.length);for(var te=this[G],ee=1,re=0;++re<V&&(ee*=256);)te+=this[G+re]*ee;return te},l.prototype.readUIntBE=function(G,V,X){G>>>=0,V>>>=0,X||C(G,V,this.length);for(var te=this[G+--V],ee=1;V>0&&(ee*=256);)te+=this[G+--V]*ee;return te},l.prototype.readUInt8=function(G,V){return G>>>=0,V||C(G,1,this.length),this[G]},l.prototype.readUInt16LE=function(G,V){return G>>>=0,V||C(G,2,this.length),this[G]|this[G+1]<<8},l.prototype.readUInt16BE=function(G,V){return G>>>=0,V||C(G,2,this.length),this[G]<<8|this[G+1]},l.prototype.readUInt32LE=function(G,V){return G>>>=0,V||C(G,4,this.length),(this[G]|this[G+1]<<8|this[G+2]<<16)+16777216*this[G+3]},l.prototype.readUInt32BE=function(G,V){return G>>>=0,V||C(G,4,this.length),16777216*this[G]+(this[G+1]<<16|this[G+2]<<8|this[G+3])},l.prototype.readIntLE=function(G,V,X){G>>>=0,V>>>=0,X||C(G,V,this.length);for(var te=this[G],ee=1,re=0;++re<V&&(ee*=256);)te+=this[G+re]*ee;return te>=(ee*=128)&&(te-=Math.pow(2,8*V)),te},l.prototype.readIntBE=function(G,V,X){G>>>=0,V>>>=0,X||C(G,V,this.length);for(var te=V,ee=1,re=this[G+--te];te>0&&(ee*=256);)re+=this[G+--te]*ee;return re>=(ee*=128)&&(re-=Math.pow(2,8*V)),re},l.prototype.readInt8=function(G,V){return G>>>=0,V||C(G,1,this.length),128&this[G]?-1*(255-this[G]+1):this[G]},l.prototype.readInt16LE=function(G,V){G>>>=0,V||C(G,2,this.length);var X=this[G]|this[G+1]<<8;return 32768&X?4294901760|X:X},l.prototype.readInt16BE=function(G,V){G>>>=0,V||C(G,2,this.length);var X=this[G+1]|this[G]<<8;return 32768&X?4294901760|X:X},l.prototype.readInt32LE=function(G,V){return G>>>=0,V||C(G,4,this.length),this[G]|this[G+1]<<8|this[G+2]<<16|this[G+3]<<24},l.prototype.readInt32BE=function(G,V){return G>>>=0,V||C(G,4,this.length),this[G]<<24|this[G+1]<<16|this[G+2]<<8|this[G+3]},l.prototype.readFloatLE=function(G,V){return G>>>=0,V||C(G,4,this.length),s.read(this,G,!0,23,4)},l.prototype.readFloatBE=function(G,V){return G>>>=0,V||C(G,4,this.length),s.read(this,G,!1,23,4)},l.prototype.readDoubleLE=function(G,V){return G>>>=0,V||C(G,8,this.length),s.read(this,G,!0,52,8)},l.prototype.readDoubleBE=function(G,V){return G>>>=0,V||C(G,8,this.length),s.read(this,G,!1,52,8)},l.prototype.writeUIntLE=function(G,V,X,te){G=+G,V>>>=0,X>>>=0,te||S(this,G,V,X,Math.pow(2,8*X)-1,0);var ee=1,re=0;for(this[V]=255&G;++re<X&&(ee*=256);)this[V+re]=G/ee&255;return V+X},l.prototype.writeUIntBE=function(G,V,X,te){G=+G,V>>>=0,X>>>=0,te||S(this,G,V,X,Math.pow(2,8*X)-1,0);var ee=X-1,re=1;for(this[V+ee]=255&G;--ee>=0&&(re*=256);)this[V+ee]=G/re&255;return V+X},l.prototype.writeUInt8=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,1,255,0),this[V]=255&G,V+1},l.prototype.writeUInt16LE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,2,65535,0),this[V]=255&G,this[V+1]=G>>>8,V+2},l.prototype.writeUInt16BE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,2,65535,0),this[V]=G>>>8,this[V+1]=255&G,V+2},l.prototype.writeUInt32LE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,4,4294967295,0),this[V+3]=G>>>24,this[V+2]=G>>>16,this[V+1]=G>>>8,this[V]=255&G,V+4},l.prototype.writeUInt32BE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,4,4294967295,0),this[V]=G>>>24,this[V+1]=G>>>16,this[V+2]=G>>>8,this[V+3]=255&G,V+4},l.prototype.writeIntLE=function(G,V,X,te){if(G=+G,V>>>=0,!te){var ee=Math.pow(2,8*X-1);S(this,G,V,X,ee-1,-ee)}var re=0,se=1,pe=0;for(this[V]=255&G;++re<X&&(se*=256);)G<0&&pe===0&&this[V+re-1]!==0&&(pe=1),this[V+re]=(G/se>>0)-pe&255;return V+X},l.prototype.writeIntBE=function(G,V,X,te){if(G=+G,V>>>=0,!te){var ee=Math.pow(2,8*X-1);S(this,G,V,X,ee-1,-ee)}var re=X-1,se=1,pe=0;for(this[V+re]=255&G;--re>=0&&(se*=256);)G<0&&pe===0&&this[V+re+1]!==0&&(pe=1),this[V+re]=(G/se>>0)-pe&255;return V+X},l.prototype.writeInt8=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,1,127,-128),G<0&&(G=255+G+1),this[V]=255&G,V+1},l.prototype.writeInt16LE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,2,32767,-32768),this[V]=255&G,this[V+1]=G>>>8,V+2},l.prototype.writeInt16BE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,2,32767,-32768),this[V]=G>>>8,this[V+1]=255&G,V+2},l.prototype.writeInt32LE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,4,2147483647,-2147483648),this[V]=255&G,this[V+1]=G>>>8,this[V+2]=G>>>16,this[V+3]=G>>>24,V+4},l.prototype.writeInt32BE=function(G,V,X){return G=+G,V>>>=0,X||S(this,G,V,4,2147483647,-2147483648),G<0&&(G=4294967295+G+1),this[V]=G>>>24,this[V+1]=G>>>16,this[V+2]=G>>>8,this[V+3]=255&G,V+4},l.prototype.writeFloatLE=function(G,V,X){return k(this,G,V,!0,X)},l.prototype.writeFloatBE=function(G,V,X){return k(this,G,V,!1,X)},l.prototype.writeDoubleLE=function(G,V,X){return L(this,G,V,!0,X)},l.prototype.writeDoubleBE=function(G,V,X){return L(this,G,V,!1,X)},l.prototype.copy=function(G,V,X,te){if(!l.isBuffer(G))throw new TypeError("argument should be a Buffer");if(X||(X=0),te||te===0||(te=this.length),V>=G.length&&(V=G.length),V||(V=0),te>0&&te<X&&(te=X),te===X||G.length===0||this.length===0)return 0;if(V<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("sourceEnd out of bounds");te>this.length&&(te=this.length),G.length-V<te-X&&(te=G.length-V+X);var ee=te-X;if(this===G&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(V,X,te);else if(this===G&&X<V&&V<te)for(var re=ee-1;re>=0;--re)G[re+V]=this[re+X];else Uint8Array.prototype.set.call(G,this.subarray(X,te),V);return ee},l.prototype.fill=function(G,V,X,te){if(typeof G=="string"){if(typeof V=="string"?(te=V,V=0,X=this.length):typeof X=="string"&&(te=X,X=this.length),te!==void 0&&typeof te!="string")throw new TypeError("encoding must be a string");if(typeof te=="string"&&!l.isEncoding(te))throw new TypeError("Unknown encoding: "+te);if(G.length===1){var ee=G.charCodeAt(0);(te==="utf8"&&ee<128||te==="latin1")&&(G=ee)}}else typeof G=="number"&&(G&=255);if(V<0||this.length<V||this.length<X)throw new RangeError("Out of range index");if(X<=V)return this;var re;if(V>>>=0,X=X===void 0?this.length:X>>>0,G||(G=0),typeof G=="number")for(re=V;re<X;++re)this[re]=G;else{var se=l.isBuffer(G)?G:l.from(G,te),pe=se.length;if(pe===0)throw new TypeError('The value "'+G+'" is invalid for argument "value"');for(re=0;re<X-V;++re)this[re+V]=se[re%pe]}return this};var j=/[^+/0-9A-Za-z-_]/g;function z(G){return G<16?"0"+G.toString(16):G.toString(16)}function Y(G,V){var X;V=V||1/0;for(var te=G.length,ee=null,re=[],se=0;se<te;++se){if((X=G.charCodeAt(se))>55295&&X<57344){if(!ee){if(X>56319){(V-=3)>-1&&re.push(239,191,189);continue}if(se+1===te){(V-=3)>-1&&re.push(239,191,189);continue}ee=X;continue}if(X<56320){(V-=3)>-1&&re.push(239,191,189),ee=X;continue}X=65536+(ee-55296<<10|X-56320)}else ee&&(V-=3)>-1&&re.push(239,191,189);if(ee=null,X<128){if((V-=1)<0)break;re.push(X)}else if(X<2048){if((V-=2)<0)break;re.push(X>>6|192,63&X|128)}else if(X<65536){if((V-=3)<0)break;re.push(X>>12|224,X>>6&63|128,63&X|128)}else{if(!(X<1114112))throw new Error("Invalid code point");if((V-=4)<0)break;re.push(X>>18|240,X>>12&63|128,X>>6&63|128,63&X|128)}}return re}function K(G){return a.toByteArray(function(V){if((V=(V=V.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;V.length%4!=0;)V+="=";return V}(G))}function Q(G,V,X,te){for(var ee=0;ee<te&&!(ee+X>=V.length||ee>=G.length);++ee)V[ee+X]=G[ee];return ee}function q(G,V){return G instanceof V||G!=null&&G.constructor!=null&&G.constructor.name!=null&&G.constructor.name===V.name}function J(G){return G!=G}}).call(this)}).call(this,r("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(r,n,o){var i=r("safe-buffer").Buffer,a=r("stream").Transform,s=r("string_decoder").StringDecoder;function c(l){a.call(this),this.hashMode=typeof l=="string",this.hashMode?this[l]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r("inherits")(c,a),c.prototype.update=function(l,u,f){typeof l=="string"&&(l=i.from(l,u));var d=this._update(l);return this.hashMode?this:(f&&(d=this._toString(d,f)),d)},c.prototype.setAutoPadding=function(){},c.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},c.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},c.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},c.prototype._transform=function(l,u,f){var d;try{this.hashMode?this._update(l):this.push(this._update(l))}catch(h){d=h}finally{f(d)}},c.prototype._flush=function(l){var u;try{this.push(this.__final())}catch(f){u=f}l(u)},c.prototype._finalOrDigest=function(l){var u=this.__final()||i.alloc(0);return l&&(u=this._toString(u,l,!0)),u},c.prototype._toString=function(l,u,f){if(this._decoder||(this._decoder=new s(u),this._encoding=u),this._encoding!==u)throw new Error("can't switch encodings");var d=this._decoder.write(l);return f&&(d+=this._decoder.end()),d},n.exports=c},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(r,n,o){var i=r("../internals/is-callable"),a=r("../internals/try-to-string"),s=TypeError;n.exports=function(c){if(i(c))return c;throw new s(a(c)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(r,n,o){var i=r("../internals/is-constructor"),a=r("../internals/try-to-string"),s=TypeError;n.exports=function(c){if(i(c))return c;throw new s(a(c)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(r,n,o){var i=r("../internals/is-callable"),a=String,s=TypeError;n.exports=function(c){if(typeof c=="object"||i(c))return c;throw new s("Can't set "+a(c)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(r,n,o){var i=r("../internals/well-known-symbol"),a=r("../internals/object-create"),s=r("../internals/object-define-property").f,c=i("unscopables"),l=Array.prototype;l[c]===void 0&&s(l,c,{configurable:!0,value:a(null)}),n.exports=function(u){l[c][u]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(r,n,o){var i=r("../internals/object-is-prototype-of"),a=TypeError;n.exports=function(s,c){if(i(c,s))return s;throw new a("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(r,n,o){var i=r("../internals/is-object"),a=String,s=TypeError;n.exports=function(c){if(i(c))return c;throw new s(a(c)+" is not an object")}},{"../internals/is-object":289}],228:[function(r,n,o){var i=r("../internals/to-indexed-object"),a=r("../internals/to-absolute-index"),s=r("../internals/length-of-array-like"),c=function(l){return function(u,f,d){var h,p=i(u),g=s(p),m=a(d,g);if(l&&f!=f){for(;g>m;)if((h=p[m++])!=h)return!0}else for(;g>m;m++)if((l||m in p)&&p[m]===f)return l||m||0;return!l&&-1}};n.exports={includes:c(!0),indexOf:c(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(r,n,o){var i=r("../internals/function-bind-context"),a=r("../internals/function-uncurry-this"),s=r("../internals/indexed-object"),c=r("../internals/to-object"),l=r("../internals/length-of-array-like"),u=r("../internals/array-species-create"),f=a([].push),d=function(h){var p=h===1,g=h===2,m=h===3,v=h===4,y=h===6,b=h===7,w=h===5||y;return function(E,I,O,D){for(var N,U,B=c(E),F=s(B),T=i(I,O),P=l(F),_=0,C=D||u,S=p?C(E,P):g||b?C(E,0):void 0;P>_;_++)if((w||_ in F)&&(U=T(N=F[_],_,B),h))if(p)S[_]=U;else if(U)switch(h){case 3:return!0;case 5:return N;case 6:return _;case 2:f(S,N)}else switch(h){case 4:return!1;case 7:f(S,N)}return y?-1:m||v?v:S}};n.exports={forEach:d(0),map:d(1),filter:d(2),some:d(3),every:d(4),find:d(5),findIndex:d(6),filterReject:d(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(r,n,o){var i=r("../internals/to-absolute-index"),a=r("../internals/length-of-array-like"),s=r("../internals/create-property"),c=Array,l=Math.max;n.exports=function(u,f,d){for(var h=a(u),p=i(f,h),g=i(d===void 0?h:d,h),m=c(l(g-p,0)),v=0;p<g;p++,v++)s(m,v,u[p]);return m.length=v,m}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(r,n,o){var i=r("../internals/function-uncurry-this");n.exports=i([].slice)},{"../internals/function-uncurry-this":268}],232:[function(r,n,o){var i=r("../internals/is-array"),a=r("../internals/is-constructor"),s=r("../internals/is-object"),c=r("../internals/well-known-symbol")("species"),l=Array;n.exports=function(u){var f;return i(u)&&(f=u.constructor,(a(f)&&(f===l||i(f.prototype))||s(f)&&(f=f[c])===null)&&(f=void 0)),f===void 0?l:f}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(r,n,o){var i=r("../internals/array-species-constructor");n.exports=function(a,s){return new(i(a))(s===0?0:s)}},{"../internals/array-species-constructor":232}],234:[function(r,n,o){var i=r("../internals/well-known-symbol")("iterator"),a=!1;try{var s=0,c={next:function(){return{done:!!s++}},return:function(){a=!0}};c[i]=function(){return this},Array.from(c,function(){throw 2})}catch{}n.exports=function(l,u){try{if(!u&&!a)return!1}catch{return!1}var f=!1;try{var d={};d[i]=function(){return{next:function(){return{done:f=!0}}}},l(d)}catch{}return f}},{"../internals/well-known-symbol":357}],235:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=i({}.toString),s=i("".slice);n.exports=function(c){return s(a(c),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(r,n,o){var i=r("../internals/to-string-tag-support"),a=r("../internals/is-callable"),s=r("../internals/classof-raw"),c=r("../internals/well-known-symbol")("toStringTag"),l=Object,u=s(function(){return arguments}())==="Arguments";n.exports=i?s:function(f){var d,h,p;return f===void 0?"Undefined":f===null?"Null":typeof(h=function(g,m){try{return g[m]}catch{}}(d=l(f),c))=="string"?h:u?s(d):(p=s(d))==="Object"&&a(d.callee)?"Arguments":p}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(r,n,o){var i=r("../internals/has-own-property"),a=r("../internals/own-keys"),s=r("../internals/object-get-own-property-descriptor"),c=r("../internals/object-define-property");n.exports=function(l,u,f){for(var d=a(u),h=c.f,p=s.f,g=0;g<d.length;g++){var m=d[g];i(l,m)||f&&i(f,m)||h(l,m,p(u,m))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(r,n,o){var i=r("../internals/well-known-symbol")("match");n.exports=function(a){var s=/./;try{"/./"[a](s)}catch{try{return s[i]=!1,"/./"[a](s)}catch{}}return!1}},{"../internals/well-known-symbol":357}],239:[function(r,n,o){var i=r("../internals/fails");n.exports=!i(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype})},{"../internals/fails":260}],240:[function(r,n,o){n.exports=function(i,a){return{value:i,done:a}}},{}],241:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/object-define-property"),s=r("../internals/create-property-descriptor");n.exports=i?function(c,l,u){return a.f(c,l,s(1,u))}:function(c,l,u){return c[l]=u,c}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(r,n,o){n.exports=function(i,a){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:a}}},{}],243:[function(r,n,o){var i=r("../internals/to-property-key"),a=r("../internals/object-define-property"),s=r("../internals/create-property-descriptor");n.exports=function(c,l,u){var f=i(l);f in c?a.f(c,f,s(0,u)):c[f]=u}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(r,n,o){var i=r("../internals/make-built-in"),a=r("../internals/object-define-property");n.exports=function(s,c,l){return l.get&&i(l.get,c,{getter:!0}),l.set&&i(l.set,c,{setter:!0}),a.f(s,c,l)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(r,n,o){var i=r("../internals/is-callable"),a=r("../internals/object-define-property"),s=r("../internals/make-built-in"),c=r("../internals/define-global-property");n.exports=function(l,u,f,d){d||(d={});var h=d.enumerable,p=d.name!==void 0?d.name:u;if(i(f)&&s(f,p,d),d.global)h?l[u]=f:c(u,f);else{try{d.unsafe?l[u]&&(h=!0):delete l[u]}catch{}h?l[u]=f:a.f(l,u,{value:f,enumerable:!1,configurable:!d.nonConfigurable,writable:!d.nonWritable})}return l}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(r,n,o){var i=r("../internals/global"),a=Object.defineProperty;n.exports=function(s,c){try{a(i,s,{value:c,configurable:!0,writable:!0})}catch{i[s]=c}return c}},{"../internals/global":274}],247:[function(r,n,o){var i=r("../internals/fails");n.exports=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},{"../internals/fails":260}],248:[function(r,n,o){var i=typeof document=="object"&&document.all,a=i===void 0&&i!==void 0;n.exports={all:i,IS_HTMLDDA:a}},{}],249:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/is-object"),s=i.document,c=a(s)&&a(s.createElement);n.exports=function(l){return c?s.createElement(l):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(r,n,o){var i=r("../internals/engine-is-deno"),a=r("../internals/engine-is-node");n.exports=!i&&!a&&typeof window=="object"&&typeof document=="object"},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(r,n,o){n.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},{}],252:[function(r,n,o){var i=r("../internals/engine-user-agent");n.exports=/ipad|iphone|ipod/i.test(i)&&typeof Pebble<"u"},{"../internals/engine-user-agent":256}],253:[function(r,n,o){var i=r("../internals/engine-user-agent");n.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},{"../internals/engine-user-agent":256}],254:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/classof-raw");n.exports=a(i.process)==="process"},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(r,n,o){var i=r("../internals/engine-user-agent");n.exports=/web0s(?!.*chrome)/i.test(i)},{"../internals/engine-user-agent":256}],256:[function(r,n,o){n.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},{}],257:[function(r,n,o){var i,a,s=r("../internals/global"),c=r("../internals/engine-user-agent"),l=s.process,u=s.Deno,f=l&&l.versions||u&&u.version,d=f&&f.v8;d&&(a=(i=d.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&c&&(!(i=c.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=c.match(/Chrome\/(\d+)/))&&(a=+i[1]),n.exports=a},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(r,n,o){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/object-get-own-property-descriptor").f,s=r("../internals/create-non-enumerable-property"),c=r("../internals/define-built-in"),l=r("../internals/define-global-property"),u=r("../internals/copy-constructor-properties"),f=r("../internals/is-forced");n.exports=function(d,h){var p,g,m,v,y,b=d.target,w=d.global,E=d.stat;if(p=w?i:E?i[b]||l(b,{}):(i[b]||{}).prototype)for(g in h){if(v=h[g],m=d.dontCallGetSet?(y=a(p,g))&&y.value:p[g],!f(w?g:b+(E?".":"#")+g,d.forced)&&m!==void 0){if(typeof v==typeof m)continue;u(v,m)}(d.sham||m&&m.sham)&&s(v,"sham",!0),c(p,g,v,d)}}},{"../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(r,n,o){n.exports=function(i){try{return!!i()}catch{return!0}}},{}],261:[function(r,n,o){var i=r("../internals/function-bind-native"),a=Function.prototype,s=a.apply,c=a.call;n.exports=typeof Reflect=="object"&&Reflect.apply||(i?c.bind(s):function(){return c.apply(s,arguments)})},{"../internals/function-bind-native":263}],262:[function(r,n,o){var i=r("../internals/function-uncurry-this-clause"),a=r("../internals/a-callable"),s=r("../internals/function-bind-native"),c=i(i.bind);n.exports=function(l,u){return a(l),u===void 0?l:s?c(l,u):function(){return l.apply(u,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(r,n,o){var i=r("../internals/fails");n.exports=!i(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")})},{"../internals/fails":260}],264:[function(r,n,o){var i=r("../internals/function-bind-native"),a=Function.prototype.call;n.exports=i?a.bind(a):function(){return a.apply(a,arguments)}},{"../internals/function-bind-native":263}],265:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/has-own-property"),s=Function.prototype,c=i&&Object.getOwnPropertyDescriptor,l=a(s,"name"),u=l&&(function(){}).name==="something",f=l&&(!i||i&&c(s,"name").configurable);n.exports={EXISTS:l,PROPER:u,CONFIGURABLE:f}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/a-callable");n.exports=function(s,c,l){try{return i(a(Object.getOwnPropertyDescriptor(s,c)[l]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(r,n,o){var i=r("../internals/classof-raw"),a=r("../internals/function-uncurry-this");n.exports=function(s){if(i(s)==="Function")return a(s)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(r,n,o){var i=r("../internals/function-bind-native"),a=Function.prototype,s=a.call,c=i&&a.bind.bind(s,s);n.exports=i?c:function(l){return function(){return s.apply(l,arguments)}}},{"../internals/function-bind-native":263}],269:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/is-callable"),s=function(c){return a(c)?c:void 0};n.exports=function(c,l){return arguments.length<2?s(i[c]):i[c]&&i[c][l]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(r,n,o){var i=r("../internals/classof"),a=r("../internals/get-method"),s=r("../internals/is-null-or-undefined"),c=r("../internals/iterators"),l=r("../internals/well-known-symbol")("iterator");n.exports=function(u){if(!s(u))return a(u,l)||a(u,"@@iterator")||c[i(u)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(r,n,o){var i=r("../internals/function-call"),a=r("../internals/a-callable"),s=r("../internals/an-object"),c=r("../internals/try-to-string"),l=r("../internals/get-iterator-method"),u=TypeError;n.exports=function(f,d){var h=arguments.length<2?l(f):d;if(a(h))return s(i(h,f));throw new u(c(f)+" 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(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/is-array"),s=r("../internals/is-callable"),c=r("../internals/classof-raw"),l=r("../internals/to-string"),u=i([].push);n.exports=function(f){if(s(f))return f;if(a(f)){for(var d=f.length,h=[],p=0;p<d;p++){var g=f[p];typeof g=="string"?u(h,g):typeof g!="number"&&c(g)!=="Number"&&c(g)!=="String"||u(h,l(g))}var m=h.length,v=!0;return function(y,b){if(v)return v=!1,b;if(a(this))return b;for(var w=0;w<m;w++)if(h[w]===y)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(r,n,o){var i=r("../internals/a-callable"),a=r("../internals/is-null-or-undefined");n.exports=function(s,c){var l=s[c];return a(l)?void 0:i(l)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(r,n,o){(function(i){(function(){var a=function(s){return s&&s.Math===Math&&s};n.exports=a(typeof globalThis=="object"&&globalThis)||a(typeof window=="object"&&window)||a(typeof self=="object"&&self)||a(typeof i=="object"&&i)||function(){return this}()||this||Function("return this")()}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],275:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/to-object"),s=i({}.hasOwnProperty);n.exports=Object.hasOwn||function(c,l){return s(a(c),l)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(r,n,o){n.exports={}},{}],277:[function(r,n,o){n.exports=function(i,a){try{arguments.length===1?console.error(i):console.error(i,a)}catch{}}},{}],278:[function(r,n,o){var i=r("../internals/get-built-in");n.exports=i("document","documentElement")},{"../internals/get-built-in":269}],279:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/fails"),s=r("../internals/document-create-element");n.exports=!i&&!a(function(){return Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a!==7})},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/fails"),s=r("../internals/classof-raw"),c=Object,l=i("".split);n.exports=a(function(){return!c("z").propertyIsEnumerable(0)})?function(u){return s(u)==="String"?l(u,""):c(u)}:c},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/is-callable"),s=r("../internals/shared-store"),c=i(Function.toString);a(s.inspectSource)||(s.inspectSource=function(l){return c(l)}),n.exports=s.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(r,n,o){var i,a,s,c=r("../internals/weak-map-basic-detection"),l=r("../internals/global"),u=r("../internals/is-object"),f=r("../internals/create-non-enumerable-property"),d=r("../internals/has-own-property"),h=r("../internals/shared-store"),p=r("../internals/shared-key"),g=r("../internals/hidden-keys"),m=l.TypeError,v=l.WeakMap;if(c||h.state){var y=h.state||(h.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(w,E){if(y.has(w))throw new m("Object already initialized");return E.facade=w,y.set(w,E),E},a=function(w){return y.get(w)||{}},s=function(w){return y.has(w)}}else{var b=p("state");g[b]=!0,i=function(w,E){if(d(w,b))throw new m("Object already initialized");return E.facade=w,f(w,b,E),E},a=function(w){return d(w,b)?w[b]:{}},s=function(w){return d(w,b)}}n.exports={set:i,get:a,has:s,enforce:function(w){return s(w)?a(w):i(w,{})},getterFor:function(w){return function(E){var I;if(!u(E)||(I=a(E)).type!==w)throw new m("Incompatible receiver, "+w+" required");return I}}}},{"../internals/create-non-enumerable-property":241,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/is-object":289,"../internals/shared-key":332,"../internals/shared-store":333,"../internals/weak-map-basic-detection":354}],283:[function(r,n,o){var i=r("../internals/well-known-symbol"),a=r("../internals/iterators"),s=i("iterator"),c=Array.prototype;n.exports=function(l){return l!==void 0&&(a.Array===l||c[s]===l)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(r,n,o){var i=r("../internals/classof-raw");n.exports=Array.isArray||function(a){return i(a)==="Array"}},{"../internals/classof-raw":235}],285:[function(r,n,o){var i=r("../internals/document-all"),a=i.all;n.exports=i.IS_HTMLDDA?function(s){return typeof s=="function"||s===a}:function(s){return typeof s=="function"}},{"../internals/document-all":248}],286:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/fails"),s=r("../internals/is-callable"),c=r("../internals/classof"),l=r("../internals/get-built-in"),u=r("../internals/inspect-source"),f=function(){},d=[],h=l("Reflect","construct"),p=/^\s*(?:class|function)\b/,g=i(p.exec),m=!p.test(f),v=function(b){if(!s(b))return!1;try{return h(f,d,b),!0}catch{return!1}},y=function(b){if(!s(b))return!1;switch(c(b)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!g(p,u(b))}catch{return!0}};y.sham=!0,n.exports=!h||a(function(){var b;return v(v.call)||!v(Object)||!v(function(){b=!0})||b})?y:v},{"../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(r,n,o){var i=r("../internals/fails"),a=r("../internals/is-callable"),s=/#|\.prototype\./,c=function(h,p){var g=u[l(h)];return g===d||g!==f&&(a(p)?i(p):!!p)},l=c.normalize=function(h){return String(h).replace(s,".").toLowerCase()},u=c.data={},f=c.NATIVE="N",d=c.POLYFILL="P";n.exports=c},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(r,n,o){n.exports=function(i){return i==null}},{}],289:[function(r,n,o){var i=r("../internals/is-callable"),a=r("../internals/document-all"),s=a.all;n.exports=a.IS_HTMLDDA?function(c){return typeof c=="object"?c!==null:i(c)||c===s}:function(c){return typeof c=="object"?c!==null:i(c)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(r,n,o){n.exports=!1},{}],291:[function(r,n,o){var i=r("../internals/is-object"),a=r("../internals/classof-raw"),s=r("../internals/well-known-symbol")("match");n.exports=function(c){var l;return i(c)&&((l=c[s])!==void 0?!!l:a(c)==="RegExp")}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(r,n,o){var i=r("../internals/get-built-in"),a=r("../internals/is-callable"),s=r("../internals/object-is-prototype-of"),c=r("../internals/use-symbol-as-uid"),l=Object;n.exports=c?function(u){return typeof u=="symbol"}:function(u){var f=i("Symbol");return a(f)&&s(f.prototype,l(u))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(r,n,o){var i=r("../internals/function-bind-context"),a=r("../internals/function-call"),s=r("../internals/an-object"),c=r("../internals/try-to-string"),l=r("../internals/is-array-iterator-method"),u=r("../internals/length-of-array-like"),f=r("../internals/object-is-prototype-of"),d=r("../internals/get-iterator"),h=r("../internals/get-iterator-method"),p=r("../internals/iterator-close"),g=TypeError,m=function(y,b){this.stopped=y,this.result=b},v=m.prototype;n.exports=function(y,b,w){var E,I,O,D,N,U,B,F=w&&w.that,T=!(!w||!w.AS_ENTRIES),P=!(!w||!w.IS_RECORD),_=!(!w||!w.IS_ITERATOR),C=!(!w||!w.INTERRUPTED),S=i(b,F),x=function(L){return E&&p(E,"normal",L),new m(!0,L)},k=function(L){return T?(s(L),C?S(L[0],L[1],x):S(L[0],L[1])):C?S(L,x):S(L)};if(P)E=y.iterator;else if(_)E=y;else{if(!(I=h(y)))throw new g(c(y)+" is not iterable");if(l(I)){for(O=0,D=u(y);D>O;O++)if((N=k(y[O]))&&f(v,N))return N;return new m(!1)}E=d(y,I)}for(U=P?y.next:E.next;!(B=a(U,E)).done;){try{N=k(B.value)}catch(L){p(E,"throw",L)}if(typeof N=="object"&&N&&f(v,N))return N}return new m(!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(r,n,o){var i=r("../internals/function-call"),a=r("../internals/an-object"),s=r("../internals/get-method");n.exports=function(c,l,u){var f,d;a(c);try{if(!(f=s(c,"return"))){if(l==="throw")throw u;return u}f=i(f,c)}catch(h){d=!0,f=h}if(l==="throw")throw u;if(d)throw f;return a(f),u}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(r,n,o){var i=r("../internals/iterators-core").IteratorPrototype,a=r("../internals/object-create"),s=r("../internals/create-property-descriptor"),c=r("../internals/set-to-string-tag"),l=r("../internals/iterators"),u=function(){return this};n.exports=function(f,d,h,p){var g=d+" Iterator";return f.prototype=a(i,{next:s(+!p,h)}),c(f,g,!1,!0),l[g]=u,f}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/function-call"),s=r("../internals/is-pure"),c=r("../internals/function-name"),l=r("../internals/is-callable"),u=r("../internals/iterator-create-constructor"),f=r("../internals/object-get-prototype-of"),d=r("../internals/object-set-prototype-of"),h=r("../internals/set-to-string-tag"),p=r("../internals/create-non-enumerable-property"),g=r("../internals/define-built-in"),m=r("../internals/well-known-symbol"),v=r("../internals/iterators"),y=r("../internals/iterators-core"),b=c.PROPER,w=c.CONFIGURABLE,E=y.IteratorPrototype,I=y.BUGGY_SAFARI_ITERATORS,O=m("iterator"),D=function(){return this};n.exports=function(N,U,B,F,T,P,_){u(B,U,F);var C,S,x,k=function(q){if(q===T&&K)return K;if(!I&&q&&q in z)return z[q];switch(q){case"keys":case"values":case"entries":return function(){return new B(this,q)}}return function(){return new B(this)}},L=U+" Iterator",j=!1,z=N.prototype,Y=z[O]||z["@@iterator"]||T&&z[T],K=!I&&Y||k(T),Q=U==="Array"&&z.entries||Y;if(Q&&(C=f(Q.call(new N)))!==Object.prototype&&C.next&&(s||f(C)===E||(d?d(C,E):l(C[O])||g(C,O,D)),h(C,L,!0,!0),s&&(v[L]=D)),b&&T==="values"&&Y&&Y.name!=="values"&&(!s&&w?p(z,"name","values"):(j=!0,K=function(){return a(Y,this)})),T)if(S={values:k("values"),keys:P?K:k("keys"),entries:k("entries")},_)for(x in S)(I||j||!(x in z))&&g(z,x,S[x]);else i({target:U,proto:!0,forced:I||j},S);return s&&!_||z[O]===K||g(z,O,K,{name:T}),v[U]=K,S}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(r,n,o){var i,a,s,c=r("../internals/fails"),l=r("../internals/is-callable"),u=r("../internals/is-object"),f=r("../internals/object-create"),d=r("../internals/object-get-prototype-of"),h=r("../internals/define-built-in"),p=r("../internals/well-known-symbol"),g=r("../internals/is-pure"),m=p("iterator"),v=!1;[].keys&&("next"in(s=[].keys())?(a=d(d(s)))!==Object.prototype&&(i=a):v=!0),!u(i)||c(function(){var y={};return i[m].call(y)!==y})?i={}:g&&(i=f(i)),l(i[m])||h(i,m,function(){return this}),n.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:v}},{"../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(r,n,o){arguments[4][276][0].apply(o,arguments)},{dup:276}],299:[function(r,n,o){var i=r("../internals/to-length");n.exports=function(a){return i(a.length)}},{"../internals/to-length":343}],300:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/fails"),s=r("../internals/is-callable"),c=r("../internals/has-own-property"),l=r("../internals/descriptors"),u=r("../internals/function-name").CONFIGURABLE,f=r("../internals/inspect-source"),d=r("../internals/internal-state"),h=d.enforce,p=d.get,g=String,m=Object.defineProperty,v=i("".slice),y=i("".replace),b=i([].join),w=l&&!a(function(){return m(function(){},"length",{value:8}).length!==8}),E=String(String).split("String"),I=n.exports=function(O,D,N){v(g(D),0,7)==="Symbol("&&(D="["+y(g(D),/^Symbol\(([^)]*)\)/,"$1")+"]"),N&&N.getter&&(D="get "+D),N&&N.setter&&(D="set "+D),(!c(O,"name")||u&&O.name!==D)&&(l?m(O,"name",{value:D,configurable:!0}):O.name=D),w&&N&&c(N,"arity")&&O.length!==N.arity&&m(O,"length",{value:N.arity});try{N&&c(N,"constructor")&&N.constructor?l&&m(O,"prototype",{writable:!1}):O.prototype&&(O.prototype=void 0)}catch{}var U=h(O);return c(U,"source")||(U.source=b(E,typeof D=="string"?D:"")),O};Function.prototype.toString=I(function(){return s(this)&&p(this).source||f(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(r,n,o){var i=Math.ceil,a=Math.floor;n.exports=Math.trunc||function(s){var c=+s;return(c>0?a:i)(c)}},{}],302:[function(r,n,o){var i,a,s,c,l,u=r("../internals/global"),f=r("../internals/function-bind-context"),d=r("../internals/object-get-own-property-descriptor").f,h=r("../internals/task").set,p=r("../internals/queue"),g=r("../internals/engine-is-ios"),m=r("../internals/engine-is-ios-pebble"),v=r("../internals/engine-is-webos-webkit"),y=r("../internals/engine-is-node"),b=u.MutationObserver||u.WebKitMutationObserver,w=u.document,E=u.process,I=u.Promise,O=d(u,"queueMicrotask"),D=O&&O.value;if(!D){var N=new p,U=function(){var B,F;for(y&&(B=E.domain)&&B.exit();F=N.get();)try{F()}catch(T){throw N.head&&i(),T}B&&B.enter()};g||y||v||!b||!w?!m&&I&&I.resolve?((c=I.resolve(void 0)).constructor=I,l=f(c.then,c),i=function(){l(U)}):y?i=function(){E.nextTick(U)}:(h=f(h,u),i=function(){h(U)}):(a=!0,s=w.createTextNode(""),new b(U).observe(s,{characterData:!0}),i=function(){s.data=a=!a}),D=function(B){N.head||i(),N.add(B)}}n.exports=D},{"../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(r,n,o){var i=r("../internals/a-callable"),a=TypeError,s=function(c){var l,u;this.promise=new c(function(f,d){if(l!==void 0||u!==void 0)throw new a("Bad Promise constructor");l=f,u=d}),this.resolve=i(l),this.reject=i(u)};n.exports.f=function(c){return new s(c)}},{"../internals/a-callable":222}],304:[function(r,n,o){var i=r("../internals/is-regexp"),a=TypeError;n.exports=function(s){if(i(s))throw new a("The method doesn't accept regular expressions");return s}},{"../internals/is-regexp":291}],305:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/function-uncurry-this"),s=r("../internals/function-call"),c=r("../internals/fails"),l=r("../internals/object-keys"),u=r("../internals/object-get-own-property-symbols"),f=r("../internals/object-property-is-enumerable"),d=r("../internals/to-object"),h=r("../internals/indexed-object"),p=Object.assign,g=Object.defineProperty,m=a([].concat);n.exports=!p||c(function(){if(i&&p({b:1},p(g({},"a",{enumerable:!0,get:function(){g(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var v={},y={},b=Symbol("assign detection");return v[b]=7,"abcdefghijklmnopqrst".split("").forEach(function(w){y[w]=w}),p({},v)[b]!==7||l(p({},y)).join("")!=="abcdefghijklmnopqrst"})?function(v,y){for(var b=d(v),w=arguments.length,E=1,I=u.f,O=f.f;w>E;)for(var D,N=h(arguments[E++]),U=I?m(l(N),I(N)):l(N),B=U.length,F=0;B>F;)D=U[F++],i&&!s(O,N,D)||(b[D]=N[D]);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(r,n,o){var i,a=r("../internals/an-object"),s=r("../internals/object-define-properties"),c=r("../internals/enum-bug-keys"),l=r("../internals/hidden-keys"),u=r("../internals/html"),f=r("../internals/document-create-element"),d=r("../internals/shared-key"),h=d("IE_PROTO"),p=function(){},g=function(y){return"<script>"+y+"<\/script>"},m=function(y){y.write(g("")),y.close();var b=y.parentWindow.Object;return y=null,b},v=function(){try{i=new ActiveXObject("htmlfile")}catch{}var y,b;v=typeof document<"u"?document.domain&&i?m(i):((b=f("iframe")).style.display="none",u.appendChild(b),b.src="javascript:",(y=b.contentWindow.document).open(),y.write(g("document.F=Object")),y.close(),y.F):m(i);for(var w=c.length;w--;)delete v.prototype[c[w]];return v()};l[h]=!0,n.exports=Object.create||function(y,b){var w;return y!==null?(p.prototype=a(y),w=new p,p.prototype=null,w[h]=y):w=v(),b===void 0?w:s.f(w,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(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/v8-prototype-define-bug"),s=r("../internals/object-define-property"),c=r("../internals/an-object"),l=r("../internals/to-indexed-object"),u=r("../internals/object-keys");o.f=i&&!a?Object.defineProperties:function(f,d){c(f);for(var h,p=l(d),g=u(d),m=g.length,v=0;m>v;)s.f(f,h=g[v++],p[h]);return f}},{"../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(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/ie8-dom-define"),s=r("../internals/v8-prototype-define-bug"),c=r("../internals/an-object"),l=r("../internals/to-property-key"),u=TypeError,f=Object.defineProperty,d=Object.getOwnPropertyDescriptor;o.f=i?s?function(h,p,g){if(c(h),p=l(p),c(g),typeof h=="function"&&p==="prototype"&&"value"in g&&"writable"in g&&!g.writable){var m=d(h,p);m&&m.writable&&(h[p]=g.value,g={configurable:"configurable"in g?g.configurable:m.configurable,enumerable:"enumerable"in g?g.enumerable:m.enumerable,writable:!1})}return f(h,p,g)}:f:function(h,p,g){if(c(h),p=l(p),c(g),a)try{return f(h,p,g)}catch{}if("get"in g||"set"in g)throw new u("Accessors not supported");return"value"in g&&(h[p]=g.value),h}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/ie8-dom-define":279,"../internals/to-property-key":346,"../internals/v8-prototype-define-bug":352}],309:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/function-call"),s=r("../internals/object-property-is-enumerable"),c=r("../internals/create-property-descriptor"),l=r("../internals/to-indexed-object"),u=r("../internals/to-property-key"),f=r("../internals/has-own-property"),d=r("../internals/ie8-dom-define"),h=Object.getOwnPropertyDescriptor;o.f=i?h:function(p,g){if(p=l(p),g=u(g),d)try{return h(p,g)}catch{}if(f(p,g))return c(!a(s.f,p,g),p[g])}},{"../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(r,n,o){var i=r("../internals/classof-raw"),a=r("../internals/to-indexed-object"),s=r("../internals/object-get-own-property-names").f,c=r("../internals/array-slice-simple"),l=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];n.exports.f=function(u){return l&&i(u)==="Window"?function(f){try{return s(f)}catch{return c(l)}}(u):s(a(u))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(r,n,o){var i=r("../internals/object-keys-internal"),a=r("../internals/enum-bug-keys").concat("length","prototype");o.f=Object.getOwnPropertyNames||function(s){return i(s,a)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(r,n,o){o.f=Object.getOwnPropertySymbols},{}],313:[function(r,n,o){var i=r("../internals/has-own-property"),a=r("../internals/is-callable"),s=r("../internals/to-object"),c=r("../internals/shared-key"),l=r("../internals/correct-prototype-getter"),u=c("IE_PROTO"),f=Object,d=f.prototype;n.exports=l?f.getPrototypeOf:function(h){var p=s(h);if(i(p,u))return p[u];var g=p.constructor;return a(g)&&p instanceof g?g.prototype:p instanceof f?d: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(r,n,o){var i=r("../internals/function-uncurry-this");n.exports=i({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=r("../internals/has-own-property"),s=r("../internals/to-indexed-object"),c=r("../internals/array-includes").indexOf,l=r("../internals/hidden-keys"),u=i([].push);n.exports=function(f,d){var h,p=s(f),g=0,m=[];for(h in p)!a(l,h)&&a(p,h)&&u(m,h);for(;d.length>g;)a(p,h=d[g++])&&(~c(m,h)||u(m,h));return m}},{"../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(r,n,o){var i=r("../internals/object-keys-internal"),a=r("../internals/enum-bug-keys");n.exports=Object.keys||function(s){return i(s,a)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(r,n,o){var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,s=a&&!i.call({1:2},1);o.f=s?function(c){var l=a(this,c);return!!l&&l.enumerable}:i},{}],318:[function(r,n,o){var i=r("../internals/function-uncurry-this-accessor"),a=r("../internals/an-object"),s=r("../internals/a-possible-prototype");n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var c,l=!1,u={};try{(c=i(Object.prototype,"__proto__","set"))(u,[]),l=u instanceof Array}catch{}return function(f,d){return a(f),s(d),l?c(f,d):f.__proto__=d,f}}():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/fails"),s=r("../internals/function-uncurry-this"),c=r("../internals/object-get-prototype-of"),l=r("../internals/object-keys"),u=r("../internals/to-indexed-object"),f=s(r("../internals/object-property-is-enumerable").f),d=s([].push),h=i&&a(function(){var g=Object.create(null);return g[2]=2,!f(g,2)}),p=function(g){return function(m){for(var v,y=u(m),b=l(y),w=h&&c(y)===null,E=b.length,I=0,O=[];E>I;)v=b[I++],i&&!(w?v in y:f(y,v))||d(O,g?[v,y[v]]:y[v]);return O}};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(r,n,o){var i=r("../internals/function-call"),a=r("../internals/is-callable"),s=r("../internals/is-object"),c=TypeError;n.exports=function(l,u){var f,d;if(u==="string"&&a(f=l.toString)&&!s(d=i(f,l))||a(f=l.valueOf)&&!s(d=i(f,l))||u!=="string"&&a(f=l.toString)&&!s(d=i(f,l)))return d;throw new c("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(r,n,o){var i=r("../internals/get-built-in"),a=r("../internals/function-uncurry-this"),s=r("../internals/object-get-own-property-names"),c=r("../internals/object-get-own-property-symbols"),l=r("../internals/an-object"),u=a([].concat);n.exports=i("Reflect","ownKeys")||function(f){var d=s.f(l(f)),h=c.f;return h?u(d,h(f)):d}},{"../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(r,n,o){var i=r("../internals/global");n.exports=i},{"../internals/global":274}],323:[function(r,n,o){n.exports=function(i){try{return{error:!1,value:i()}}catch(a){return{error:!0,value:a}}}},{}],324:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/promise-native-constructor"),s=r("../internals/is-callable"),c=r("../internals/is-forced"),l=r("../internals/inspect-source"),u=r("../internals/well-known-symbol"),f=r("../internals/engine-is-browser"),d=r("../internals/engine-is-deno"),h=r("../internals/is-pure"),p=r("../internals/engine-v8-version"),g=a&&a.prototype,m=u("species"),v=!1,y=s(i.PromiseRejectionEvent),b=c("Promise",function(){var w=l(a),E=w!==String(a);if(!E&&p===66||h&&(!g.catch||!g.finally))return!0;if(!p||p<51||!/native code/.test(w)){var I=new a(function(D){D(1)}),O=function(D){D(function(){},function(){})};if((I.constructor={})[m]=O,!(v=I.then(function(){})instanceof O))return!0}return!E&&(f||d)&&!y});n.exports={CONSTRUCTOR:b,REJECTION_EVENT:y,SUBCLASSING:v}},{"../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(r,n,o){var i=r("../internals/global");n.exports=i.Promise},{"../internals/global":274}],326:[function(r,n,o){var i=r("../internals/an-object"),a=r("../internals/is-object"),s=r("../internals/new-promise-capability");n.exports=function(c,l){if(i(c),a(l)&&l.constructor===c)return l;var u=s.f(c);return(0,u.resolve)(l),u.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(r,n,o){var i=r("../internals/promise-native-constructor"),a=r("../internals/check-correctness-of-iteration"),s=r("../internals/promise-constructor-detection").CONSTRUCTOR;n.exports=s||!a(function(c){i.all(c).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(r,n,o){var i=function(){this.head=null,this.tail=null};i.prototype={add:function(a){var s={item:a,next:null},c=this.tail;c?c.next=s:this.head=s,this.tail=s},get:function(){var a=this.head;if(a)return(this.head=a.next)===null&&(this.tail=null),a.item}},n.exports=i},{}],329:[function(r,n,o){var i=r("../internals/is-null-or-undefined"),a=TypeError;n.exports=function(s){if(i(s))throw new a("Can't call method on "+s);return s}},{"../internals/is-null-or-undefined":288}],330:[function(r,n,o){var i=r("../internals/get-built-in"),a=r("../internals/define-built-in-accessor"),s=r("../internals/well-known-symbol"),c=r("../internals/descriptors"),l=s("species");n.exports=function(u){var f=i(u);c&&f&&!f[l]&&a(f,l,{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(r,n,o){var i=r("../internals/object-define-property").f,a=r("../internals/has-own-property"),s=r("../internals/well-known-symbol")("toStringTag");n.exports=function(c,l,u){c&&!u&&(c=c.prototype),c&&!a(c,s)&&i(c,s,{configurable:!0,value:l})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(r,n,o){var i=r("../internals/shared"),a=r("../internals/uid"),s=i("keys");n.exports=function(c){return s[c]||(s[c]=a(c))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/define-global-property"),s=i["__core-js_shared__"]||a("__core-js_shared__",{});n.exports=s},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(r,n,o){var i=r("../internals/is-pure"),a=r("../internals/shared-store");(n.exports=function(s,c){return a[s]||(a[s]=c!==void 0?c:{})})("versions",[]).push({version:"3.33.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":290,"../internals/shared-store":333}],335:[function(r,n,o){var i=r("../internals/an-object"),a=r("../internals/a-constructor"),s=r("../internals/is-null-or-undefined"),c=r("../internals/well-known-symbol")("species");n.exports=function(l,u){var f,d=i(l).constructor;return d===void 0||s(f=i(d)[c])?u:a(f)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(r,n,o){var i=r("../internals/engine-v8-version"),a=r("../internals/fails"),s=r("../internals/global").String;n.exports=!!Object.getOwnPropertySymbols&&!a(function(){var c=Symbol("symbol detection");return!s(c)||!(Object(c)instanceof Symbol)||!Symbol.sham&&i&&i<41})},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(r,n,o){var i=r("../internals/function-call"),a=r("../internals/get-built-in"),s=r("../internals/well-known-symbol"),c=r("../internals/define-built-in");n.exports=function(){var l=a("Symbol"),u=l&&l.prototype,f=u&&u.valueOf,d=s("toPrimitive");u&&!u[d]&&c(u,d,function(h){return i(f,this)},{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(r,n,o){var i=r("../internals/symbol-constructor-detection");n.exports=i&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(r,n,o){var i,a,s,c,l=r("../internals/global"),u=r("../internals/function-apply"),f=r("../internals/function-bind-context"),d=r("../internals/is-callable"),h=r("../internals/has-own-property"),p=r("../internals/fails"),g=r("../internals/html"),m=r("../internals/array-slice"),v=r("../internals/document-create-element"),y=r("../internals/validate-arguments-length"),b=r("../internals/engine-is-ios"),w=r("../internals/engine-is-node"),E=l.setImmediate,I=l.clearImmediate,O=l.process,D=l.Dispatch,N=l.Function,U=l.MessageChannel,B=l.String,F=0,T={};p(function(){i=l.location});var P=function(x){if(h(T,x)){var k=T[x];delete T[x],k()}},_=function(x){return function(){P(x)}},C=function(x){P(x.data)},S=function(x){l.postMessage(B(x),i.protocol+"//"+i.host)};E&&I||(E=function(x){y(arguments.length,1);var k=d(x)?x:N(x),L=m(arguments,1);return T[++F]=function(){u(k,void 0,L)},a(F),F},I=function(x){delete T[x]},w?a=function(x){O.nextTick(_(x))}:D&&D.now?a=function(x){D.now(_(x))}:U&&!b?(c=(s=new U).port2,s.port1.onmessage=C,a=f(c.postMessage,c)):l.addEventListener&&d(l.postMessage)&&!l.importScripts&&i&&i.protocol!=="file:"&&!p(S)?(a=S,l.addEventListener("message",C,!1)):a="onreadystatechange"in v("script")?function(x){g.appendChild(v("script")).onreadystatechange=function(){g.removeChild(this),P(x)}}:function(x){setTimeout(_(x),0)}),n.exports={set:E,clear:I}},{"../internals/array-slice":231,"../internals/document-create-element":249,"../internals/engine-is-ios":253,"../internals/engine-is-node":254,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-bind-context":262,"../internals/global":274,"../internals/has-own-property":275,"../internals/html":278,"../internals/is-callable":285,"../internals/validate-arguments-length":353}],340:[function(r,n,o){var i=r("../internals/to-integer-or-infinity"),a=Math.max,s=Math.min;n.exports=function(c,l){var u=i(c);return u<0?a(u+l,0):s(u,l)}},{"../internals/to-integer-or-infinity":342}],341:[function(r,n,o){var i=r("../internals/indexed-object"),a=r("../internals/require-object-coercible");n.exports=function(s){return i(a(s))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(r,n,o){var i=r("../internals/math-trunc");n.exports=function(a){var s=+a;return s!=s||s===0?0:i(s)}},{"../internals/math-trunc":301}],343:[function(r,n,o){var i=r("../internals/to-integer-or-infinity"),a=Math.min;n.exports=function(s){return s>0?a(i(s),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(r,n,o){var i=r("../internals/require-object-coercible"),a=Object;n.exports=function(s){return a(i(s))}},{"../internals/require-object-coercible":329}],345:[function(r,n,o){var i=r("../internals/function-call"),a=r("../internals/is-object"),s=r("../internals/is-symbol"),c=r("../internals/get-method"),l=r("../internals/ordinary-to-primitive"),u=r("../internals/well-known-symbol"),f=TypeError,d=u("toPrimitive");n.exports=function(h,p){if(!a(h)||s(h))return h;var g,m=c(h,d);if(m){if(p===void 0&&(p="default"),g=i(m,h,p),!a(g)||s(g))return g;throw new f("Can't convert object to primitive value")}return p===void 0&&(p="number"),l(h,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(r,n,o){var i=r("../internals/to-primitive"),a=r("../internals/is-symbol");n.exports=function(s){var c=i(s,"string");return a(c)?c:c+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(r,n,o){var i={};i[r("../internals/well-known-symbol")("toStringTag")]="z",n.exports=String(i)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(r,n,o){var i=r("../internals/classof"),a=String;n.exports=function(s){if(i(s)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return a(s)}},{"../internals/classof":236}],349:[function(r,n,o){var i=String;n.exports=function(a){try{return i(a)}catch{return"Object"}}},{}],350:[function(r,n,o){var i=r("../internals/function-uncurry-this"),a=0,s=Math.random(),c=i(1 .toString);n.exports=function(l){return"Symbol("+(l===void 0?"":l)+")_"+c(++a+s,36)}},{"../internals/function-uncurry-this":268}],351:[function(r,n,o){var i=r("../internals/symbol-constructor-detection");n.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(r,n,o){var i=r("../internals/descriptors"),a=r("../internals/fails");n.exports=i&&a(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(r,n,o){var i=TypeError;n.exports=function(a,s){if(a<s)throw new i("Not enough arguments");return a}},{}],354:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/is-callable"),s=i.WeakMap;n.exports=a(s)&&/native code/.test(String(s))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(r,n,o){var i=r("../internals/path"),a=r("../internals/has-own-property"),s=r("../internals/well-known-symbol-wrapped"),c=r("../internals/object-define-property").f;n.exports=function(l){var u=i.Symbol||(i.Symbol={});a(u,l)||c(u,l,{value:s.f(l)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(r,n,o){var i=r("../internals/well-known-symbol");o.f=i},{"../internals/well-known-symbol":357}],357:[function(r,n,o){var i=r("../internals/global"),a=r("../internals/shared"),s=r("../internals/has-own-property"),c=r("../internals/uid"),l=r("../internals/symbol-constructor-detection"),u=r("../internals/use-symbol-as-uid"),f=i.Symbol,d=a("wks"),h=u?f.for||f:f&&f.withoutSetter||c;n.exports=function(p){return s(d,p)||(d[p]=l&&s(f,p)?f[p]:h("Symbol."+p)),d[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(r,n,o){var i=r("../internals/export"),a=r("../internals/array-iteration").findIndex,s=r("../internals/add-to-unscopables"),c=!0;"findIndex"in[]&&Array(1).findIndex(function(){c=!1}),i({target:"Array",proto:!0,forced:c},{findIndex:function(l){return a(this,l,arguments.length>1?arguments[1]:void 0)}}),s("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/array-iteration").find,s=r("../internals/add-to-unscopables"),c=!0;"find"in[]&&Array(1).find(function(){c=!1}),i({target:"Array",proto:!0,forced:c},{find:function(l){return a(this,l,arguments.length>1?arguments[1]:void 0)}}),s("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/array-includes").includes,s=r("../internals/fails"),c=r("../internals/add-to-unscopables");i({target:"Array",proto:!0,forced:s(function(){return!Array(1).includes()})},{includes:function(l){return a(this,l,arguments.length>1?arguments[1]:void 0)}}),c("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(r,n,o){var i=r("../internals/to-indexed-object"),a=r("../internals/add-to-unscopables"),s=r("../internals/iterators"),c=r("../internals/internal-state"),l=r("../internals/object-define-property").f,u=r("../internals/iterator-define"),f=r("../internals/create-iter-result-object"),d=r("../internals/is-pure"),h=r("../internals/descriptors"),p=c.set,g=c.getterFor("Array Iterator");n.exports=u(Array,"Array",function(v,y){p(this,{type:"Array Iterator",target:i(v),index:0,kind:y})},function(){var v=g(this),y=v.target,b=v.kind,w=v.index++;if(!y||w>=y.length)return v.target=void 0,f(void 0,!0);switch(b){case"keys":return f(w,!1);case"values":return f(y[w],!1)}return f([w,y[w]],!1)},"values");var m=s.Arguments=s.Array;if(a("keys"),a("values"),a("entries"),!d&&h&&m.name!=="values")try{l(m,"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(r,n,o){var i=r("../internals/export"),a=r("../internals/get-built-in"),s=r("../internals/function-apply"),c=r("../internals/function-call"),l=r("../internals/function-uncurry-this"),u=r("../internals/fails"),f=r("../internals/is-callable"),d=r("../internals/is-symbol"),h=r("../internals/array-slice"),p=r("../internals/get-json-replacer-function"),g=r("../internals/symbol-constructor-detection"),m=String,v=a("JSON","stringify"),y=l(/./.exec),b=l("".charAt),w=l("".charCodeAt),E=l("".replace),I=l(1 .toString),O=/[\uD800-\uDFFF]/g,D=/^[\uD800-\uDBFF]$/,N=/^[\uDC00-\uDFFF]$/,U=!g||u(function(){var P=a("Symbol")("stringify detection");return v([P])!=="[null]"||v({a:P})!=="{}"||v(Object(P))!=="{}"}),B=u(function(){return v("\uDF06\uD834")!=='"\\udf06\\ud834"'||v("\uDEAD")!=='"\\udead"'}),F=function(P,_){var C=h(arguments),S=p(_);if(f(S)||P!==void 0&&!d(P))return C[1]=function(x,k){if(f(S)&&(k=c(S,this,m(x),k)),!d(k))return k},s(v,null,C)},T=function(P,_,C){var S=b(C,_-1),x=b(C,_+1);return y(D,P)&&!y(N,x)||y(N,P)&&!y(D,S)?"\\u"+I(w(P,0),16):P};v&&i({target:"JSON",stat:!0,arity:3,forced:U||B},{stringify:function(P,_,C){var S=h(arguments),x=s(U?F:v,null,S);return B&&typeof x=="string"?E(x,O,T):x}})},{"../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(r,n,o){r("../internals/export")({target:"Number",stat:!0},{isNaN:function(i){return i!=i}})},{"../internals/export":259}],364:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/object-assign");i({target:"Object",stat:!0,arity:2,forced:Object.assign!==a},{assign:a})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/symbol-constructor-detection"),s=r("../internals/fails"),c=r("../internals/object-get-own-property-symbols"),l=r("../internals/to-object");i({target:"Object",stat:!0,forced:!a||s(function(){c.f(1)})},{getOwnPropertySymbols:function(u){var f=c.f;return f?f(l(u)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/to-object"),s=r("../internals/object-keys");i({target:"Object",stat:!0,forced:r("../internals/fails")(function(){s(1)})},{keys:function(c){return s(a(c))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/object-to-array").values;i({target:"Object",stat:!0},{values:function(s){return a(s)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/function-call"),s=r("../internals/a-callable"),c=r("../internals/new-promise-capability"),l=r("../internals/perform"),u=r("../internals/iterate");i({target:"Promise",stat:!0,forced:r("../internals/promise-statics-incorrect-iteration")},{all:function(f){var d=this,h=c.f(d),p=h.resolve,g=h.reject,m=l(function(){var v=s(d.resolve),y=[],b=0,w=1;u(f,function(E){var I=b++,O=!1;w++,a(v,d,E).then(function(D){O||(O=!0,y[I]=D,--w||p(y))},g)}),--w||p(y)});return m.error&&g(m.value),h.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],369:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/is-pure"),s=r("../internals/promise-constructor-detection").CONSTRUCTOR,c=r("../internals/promise-native-constructor"),l=r("../internals/get-built-in"),u=r("../internals/is-callable"),f=r("../internals/define-built-in"),d=c&&c.prototype;if(i({target:"Promise",proto:!0,forced:s,real:!0},{catch:function(p){return this.then(void 0,p)}}),!a&&u(c)){var h=l("Promise").prototype.catch;d.catch!==h&&f(d,"catch",h,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],370:[function(r,n,o){var i,a,s,c=r("../internals/export"),l=r("../internals/is-pure"),u=r("../internals/engine-is-node"),f=r("../internals/global"),d=r("../internals/function-call"),h=r("../internals/define-built-in"),p=r("../internals/object-set-prototype-of"),g=r("../internals/set-to-string-tag"),m=r("../internals/set-species"),v=r("../internals/a-callable"),y=r("../internals/is-callable"),b=r("../internals/is-object"),w=r("../internals/an-instance"),E=r("../internals/species-constructor"),I=r("../internals/task").set,O=r("../internals/microtask"),D=r("../internals/host-report-errors"),N=r("../internals/perform"),U=r("../internals/queue"),B=r("../internals/internal-state"),F=r("../internals/promise-native-constructor"),T=r("../internals/promise-constructor-detection"),P=r("../internals/new-promise-capability"),_=T.CONSTRUCTOR,C=T.REJECTION_EVENT,S=T.SUBCLASSING,x=B.getterFor("Promise"),k=B.set,L=F&&F.prototype,j=F,z=L,Y=f.TypeError,K=f.document,Q=f.process,q=P.f,J=q,G=!!(K&&K.createEvent&&f.dispatchEvent),V=function(oe){var le;return!(!b(oe)||!y(le=oe.then))&&le},X=function(oe,le){var de,ve,we,ie=le.value,ge=le.state===1,Pe=ge?oe.ok:oe.fail,Fe=oe.resolve,Ie=oe.reject,Oe=oe.domain;try{Pe?(ge||(le.rejection===2&&pe(le),le.rejection=1),Pe===!0?de=ie:(Oe&&Oe.enter(),de=Pe(ie),Oe&&(Oe.exit(),we=!0)),de===oe.promise?Ie(new Y("Promise-chain cycle")):(ve=V(de))?d(ve,de,Fe,Ie):Fe(de)):Ie(ie)}catch($e){Oe&&!we&&Oe.exit(),Ie($e)}},te=function(oe,le){oe.notified||(oe.notified=!0,O(function(){for(var de,ve=oe.reactions;de=ve.get();)X(de,oe);oe.notified=!1,le&&!oe.rejection&&re(oe)}))},ee=function(oe,le,de){var ve,we;G?((ve=K.createEvent("Event")).promise=le,ve.reason=de,ve.initEvent(oe,!1,!0),f.dispatchEvent(ve)):ve={promise:le,reason:de},!C&&(we=f["on"+oe])?we(ve):oe==="unhandledrejection"&&D("Unhandled promise rejection",de)},re=function(oe){d(I,f,function(){var le,de=oe.facade,ve=oe.value;if(se(oe)&&(le=N(function(){u?Q.emit("unhandledRejection",ve,de):ee("unhandledrejection",de,ve)}),oe.rejection=u||se(oe)?2:1,le.error))throw le.value})},se=function(oe){return oe.rejection!==1&&!oe.parent},pe=function(oe){d(I,f,function(){var le=oe.facade;u?Q.emit("rejectionHandled",le):ee("rejectionhandled",le,oe.value)})},ce=function(oe,le,de){return function(ve){oe(le,ve,de)}},ne=function(oe,le,de){oe.done||(oe.done=!0,de&&(oe=de),oe.value=le,oe.state=2,te(oe,!0))},he=function(oe,le,de){if(!oe.done){oe.done=!0,de&&(oe=de);try{if(oe.facade===le)throw new Y("Promise can't be resolved itself");var ve=V(le);ve?O(function(){var we={done:!1};try{d(ve,le,ce(he,we,oe),ce(ne,we,oe))}catch(ie){ne(we,ie,oe)}}):(oe.value=le,oe.state=1,te(oe,!1))}catch(we){ne({done:!1},we,oe)}}};if(_&&(z=(j=function(oe){w(this,z),v(oe),d(i,this);var le=x(this);try{oe(ce(he,le),ce(ne,le))}catch(de){ne(le,de)}}).prototype,(i=function(oe){k(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new U,rejection:!1,state:0,value:void 0})}).prototype=h(z,"then",function(oe,le){var de=x(this),ve=q(E(this,j));return de.parent=!0,ve.ok=!y(oe)||oe,ve.fail=y(le)&&le,ve.domain=u?Q.domain:void 0,de.state===0?de.reactions.add(ve):O(function(){X(ve,de)}),ve.promise}),a=function(){var oe=new i,le=x(oe);this.promise=oe,this.resolve=ce(he,le),this.reject=ce(ne,le)},P.f=q=function(oe){return oe===j||oe===void 0?new a(oe):J(oe)},!l&&y(F)&&L!==Object.prototype)){s=L.then,S||h(L,"then",function(oe,le){var de=this;return new j(function(ve,we){d(s,de,ve,we)}).then(oe,le)},{unsafe:!0});try{delete L.constructor}catch{}p&&p(L,z)}c({global:!0,constructor:!0,wrap:!0,forced:_},{Promise:j}),g(j,"Promise",!1,!0),m("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(r,n,o){var i=r("../internals/export"),a=r("../internals/is-pure"),s=r("../internals/promise-native-constructor"),c=r("../internals/fails"),l=r("../internals/get-built-in"),u=r("../internals/is-callable"),f=r("../internals/species-constructor"),d=r("../internals/promise-resolve"),h=r("../internals/define-built-in"),p=s&&s.prototype;if(i({target:"Promise",proto:!0,real:!0,forced:!!s&&c(function(){p.finally.call({then:function(){}},function(){})})},{finally:function(m){var v=f(this,l("Promise")),y=u(m);return this.then(y?function(b){return d(v,m()).then(function(){return b})}:m,y?function(b){return d(v,m()).then(function(){throw b})}:m)}}),!a&&u(s)){var g=l("Promise").prototype.finally;p.finally!==g&&h(p,"finally",g,{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(r,n,o){r("../modules/es.promise.constructor"),r("../modules/es.promise.all"),r("../modules/es.promise.catch"),r("../modules/es.promise.race"),r("../modules/es.promise.reject"),r("../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(r,n,o){var i=r("../internals/export"),a=r("../internals/function-call"),s=r("../internals/a-callable"),c=r("../internals/new-promise-capability"),l=r("../internals/perform"),u=r("../internals/iterate");i({target:"Promise",stat:!0,forced:r("../internals/promise-statics-incorrect-iteration")},{race:function(f){var d=this,h=c.f(d),p=h.reject,g=l(function(){var m=s(d.resolve);u(f,function(v){a(m,d,v).then(h.resolve,p)})});return g.error&&p(g.value),h.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],374:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/function-call"),s=r("../internals/new-promise-capability");i({target:"Promise",stat:!0,forced:r("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(c){var l=s.f(this);return a(l.reject,void 0,c),l.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/get-built-in"),s=r("../internals/is-pure"),c=r("../internals/promise-native-constructor"),l=r("../internals/promise-constructor-detection").CONSTRUCTOR,u=r("../internals/promise-resolve"),f=a("Promise"),d=s&&!l;i({target:"Promise",stat:!0,forced:s||l},{resolve:function(h){return u(d&&this===f?c:this,h)}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326}],376:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/function-uncurry-this"),s=r("../internals/to-absolute-index"),c=RangeError,l=String.fromCharCode,u=String.fromCodePoint,f=a([].join);i({target:"String",stat:!0,arity:1,forced:!!u&&u.length!==1},{fromCodePoint:function(d){for(var h,p=[],g=arguments.length,m=0;g>m;){if(h=+arguments[m++],s(h,1114111)!==h)throw new c(h+" is not a valid code point");p[m]=h<65536?l(h):l(55296+((h-=65536)>>10),h%1024+56320)}return f(p,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/function-uncurry-this"),s=r("../internals/not-a-regexp"),c=r("../internals/require-object-coercible"),l=r("../internals/to-string"),u=r("../internals/correct-is-regexp-logic"),f=a("".indexOf);i({target:"String",proto:!0,forced:!u("includes")},{includes:function(d){return!!~f(l(c(this)),l(s(d)),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(r,n,o){r("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(r,n,o){var i=r("../internals/export"),a=r("../internals/global"),s=r("../internals/function-call"),c=r("../internals/function-uncurry-this"),l=r("../internals/is-pure"),u=r("../internals/descriptors"),f=r("../internals/symbol-constructor-detection"),d=r("../internals/fails"),h=r("../internals/has-own-property"),p=r("../internals/object-is-prototype-of"),g=r("../internals/an-object"),m=r("../internals/to-indexed-object"),v=r("../internals/to-property-key"),y=r("../internals/to-string"),b=r("../internals/create-property-descriptor"),w=r("../internals/object-create"),E=r("../internals/object-keys"),I=r("../internals/object-get-own-property-names"),O=r("../internals/object-get-own-property-names-external"),D=r("../internals/object-get-own-property-symbols"),N=r("../internals/object-get-own-property-descriptor"),U=r("../internals/object-define-property"),B=r("../internals/object-define-properties"),F=r("../internals/object-property-is-enumerable"),T=r("../internals/define-built-in"),P=r("../internals/define-built-in-accessor"),_=r("../internals/shared"),C=r("../internals/shared-key"),S=r("../internals/hidden-keys"),x=r("../internals/uid"),k=r("../internals/well-known-symbol"),L=r("../internals/well-known-symbol-wrapped"),j=r("../internals/well-known-symbol-define"),z=r("../internals/symbol-define-to-primitive"),Y=r("../internals/set-to-string-tag"),K=r("../internals/internal-state"),Q=r("../internals/array-iteration").forEach,q=C("hidden"),J=K.set,G=K.getterFor("Symbol"),V=Object.prototype,X=a.Symbol,te=X&&X.prototype,ee=a.RangeError,re=a.TypeError,se=a.QObject,pe=N.f,ce=U.f,ne=O.f,he=F.f,oe=c([].push),le=_("symbols"),de=_("op-symbols"),ve=_("wks"),we=!se||!se.prototype||!se.prototype.findChild,ie=function(Ne,Qe,Xe){var rt=pe(V,Qe);rt&&delete V[Qe],ce(Ne,Qe,Xe),rt&&Ne!==V&&ce(V,Qe,rt)},ge=u&&d(function(){return w(ce({},"a",{get:function(){return ce(this,"a",{value:7}).a}})).a!==7})?ie:ce,Pe=function(Ne,Qe){var Xe=le[Ne]=w(te);return J(Xe,{type:"Symbol",tag:Ne,description:Qe}),u||(Xe.description=Qe),Xe},Fe=function(Ne,Qe,Xe){Ne===V&&Fe(de,Qe,Xe),g(Ne);var rt=v(Qe);return g(Xe),h(le,rt)?(Xe.enumerable?(h(Ne,q)&&Ne[q][rt]&&(Ne[q][rt]=!1),Xe=w(Xe,{enumerable:b(0,!1)})):(h(Ne,q)||ce(Ne,q,b(1,{})),Ne[q][rt]=!0),ge(Ne,rt,Xe)):ce(Ne,rt,Xe)},Ie=function(Ne,Qe){g(Ne);var Xe=m(Qe),rt=E(Xe).concat(Ze(Xe));return Q(rt,function(ht){u&&!s(Oe,Xe,ht)||Fe(Ne,ht,Xe[ht])}),Ne},Oe=function(Ne){var Qe=v(Ne),Xe=s(he,this,Qe);return!(this===V&&h(le,Qe)&&!h(de,Qe))&&(!(Xe||!h(this,Qe)||!h(le,Qe)||h(this,q)&&this[q][Qe])||Xe)},$e=function(Ne,Qe){var Xe=m(Ne),rt=v(Qe);if(Xe!==V||!h(le,rt)||h(de,rt)){var ht=pe(Xe,rt);return!ht||!h(le,rt)||h(Xe,q)&&Xe[q][rt]||(ht.enumerable=!0),ht}},et=function(Ne){var Qe=ne(m(Ne)),Xe=[];return Q(Qe,function(rt){h(le,rt)||h(S,rt)||oe(Xe,rt)}),Xe},Ze=function(Ne){var Qe=Ne===V,Xe=ne(Qe?de:m(Ne)),rt=[];return Q(Xe,function(ht){!h(le,ht)||Qe&&!h(V,ht)||oe(rt,le[ht])}),rt};f||(T(te=(X=function(){if(p(te,this))throw new re("Symbol is not a constructor");var Ne=arguments.length&&arguments[0]!==void 0?y(arguments[0]):void 0,Qe=x(Ne),Xe=function(rt){this===V&&s(Xe,de,rt),h(this,q)&&h(this[q],Qe)&&(this[q][Qe]=!1);var ht=b(1,rt);try{ge(this,Qe,ht)}catch(At){if(!(At instanceof ee))throw At;ie(this,Qe,ht)}};return u&&we&&ge(V,Qe,{configurable:!0,set:Xe}),Pe(Qe,Ne)}).prototype,"toString",function(){return G(this).tag}),T(X,"withoutSetter",function(Ne){return Pe(x(Ne),Ne)}),F.f=Oe,U.f=Fe,B.f=Ie,N.f=$e,I.f=O.f=et,D.f=Ze,L.f=function(Ne){return Pe(k(Ne),Ne)},u&&(P(te,"description",{configurable:!0,get:function(){return G(this).description}}),l||T(V,"propertyIsEnumerable",Oe,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!f,sham:!f},{Symbol:X}),Q(E(ve),function(Ne){j(Ne)}),i({target:"Symbol",stat:!0,forced:!f},{useSetter:function(){we=!0},useSimple:function(){we=!1}}),i({target:"Object",stat:!0,forced:!f,sham:!u},{create:function(Ne,Qe){return Qe===void 0?w(Ne):Ie(w(Ne),Qe)},defineProperty:Fe,defineProperties:Ie,getOwnPropertyDescriptor:$e}),i({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:et}),z(),Y(X,"Symbol"),S[q]=!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(r,n,o){var i=r("../internals/export"),a=r("../internals/get-built-in"),s=r("../internals/has-own-property"),c=r("../internals/to-string"),l=r("../internals/shared"),u=r("../internals/symbol-registry-detection"),f=l("string-to-symbol-registry"),d=l("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{for:function(h){var p=c(h);if(s(f,p))return f[p];var g=a("Symbol")(p);return f[p]=g,d[g]=p,g}})},{"../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(r,n,o){r("../modules/es.symbol.constructor"),r("../modules/es.symbol.for"),r("../modules/es.symbol.key-for"),r("../modules/es.json.stringify"),r("../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(r,n,o){var i=r("../internals/export"),a=r("../internals/has-own-property"),s=r("../internals/is-symbol"),c=r("../internals/try-to-string"),l=r("../internals/shared"),u=r("../internals/symbol-registry-detection"),f=l("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!u},{keyFor:function(d){if(!s(d))throw new TypeError(c(d)+" is not a symbol");if(a(f,d))return f[d]}})},{"../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(r,n,o){function i(a){return Object.prototype.toString.call(a)}o.isArray=function(a){return Array.isArray?Array.isArray(a):i(a)==="[object Array]"},o.isBoolean=function(a){return typeof a=="boolean"},o.isNull=function(a){return a===null},o.isNullOrUndefined=function(a){return a==null},o.isNumber=function(a){return typeof a=="number"},o.isString=function(a){return typeof a=="string"},o.isSymbol=function(a){return typeof a=="symbol"},o.isUndefined=function(a){return a===void 0},o.isRegExp=function(a){return i(a)==="[object RegExp]"},o.isObject=function(a){return typeof a=="object"&&a!==null},o.isDate=function(a){return i(a)==="[object Date]"},o.isError=function(a){return i(a)==="[object Error]"||a instanceof Error},o.isFunction=function(a){return typeof a=="function"},o.isPrimitive=function(a){return a===null||typeof a=="boolean"||typeof a=="number"||typeof a=="string"||typeof a=="symbol"||a===void 0},o.isBuffer=r("buffer").Buffer.isBuffer},{buffer:220}],384:[function(r,n,o){(function(i){(function(){var a=r("elliptic"),s=r("bn.js");n.exports=function(f){return new l(f)};var c={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 l(f){this.curveType=c[f],this.curveType||(this.curveType={name:f}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function u(f,d,h){Array.isArray(f)||(f=f.toArray());var p=new i(f);if(h&&p.length<h){var g=new i(h-p.length);g.fill(0),p=i.concat([g,p])}return d?p.toString(d):p}c.p224=c.secp224r1,c.p256=c.secp256r1=c.prime256v1,c.p192=c.secp192r1=c.prime192v1,c.p384=c.secp384r1,c.p521=c.secp521r1,l.prototype.generateKeys=function(f,d){return this.keys=this.curve.genKeyPair(),this.getPublicKey(f,d)},l.prototype.computeSecret=function(f,d,h){return d=d||"utf8",i.isBuffer(f)||(f=new i(f,d)),u(this.curve.keyFromPublic(f).getPublic().mul(this.keys.getPrivate()).getX(),h,this.curveType.byteLength)},l.prototype.getPublicKey=function(f,d){var h=this.keys.getPublic(d==="compressed",!0);return d==="hybrid"&&(h[h.length-1]%2?h[0]=7:h[0]=6),u(h,f)},l.prototype.getPrivateKey=function(f){return u(this.keys.getPrivate(),f)},l.prototype.setPublicKey=function(f,d){return d=d||"utf8",i.isBuffer(f)||(f=new i(f,d)),this.keys._importPublic(f),this},l.prototype.setPrivateKey=function(f,d){d=d||"utf8",i.isBuffer(f)||(f=new i(f,d));var h=new s(f);return h=h.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(h),this}}).call(this)}).call(this,r("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(r,n,o){arguments[4][184][0].apply(o,arguments)},{buffer:188,dup:184}],386:[function(r,n,o){var i=r("inherits"),a=r("md5.js"),s=r("ripemd160"),c=r("sha.js"),l=r("cipher-base");function u(f){l.call(this,"digest"),this._hash=f}i(u,l),u.prototype._update=function(f){this._hash.update(f)},u.prototype._final=function(){return this._hash.digest()},n.exports=function(f){return(f=f.toLowerCase())==="md5"?new a:f==="rmd160"||f==="ripemd160"?new s:new u(c(f))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(r,n,o){var i=r("md5.js");n.exports=function(a){return new i().update(a).digest()}},{"md5.js":450}],388:[function(r,n,o){var i=r("inherits"),a=r("./legacy"),s=r("cipher-base"),c=r("safe-buffer").Buffer,l=r("create-hash/md5"),u=r("ripemd160"),f=r("sha.js"),d=c.alloc(128);function h(p,g){s.call(this,"digest"),typeof g=="string"&&(g=c.from(g));var m=p==="sha512"||p==="sha384"?128:64;this._alg=p,this._key=g,g.length>m?g=(p==="rmd160"?new u:f(p)).update(g).digest():g.length<m&&(g=c.concat([g,d],m));for(var v=this._ipad=c.allocUnsafe(m),y=this._opad=c.allocUnsafe(m),b=0;b<m;b++)v[b]=54^g[b],y[b]=92^g[b];this._hash=p==="rmd160"?new u:f(p),this._hash.update(v)}i(h,s),h.prototype._update=function(p){this._hash.update(p)},h.prototype._final=function(){var p=this._hash.digest();return(this._alg==="rmd160"?new u:f(this._alg)).update(this._opad).update(p).digest()},n.exports=function(p,g){return(p=p.toLowerCase())==="rmd160"||p==="ripemd160"?new h("rmd160",g):p==="md5"?new a(l,g):new h(p,g)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(r,n,o){var i=r("inherits"),a=r("safe-buffer").Buffer,s=r("cipher-base"),c=a.alloc(128);function l(u,f){s.call(this,"digest"),typeof f=="string"&&(f=a.from(f)),this._alg=u,this._key=f,f.length>64?f=u(f):f.length<64&&(f=a.concat([f,c],64));for(var d=this._ipad=a.allocUnsafe(64),h=this._opad=a.allocUnsafe(64),p=0;p<64;p++)d[p]=54^f[p],h[p]=92^f[p];this._hash=[d]}i(l,s),l.prototype._update=function(u){this._hash.push(u)},l.prototype._final=function(){var u=this._alg(a.concat(this._hash));return this._alg(a.concat([this._opad,u]))},n.exports=l},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(r,n,o){o.randomBytes=o.rng=o.pseudoRandomBytes=o.prng=r("randombytes"),o.createHash=o.Hash=r("create-hash"),o.createHmac=o.Hmac=r("create-hmac");var i=r("browserify-sign/algos"),a=Object.keys(i),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(a);o.getHashes=function(){return s};var c=r("pbkdf2");o.pbkdf2=c.pbkdf2,o.pbkdf2Sync=c.pbkdf2Sync;var l=r("browserify-cipher");o.Cipher=l.Cipher,o.createCipher=l.createCipher,o.Cipheriv=l.Cipheriv,o.createCipheriv=l.createCipheriv,o.Decipher=l.Decipher,o.createDecipher=l.createDecipher,o.Decipheriv=l.Decipheriv,o.createDecipheriv=l.createDecipheriv,o.getCiphers=l.getCiphers,o.listCiphers=l.listCiphers;var u=r("diffie-hellman");o.DiffieHellmanGroup=u.DiffieHellmanGroup,o.createDiffieHellmanGroup=u.createDiffieHellmanGroup,o.getDiffieHellman=u.getDiffieHellman,o.createDiffieHellman=u.createDiffieHellman,o.DiffieHellman=u.DiffieHellman;var f=r("browserify-sign");o.createSign=f.createSign,o.Sign=f.Sign,o.createVerify=f.createVerify,o.Verify=f.Verify,o.createECDH=r("create-ecdh");var d=r("public-encrypt");o.publicEncrypt=d.publicEncrypt,o.privateEncrypt=d.privateEncrypt,o.publicDecrypt=d.publicDecrypt,o.privateDecrypt=d.privateDecrypt;var h=r("randomfill");o.randomFill=h.randomFill,o.randomFillSync=h.randomFillSync,o.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))},o.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(r,n,o){(function(i,a){typeof o=="object"&&n!==void 0?n.exports=a():(i=typeof globalThis<"u"?globalThis:i||self).dayjs=a()})(void 0,function(){var i=6e4,a=36e5,s="millisecond",c="second",l="minute",u="hour",f="day",d="week",h="month",p="quarter",g="year",m="date",v="Invalid Date",y=/^(\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,w={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(C){var S=["th","st","nd","rd"],x=C%100;return"["+C+(S[(x-20)%10]||S[x]||S[0])+"]"}},E=function(C,S,x){var k=String(C);return!k||k.length>=S?C:""+Array(S+1-k.length).join(x)+C},I={s:E,z:function(C){var S=-C.utcOffset(),x=Math.abs(S),k=Math.floor(x/60),L=x%60;return(S<=0?"+":"-")+E(k,2,"0")+":"+E(L,2,"0")},m:function C(S,x){if(S.date()<x.date())return-C(x,S);var k=12*(x.year()-S.year())+(x.month()-S.month()),L=S.clone().add(k,h),j=x-L<0,z=S.clone().add(k+(j?-1:1),h);return+(-(k+(x-L)/(j?L-z:z-L))||0)},a:function(C){return C<0?Math.ceil(C)||0:Math.floor(C)},p:function(C){return{M:h,y:g,w:d,d:f,D:m,h:u,m:l,s:c,ms:s,Q:p}[C]||String(C||"").toLowerCase().replace(/s$/,"")},u:function(C){return C===void 0}},O="en",D={};D[O]=w;var N="$isDayjsObject",U=function(C){return C instanceof P||!(!C||!C[N])},B=function C(S,x,k){var L;if(!S)return O;if(typeof S=="string"){var j=S.toLowerCase();D[j]&&(L=j),x&&(D[j]=x,L=j);var z=S.split("-");if(!L&&z.length>1)return C(z[0])}else{var Y=S.name;D[Y]=S,L=Y}return!k&&L&&(O=L),L||!k&&O},F=function(C,S){if(U(C))return C.clone();var x=typeof S=="object"?S:{};return x.date=C,x.args=arguments,new P(x)},T=I;T.l=B,T.i=U,T.w=function(C,S){return F(C,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var P=function(){function C(x){this.$L=B(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[N]=!0}var S=C.prototype;return S.parse=function(x){this.$d=function(k){var L=k.date,j=k.utc;if(L===null)return new Date(NaN);if(T.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var z=L.match(y);if(z){var Y=z[2]-1||0,K=(z[7]||"0").substring(0,3);return j?new Date(Date.UTC(z[1],Y,z[3]||1,z[4]||0,z[5]||0,z[6]||0,K)):new Date(z[1],Y,z[3]||1,z[4]||0,z[5]||0,z[6]||0,K)}}return new Date(L)}(x),this.init()},S.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},S.$utils=function(){return T},S.isValid=function(){return this.$d.toString()!==v},S.isSame=function(x,k){var L=F(x);return this.startOf(k)<=L&&L<=this.endOf(k)},S.isAfter=function(x,k){return F(x)<this.startOf(k)},S.isBefore=function(x,k){return this.endOf(k)<F(x)},S.$g=function(x,k,L){return T.u(x)?this[k]:this.set(L,x)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(x,k){var L=this,j=!!T.u(k)||k,z=T.p(x),Y=function(te,ee){var re=T.w(L.$u?Date.UTC(L.$y,ee,te):new Date(L.$y,ee,te),L);return j?re:re.endOf(f)},K=function(te,ee){return T.w(L.toDate()[te].apply(L.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(ee)),L)},Q=this.$W,q=this.$M,J=this.$D,G="set"+(this.$u?"UTC":"");switch(z){case g:return j?Y(1,0):Y(31,11);case h:return j?Y(1,q):Y(0,q+1);case d:var V=this.$locale().weekStart||0,X=(Q<V?Q+7:Q)-V;return Y(j?J-X:J+(6-X),q);case f:case m:return K(G+"Hours",0);case u:return K(G+"Minutes",1);case l:return K(G+"Seconds",2);case c:return K(G+"Milliseconds",3);default:return this.clone()}},S.endOf=function(x){return this.startOf(x,!1)},S.$set=function(x,k){var L,j=T.p(x),z="set"+(this.$u?"UTC":""),Y=(L={},L[f]=z+"Date",L[m]=z+"Date",L[h]=z+"Month",L[g]=z+"FullYear",L[u]=z+"Hours",L[l]=z+"Minutes",L[c]=z+"Seconds",L[s]=z+"Milliseconds",L)[j],K=j===f?this.$D+(k-this.$W):k;if(j===h||j===g){var Q=this.clone().set(m,1);Q.$d[Y](K),Q.init(),this.$d=Q.set(m,Math.min(this.$D,Q.daysInMonth())).$d}else Y&&this.$d[Y](K);return this.init(),this},S.set=function(x,k){return this.clone().$set(x,k)},S.get=function(x){return this[T.p(x)]()},S.add=function(x,k){var L,j=this;x=Number(x);var z=T.p(k),Y=function(q){var J=F(j);return T.w(J.date(J.date()+Math.round(q*x)),j)};if(z===h)return this.set(h,this.$M+x);if(z===g)return this.set(g,this.$y+x);if(z===f)return Y(1);if(z===d)return Y(7);var K=(L={},L[l]=i,L[u]=a,L[c]=1e3,L)[z]||1,Q=this.$d.getTime()+x*K;return T.w(Q,this)},S.subtract=function(x,k){return this.add(-1*x,k)},S.format=function(x){var k=this,L=this.$locale();if(!this.isValid())return L.invalidDate||v;var j=x||"YYYY-MM-DDTHH:mm:ssZ",z=T.z(this),Y=this.$H,K=this.$m,Q=this.$M,q=L.weekdays,J=L.months,G=L.meridiem,V=function(ee,re,se,pe){return ee&&(ee[re]||ee(k,j))||se[re].slice(0,pe)},X=function(ee){return T.s(Y%12||12,ee,"0")},te=G||function(ee,re,se){var pe=ee<12?"AM":"PM";return se?pe.toLowerCase():pe};return j.replace(b,function(ee,re){return re||function(se){switch(se){case"YY":return String(k.$y).slice(-2);case"YYYY":return T.s(k.$y,4,"0");case"M":return Q+1;case"MM":return T.s(Q+1,2,"0");case"MMM":return V(L.monthsShort,Q,J,3);case"MMMM":return V(J,Q);case"D":return k.$D;case"DD":return T.s(k.$D,2,"0");case"d":return String(k.$W);case"dd":return V(L.weekdaysMin,k.$W,q,2);case"ddd":return V(L.weekdaysShort,k.$W,q,3);case"dddd":return q[k.$W];case"H":return String(Y);case"HH":return T.s(Y,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return te(Y,K,!0);case"A":return te(Y,K,!1);case"m":return String(K);case"mm":return T.s(K,2,"0");case"s":return String(k.$s);case"ss":return T.s(k.$s,2,"0");case"SSS":return T.s(k.$ms,3,"0");case"Z":return z}return null}(ee)||z.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(x,k,L){var j,z=this,Y=T.p(k),K=F(x),Q=(K.utcOffset()-this.utcOffset())*i,q=this-K,J=function(){return T.m(z,K)};switch(Y){case g:j=J()/12;break;case h:j=J();break;case p:j=J()/3;break;case d:j=(q-Q)/6048e5;break;case f:j=(q-Q)/864e5;break;case u:j=q/a;break;case l:j=q/i;break;case c:j=q/1e3;break;default:j=q}return L?j:T.a(j)},S.daysInMonth=function(){return this.endOf(h).$D},S.$locale=function(){return D[this.$L]},S.locale=function(x,k){if(!x)return this.$L;var L=this.clone(),j=B(x,k,!0);return j&&(L.$L=j),L},S.clone=function(){return T.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},C}(),_=P.prototype;return F.prototype=_,[["$ms",s],["$s",c],["$m",l],["$H",u],["$W",f],["$M",h],["$y",g],["$D",m]].forEach(function(C){_[C[1]]=function(S){return this.$g(S,C[0],C[1])}}),F.extend=function(C,S){return C.$i||(C(S,P,F),C.$i=!0),F},F.locale=B,F.isDayjs=U,F.unix=function(C){return F(1e3*C)},F.en=D[O],F.Ls=D,F.p={},F})},{}],392:[function(r,n,o){(function(i,a){typeof o=="object"&&n!==void 0?n.exports=a():(i=typeof globalThis<"u"?globalThis:i||self).dayjs_plugin_customParseFormat=a()})(void 0,function(){var i={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,c=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,u={},f=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(b){this[y]=+b}},h=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),E=60*w[1]+(+w[2]||0);return E===0?0:w[0]==="+"?-E:E}(y)}],p=function(y){var b=u[y];return b&&(b.indexOf?b:b.s.concat(b.f))},g=function(y,b){var w,E=u.meridiem;if(E){for(var I=1;I<=24;I+=1)if(y.indexOf(E(I,0,b))>-1){w=I>12;break}}else w=y===(b?"pm":"PM");return w},m={A:[l,function(y){this.afternoon=g(y,!1)}],a:[l,function(y){this.afternoon=g(y,!0)}],S:[/\d/,function(y){this.milliseconds=100*+y}],SS:[s,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[c,d("seconds")],ss:[c,d("seconds")],m:[c,d("minutes")],mm:[c,d("minutes")],H:[c,d("hours")],h:[c,d("hours")],HH:[c,d("hours")],hh:[c,d("hours")],D:[c,d("day")],DD:[s,d("day")],Do:[l,function(y){var b=u.ordinal,w=y.match(/\d+/);if(this.day=w[0],b)for(var E=1;E<=31;E+=1)b(E).replace(/\[|\]/g,"")===y&&(this.day=E)}],M:[c,d("month")],MM:[s,d("month")],MMM:[l,function(y){var b=p("months"),w=(p("monthsShort")||b.map(function(E){return E.slice(0,3)})).indexOf(y)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[l,function(y){var b=p("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[s,function(y){this.year=f(y)}],YYYY:[/\d{4}/,d("year")],Z:h,ZZ:h};function v(y){var b,w;b=y,w=u&&u.formats;for(var E=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,T,P){var _=P&&P.toUpperCase();return T||w[P]||i[P]||w[_].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C,S,x){return S||x.slice(1)})})).match(a),I=E.length,O=0;O<I;O+=1){var D=E[O],N=m[D],U=N&&N[0],B=N&&N[1];E[O]=B?{regex:U,parser:B}:D.replace(/^\[|\]$/g,"")}return function(F){for(var T={},P=0,_=0;P<I;P+=1){var C=E[P];if(typeof C=="string")_+=C.length;else{var S=C.regex,x=C.parser,k=F.slice(_),L=S.exec(k)[0];x.call(T,L),F=F.replace(L,"")}}return function(j){var z=j.afternoon;if(z!==void 0){var Y=j.hours;z?Y<12&&(j.hours+=12):Y===12&&(j.hours=0),delete j.afternoon}}(T),T}}return function(y,b,w){w.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(f=y.parseTwoDigitYear);var E=b.prototype,I=E.parse;E.parse=function(O){var D=O.date,N=O.utc,U=O.args;this.$u=N;var B=U[1];if(typeof B=="string"){var F=U[2]===!0,T=U[3]===!0,P=F||T,_=U[2];T&&(_=U[2]),u=this.$locale(),!F&&_&&(u=w.Ls[_]),this.$d=function(k,L,j){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*k);var z=v(L)(k),Y=z.year,K=z.month,Q=z.day,q=z.hours,J=z.minutes,G=z.seconds,V=z.milliseconds,X=z.zone,te=new Date,ee=Q||(Y||K?1:te.getDate()),re=Y||te.getFullYear(),se=0;Y&&!K||(se=K>0?K-1:te.getMonth());var pe=q||0,ce=J||0,ne=G||0,he=V||0;return X?new Date(Date.UTC(re,se,ee,pe,ce,ne,he+60*X.offset*1e3)):j?new Date(Date.UTC(re,se,ee,pe,ce,ne,he)):new Date(re,se,ee,pe,ce,ne,he)}catch{return new Date("")}}(D,B,N),this.init(),_&&_!==!0&&(this.$L=this.locale(_).$L),P&&D!=this.format(B)&&(this.$d=new Date("")),u={}}else if(B instanceof Array)for(var C=B.length,S=1;S<=C;S+=1){U[1]=B[S-1];var x=w.apply(this,U);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}S===C&&(this.$d=new Date(""))}else I.call(this,O)}}})},{}],393:[function(r,n,o){(function(i,a){typeof o=="object"&&n!==void 0?n.exports=a():(i=typeof globalThis<"u"?globalThis:i||self).dayjs_plugin_utc=a()})(void 0,function(){var i="minute",a=/[+-]\d\d(?::?\d\d)?/g,s=/([+-]|\d\d)/g;return function(c,l,u){var f=l.prototype;u.utc=function(y){var b={date:y,utc:!0,args:arguments};return new l(b)},f.utc=function(y){var b=u(this.toDate(),{locale:this.$L,utc:!0});return y?b.add(this.utcOffset(),i):b},f.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=f.parse;f.parse=function(y){y.utc&&(this.$u=!0),this.$utils().u(y.$offset)||(this.$offset=y.$offset),d.call(this,y)};var h=f.init;f.init=function(){if(this.$u){var y=this.$d;this.$y=y.getUTCFullYear(),this.$M=y.getUTCMonth(),this.$D=y.getUTCDate(),this.$W=y.getUTCDay(),this.$H=y.getUTCHours(),this.$m=y.getUTCMinutes(),this.$s=y.getUTCSeconds(),this.$ms=y.getUTCMilliseconds()}else h.call(this)};var p=f.utcOffset;f.utcOffset=function(y,b){var w=this.$utils().u;if(w(y))return this.$u?0:w(this.$offset)?p.call(this):this.$offset;if(typeof y=="string"&&(y=function(D){D===void 0&&(D="");var N=D.match(a);if(!N)return null;var U=(""+N[0]).match(s)||["-",0,0],B=U[0],F=60*+U[1]+ +U[2];return F===0?0:B==="+"?F:-F}(y))===null)return this;var E=Math.abs(y)<=16?60*y:y,I=this;if(b)return I.$offset=E,I.$u=y===0,I;if(y!==0){var O=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(I=this.local().add(E+O,i)).$offset=E,I.$x.$localOffset=O}else I=this.utc();return I};var g=f.format;f.format=function(y){var b=y||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,b)},f.valueOf=function(){var y=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*y},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var m=f.toDate;f.toDate=function(y){return y==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():m.call(this)};var v=f.diff;f.diff=function(y,b,w){if(y&&this.$u===y.$u)return v.call(this,y,b,w);var E=this.local(),I=u(y).local();return v.call(E,I,b,w)}}})},{}],394:[function(r,n,o){o.utils=r("./des/utils"),o.Cipher=r("./des/cipher"),o.DES=r("./des/des"),o.CBC=r("./des/cbc"),o.EDE=r("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(r,n,o){var i=r("minimalistic-assert"),a=r("inherits"),s={};function c(l){i.equal(l.length,8,"Invalid IV length"),this.iv=new Array(8);for(var u=0;u<this.iv.length;u++)this.iv[u]=l[u]}o.instantiate=function(l){function u(p){l.call(this,p),this._cbcInit()}a(u,l);for(var f=Object.keys(s),d=0;d<f.length;d++){var h=f[d];u.prototype[h]=s[h]}return u.create=function(p){return new u(p)},u},s._cbcInit=function(){var l=new c(this.options.iv);this._cbcState=l},s._update=function(l,u,f,d){var h=this._cbcState,p=this.constructor.super_.prototype,g=h.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)g[m]^=l[u+m];for(p._update.call(this,g,0,f,d),m=0;m<this.blockSize;m++)g[m]=f[d+m]}else{for(p._update.call(this,l,u,f,d),m=0;m<this.blockSize;m++)f[d+m]^=g[m];for(m=0;m<this.blockSize;m++)g[m]=l[u+m]}}},{inherits:440,"minimalistic-assert":453}],396:[function(r,n,o){var i=r("minimalistic-assert");function a(s){this.options=s,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=s.padding!==!1}n.exports=a,a.prototype._init=function(){},a.prototype.update=function(s){return s.length===0?[]:this.type==="decrypt"?this._updateDecrypt(s):this._updateEncrypt(s)},a.prototype._buffer=function(s,c){for(var l=Math.min(this.buffer.length-this.bufferOff,s.length-c),u=0;u<l;u++)this.buffer[this.bufferOff+u]=s[c+u];return this.bufferOff+=l,l},a.prototype._flushBuffer=function(s,c){return this._update(this.buffer,0,s,c),this.bufferOff=0,this.blockSize},a.prototype._updateEncrypt=function(s){var c=0,l=0,u=(this.bufferOff+s.length)/this.blockSize|0,f=new Array(u*this.blockSize);this.bufferOff!==0&&(c+=this._buffer(s,c),this.bufferOff===this.buffer.length&&(l+=this._flushBuffer(f,l)));for(var d=s.length-(s.length-c)%this.blockSize;c<d;c+=this.blockSize)this._update(s,c,f,l),l+=this.blockSize;for(;c<s.length;c++,this.bufferOff++)this.buffer[this.bufferOff]=s[c];return f},a.prototype._updateDecrypt=function(s){for(var c=0,l=0,u=Math.ceil((this.bufferOff+s.length)/this.blockSize)-1,f=new Array(u*this.blockSize);u>0;u--)c+=this._buffer(s,c),l+=this._flushBuffer(f,l);return c+=this._buffer(s,c),f},a.prototype.final=function(s){var c,l;return s&&(c=this.update(s)),l=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),c?c.concat(l):l},a.prototype._pad=function(s,c){if(c===0)return!1;for(;c<s.length;)s[c++]=0;return!0},a.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var s=new Array(this.blockSize);return this._update(this.buffer,0,s,0),s},a.prototype._unpad=function(s){return s},a.prototype._finalDecrypt=function(){i.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var s=new Array(this.blockSize);return this._flushBuffer(s,0),this._unpad(s)}},{"minimalistic-assert":453}],397:[function(r,n,o){var i=r("minimalistic-assert"),a=r("inherits"),s=r("./utils"),c=r("./cipher");function l(){this.tmp=new Array(2),this.keys=null}function u(d){c.call(this,d);var h=new l;this._desState=h,this.deriveKeys(h,d.key)}a(u,c),n.exports=u,u.create=function(d){return new u(d)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(d,h){d.keys=new Array(32),i.equal(h.length,this.blockSize,"Invalid key length");var p=s.readUInt32BE(h,0),g=s.readUInt32BE(h,4);s.pc1(p,g,d.tmp,0),p=d.tmp[0],g=d.tmp[1];for(var m=0;m<d.keys.length;m+=2){var v=f[m>>>1];p=s.r28shl(p,v),g=s.r28shl(g,v),s.pc2(p,g,d.keys,m)}},u.prototype._update=function(d,h,p,g){var m=this._desState,v=s.readUInt32BE(d,h),y=s.readUInt32BE(d,h+4);s.ip(v,y,m.tmp,0),v=m.tmp[0],y=m.tmp[1],this.type==="encrypt"?this._encrypt(m,v,y,m.tmp,0):this._decrypt(m,v,y,m.tmp,0),v=m.tmp[0],y=m.tmp[1],s.writeUInt32BE(p,v,g),s.writeUInt32BE(p,y,g+4)},u.prototype._pad=function(d,h){if(this.padding===!1)return!1;for(var p=d.length-h,g=h;g<d.length;g++)d[g]=p;return!0},u.prototype._unpad=function(d){if(this.padding===!1)return d;for(var h=d[d.length-1],p=d.length-h;p<d.length;p++)i.equal(d[p],h);return d.slice(0,d.length-h)},u.prototype._encrypt=function(d,h,p,g,m){for(var v=h,y=p,b=0;b<d.keys.length;b+=2){var w=d.keys[b],E=d.keys[b+1];s.expand(y,d.tmp,0),w^=d.tmp[0],E^=d.tmp[1];var I=s.substitute(w,E),O=y;y=(v^s.permute(I))>>>0,v=O}s.rip(y,v,g,m)},u.prototype._decrypt=function(d,h,p,g,m){for(var v=p,y=h,b=d.keys.length-2;b>=0;b-=2){var w=d.keys[b],E=d.keys[b+1];s.expand(v,d.tmp,0),w^=d.tmp[0],E^=d.tmp[1];var I=s.substitute(w,E),O=v;v=(y^s.permute(I))>>>0,y=O}s.rip(v,y,g,m)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(r,n,o){var i=r("minimalistic-assert"),a=r("inherits"),s=r("./cipher"),c=r("./des");function l(f,d){i.equal(d.length,24,"Invalid key length");var h=d.slice(0,8),p=d.slice(8,16),g=d.slice(16,24);this.ciphers=f==="encrypt"?[c.create({type:"encrypt",key:h}),c.create({type:"decrypt",key:p}),c.create({type:"encrypt",key:g})]:[c.create({type:"decrypt",key:g}),c.create({type:"encrypt",key:p}),c.create({type:"decrypt",key:h})]}function u(f){s.call(this,f);var d=new l(this.type,this.options.key);this._edeState=d}a(u,s),n.exports=u,u.create=function(f){return new u(f)},u.prototype._update=function(f,d,h,p){var g=this._edeState;g.ciphers[0]._update(f,d,h,p),g.ciphers[1]._update(h,p,h,p),g.ciphers[2]._update(h,p,h,p)},u.prototype._pad=c.prototype._pad,u.prototype._unpad=c.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(r,n,o){o.readUInt32BE=function(c,l){return(c[0+l]<<24|c[1+l]<<16|c[2+l]<<8|c[3+l])>>>0},o.writeUInt32BE=function(c,l,u){c[0+u]=l>>>24,c[1+u]=l>>>16&255,c[2+u]=l>>>8&255,c[3+u]=255&l},o.ip=function(c,l,u,f){for(var d=0,h=0,p=6;p>=0;p-=2){for(var g=0;g<=24;g+=8)d<<=1,d|=l>>>g+p&1;for(g=0;g<=24;g+=8)d<<=1,d|=c>>>g+p&1}for(p=6;p>=0;p-=2){for(g=1;g<=25;g+=8)h<<=1,h|=l>>>g+p&1;for(g=1;g<=25;g+=8)h<<=1,h|=c>>>g+p&1}u[f+0]=d>>>0,u[f+1]=h>>>0},o.rip=function(c,l,u,f){for(var d=0,h=0,p=0;p<4;p++)for(var g=24;g>=0;g-=8)d<<=1,d|=l>>>g+p&1,d<<=1,d|=c>>>g+p&1;for(p=4;p<8;p++)for(g=24;g>=0;g-=8)h<<=1,h|=l>>>g+p&1,h<<=1,h|=c>>>g+p&1;u[f+0]=d>>>0,u[f+1]=h>>>0},o.pc1=function(c,l,u,f){for(var d=0,h=0,p=7;p>=5;p--){for(var g=0;g<=24;g+=8)d<<=1,d|=l>>g+p&1;for(g=0;g<=24;g+=8)d<<=1,d|=c>>g+p&1}for(g=0;g<=24;g+=8)d<<=1,d|=l>>g+p&1;for(p=1;p<=3;p++){for(g=0;g<=24;g+=8)h<<=1,h|=l>>g+p&1;for(g=0;g<=24;g+=8)h<<=1,h|=c>>g+p&1}for(g=0;g<=24;g+=8)h<<=1,h|=c>>g+p&1;u[f+0]=d>>>0,u[f+1]=h>>>0},o.r28shl=function(c,l){return c<<l&268435455|c>>>28-l};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];o.pc2=function(c,l,u,f){for(var d=0,h=0,p=i.length>>>1,g=0;g<p;g++)d<<=1,d|=c>>>i[g]&1;for(g=p;g<i.length;g++)h<<=1,h|=l>>>i[g]&1;u[f+0]=d>>>0,u[f+1]=h>>>0},o.expand=function(c,l,u){var f=0,d=0;f=(1&c)<<5|c>>>27;for(var h=23;h>=15;h-=4)f<<=6,f|=c>>>h&63;for(h=11;h>=3;h-=4)d|=c>>>h&63,d<<=6;d|=(31&c)<<1|c>>>31,l[u+0]=f>>>0,l[u+1]=d>>>0};var a=[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];o.substitute=function(c,l){for(var u=0,f=0;f<4;f++)u<<=4,u|=a[64*f+(c>>>18-6*f&63)];for(f=0;f<4;f++)u<<=4,u|=a[256+64*f+(l>>>18-6*f&63)];return u>>>0};var s=[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];o.permute=function(c){for(var l=0,u=0;u<s.length;u++)l<<=1,l|=c>>>s[u]&1;return l>>>0},o.padSplit=function(c,l,u){for(var f=c.toString(2);f.length<l;)f="0"+f;for(var d=[],h=0;h<l;h+=u)d.push(f.slice(h,h+u));return d.join(" ")}},{}],400:[function(r,n,o){(function(i){(function(){var a=r("./lib/generatePrime"),s=r("./lib/primes.json"),c=r("./lib/dh"),l={binary:!0,hex:!0,base64:!0};o.DiffieHellmanGroup=o.createDiffieHellmanGroup=o.getDiffieHellman=function(u){var f=new i(s[u].prime,"hex"),d=new i(s[u].gen,"hex");return new c(f,d)},o.createDiffieHellman=o.DiffieHellman=function u(f,d,h,p){return i.isBuffer(d)||l[d]===void 0?u(f,"binary",d,h):(d=d||"binary",p=p||"binary",h=h||new i([2]),i.isBuffer(h)||(h=new i(h,p)),typeof f=="number"?new c(a(f,h),h,!0):(i.isBuffer(f)||(f=new i(f,d)),new c(f,h,!0)))}}).call(this)}).call(this,r("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(r,n,o){(function(i){(function(){var a=r("bn.js"),s=new(r("miller-rabin")),c=new a(24),l=new a(11),u=new a(10),f=new a(3),d=new a(7),h=r("./generatePrime"),p=r("randombytes");function g(w,E){return E=E||"utf8",i.isBuffer(w)||(w=new i(w,E)),this._pub=new a(w),this}function m(w,E){return E=E||"utf8",i.isBuffer(w)||(w=new i(w,E)),this._priv=new a(w),this}n.exports=y;var v={};function y(w,E,I){this.setGenerator(E),this.__prime=new a(w),this._prime=a.mont(this.__prime),this._primeLen=w.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,I?(this.setPublicKey=g,this.setPrivateKey=m):this._primeCode=8}function b(w,E){var I=new i(w.toArray());return E?I.toString(E):I}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=function(w,E){var I=E.toString("hex"),O=[I,w.toString(16)].join("_");if(O in v)return v[O];var D,N=0;if(w.isEven()||!h.simpleSieve||!h.fermatTest(w)||!s.test(w))return N+=1,N+=I==="02"||I==="05"?8:4,v[O]=N,N;switch(s.test(w.shrn(1))||(N+=2),I){case"02":w.mod(c).cmp(l)&&(N+=8);break;case"05":(D=w.mod(u)).cmp(f)&&D.cmp(d)&&(N+=8);break;default:N+=4}return v[O]=N,N}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new a(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(w){var E=(w=(w=new a(w)).toRed(this._prime)).redPow(this._priv).fromRed(),I=new i(E.toArray()),O=this.getPrime();if(I.length<O.length){var D=new i(O.length-I.length);D.fill(0),I=i.concat([D,I])}return I},y.prototype.getPublicKey=function(w){return b(this._pub,w)},y.prototype.getPrivateKey=function(w){return b(this._priv,w)},y.prototype.getPrime=function(w){return b(this.__prime,w)},y.prototype.getGenerator=function(w){return b(this._gen,w)},y.prototype.setGenerator=function(w,E){return E=E||"utf8",i.isBuffer(w)||(w=new i(w,E)),this.__gen=w,this._gen=new a(w),this}}).call(this)}).call(this,r("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(r,n,o){var i=r("randombytes");n.exports=w,w.simpleSieve=y,w.fermatTest=b;var a=r("bn.js"),s=new a(24),c=new(r("miller-rabin")),l=new a(1),u=new a(2),f=new a(5),d=(new a(16),new a(8),new a(10)),h=new a(3),p=(new a(7),new a(11)),g=new a(4),m=(new a(12),null);function v(){if(m!==null)return m;var E=[];E[0]=2;for(var I=1,O=3;O<1048576;O+=2){for(var D=Math.ceil(Math.sqrt(O)),N=0;N<I&&E[N]<=D&&O%E[N]!=0;N++);I!==N&&E[N]<=D||(E[I++]=O)}return m=E,E}function y(E){for(var I=v(),O=0;O<I.length;O++)if(E.modn(I[O])===0)return E.cmpn(I[O])===0;return!0}function b(E){var I=a.mont(E);return u.toRed(I).redPow(E.subn(1)).fromRed().cmpn(1)===0}function w(E,I){if(E<16)return new a(I===2||I===5?[140,123]:[140,39]);var O,D;for(I=new a(I);;){for(O=new a(i(Math.ceil(E/8)));O.bitLength()>E;)O.ishrn(1);if(O.isEven()&&O.iadd(l),O.testn(1)||O.iadd(u),I.cmp(u)){if(!I.cmp(f))for(;O.mod(d).cmp(h);)O.iadd(g)}else for(;O.mod(s).cmp(p);)O.iadd(g);if(y(D=O.shrn(1))&&y(O)&&b(D)&&b(O)&&c.test(D)&&c.test(O))return O}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(r,n,o){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(r,n,o){arguments[4][184][0].apply(o,arguments)},{buffer:188,dup:184}],405:[function(r,n,o){var i=o;i.version=r("../package.json").version,i.utils=r("./elliptic/utils"),i.rand=r("brorand"),i.curve=r("./elliptic/curve"),i.curves=r("./elliptic/curves"),i.ec=r("./elliptic/ec"),i.eddsa=r("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(r,n,o){var i=r("bn.js"),a=r("../utils"),s=a.getNAF,c=a.getJSF,l=a.assert;function u(d,h){this.type=d,this.p=new i(h.p,16),this.red=h.prime?i.red(h.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=h.n&&new i(h.n,16),this.g=h.g&&this.pointFromJSON(h.g,h.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var 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 f(d,h){this.curve=d,this.type=h,this.precomputed=null}n.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(d,h){l(d.precomputed);var p=d._getDoubles(),g=s(h,1,this._bitLength),m=(1<<p.step+1)-(p.step%2==0?2:1);m/=3;var v,y,b=[];for(v=0;v<g.length;v+=p.step){y=0;for(var w=v+p.step-1;w>=v;w--)y=(y<<1)+g[w];b.push(y)}for(var E=this.jpoint(null,null,null),I=this.jpoint(null,null,null),O=m;O>0;O--){for(v=0;v<b.length;v++)(y=b[v])===O?I=I.mixedAdd(p.points[v]):y===-O&&(I=I.mixedAdd(p.points[v].neg()));E=E.add(I)}return E.toP()},u.prototype._wnafMul=function(d,h){var p=4,g=d._getNAFPoints(p);p=g.wnd;for(var m=g.points,v=s(h,p,this._bitLength),y=this.jpoint(null,null,null),b=v.length-1;b>=0;b--){for(var w=0;b>=0&&v[b]===0;b--)w++;if(b>=0&&w++,y=y.dblp(w),b<0)break;var E=v[b];l(E!==0),y=d.type==="affine"?E>0?y.mixedAdd(m[E-1>>1]):y.mixedAdd(m[-E-1>>1].neg()):E>0?y.add(m[E-1>>1]):y.add(m[-E-1>>1].neg())}return d.type==="affine"?y.toP():y},u.prototype._wnafMulAdd=function(d,h,p,g,m){var v,y,b,w=this._wnafT1,E=this._wnafT2,I=this._wnafT3,O=0;for(v=0;v<g;v++){var D=(b=h[v])._getNAFPoints(d);w[v]=D.wnd,E[v]=D.points}for(v=g-1;v>=1;v-=2){var N=v-1,U=v;if(w[N]===1&&w[U]===1){var B=[h[N],null,null,h[U]];h[N].y.cmp(h[U].y)===0?(B[1]=h[N].add(h[U]),B[2]=h[N].toJ().mixedAdd(h[U].neg())):h[N].y.cmp(h[U].y.redNeg())===0?(B[1]=h[N].toJ().mixedAdd(h[U]),B[2]=h[N].add(h[U].neg())):(B[1]=h[N].toJ().mixedAdd(h[U]),B[2]=h[N].toJ().mixedAdd(h[U].neg()));var F=[-3,-1,-5,-7,0,7,5,1,3],T=c(p[N],p[U]);for(O=Math.max(T[0].length,O),I[N]=new Array(O),I[U]=new Array(O),y=0;y<O;y++){var P=0|T[0][y],_=0|T[1][y];I[N][y]=F[3*(P+1)+(_+1)],I[U][y]=0,E[N]=B}}else I[N]=s(p[N],w[N],this._bitLength),I[U]=s(p[U],w[U],this._bitLength),O=Math.max(I[N].length,O),O=Math.max(I[U].length,O)}var C=this.jpoint(null,null,null),S=this._wnafT4;for(v=O;v>=0;v--){for(var x=0;v>=0;){var k=!0;for(y=0;y<g;y++)S[y]=0|I[y][v],S[y]!==0&&(k=!1);if(!k)break;x++,v--}if(v>=0&&x++,C=C.dblp(x),v<0)break;for(y=0;y<g;y++){var L=S[y];L!==0&&(L>0?b=E[y][L-1>>1]:L<0&&(b=E[y][-L-1>>1].neg()),C=b.type==="affine"?C.mixedAdd(b):C.add(b))}}for(v=0;v<g;v++)E[v]=null;return m?C:C.toP()},u.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(d,h){d=a.toArray(d,h);var p=this.p.byteLength();if((d[0]===4||d[0]===6||d[0]===7)&&d.length-1==2*p)return d[0]===6?l(d[d.length-1]%2==0):d[0]===7&&l(d[d.length-1]%2==1),this.point(d.slice(1,1+p),d.slice(1+p,1+2*p));if((d[0]===2||d[0]===3)&&d.length-1===p)return this.pointFromX(d.slice(1,1+p),d[0]===3);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(d){return this.encode(d,!0)},f.prototype._encode=function(d){var h=this.curve.p.byteLength(),p=this.getX().toArray("be",h);return d?[this.getY().isEven()?2:3].concat(p):[4].concat(p,this.getY().toArray("be",h))},f.prototype.encode=function(d,h){return a.encode(this._encode(h),d)},f.prototype.precompute=function(d){if(this.precomputed)return this;var h={doubles:null,naf:null,beta:null};return h.naf=this._getNAFPoints(8),h.doubles=this._getDoubles(4,d),h.beta=this._getBeta(),this.precomputed=h,this},f.prototype._hasDoubles=function(d){if(!this.precomputed)return!1;var h=this.precomputed.doubles;return!!h&&h.points.length>=Math.ceil((d.bitLength()+1)/h.step)},f.prototype._getDoubles=function(d,h){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var p=[this],g=this,m=0;m<h;m+=d){for(var v=0;v<d;v++)g=g.dbl();p.push(g)}return{step:d,points:p}},f.prototype._getNAFPoints=function(d){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var h=[this],p=(1<<d)-1,g=p===1?null:this.dbl(),m=1;m<p;m++)h[m]=h[m-1].add(g);return{wnd:d,points:h}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(d){for(var h=this,p=0;p<d;p++)h=h.dbl();return h}},{"../utils":419,"bn.js":420}],407:[function(r,n,o){var i=r("../utils"),a=r("bn.js"),s=r("inherits"),c=r("./base"),l=i.assert;function u(d){this.twisted=(0|d.a)!=1,this.mOneA=this.twisted&&(0|d.a)==-1,this.extended=this.mOneA,c.call(this,"edwards",d),this.a=new a(d.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new a(d.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new a(d.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),l(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|d.c)==1}function f(d,h,p,g,m){c.BasePoint.call(this,d,"projective"),h===null&&p===null&&g===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 a(h,16),this.y=new a(p,16),this.z=g?new a(g,16):this.curve.one,this.t=m&&new a(m,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()))))}s(u,c),n.exports=u,u.prototype._mulA=function(d){return this.mOneA?d.redNeg():this.a.redMul(d)},u.prototype._mulC=function(d){return this.oneC?d:this.c.redMul(d)},u.prototype.jpoint=function(d,h,p,g){return this.point(d,h,p,g)},u.prototype.pointFromX=function(d,h){(d=new a(d,16)).red||(d=d.toRed(this.red));var p=d.redSqr(),g=this.c2.redSub(this.a.redMul(p)),m=this.one.redSub(this.c2.redMul(this.d).redMul(p)),v=g.redMul(m.redInvm()),y=v.redSqrt();if(y.redSqr().redSub(v).cmp(this.zero)!==0)throw new Error("invalid point");var b=y.fromRed().isOdd();return(h&&!b||!h&&b)&&(y=y.redNeg()),this.point(d,y)},u.prototype.pointFromY=function(d,h){(d=new a(d,16)).red||(d=d.toRed(this.red));var p=d.redSqr(),g=p.redSub(this.c2),m=p.redMul(this.d).redMul(this.c2).redSub(this.a),v=g.redMul(m.redInvm());if(v.cmp(this.zero)===0){if(h)throw new Error("invalid point");return this.point(this.zero,d)}var y=v.redSqrt();if(y.redSqr().redSub(v).cmp(this.zero)!==0)throw new Error("invalid point");return y.fromRed().isOdd()!==h&&(y=y.redNeg()),this.point(y,d)},u.prototype.validate=function(d){if(d.isInfinity())return!0;d.normalize();var h=d.x.redSqr(),p=d.y.redSqr(),g=h.redMul(this.a).redAdd(p),m=this.c2.redMul(this.one.redAdd(this.d.redMul(h).redMul(p)));return g.cmp(m)===0},s(f,c.BasePoint),u.prototype.pointFromJSON=function(d){return f.fromJSON(this,d)},u.prototype.point=function(d,h,p,g){return new f(this,d,h,p,g)},f.fromJSON=function(d,h){return new f(d,h[0],h[1],h[2])},f.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)+">"},f.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},f.prototype._extDbl=function(){var d=this.x.redSqr(),h=this.y.redSqr(),p=this.z.redSqr();p=p.redIAdd(p);var g=this.curve._mulA(d),m=this.x.redAdd(this.y).redSqr().redISub(d).redISub(h),v=g.redAdd(h),y=v.redSub(p),b=g.redSub(h),w=m.redMul(y),E=v.redMul(b),I=m.redMul(b),O=y.redMul(v);return this.curve.point(w,E,O,I)},f.prototype._projDbl=function(){var d,h,p,g,m,v,y=this.x.redAdd(this.y).redSqr(),b=this.x.redSqr(),w=this.y.redSqr();if(this.curve.twisted){var E=(g=this.curve._mulA(b)).redAdd(w);this.zOne?(d=y.redSub(b).redSub(w).redMul(E.redSub(this.curve.two)),h=E.redMul(g.redSub(w)),p=E.redSqr().redSub(E).redSub(E)):(m=this.z.redSqr(),v=E.redSub(m).redISub(m),d=y.redSub(b).redISub(w).redMul(v),h=E.redMul(g.redSub(w)),p=E.redMul(v))}else g=b.redAdd(w),m=this.curve._mulC(this.z).redSqr(),v=g.redSub(m).redSub(m),d=this.curve._mulC(y.redISub(g)).redMul(v),h=this.curve._mulC(g).redMul(b.redISub(w)),p=g.redMul(v);return this.curve.point(d,h,p)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(d){var h=this.y.redSub(this.x).redMul(d.y.redSub(d.x)),p=this.y.redAdd(this.x).redMul(d.y.redAdd(d.x)),g=this.t.redMul(this.curve.dd).redMul(d.t),m=this.z.redMul(d.z.redAdd(d.z)),v=p.redSub(h),y=m.redSub(g),b=m.redAdd(g),w=p.redAdd(h),E=v.redMul(y),I=b.redMul(w),O=v.redMul(w),D=y.redMul(b);return this.curve.point(E,I,D,O)},f.prototype._projAdd=function(d){var h,p,g=this.z.redMul(d.z),m=g.redSqr(),v=this.x.redMul(d.x),y=this.y.redMul(d.y),b=this.curve.d.redMul(v).redMul(y),w=m.redSub(b),E=m.redAdd(b),I=this.x.redAdd(this.y).redMul(d.x.redAdd(d.y)).redISub(v).redISub(y),O=g.redMul(w).redMul(I);return this.curve.twisted?(h=g.redMul(E).redMul(y.redSub(this.curve._mulA(v))),p=w.redMul(E)):(h=g.redMul(E).redMul(y.redSub(v)),p=this.curve._mulC(w).redMul(E)),this.curve.point(O,h,p)},f.prototype.add=function(d){return this.isInfinity()?d:d.isInfinity()?this:this.curve.extended?this._extAdd(d):this._projAdd(d)},f.prototype.mul=function(d){return this._hasDoubles(d)?this.curve._fixedNafMul(this,d):this.curve._wnafMul(this,d)},f.prototype.mulAdd=function(d,h,p){return this.curve._wnafMulAdd(1,[this,h],[d,p],2,!1)},f.prototype.jmulAdd=function(d,h,p){return this.curve._wnafMulAdd(1,[this,h],[d,p],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var d=this.z.redInvm();return this.x=this.x.redMul(d),this.y=this.y.redMul(d),this.t&&(this.t=this.t.redMul(d)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(d){return this===d||this.getX().cmp(d.getX())===0&&this.getY().cmp(d.getY())===0},f.prototype.eqXToP=function(d){var h=d.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(h)===0)return!0;for(var p=d.clone(),g=this.curve.redN.redMul(this.z);;){if(p.iadd(this.curve.n),p.cmp(this.curve.p)>=0)return!1;if(h.redIAdd(g),this.x.cmp(h)===0)return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(r,n,o){var i=o;i.base=r("./base"),i.short=r("./short"),i.mont=r("./mont"),i.edwards=r("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(r,n,o){var i=r("bn.js"),a=r("inherits"),s=r("./base"),c=r("../utils");function l(f){s.call(this,"mont",f),this.a=new i(f.a,16).toRed(this.red),this.b=new i(f.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(f,d,h){s.BasePoint.call(this,f,"projective"),d===null&&h===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(d,16),this.z=new i(h,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}a(l,s),n.exports=l,l.prototype.validate=function(f){var d=f.normalize().x,h=d.redSqr(),p=h.redMul(d).redAdd(h.redMul(this.a)).redAdd(d);return p.redSqrt().redSqr().cmp(p)===0},a(u,s.BasePoint),l.prototype.decodePoint=function(f,d){return this.point(c.toArray(f,d),1)},l.prototype.point=function(f,d){return new u(this,f,d)},l.prototype.pointFromJSON=function(f){return u.fromJSON(this,f)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(f,d){return new u(f,d[0],d[1]||f.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return this.z.cmpn(0)===0},u.prototype.dbl=function(){var f=this.x.redAdd(this.z).redSqr(),d=this.x.redSub(this.z).redSqr(),h=f.redSub(d),p=f.redMul(d),g=h.redMul(d.redAdd(this.curve.a24.redMul(h)));return this.curve.point(p,g)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(f,d){var h=this.x.redAdd(this.z),p=this.x.redSub(this.z),g=f.x.redAdd(f.z),m=f.x.redSub(f.z).redMul(h),v=g.redMul(p),y=d.z.redMul(m.redAdd(v).redSqr()),b=d.x.redMul(m.redISub(v).redSqr());return this.curve.point(y,b)},u.prototype.mul=function(f){for(var d=f.clone(),h=this,p=this.curve.point(null,null),g=[];d.cmpn(0)!==0;d.iushrn(1))g.push(d.andln(1));for(var m=g.length-1;m>=0;m--)g[m]===0?(h=h.diffAdd(p,this),p=p.dbl()):(p=h.diffAdd(p,this),h=h.dbl());return p},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(f){return this.getX().cmp(f.getX())===0},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(r,n,o){var i=r("../utils"),a=r("bn.js"),s=r("inherits"),c=r("./base"),l=i.assert;function u(h){c.call(this,"short",h),this.a=new a(h.a,16).toRed(this.red),this.b=new a(h.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(h),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(h,p,g,m){c.BasePoint.call(this,h,"affine"),p===null&&g===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new a(p,16),this.y=new a(g,16),m&&(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 d(h,p,g,m){c.BasePoint.call(this,h,"jacobian"),p===null&&g===null&&m===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new a(0)):(this.x=new a(p,16),this.y=new a(g,16),this.z=new a(m,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}s(u,c),n.exports=u,u.prototype._getEndomorphism=function(h){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var p,g;if(h.beta)p=new a(h.beta,16).toRed(this.red);else{var m=this._getEndoRoots(this.p);p=(p=m[0].cmp(m[1])<0?m[0]:m[1]).toRed(this.red)}if(h.lambda)g=new a(h.lambda,16);else{var v=this._getEndoRoots(this.n);this.g.mul(v[0]).x.cmp(this.g.x.redMul(p))===0?g=v[0]:(g=v[1],l(this.g.mul(g).x.cmp(this.g.x.redMul(p))===0))}return{beta:p,lambda:g,basis:h.basis?h.basis.map(function(y){return{a:new a(y.a,16),b:new a(y.b,16)}}):this._getEndoBasis(g)}}},u.prototype._getEndoRoots=function(h){var p=h===this.p?this.red:a.mont(h),g=new a(2).toRed(p).redInvm(),m=g.redNeg(),v=new a(3).toRed(p).redNeg().redSqrt().redMul(g);return[m.redAdd(v).fromRed(),m.redSub(v).fromRed()]},u.prototype._getEndoBasis=function(h){for(var p,g,m,v,y,b,w,E,I,O=this.n.ushrn(Math.floor(this.n.bitLength()/2)),D=h,N=this.n.clone(),U=new a(1),B=new a(0),F=new a(0),T=new a(1),P=0;D.cmpn(0)!==0;){var _=N.div(D);E=N.sub(_.mul(D)),I=F.sub(_.mul(U));var C=T.sub(_.mul(B));if(!m&&E.cmp(O)<0)p=w.neg(),g=U,m=E.neg(),v=I;else if(m&&++P==2)break;w=E,N=D,D=E,F=U,U=I,T=B,B=C}y=E.neg(),b=I;var S=m.sqr().add(v.sqr());return y.sqr().add(b.sqr()).cmp(S)>=0&&(y=p,b=g),m.negative&&(m=m.neg(),v=v.neg()),y.negative&&(y=y.neg(),b=b.neg()),[{a:m,b:v},{a:y,b}]},u.prototype._endoSplit=function(h){var p=this.endo.basis,g=p[0],m=p[1],v=m.b.mul(h).divRound(this.n),y=g.b.neg().mul(h).divRound(this.n),b=v.mul(g.a),w=y.mul(m.a),E=v.mul(g.b),I=y.mul(m.b);return{k1:h.sub(b).sub(w),k2:E.add(I).neg()}},u.prototype.pointFromX=function(h,p){(h=new a(h,16)).red||(h=h.toRed(this.red));var g=h.redSqr().redMul(h).redIAdd(h.redMul(this.a)).redIAdd(this.b),m=g.redSqrt();if(m.redSqr().redSub(g).cmp(this.zero)!==0)throw new Error("invalid point");var v=m.fromRed().isOdd();return(p&&!v||!p&&v)&&(m=m.redNeg()),this.point(h,m)},u.prototype.validate=function(h){if(h.inf)return!0;var p=h.x,g=h.y,m=this.a.redMul(p),v=p.redSqr().redMul(p).redIAdd(m).redIAdd(this.b);return g.redSqr().redISub(v).cmpn(0)===0},u.prototype._endoWnafMulAdd=function(h,p,g){for(var m=this._endoWnafT1,v=this._endoWnafT2,y=0;y<h.length;y++){var b=this._endoSplit(p[y]),w=h[y],E=w._getBeta();b.k1.negative&&(b.k1.ineg(),w=w.neg(!0)),b.k2.negative&&(b.k2.ineg(),E=E.neg(!0)),m[2*y]=w,m[2*y+1]=E,v[2*y]=b.k1,v[2*y+1]=b.k2}for(var I=this._wnafMulAdd(1,m,v,2*y,g),O=0;O<2*y;O++)m[O]=null,v[O]=null;return I},s(f,c.BasePoint),u.prototype.point=function(h,p,g){return new f(this,h,p,g)},u.prototype.pointFromJSON=function(h,p){return f.fromJSON(this,h,p)},f.prototype._getBeta=function(){if(this.curve.endo){var h=this.precomputed;if(h&&h.beta)return h.beta;var p=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(h){var g=this.curve,m=function(v){return g.point(v.x.redMul(g.endo.beta),v.y)};h.beta=p,p.precomputed={beta:null,naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(m)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(m)}}}return p}},f.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]},f.fromJSON=function(h,p,g){typeof p=="string"&&(p=JSON.parse(p));var m=h.point(p[0],p[1],g);if(!p[2])return m;function v(b){return h.point(b[0],b[1],g)}var y=p[2];return m.precomputed={beta:null,doubles:y.doubles&&{step:y.doubles.step,points:[m].concat(y.doubles.points.map(v))},naf:y.naf&&{wnd:y.naf.wnd,points:[m].concat(y.naf.points.map(v))}},m},f.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)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(h){if(this.inf)return h;if(h.inf)return this;if(this.eq(h))return this.dbl();if(this.neg().eq(h))return this.curve.point(null,null);if(this.x.cmp(h.x)===0)return this.curve.point(null,null);var p=this.y.redSub(h.y);p.cmpn(0)!==0&&(p=p.redMul(this.x.redSub(h.x).redInvm()));var g=p.redSqr().redISub(this.x).redISub(h.x),m=p.redMul(this.x.redSub(g)).redISub(this.y);return this.curve.point(g,m)},f.prototype.dbl=function(){if(this.inf)return this;var h=this.y.redAdd(this.y);if(h.cmpn(0)===0)return this.curve.point(null,null);var p=this.curve.a,g=this.x.redSqr(),m=h.redInvm(),v=g.redAdd(g).redIAdd(g).redIAdd(p).redMul(m),y=v.redSqr().redISub(this.x.redAdd(this.x)),b=v.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,b)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(h){return h=new a(h,16),this.isInfinity()?this:this._hasDoubles(h)?this.curve._fixedNafMul(this,h):this.curve.endo?this.curve._endoWnafMulAdd([this],[h]):this.curve._wnafMul(this,h)},f.prototype.mulAdd=function(h,p,g){var m=[this,p],v=[h,g];return this.curve.endo?this.curve._endoWnafMulAdd(m,v):this.curve._wnafMulAdd(1,m,v,2)},f.prototype.jmulAdd=function(h,p,g){var m=[this,p],v=[h,g];return this.curve.endo?this.curve._endoWnafMulAdd(m,v,!0):this.curve._wnafMulAdd(1,m,v,2,!0)},f.prototype.eq=function(h){return this===h||this.inf===h.inf&&(this.inf||this.x.cmp(h.x)===0&&this.y.cmp(h.y)===0)},f.prototype.neg=function(h){if(this.inf)return this;var p=this.curve.point(this.x,this.y.redNeg());if(h&&this.precomputed){var g=this.precomputed,m=function(v){return v.neg()};p.precomputed={naf:g.naf&&{wnd:g.naf.wnd,points:g.naf.points.map(m)},doubles:g.doubles&&{step:g.doubles.step,points:g.doubles.points.map(m)}}}return p},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},s(d,c.BasePoint),u.prototype.jpoint=function(h,p,g){return new d(this,h,p,g)},d.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var h=this.z.redInvm(),p=h.redSqr(),g=this.x.redMul(p),m=this.y.redMul(p).redMul(h);return this.curve.point(g,m)},d.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},d.prototype.add=function(h){if(this.isInfinity())return h;if(h.isInfinity())return this;var p=h.z.redSqr(),g=this.z.redSqr(),m=this.x.redMul(p),v=h.x.redMul(g),y=this.y.redMul(p.redMul(h.z)),b=h.y.redMul(g.redMul(this.z)),w=m.redSub(v),E=y.redSub(b);if(w.cmpn(0)===0)return E.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var I=w.redSqr(),O=I.redMul(w),D=m.redMul(I),N=E.redSqr().redIAdd(O).redISub(D).redISub(D),U=E.redMul(D.redISub(N)).redISub(y.redMul(O)),B=this.z.redMul(h.z).redMul(w);return this.curve.jpoint(N,U,B)},d.prototype.mixedAdd=function(h){if(this.isInfinity())return h.toJ();if(h.isInfinity())return this;var p=this.z.redSqr(),g=this.x,m=h.x.redMul(p),v=this.y,y=h.y.redMul(p).redMul(this.z),b=g.redSub(m),w=v.redSub(y);if(b.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var E=b.redSqr(),I=E.redMul(b),O=g.redMul(E),D=w.redSqr().redIAdd(I).redISub(O).redISub(O),N=w.redMul(O.redISub(D)).redISub(v.redMul(I)),U=this.z.redMul(b);return this.curve.jpoint(D,N,U)},d.prototype.dblp=function(h){if(h===0)return this;if(this.isInfinity())return this;if(!h)return this.dbl();var p;if(this.curve.zeroA||this.curve.threeA){var g=this;for(p=0;p<h;p++)g=g.dbl();return g}var m=this.curve.a,v=this.curve.tinv,y=this.x,b=this.y,w=this.z,E=w.redSqr().redSqr(),I=b.redAdd(b);for(p=0;p<h;p++){var O=y.redSqr(),D=I.redSqr(),N=D.redSqr(),U=O.redAdd(O).redIAdd(O).redIAdd(m.redMul(E)),B=y.redMul(D),F=U.redSqr().redISub(B.redAdd(B)),T=B.redISub(F),P=U.redMul(T);P=P.redIAdd(P).redISub(N);var _=I.redMul(w);p+1<h&&(E=E.redMul(N)),y=F,w=_,I=P}return this.curve.jpoint(y,I.redMul(v),w)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},d.prototype._zeroDbl=function(){var h,p,g;if(this.zOne){var m=this.x.redSqr(),v=this.y.redSqr(),y=v.redSqr(),b=this.x.redAdd(v).redSqr().redISub(m).redISub(y);b=b.redIAdd(b);var w=m.redAdd(m).redIAdd(m),E=w.redSqr().redISub(b).redISub(b),I=y.redIAdd(y);I=(I=I.redIAdd(I)).redIAdd(I),h=E,p=w.redMul(b.redISub(E)).redISub(I),g=this.y.redAdd(this.y)}else{var O=this.x.redSqr(),D=this.y.redSqr(),N=D.redSqr(),U=this.x.redAdd(D).redSqr().redISub(O).redISub(N);U=U.redIAdd(U);var B=O.redAdd(O).redIAdd(O),F=B.redSqr(),T=N.redIAdd(N);T=(T=T.redIAdd(T)).redIAdd(T),h=F.redISub(U).redISub(U),p=B.redMul(U.redISub(h)).redISub(T),g=(g=this.y.redMul(this.z)).redIAdd(g)}return this.curve.jpoint(h,p,g)},d.prototype._threeDbl=function(){var h,p,g;if(this.zOne){var m=this.x.redSqr(),v=this.y.redSqr(),y=v.redSqr(),b=this.x.redAdd(v).redSqr().redISub(m).redISub(y);b=b.redIAdd(b);var w=m.redAdd(m).redIAdd(m).redIAdd(this.curve.a),E=w.redSqr().redISub(b).redISub(b);h=E;var I=y.redIAdd(y);I=(I=I.redIAdd(I)).redIAdd(I),p=w.redMul(b.redISub(E)).redISub(I),g=this.y.redAdd(this.y)}else{var O=this.z.redSqr(),D=this.y.redSqr(),N=this.x.redMul(D),U=this.x.redSub(O).redMul(this.x.redAdd(O));U=U.redAdd(U).redIAdd(U);var B=N.redIAdd(N),F=(B=B.redIAdd(B)).redAdd(B);h=U.redSqr().redISub(F),g=this.y.redAdd(this.z).redSqr().redISub(D).redISub(O);var T=D.redSqr();T=(T=(T=T.redIAdd(T)).redIAdd(T)).redIAdd(T),p=U.redMul(B.redISub(h)).redISub(T)}return this.curve.jpoint(h,p,g)},d.prototype._dbl=function(){var h=this.curve.a,p=this.x,g=this.y,m=this.z,v=m.redSqr().redSqr(),y=p.redSqr(),b=g.redSqr(),w=y.redAdd(y).redIAdd(y).redIAdd(h.redMul(v)),E=p.redAdd(p),I=(E=E.redIAdd(E)).redMul(b),O=w.redSqr().redISub(I.redAdd(I)),D=I.redISub(O),N=b.redSqr();N=(N=(N=N.redIAdd(N)).redIAdd(N)).redIAdd(N);var U=w.redMul(D).redISub(N),B=g.redAdd(g).redMul(m);return this.curve.jpoint(O,U,B)},d.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var h=this.x.redSqr(),p=this.y.redSqr(),g=this.z.redSqr(),m=p.redSqr(),v=h.redAdd(h).redIAdd(h),y=v.redSqr(),b=this.x.redAdd(p).redSqr().redISub(h).redISub(m),w=(b=(b=(b=b.redIAdd(b)).redAdd(b).redIAdd(b)).redISub(y)).redSqr(),E=m.redIAdd(m);E=(E=(E=E.redIAdd(E)).redIAdd(E)).redIAdd(E);var I=v.redIAdd(b).redSqr().redISub(y).redISub(w).redISub(E),O=p.redMul(I);O=(O=O.redIAdd(O)).redIAdd(O);var D=this.x.redMul(w).redISub(O);D=(D=D.redIAdd(D)).redIAdd(D);var N=this.y.redMul(I.redMul(E.redISub(I)).redISub(b.redMul(w)));N=(N=(N=N.redIAdd(N)).redIAdd(N)).redIAdd(N);var U=this.z.redAdd(b).redSqr().redISub(g).redISub(w);return this.curve.jpoint(D,N,U)},d.prototype.mul=function(h,p){return h=new a(h,p),this.curve._wnafMul(this,h)},d.prototype.eq=function(h){if(h.type==="affine")return this.eq(h.toJ());if(this===h)return!0;var p=this.z.redSqr(),g=h.z.redSqr();if(this.x.redMul(g).redISub(h.x.redMul(p)).cmpn(0)!==0)return!1;var m=p.redMul(this.z),v=g.redMul(h.z);return this.y.redMul(v).redISub(h.y.redMul(m)).cmpn(0)===0},d.prototype.eqXToP=function(h){var p=this.z.redSqr(),g=h.toRed(this.curve.red).redMul(p);if(this.x.cmp(g)===0)return!0;for(var m=h.clone(),v=this.curve.redN.redMul(p);;){if(m.iadd(this.curve.n),m.cmp(this.curve.p)>=0)return!1;if(g.redIAdd(v),this.x.cmp(g)===0)return!0}},d.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)+">"},d.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(r,n,o){var i,a=o,s=r("hash.js"),c=r("./curve"),l=r("./utils").assert;function u(d){d.type==="short"?this.curve=new c.short(d):d.type==="edwards"?this.curve=new c.edwards(d):this.curve=new c.mont(d),this.g=this.curve.g,this.n=this.curve.n,this.hash=d.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(d,h){Object.defineProperty(a,d,{configurable:!0,enumerable:!0,get:function(){var p=new u(h);return Object.defineProperty(a,d,{configurable:!0,enumerable:!0,value:p}),p}})}a.PresetCurve=u,f("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:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:s.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"]}),f("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:s.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),f("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:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=r("./precomputed/secp256k1")}catch{i=void 0}f("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:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(r,n,o){var i=r("bn.js"),a=r("hmac-drbg"),s=r("../utils"),c=r("../curves"),l=r("brorand"),u=s.assert,f=r("./key"),d=r("./signature");function h(p){if(!(this instanceof h))return new h(p);typeof p=="string"&&(u(Object.prototype.hasOwnProperty.call(c,p),"Unknown curve "+p),p=c[p]),p instanceof c.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=h,h.prototype.keyPair=function(p){return new f(this,p)},h.prototype.keyFromPrivate=function(p,g){return f.fromPrivate(this,p,g)},h.prototype.keyFromPublic=function(p,g){return f.fromPublic(this,p,g)},h.prototype.genKeyPair=function(p){p||(p={});for(var g=new a({hash:this.hash,pers:p.pers,persEnc:p.persEnc||"utf8",entropy:p.entropy||l(this.hash.hmacStrength),entropyEnc:p.entropy&&p.entropyEnc||"utf8",nonce:this.n.toArray()}),m=this.n.byteLength(),v=this.n.sub(new i(2));;){var y=new i(g.generate(m));if(!(y.cmp(v)>0))return y.iaddn(1),this.keyFromPrivate(y)}},h.prototype._truncateToN=function(p,g){var m=8*p.byteLength()-this.n.bitLength();return m>0&&(p=p.ushrn(m)),!g&&p.cmp(this.n)>=0?p.sub(this.n):p},h.prototype.sign=function(p,g,m,v){typeof m=="object"&&(v=m,m=null),v||(v={}),g=this.keyFromPrivate(g,m),p=this._truncateToN(new i(p,16));for(var y=this.n.byteLength(),b=g.getPrivate().toArray("be",y),w=p.toArray("be",y),E=new a({hash:this.hash,entropy:b,nonce:w,pers:v.pers,persEnc:v.persEnc||"utf8"}),I=this.n.sub(new i(1)),O=0;;O++){var D=v.k?v.k(O):new i(E.generate(this.n.byteLength()));if(!((D=this._truncateToN(D,!0)).cmpn(1)<=0||D.cmp(I)>=0)){var N=this.g.mul(D);if(!N.isInfinity()){var U=N.getX(),B=U.umod(this.n);if(B.cmpn(0)!==0){var F=D.invm(this.n).mul(B.mul(g.getPrivate()).iadd(p));if((F=F.umod(this.n)).cmpn(0)!==0){var T=(N.getY().isOdd()?1:0)|(U.cmp(B)!==0?2:0);return v.canonical&&F.cmp(this.nh)>0&&(F=this.n.sub(F),T^=1),new d({r:B,s:F,recoveryParam:T})}}}}}},h.prototype.verify=function(p,g,m,v){p=this._truncateToN(new i(p,16)),m=this.keyFromPublic(m,v);var y=(g=new d(g,"hex")).r,b=g.s;if(y.cmpn(1)<0||y.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var w,E=b.invm(this.n),I=E.mul(p).umod(this.n),O=E.mul(y).umod(this.n);return this.curve._maxwellTrick?!(w=this.g.jmulAdd(I,m.getPublic(),O)).isInfinity()&&w.eqXToP(y):!(w=this.g.mulAdd(I,m.getPublic(),O)).isInfinity()&&w.getX().umod(this.n).cmp(y)===0},h.prototype.recoverPubKey=function(p,g,m,v){u((3&m)===m,"The recovery param is more than two bits"),g=new d(g,v);var y=this.n,b=new i(p),w=g.r,E=g.s,I=1&m,O=m>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&O)throw new Error("Unable to find sencond key candinate");w=O?this.curve.pointFromX(w.add(this.curve.n),I):this.curve.pointFromX(w,I);var D=g.r.invm(y),N=y.sub(b).mul(D).umod(y),U=E.mul(D).umod(y);return this.g.mulAdd(N,w,U)},h.prototype.getKeyRecoveryParam=function(p,g,m,v){if((g=new d(g,v)).recoveryParam!==null)return g.recoveryParam;for(var y=0;y<4;y++){var b;try{b=this.recoverPubKey(p,g,y)}catch{continue}if(b.eq(m))return y}throw new Error("Unable to find valid recovery factor")}},{"../curves":411,"../utils":419,"./key":413,"./signature":414,"bn.js":420,brorand:187,"hmac-drbg":438}],413:[function(r,n,o){var i=r("bn.js"),a=r("../utils").assert;function s(c,l){this.ec=c,this.priv=null,this.pub=null,l.priv&&this._importPrivate(l.priv,l.privEnc),l.pub&&this._importPublic(l.pub,l.pubEnc)}n.exports=s,s.fromPublic=function(c,l,u){return l instanceof s?l:new s(c,{pub:l,pubEnc:u})},s.fromPrivate=function(c,l,u){return l instanceof s?l:new s(c,{priv:l,privEnc:u})},s.prototype.validate=function(){var c=this.getPublic();return c.isInfinity()?{result:!1,reason:"Invalid public key"}:c.validate()?c.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"}},s.prototype.getPublic=function(c,l){return typeof c=="string"&&(l=c,c=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),l?this.pub.encode(l,c):this.pub},s.prototype.getPrivate=function(c){return c==="hex"?this.priv.toString(16,2):this.priv},s.prototype._importPrivate=function(c,l){this.priv=new i(c,l||16),this.priv=this.priv.umod(this.ec.curve.n)},s.prototype._importPublic=function(c,l){if(c.x||c.y)return this.ec.curve.type==="mont"?a(c.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||a(c.x&&c.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(c.x,c.y));this.pub=this.ec.curve.decodePoint(c,l)},s.prototype.derive=function(c){return c.validate()||a(c.validate(),"public point not validated"),c.mul(this.priv).getX()},s.prototype.sign=function(c,l,u){return this.ec.sign(c,this,l,u)},s.prototype.verify=function(c,l){return this.ec.verify(c,l,this)},s.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(r,n,o){var i=r("bn.js"),a=r("../utils"),s=a.assert;function c(h,p){if(h instanceof c)return h;this._importDER(h,p)||(s(h.r&&h.s,"Signature without r or s"),this.r=new i(h.r,16),this.s=new i(h.s,16),h.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=h.recoveryParam)}function l(){this.place=0}function u(h,p){var g=h[p.place++];if(!(128&g))return g;var m=15&g;if(m===0||m>4)return!1;for(var v=0,y=0,b=p.place;y<m;y++,b++)v<<=8,v|=h[b],v>>>=0;return!(v<=127)&&(p.place=b,v)}function f(h){for(var p=0,g=h.length-1;!h[p]&&!(128&h[p+1])&&p<g;)p++;return p===0?h:h.slice(p)}function d(h,p){if(p<128)h.push(p);else{var g=1+(Math.log(p)/Math.LN2>>>3);for(h.push(128|g);--g;)h.push(p>>>(g<<3)&255);h.push(p)}}n.exports=c,c.prototype._importDER=function(h,p){h=a.toArray(h,p);var g=new l;if(h[g.place++]!==48)return!1;var m=u(h,g);if(m===!1||m+g.place!==h.length||h[g.place++]!==2)return!1;var v=u(h,g);if(v===!1)return!1;var y=h.slice(g.place,v+g.place);if(g.place+=v,h[g.place++]!==2)return!1;var b=u(h,g);if(b===!1||h.length!==b+g.place)return!1;var w=h.slice(g.place,b+g.place);if(y[0]===0){if(!(128&y[1]))return!1;y=y.slice(1)}if(w[0]===0){if(!(128&w[1]))return!1;w=w.slice(1)}return this.r=new i(y),this.s=new i(w),this.recoveryParam=null,!0},c.prototype.toDER=function(h){var p=this.r.toArray(),g=this.s.toArray();for(128&p[0]&&(p=[0].concat(p)),128&g[0]&&(g=[0].concat(g)),p=f(p),g=f(g);!(g[0]||128&g[1]);)g=g.slice(1);var m=[2];d(m,p.length),(m=m.concat(p)).push(2),d(m,g.length);var v=m.concat(g),y=[48];return d(y,v.length),y=y.concat(v),a.encode(y,h)}},{"../utils":419,"bn.js":420}],415:[function(r,n,o){var i=r("hash.js"),a=r("../curves"),s=r("../utils"),c=s.assert,l=s.parseBytes,u=r("./key"),f=r("./signature");function d(h){if(c(h==="ed25519","only tested with ed25519 so far"),!(this instanceof d))return new d(h);h=a[h].curve,this.curve=h,this.g=h.g,this.g.precompute(h.n.bitLength()+1),this.pointClass=h.point().constructor,this.encodingLength=Math.ceil(h.n.bitLength()/8),this.hash=i.sha512}n.exports=d,d.prototype.sign=function(h,p){h=l(h);var g=this.keyFromSecret(p),m=this.hashInt(g.messagePrefix(),h),v=this.g.mul(m),y=this.encodePoint(v),b=this.hashInt(y,g.pubBytes(),h).mul(g.priv()),w=m.add(b).umod(this.curve.n);return this.makeSignature({R:v,S:w,Rencoded:y})},d.prototype.verify=function(h,p,g){h=l(h),p=this.makeSignature(p);var m=this.keyFromPublic(g),v=this.hashInt(p.Rencoded(),m.pubBytes(),h),y=this.g.mul(p.S());return p.R().add(m.pub().mul(v)).eq(y)},d.prototype.hashInt=function(){for(var h=this.hash(),p=0;p<arguments.length;p++)h.update(arguments[p]);return s.intFromLE(h.digest()).umod(this.curve.n)},d.prototype.keyFromPublic=function(h){return u.fromPublic(this,h)},d.prototype.keyFromSecret=function(h){return u.fromSecret(this,h)},d.prototype.makeSignature=function(h){return h instanceof f?h:new f(this,h)},d.prototype.encodePoint=function(h){var p=h.getY().toArray("le",this.encodingLength);return p[this.encodingLength-1]|=h.getX().isOdd()?128:0,p},d.prototype.decodePoint=function(h){var p=(h=s.parseBytes(h)).length-1,g=h.slice(0,p).concat(-129&h[p]),m=(128&h[p])!=0,v=s.intFromLE(g);return this.curve.pointFromY(v,m)},d.prototype.encodeInt=function(h){return h.toArray("le",this.encodingLength)},d.prototype.decodeInt=function(h){return s.intFromLE(h)},d.prototype.isPoint=function(h){return h instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(r,n,o){var i=r("../utils"),a=i.assert,s=i.parseBytes,c=i.cachedProperty;function l(u,f){this.eddsa=u,this._secret=s(f.secret),u.isPoint(f.pub)?this._pub=f.pub:this._pubBytes=s(f.pub)}l.fromPublic=function(u,f){return f instanceof l?f:new l(u,{pub:f})},l.fromSecret=function(u,f){return f instanceof l?f:new l(u,{secret:f})},l.prototype.secret=function(){return this._secret},c(l,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),c(l,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),c(l,"privBytes",function(){var u=this.eddsa,f=this.hash(),d=u.encodingLength-1,h=f.slice(0,u.encodingLength);return h[0]&=248,h[d]&=127,h[d]|=64,h}),c(l,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),c(l,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),c(l,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),l.prototype.sign=function(u){return a(this._secret,"KeyPair can only verify"),this.eddsa.sign(u,this)},l.prototype.verify=function(u,f){return this.eddsa.verify(u,f,this)},l.prototype.getSecret=function(u){return a(this._secret,"KeyPair is public only"),i.encode(this.secret(),u)},l.prototype.getPublic=function(u){return i.encode(this.pubBytes(),u)},n.exports=l},{"../utils":419}],417:[function(r,n,o){var i=r("bn.js"),a=r("../utils"),s=a.assert,c=a.cachedProperty,l=a.parseBytes;function u(f,d){this.eddsa=f,typeof d!="object"&&(d=l(d)),Array.isArray(d)&&(d={R:d.slice(0,f.encodingLength),S:d.slice(f.encodingLength)}),s(d.R&&d.S,"Signature without R or S"),f.isPoint(d.R)&&(this._R=d.R),d.S instanceof i&&(this._S=d.S),this._Rencoded=Array.isArray(d.R)?d.R:d.Rencoded,this._Sencoded=Array.isArray(d.S)?d.S:d.Sencoded}c(u,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),c(u,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),c(u,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),c(u,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return a.encode(this.toBytes(),"hex").toUpperCase()},n.exports=u},{"../utils":419,"bn.js":420}],418:[function(r,n,o){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(r,n,o){var i=o,a=r("bn.js"),s=r("minimalistic-assert"),c=r("minimalistic-crypto-utils");i.assert=s,i.toArray=c.toArray,i.zero2=c.zero2,i.toHex=c.toHex,i.encode=c.encode,i.getNAF=function(l,u,f){var d=new Array(Math.max(l.bitLength(),f)+1);d.fill(0);for(var h=1<<u+1,p=l.clone(),g=0;g<d.length;g++){var m,v=p.andln(h-1);p.isOdd()?(m=v>(h>>1)-1?(h>>1)-v:v,p.isubn(m)):m=0,d[g]=m,p.iushrn(1)}return d},i.getJSF=function(l,u){var f=[[],[]];l=l.clone(),u=u.clone();for(var d,h=0,p=0;l.cmpn(-h)>0||u.cmpn(-p)>0;){var g,m,v=l.andln(3)+h&3,y=u.andln(3)+p&3;v===3&&(v=-1),y===3&&(y=-1),g=1&v?(d=l.andln(7)+h&7)!==3&&d!==5||y!==2?v:-v:0,f[0].push(g),m=1&y?(d=u.andln(7)+p&7)!==3&&d!==5||v!==2?y:-y:0,f[1].push(m),2*h===g+1&&(h=1-h),2*p===m+1&&(p=1-p),l.iushrn(1),u.iushrn(1)}return f},i.cachedProperty=function(l,u,f){var d="_"+u;l.prototype[u]=function(){return this[d]!==void 0?this[d]:this[d]=f.call(this)}},i.parseBytes=function(l){return typeof l=="string"?i.toArray(l,"hex"):l},i.intFromLE=function(l){return new a(l,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(r,n,o){arguments[4][184][0].apply(o,arguments)},{buffer:188,dup:184}],421:[function(r,n,o){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(r,n,o){var i=Object.create||function(D){var N=function(){};return N.prototype=D,new N},a=Object.keys||function(D){var N=[];for(var U in D)Object.prototype.hasOwnProperty.call(D,U)&&N.push(U);return U},s=Function.prototype.bind||function(D){var N=this;return function(){return N.apply(D,arguments)}};function c(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}n.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0;var l,u=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),l=f.x===0}catch{l=!1}function d(D){return D._maxListeners===void 0?c.defaultMaxListeners:D._maxListeners}function h(D,N,U){if(N)D.call(U);else for(var B=D.length,F=O(D,B),T=0;T<B;++T)F[T].call(U)}function p(D,N,U,B){if(N)D.call(U,B);else for(var F=D.length,T=O(D,F),P=0;P<F;++P)T[P].call(U,B)}function g(D,N,U,B,F){if(N)D.call(U,B,F);else for(var T=D.length,P=O(D,T),_=0;_<T;++_)P[_].call(U,B,F)}function m(D,N,U,B,F,T){if(N)D.call(U,B,F,T);else for(var P=D.length,_=O(D,P),C=0;C<P;++C)_[C].call(U,B,F,T)}function v(D,N,U,B){if(N)D.apply(U,B);else for(var F=D.length,T=O(D,F),P=0;P<F;++P)T[P].apply(U,B)}function y(D,N,U,B){var F,T,P;if(typeof U!="function")throw new TypeError('"listener" argument must be a function');if((T=D._events)?(T.newListener&&(D.emit("newListener",N,U.listener?U.listener:U),T=D._events),P=T[N]):(T=D._events=i(null),D._eventsCount=0),P){if(typeof P=="function"?P=T[N]=B?[U,P]:[P,U]:B?P.unshift(U):P.push(U),!P.warned&&(F=d(D))&&F>0&&P.length>F){P.warned=!0;var _=new Error("Possible EventEmitter memory leak detected. "+P.length+' "'+String(N)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');_.name="MaxListenersExceededWarning",_.emitter=D,_.type=N,_.count=P.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",_.name,_.message)}}else P=T[N]=U,++D._eventsCount;return D}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 D=new Array(arguments.length),N=0;N<D.length;++N)D[N]=arguments[N];this.listener.apply(this.target,D)}}function w(D,N,U){var B={fired:!1,wrapFn:void 0,target:D,type:N,listener:U},F=s.call(b,B);return F.listener=U,B.wrapFn=F,F}function E(D,N,U){var B=D._events;if(!B)return[];var F=B[N];return F?typeof F=="function"?U?[F.listener||F]:[F]:U?function(T){for(var P=new Array(T.length),_=0;_<P.length;++_)P[_]=T[_].listener||T[_];return P}(F):O(F,F.length):[]}function I(D){var N=this._events;if(N){var U=N[D];if(typeof U=="function")return 1;if(U)return U.length}return 0}function O(D,N){for(var U=new Array(N),B=0;B<N;++B)U[B]=D[B];return U}l?Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(D){if(typeof D!="number"||D<0||D!=D)throw new TypeError('"defaultMaxListeners" must be a positive number');u=D}}):c.defaultMaxListeners=u,c.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||isNaN(D))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=D,this},c.prototype.getMaxListeners=function(){return d(this)},c.prototype.emit=function(D){var N,U,B,F,T,P,_=D==="error";if(P=this._events)_=_&&P.error==null;else if(!_)return!1;if(_){if(arguments.length>1&&(N=arguments[1]),N instanceof Error)throw N;var C=new Error('Unhandled "error" event. ('+N+")");throw C.context=N,C}if(!(U=P[D]))return!1;var S=typeof U=="function";switch(B=arguments.length){case 1:h(U,S,this);break;case 2:p(U,S,this,arguments[1]);break;case 3:g(U,S,this,arguments[1],arguments[2]);break;case 4:m(U,S,this,arguments[1],arguments[2],arguments[3]);break;default:for(F=new Array(B-1),T=1;T<B;T++)F[T-1]=arguments[T];v(U,S,this,F)}return!0},c.prototype.addListener=function(D,N){return y(this,D,N,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function(D,N){return y(this,D,N,!0)},c.prototype.once=function(D,N){if(typeof N!="function")throw new TypeError('"listener" argument must be a function');return this.on(D,w(this,D,N)),this},c.prototype.prependOnceListener=function(D,N){if(typeof N!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(D,w(this,D,N)),this},c.prototype.removeListener=function(D,N){var U,B,F,T,P;if(typeof N!="function")throw new TypeError('"listener" argument must be a function');if(!(B=this._events))return this;if(!(U=B[D]))return this;if(U===N||U.listener===N)--this._eventsCount==0?this._events=i(null):(delete B[D],B.removeListener&&this.emit("removeListener",D,U.listener||N));else if(typeof U!="function"){for(F=-1,T=U.length-1;T>=0;T--)if(U[T]===N||U[T].listener===N){P=U[T].listener,F=T;break}if(F<0)return this;F===0?U.shift():function(_,C){for(var S=C,x=S+1,k=_.length;x<k;S+=1,x+=1)_[S]=_[x];_.pop()}(U,F),U.length===1&&(B[D]=U[0]),B.removeListener&&this.emit("removeListener",D,P||N)}return this},c.prototype.removeAllListeners=function(D){var N,U,B;if(!(U=this._events))return this;if(!U.removeListener)return arguments.length===0?(this._events=i(null),this._eventsCount=0):U[D]&&(--this._eventsCount==0?this._events=i(null):delete U[D]),this;if(arguments.length===0){var F,T=a(U);for(B=0;B<T.length;++B)(F=T[B])!=="removeListener"&&this.removeAllListeners(F);return this.removeAllListeners("removeListener"),this._events=i(null),this._eventsCount=0,this}if(typeof(N=U[D])=="function")this.removeListener(D,N);else if(N)for(B=N.length-1;B>=0;B--)this.removeListener(D,N[B]);return this},c.prototype.listeners=function(D){return E(this,D,!0)},c.prototype.rawListeners=function(D){return E(this,D,!1)},c.listenerCount=function(D,N){return typeof D.listenerCount=="function"?D.listenerCount(N):I.call(D,N)},c.prototype.listenerCount=I,c.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(r,n,o){var i=r("safe-buffer").Buffer,a=r("md5.js");n.exports=function(s,c,l,u){if(i.isBuffer(s)||(s=i.from(s,"binary")),c&&(i.isBuffer(c)||(c=i.from(c,"binary")),c.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var f=l/8,d=i.alloc(f),h=i.alloc(u||0),p=i.alloc(0);f>0||u>0;){var g=new a;g.update(p),g.update(s),c&&g.update(c),p=g.digest();var m=0;if(f>0){var v=d.length-f;m=Math.min(f,p.length),p.copy(d,v,0,m),f-=m}if(m<p.length&&u>0){var y=h.length-u,b=Math.min(u,p.length-m);p.copy(h,y,m,m+b),u-=b}}return p.fill(0),{key:d,iv:h}}},{"md5.js":450,"safe-buffer":494}],424:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.CsvParserStream=o.ParserOptions=o.parseFile=o.parseStream=o.parseString=o.parse=o.FormatterOptions=o.CsvFormatterStream=o.writeToPath=o.writeToString=o.writeToBuffer=o.writeToStream=o.write=o.format=void 0;var i=r("@fast-csv/format");Object.defineProperty(o,"format",{enumerable:!0,get:function(){return i.format}}),Object.defineProperty(o,"write",{enumerable:!0,get:function(){return i.write}}),Object.defineProperty(o,"writeToStream",{enumerable:!0,get:function(){return i.writeToStream}}),Object.defineProperty(o,"writeToBuffer",{enumerable:!0,get:function(){return i.writeToBuffer}}),Object.defineProperty(o,"writeToString",{enumerable:!0,get:function(){return i.writeToString}}),Object.defineProperty(o,"writeToPath",{enumerable:!0,get:function(){return i.writeToPath}}),Object.defineProperty(o,"CsvFormatterStream",{enumerable:!0,get:function(){return i.CsvFormatterStream}}),Object.defineProperty(o,"FormatterOptions",{enumerable:!0,get:function(){return i.FormatterOptions}});var a=r("@fast-csv/parse");Object.defineProperty(o,"parse",{enumerable:!0,get:function(){return a.parse}}),Object.defineProperty(o,"parseString",{enumerable:!0,get:function(){return a.parseString}}),Object.defineProperty(o,"parseStream",{enumerable:!0,get:function(){return a.parseStream}}),Object.defineProperty(o,"parseFile",{enumerable:!0,get:function(){return a.parseFile}}),Object.defineProperty(o,"ParserOptions",{enumerable:!0,get:function(){return a.ParserOptions}}),Object.defineProperty(o,"CsvParserStream",{enumerable:!0,get:function(){return a.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(r,n,o){var i=r("safe-buffer").Buffer,a=r("readable-stream").Transform;function s(c){a.call(this),this._block=i.allocUnsafe(c),this._blockSize=c,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r("inherits")(s,a),s.prototype._transform=function(c,l,u){var f=null;try{this.update(c,l)}catch(d){f=d}u(f)},s.prototype._flush=function(c){var l=null;try{this.push(this.digest())}catch(u){l=u}c(l)},s.prototype.update=function(c,l){if(function(g,m){if(!i.isBuffer(g)&&typeof g!="string")throw new TypeError(m+" must be a string or a buffer")}(c,"Data"),this._finalized)throw new Error("Digest already called");i.isBuffer(c)||(c=i.from(c,l));for(var u=this._block,f=0;this._blockOffset+c.length-f>=this._blockSize;){for(var d=this._blockOffset;d<this._blockSize;)u[d++]=c[f++];this._update(),this._blockOffset=0}for(;f<c.length;)u[this._blockOffset++]=c[f++];for(var h=0,p=8*c.length;p>0;++h)this._length[h]+=p,(p=this._length[h]/4294967296|0)>0&&(this._length[h]-=4294967296*p);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(c){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var l=this._digest();c!==void 0&&(l=l.toString(c)),this._block.fill(0),this._blockOffset=0;for(var u=0;u<4;++u)this._length[u]=0;return l},s.prototype._digest=function(){throw new Error("_digest is not implemented")},n.exports=s},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(r,n,o){var i=o;i.utils=r("./hash/utils"),i.common=r("./hash/common"),i.sha=r("./hash/sha"),i.ripemd=r("./hash/ripemd"),i.hmac=r("./hash/hmac"),i.sha1=i.sha.sha1,i.sha256=i.sha.sha256,i.sha224=i.sha.sha224,i.sha384=i.sha.sha384,i.sha512=i.sha.sha512,i.ripemd160=i.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(r,n,o){var i=r("./utils"),a=r("minimalistic-assert");function s(){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}o.BlockHash=s,s.prototype.update=function(c,l){if(c=i.toArray(c,l),this.pending?this.pending=this.pending.concat(c):this.pending=c,this.pendingTotal+=c.length,this.pending.length>=this._delta8){var u=(c=this.pending).length%this._delta8;this.pending=c.slice(c.length-u,c.length),this.pending.length===0&&(this.pending=null),c=i.join32(c,0,c.length-u,this.endian);for(var f=0;f<c.length;f+=this._delta32)this._update(c,f,f+this._delta32)}return this},s.prototype.digest=function(c){return this.update(this._pad()),a(this.pending===null),this._digest(c)},s.prototype._pad=function(){var c=this.pendingTotal,l=this._delta8,u=l-(c+this.padLength)%l,f=new Array(u+this.padLength);f[0]=128;for(var d=1;d<u;d++)f[d]=0;if(c<<=3,this.endian==="big"){for(var h=8;h<this.padLength;h++)f[d++]=0;f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=c>>>24&255,f[d++]=c>>>16&255,f[d++]=c>>>8&255,f[d++]=255&c}else for(f[d++]=255&c,f[d++]=c>>>8&255,f[d++]=c>>>16&255,f[d++]=c>>>24&255,f[d++]=0,f[d++]=0,f[d++]=0,f[d++]=0,h=8;h<this.padLength;h++)f[d++]=0;return f}},{"./utils":437,"minimalistic-assert":453}],428:[function(r,n,o){var i=r("./utils"),a=r("minimalistic-assert");function s(c,l,u){if(!(this instanceof s))return new s(c,l,u);this.Hash=c,this.blockSize=c.blockSize/8,this.outSize=c.outSize/8,this.inner=null,this.outer=null,this._init(i.toArray(l,u))}n.exports=s,s.prototype._init=function(c){c.length>this.blockSize&&(c=new this.Hash().update(c).digest()),a(c.length<=this.blockSize);for(var l=c.length;l<this.blockSize;l++)c.push(0);for(l=0;l<c.length;l++)c[l]^=54;for(this.inner=new this.Hash().update(c),l=0;l<c.length;l++)c[l]^=106;this.outer=new this.Hash().update(c)},s.prototype.update=function(c,l){return this.inner.update(c,l),this},s.prototype.digest=function(c){return this.outer.update(this.inner.digest()),this.outer.digest(c)}},{"./utils":437,"minimalistic-assert":453}],429:[function(r,n,o){var i=r("./utils"),a=r("./common"),s=i.rotl32,c=i.sum32,l=i.sum32_3,u=i.sum32_4,f=a.BlockHash;function d(){if(!(this instanceof d))return new d;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(w,E,I,O){return w<=15?E^I^O:w<=31?E&I|~E&O:w<=47?(E|~I)^O:w<=63?E&O|I&~O:E^(I|~O)}function p(w){return w<=15?0:w<=31?1518500249:w<=47?1859775393:w<=63?2400959708:2840853838}function g(w){return w<=15?1352829926:w<=31?1548603684:w<=47?1836072691:w<=63?2053994217:0}i.inherits(d,f),o.ripemd160=d,d.blockSize=512,d.outSize=160,d.hmacStrength=192,d.padLength=64,d.prototype._update=function(w,E){for(var I=this.h[0],O=this.h[1],D=this.h[2],N=this.h[3],U=this.h[4],B=I,F=O,T=D,P=N,_=U,C=0;C<80;C++){var S=c(s(u(I,h(C,O,D,N),w[m[C]+E],p(C)),y[C]),U);I=U,U=N,N=s(D,10),D=O,O=S,S=c(s(u(B,h(79-C,F,T,P),w[v[C]+E],g(C)),b[C]),_),B=_,_=P,P=s(T,10),T=F,F=S}S=l(this.h[1],D,P),this.h[1]=l(this.h[2],N,_),this.h[2]=l(this.h[3],U,B),this.h[3]=l(this.h[4],I,F),this.h[4]=l(this.h[0],O,T),this.h[0]=S},d.prototype._digest=function(w){return w==="hex"?i.toHex32(this.h,"little"):i.split32(this.h,"little")};var m=[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],v=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],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(r,n,o){o.sha1=r("./sha/1"),o.sha224=r("./sha/224"),o.sha256=r("./sha/256"),o.sha384=r("./sha/384"),o.sha512=r("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(r,n,o){var i=r("../utils"),a=r("../common"),s=r("./common"),c=i.rotl32,l=i.sum32,u=i.sum32_5,f=s.ft_1,d=a.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}i.inherits(p,d),n.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(g,m){for(var v=this.W,y=0;y<16;y++)v[y]=g[m+y];for(;y<v.length;y++)v[y]=c(v[y-3]^v[y-8]^v[y-14]^v[y-16],1);var b=this.h[0],w=this.h[1],E=this.h[2],I=this.h[3],O=this.h[4];for(y=0;y<v.length;y++){var D=~~(y/20),N=u(c(b,5),f(D,w,E,I),O,v[y],h[D]);O=I,I=E,E=c(w,30),w=b,b=N}this.h[0]=l(this.h[0],b),this.h[1]=l(this.h[1],w),this.h[2]=l(this.h[2],E),this.h[3]=l(this.h[3],I),this.h[4]=l(this.h[4],O)},p.prototype._digest=function(g){return g==="hex"?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(r,n,o){var i=r("../utils"),a=r("./256");function s(){if(!(this instanceof s))return new s;a.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}i.inherits(s,a),n.exports=s,s.blockSize=512,s.outSize=224,s.hmacStrength=192,s.padLength=64,s.prototype._digest=function(c){return c==="hex"?i.toHex32(this.h.slice(0,7),"big"):i.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(r,n,o){var i=r("../utils"),a=r("../common"),s=r("./common"),c=r("minimalistic-assert"),l=i.sum32,u=i.sum32_4,f=i.sum32_5,d=s.ch32,h=s.maj32,p=s.s0_256,g=s.s1_256,m=s.g0_256,v=s.g1_256,y=a.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 w(){if(!(this instanceof w))return new w;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}i.inherits(w,y),n.exports=w,w.blockSize=512,w.outSize=256,w.hmacStrength=192,w.padLength=64,w.prototype._update=function(E,I){for(var O=this.W,D=0;D<16;D++)O[D]=E[I+D];for(;D<O.length;D++)O[D]=u(v(O[D-2]),O[D-7],m(O[D-15]),O[D-16]);var N=this.h[0],U=this.h[1],B=this.h[2],F=this.h[3],T=this.h[4],P=this.h[5],_=this.h[6],C=this.h[7];for(c(this.k.length===O.length),D=0;D<O.length;D++){var S=f(C,g(T),d(T,P,_),this.k[D],O[D]),x=l(p(N),h(N,U,B));C=_,_=P,P=T,T=l(F,S),F=B,B=U,U=N,N=l(S,x)}this.h[0]=l(this.h[0],N),this.h[1]=l(this.h[1],U),this.h[2]=l(this.h[2],B),this.h[3]=l(this.h[3],F),this.h[4]=l(this.h[4],T),this.h[5]=l(this.h[5],P),this.h[6]=l(this.h[6],_),this.h[7]=l(this.h[7],C)},w.prototype._digest=function(E){return E==="hex"?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(r,n,o){var i=r("../utils"),a=r("./512");function s(){if(!(this instanceof s))return new s;a.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}i.inherits(s,a),n.exports=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(c){return c==="hex"?i.toHex32(this.h.slice(0,12),"big"):i.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(r,n,o){var i=r("../utils"),a=r("../common"),s=r("minimalistic-assert"),c=i.rotr64_hi,l=i.rotr64_lo,u=i.shr64_hi,f=i.shr64_lo,d=i.sum64,h=i.sum64_hi,p=i.sum64_lo,g=i.sum64_4_hi,m=i.sum64_4_lo,v=i.sum64_5_hi,y=i.sum64_5_lo,b=a.BlockHash,w=[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 E(){if(!(this instanceof E))return new E;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=w,this.W=new Array(160)}function I(x,k,L,j,z){var Y=x&L^~x&z;return Y<0&&(Y+=4294967296),Y}function O(x,k,L,j,z,Y){var K=k&j^~k&Y;return K<0&&(K+=4294967296),K}function D(x,k,L,j,z){var Y=x&L^x&z^L&z;return Y<0&&(Y+=4294967296),Y}function N(x,k,L,j,z,Y){var K=k&j^k&Y^j&Y;return K<0&&(K+=4294967296),K}function U(x,k){var L=c(x,k,28)^c(k,x,2)^c(k,x,7);return L<0&&(L+=4294967296),L}function B(x,k){var L=l(x,k,28)^l(k,x,2)^l(k,x,7);return L<0&&(L+=4294967296),L}function F(x,k){var L=c(x,k,14)^c(x,k,18)^c(k,x,9);return L<0&&(L+=4294967296),L}function T(x,k){var L=l(x,k,14)^l(x,k,18)^l(k,x,9);return L<0&&(L+=4294967296),L}function P(x,k){var L=c(x,k,1)^c(x,k,8)^u(x,k,7);return L<0&&(L+=4294967296),L}function _(x,k){var L=l(x,k,1)^l(x,k,8)^f(x,k,7);return L<0&&(L+=4294967296),L}function C(x,k){var L=c(x,k,19)^c(k,x,29)^u(x,k,6);return L<0&&(L+=4294967296),L}function S(x,k){var L=l(x,k,19)^l(k,x,29)^f(x,k,6);return L<0&&(L+=4294967296),L}i.inherits(E,b),n.exports=E,E.blockSize=1024,E.outSize=512,E.hmacStrength=192,E.padLength=128,E.prototype._prepareBlock=function(x,k){for(var L=this.W,j=0;j<32;j++)L[j]=x[k+j];for(;j<L.length;j+=2){var z=C(L[j-4],L[j-3]),Y=S(L[j-4],L[j-3]),K=L[j-14],Q=L[j-13],q=P(L[j-30],L[j-29]),J=_(L[j-30],L[j-29]),G=L[j-32],V=L[j-31];L[j]=g(z,Y,K,Q,q,J,G,V),L[j+1]=m(z,Y,K,Q,q,J,G,V)}},E.prototype._update=function(x,k){this._prepareBlock(x,k);var L=this.W,j=this.h[0],z=this.h[1],Y=this.h[2],K=this.h[3],Q=this.h[4],q=this.h[5],J=this.h[6],G=this.h[7],V=this.h[8],X=this.h[9],te=this.h[10],ee=this.h[11],re=this.h[12],se=this.h[13],pe=this.h[14],ce=this.h[15];s(this.k.length===L.length);for(var ne=0;ne<L.length;ne+=2){var he=pe,oe=ce,le=F(V,X),de=T(V,X),ve=I(V,X,te,ee,re),we=O(V,X,te,ee,re,se),ie=this.k[ne],ge=this.k[ne+1],Pe=L[ne],Fe=L[ne+1],Ie=v(he,oe,le,de,ve,we,ie,ge,Pe,Fe),Oe=y(he,oe,le,de,ve,we,ie,ge,Pe,Fe);he=U(j,z),oe=B(j,z),le=D(j,z,Y,K,Q),de=N(j,z,Y,K,Q,q);var $e=h(he,oe,le,de),et=p(he,oe,le,de);pe=re,ce=se,re=te,se=ee,te=V,ee=X,V=h(J,G,Ie,Oe),X=p(G,G,Ie,Oe),J=Q,G=q,Q=Y,q=K,Y=j,K=z,j=h(Ie,Oe,$e,et),z=p(Ie,Oe,$e,et)}d(this.h,0,j,z),d(this.h,2,Y,K),d(this.h,4,Q,q),d(this.h,6,J,G),d(this.h,8,V,X),d(this.h,10,te,ee),d(this.h,12,re,se),d(this.h,14,pe,ce)},E.prototype._digest=function(x){return x==="hex"?i.toHex32(this.h,"big"):i.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(r,n,o){var i=r("../utils").rotr32;function a(l,u,f){return l&u^~l&f}function s(l,u,f){return l&u^l&f^u&f}function c(l,u,f){return l^u^f}o.ft_1=function(l,u,f,d){return l===0?a(u,f,d):l===1||l===3?c(u,f,d):l===2?s(u,f,d):void 0},o.ch32=a,o.maj32=s,o.p32=c,o.s0_256=function(l){return i(l,2)^i(l,13)^i(l,22)},o.s1_256=function(l){return i(l,6)^i(l,11)^i(l,25)},o.g0_256=function(l){return i(l,7)^i(l,18)^l>>>3},o.g1_256=function(l){return i(l,17)^i(l,19)^l>>>10}},{"../utils":437}],437:[function(r,n,o){var i=r("minimalistic-assert"),a=r("inherits");function s(f,d){return(64512&f.charCodeAt(d))==55296&&!(d<0||d+1>=f.length)&&(64512&f.charCodeAt(d+1))==56320}function c(f){return(f>>>24|f>>>8&65280|f<<8&16711680|(255&f)<<24)>>>0}function l(f){return f.length===1?"0"+f:f}function u(f){return f.length===7?"0"+f:f.length===6?"00"+f:f.length===5?"000"+f:f.length===4?"0000"+f:f.length===3?"00000"+f:f.length===2?"000000"+f:f.length===1?"0000000"+f:f}o.inherits=a,o.toArray=function(f,d){if(Array.isArray(f))return f.slice();if(!f)return[];var h=[];if(typeof f=="string")if(d){if(d==="hex")for((f=f.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(f="0"+f),g=0;g<f.length;g+=2)h.push(parseInt(f[g]+f[g+1],16))}else for(var p=0,g=0;g<f.length;g++){var m=f.charCodeAt(g);m<128?h[p++]=m:m<2048?(h[p++]=m>>6|192,h[p++]=63&m|128):s(f,g)?(m=65536+((1023&m)<<10)+(1023&f.charCodeAt(++g)),h[p++]=m>>18|240,h[p++]=m>>12&63|128,h[p++]=m>>6&63|128,h[p++]=63&m|128):(h[p++]=m>>12|224,h[p++]=m>>6&63|128,h[p++]=63&m|128)}else for(g=0;g<f.length;g++)h[g]=0|f[g];return h},o.toHex=function(f){for(var d="",h=0;h<f.length;h++)d+=l(f[h].toString(16));return d},o.htonl=c,o.toHex32=function(f,d){for(var h="",p=0;p<f.length;p++){var g=f[p];d==="little"&&(g=c(g)),h+=u(g.toString(16))}return h},o.zero2=l,o.zero8=u,o.join32=function(f,d,h,p){var g=h-d;i(g%4==0);for(var m=new Array(g/4),v=0,y=d;v<m.length;v++,y+=4){var b;b=p==="big"?f[y]<<24|f[y+1]<<16|f[y+2]<<8|f[y+3]:f[y+3]<<24|f[y+2]<<16|f[y+1]<<8|f[y],m[v]=b>>>0}return m},o.split32=function(f,d){for(var h=new Array(4*f.length),p=0,g=0;p<f.length;p++,g+=4){var m=f[p];d==="big"?(h[g]=m>>>24,h[g+1]=m>>>16&255,h[g+2]=m>>>8&255,h[g+3]=255&m):(h[g+3]=m>>>24,h[g+2]=m>>>16&255,h[g+1]=m>>>8&255,h[g]=255&m)}return h},o.rotr32=function(f,d){return f>>>d|f<<32-d},o.rotl32=function(f,d){return f<<d|f>>>32-d},o.sum32=function(f,d){return f+d>>>0},o.sum32_3=function(f,d,h){return f+d+h>>>0},o.sum32_4=function(f,d,h,p){return f+d+h+p>>>0},o.sum32_5=function(f,d,h,p,g){return f+d+h+p+g>>>0},o.sum64=function(f,d,h,p){var g=f[d],m=p+f[d+1]>>>0,v=(m<p?1:0)+h+g;f[d]=v>>>0,f[d+1]=m},o.sum64_hi=function(f,d,h,p){return(d+p>>>0<d?1:0)+f+h>>>0},o.sum64_lo=function(f,d,h,p){return d+p>>>0},o.sum64_4_hi=function(f,d,h,p,g,m,v,y){var b=0,w=d;return b+=(w=w+p>>>0)<d?1:0,b+=(w=w+m>>>0)<m?1:0,f+h+g+v+(b+=(w=w+y>>>0)<y?1:0)>>>0},o.sum64_4_lo=function(f,d,h,p,g,m,v,y){return d+p+m+y>>>0},o.sum64_5_hi=function(f,d,h,p,g,m,v,y,b,w){var E=0,I=d;return E+=(I=I+p>>>0)<d?1:0,E+=(I=I+m>>>0)<m?1:0,E+=(I=I+y>>>0)<y?1:0,f+h+g+v+b+(E+=(I=I+w>>>0)<w?1:0)>>>0},o.sum64_5_lo=function(f,d,h,p,g,m,v,y,b,w){return d+p+m+y+w>>>0},o.rotr64_hi=function(f,d,h){return(d<<32-h|f>>>h)>>>0},o.rotr64_lo=function(f,d,h){return(f<<32-h|d>>>h)>>>0},o.shr64_hi=function(f,d,h){return f>>>h},o.shr64_lo=function(f,d,h){return(f<<32-h|d>>>h)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(r,n,o){var i=r("hash.js"),a=r("minimalistic-crypto-utils"),s=r("minimalistic-assert");function c(l){if(!(this instanceof c))return new c(l);this.hash=l.hash,this.predResist=!!l.predResist,this.outLen=this.hash.outSize,this.minEntropy=l.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var u=a.toArray(l.entropy,l.entropyEnc||"hex"),f=a.toArray(l.nonce,l.nonceEnc||"hex"),d=a.toArray(l.pers,l.persEnc||"hex");s(u.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(u,f,d)}n.exports=c,c.prototype._init=function(l,u,f){var d=l.concat(u).concat(f);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var h=0;h<this.V.length;h++)this.K[h]=0,this.V[h]=1;this._update(d),this._reseed=1,this.reseedInterval=281474976710656},c.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},c.prototype._update=function(l){var u=this._hmac().update(this.V).update([0]);l&&(u=u.update(l)),this.K=u.digest(),this.V=this._hmac().update(this.V).digest(),l&&(this.K=this._hmac().update(this.V).update([1]).update(l).digest(),this.V=this._hmac().update(this.V).digest())},c.prototype.reseed=function(l,u,f,d){typeof u!="string"&&(d=f,f=u,u=null),l=a.toArray(l,u),f=a.toArray(f,d),s(l.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(l.concat(f||[])),this._reseed=1},c.prototype.generate=function(l,u,f,d){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof u!="string"&&(d=f,f=u,u=null),f&&(f=a.toArray(f,d||"hex"),this._update(f));for(var h=[];h.length<l;)this.V=this._hmac().update(this.V).digest(),h=h.concat(this.V);var p=h.slice(0,l);return this._update(f),this._reseed++,a.encode(p,u)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(r,n,o){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */o.read=function(i,a,s,c,l){var u,f,d=8*l-c-1,h=(1<<d)-1,p=h>>1,g=-7,m=s?l-1:0,v=s?-1:1,y=i[a+m];for(m+=v,u=y&(1<<-g)-1,y>>=-g,g+=d;g>0;u=256*u+i[a+m],m+=v,g-=8);for(f=u&(1<<-g)-1,u>>=-g,g+=c;g>0;f=256*f+i[a+m],m+=v,g-=8);if(u===0)u=1-p;else{if(u===h)return f?NaN:1/0*(y?-1:1);f+=Math.pow(2,c),u-=p}return(y?-1:1)*f*Math.pow(2,u-c)},o.write=function(i,a,s,c,l,u){var f,d,h,p=8*u-l-1,g=(1<<p)-1,m=g>>1,v=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=c?0:u-1,b=c?1:-1,w=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(d=isNaN(a)?1:0,f=g):(f=Math.floor(Math.log(a)/Math.LN2),a*(h=Math.pow(2,-f))<1&&(f--,h*=2),(a+=f+m>=1?v/h:v*Math.pow(2,1-m))*h>=2&&(f++,h/=2),f+m>=g?(d=0,f=g):f+m>=1?(d=(a*h-1)*Math.pow(2,l),f+=m):(d=a*Math.pow(2,m-1)*Math.pow(2,l),f=0));l>=8;i[s+y]=255&d,y+=b,d/=256,l-=8);for(f=f<<l|d,p+=l;p>0;i[s+y]=255&f,y+=b,f/=256,p-=8);i[s+y-b]|=128*w}},{}],440:[function(r,n,o){typeof Object.create=="function"?n.exports=function(i,a){a&&(i.super_=a,i.prototype=Object.create(a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:n.exports=function(i,a){if(a){i.super_=a;var s=function(){};s.prototype=a.prototype,i.prototype=new s,i.prototype.constructor=i}}},{}],441:[function(r,n,o){(function(i,a,s,c,l,u,f,d){(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(h){typeof o=="object"&&n!==void 0?n.exports=h():(typeof window<"u"?window:a!==void 0?a:typeof self<"u"?self:this).JSZip=h()})(function(){return function h(p,g,m){function v(w,E){if(!g[w]){if(!p[w]){var I=typeof r=="function"&&r;if(!E&&I)return I(w,!0);if(y)return y(w,!0);var O=new Error("Cannot find module '"+w+"'");throw O.code="MODULE_NOT_FOUND",O}var D=g[w]={exports:{}};p[w][0].call(D.exports,function(N){return v(p[w][1][N]||N)},D,D.exports,h,p,g,m)}return g[w].exports}for(var y=typeof r=="function"&&r,b=0;b<m.length;b++)v(m[b]);return v}({1:[function(h,p,g){var m=h("./utils"),v=h("./support"),y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";g.encode=function(b){for(var w,E,I,O,D,N,U,B=[],F=0,T=b.length,P=T,_=m.getTypeOf(b)!=="string";F<b.length;)P=T-F,I=_?(w=b[F++],E=F<T?b[F++]:0,F<T?b[F++]:0):(w=b.charCodeAt(F++),E=F<T?b.charCodeAt(F++):0,F<T?b.charCodeAt(F++):0),O=w>>2,D=(3&w)<<4|E>>4,N=1<P?(15&E)<<2|I>>6:64,U=2<P?63&I:64,B.push(y.charAt(O)+y.charAt(D)+y.charAt(N)+y.charAt(U));return B.join("")},g.decode=function(b){var w,E,I,O,D,N,U=0,B=0,F="data:";if(b.substr(0,F.length)===F)throw new Error("Invalid base64 input, it looks like a data url.");var T,P=3*(b=b.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(b.charAt(b.length-1)===y.charAt(64)&&P--,b.charAt(b.length-2)===y.charAt(64)&&P--,P%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=v.uint8array?new Uint8Array(0|P):new Array(0|P);U<b.length;)w=y.indexOf(b.charAt(U++))<<2|(O=y.indexOf(b.charAt(U++)))>>4,E=(15&O)<<4|(D=y.indexOf(b.charAt(U++)))>>2,I=(3&D)<<6|(N=y.indexOf(b.charAt(U++))),T[B++]=w,D!==64&&(T[B++]=E),N!==64&&(T[B++]=I);return T}},{"./support":30,"./utils":32}],2:[function(h,p,g){var m=h("./external"),v=h("./stream/DataWorker"),y=h("./stream/Crc32Probe"),b=h("./stream/DataLengthProbe");function w(E,I,O,D,N){this.compressedSize=E,this.uncompressedSize=I,this.crc32=O,this.compression=D,this.compressedContent=N}w.prototype={getContentWorker:function(){var E=new v(m.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new b("data_length")),I=this;return E.on("end",function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),E},getCompressedWorker:function(){return new v(m.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},w.createWorkerFrom=function(E,I,O){return E.pipe(new y).pipe(new b("uncompressedSize")).pipe(I.compressWorker(O)).pipe(new b("compressedSize")).withStreamInfo("compression",I)},p.exports=w},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(h,p,g){var m=h("./stream/GenericWorker");g.STORE={magic:"\0\0",compressWorker:function(){return new m("STORE compression")},uncompressWorker:function(){return new m("STORE decompression")}},g.DEFLATE=h("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(h,p,g){var m=h("./utils"),v=function(){for(var y,b=[],w=0;w<256;w++){y=w;for(var E=0;E<8;E++)y=1&y?3988292384^y>>>1:y>>>1;b[w]=y}return b}();p.exports=function(y,b){return y!==void 0&&y.length?m.getTypeOf(y)!=="string"?function(w,E,I,O){var D=v,N=0+I;w^=-1;for(var U=0;U<N;U++)w=w>>>8^D[255&(w^E[U])];return-1^w}(0|b,y,y.length):function(w,E,I,O){var D=v,N=0+I;w^=-1;for(var U=0;U<N;U++)w=w>>>8^D[255&(w^E.charCodeAt(U))];return-1^w}(0|b,y,y.length):0}},{"./utils":32}],5:[function(h,p,g){g.base64=!1,g.binary=!1,g.dir=!1,g.createFolders=!0,g.date=null,g.compression=null,g.compressionOptions=null,g.comment=null,g.unixPermissions=null,g.dosPermissions=null},{}],6:[function(h,p,g){var m;m=typeof Promise<"u"?Promise:h("lie"),p.exports={Promise:m}},{lie:37}],7:[function(h,p,g){var m=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",v=h("pako"),y=h("./utils"),b=h("./stream/GenericWorker"),w=m?"uint8array":"array";function E(I,O){b.call(this,"FlateWorker/"+I),this._pako=null,this._pakoAction=I,this._pakoOptions=O,this.meta={}}g.magic="\b\0",y.inherits(E,b),E.prototype.processChunk=function(I){this.meta=I.meta,this._pako===null&&this._createPako(),this._pako.push(y.transformTo(w,I.data),!1)},E.prototype.flush=function(){b.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},E.prototype.cleanUp=function(){b.prototype.cleanUp.call(this),this._pako=null},E.prototype._createPako=function(){this._pako=new v[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var I=this;this._pako.onData=function(O){I.push({data:O,meta:I.meta})}},g.compressWorker=function(I){return new E("Deflate",I)},g.uncompressWorker=function(){return new E("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(h,p,g){function m(D,N){var U,B="";for(U=0;U<N;U++)B+=String.fromCharCode(255&D),D>>>=8;return B}function v(D,N,U,B,F,T){var P,_,C=D.file,S=D.compression,x=T!==w.utf8encode,k=y.transformTo("string",T(C.name)),L=y.transformTo("string",w.utf8encode(C.name)),j=C.comment,z=y.transformTo("string",T(j)),Y=y.transformTo("string",w.utf8encode(j)),K=L.length!==C.name.length,Q=Y.length!==j.length,q="",J="",G="",V=C.dir,X=C.date,te={crc32:0,compressedSize:0,uncompressedSize:0};N&&!U||(te.crc32=D.crc32,te.compressedSize=D.compressedSize,te.uncompressedSize=D.uncompressedSize);var ee=0;N&&(ee|=8),x||!K&&!Q||(ee|=2048);var re=0,se=0;V&&(re|=16),F==="UNIX"?(se=798,re|=function(ce,ne){var he=ce;return ce||(he=ne?16893:33204),(65535&he)<<16}(C.unixPermissions,V)):(se=20,re|=function(ce){return 63&(ce||0)}(C.dosPermissions)),P=X.getUTCHours(),P<<=6,P|=X.getUTCMinutes(),P<<=5,P|=X.getUTCSeconds()/2,_=X.getUTCFullYear()-1980,_<<=4,_|=X.getUTCMonth()+1,_<<=5,_|=X.getUTCDate(),K&&(J=m(1,1)+m(E(k),4)+L,q+="up"+m(J.length,2)+J),Q&&(G=m(1,1)+m(E(z),4)+Y,q+="uc"+m(G.length,2)+G);var pe="";return pe+=`
\0`,pe+=m(ee,2),pe+=S.magic,pe+=m(P,2),pe+=m(_,2),pe+=m(te.crc32,4),pe+=m(te.compressedSize,4),pe+=m(te.uncompressedSize,4),pe+=m(k.length,2),pe+=m(q.length,2),{fileRecord:I.LOCAL_FILE_HEADER+pe+k+q,dirRecord:I.CENTRAL_FILE_HEADER+m(se,2)+pe+m(z.length,2)+"\0\0\0\0"+m(re,4)+m(B,4)+k+q+z}}var y=h("../utils"),b=h("../stream/GenericWorker"),w=h("../utf8"),E=h("../crc32"),I=h("../signature");function O(D,N,U,B){b.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=N,this.zipPlatform=U,this.encodeFileName=B,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}y.inherits(O,b),O.prototype.push=function(D){var N=D.meta.percent||0,U=this.entriesCount,B=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,b.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:U?(N+100*(U-B-1))/U:100}}))},O.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var N=this.streamFiles&&!D.file.dir;if(N){var U=v(D,N,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:U.fileRecord,meta:{percent:0}})}else this.accumulate=!0},O.prototype.closedSource=function(D){this.accumulate=!1;var N=this.streamFiles&&!D.file.dir,U=v(D,N,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(U.dirRecord),N)this.push({data:function(B){return I.DATA_DESCRIPTOR+m(B.crc32,4)+m(B.compressedSize,4)+m(B.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:U.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},O.prototype.flush=function(){for(var D=this.bytesWritten,N=0;N<this.dirRecords.length;N++)this.push({data:this.dirRecords[N],meta:{percent:100}});var U=this.bytesWritten-D,B=function(F,T,P,_,C){var S=y.transformTo("string",C(_));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+m(F,2)+m(F,2)+m(T,4)+m(P,4)+m(S.length,2)+S}(this.dirRecords.length,U,D,this.zipComment,this.encodeFileName);this.push({data:B,meta:{percent:100}})},O.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},O.prototype.registerPrevious=function(D){this._sources.push(D);var N=this;return D.on("data",function(U){N.processChunk(U)}),D.on("end",function(){N.closedSource(N.previous.streamInfo),N._sources.length?N.prepareNextSource():N.end()}),D.on("error",function(U){N.error(U)}),this},O.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))},O.prototype.error=function(D){var N=this._sources;if(!b.prototype.error.call(this,D))return!1;for(var U=0;U<N.length;U++)try{N[U].error(D)}catch{}return!0},O.prototype.lock=function(){b.prototype.lock.call(this);for(var D=this._sources,N=0;N<D.length;N++)D[N].lock()},p.exports=O},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(h,p,g){var m=h("../compressions"),v=h("./ZipFileWorker");g.generateWorker=function(y,b,w){var E=new v(b.streamFiles,w,b.platform,b.encodeFileName),I=0;try{y.forEach(function(O,D){I++;var N=function(T,P){var _=T||P,C=m[_];if(!C)throw new Error(_+" is not a valid compression method !");return C}(D.options.compression,b.compression),U=D.options.compressionOptions||b.compressionOptions||{},B=D.dir,F=D.date;D._compressWorker(N,U).withStreamInfo("file",{name:O,dir:B,date:F,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(E)}),E.entriesCount=I}catch(O){E.error(O)}return E}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(h,p,g){function m(){if(!(this instanceof m))return new m;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 v=new m;for(var y in this)typeof this[y]!="function"&&(v[y]=this[y]);return v}}(m.prototype=h("./object")).loadAsync=h("./load"),m.support=h("./support"),m.defaults=h("./defaults"),m.version="3.10.1",m.loadAsync=function(v,y){return new m().loadAsync(v,y)},m.external=h("./external"),p.exports=m},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(h,p,g){var m=h("./utils"),v=h("./external"),y=h("./utf8"),b=h("./zipEntries"),w=h("./stream/Crc32Probe"),E=h("./nodejsUtils");function I(O){return new v.Promise(function(D,N){var U=O.decompressed.getContentWorker().pipe(new w);U.on("error",function(B){N(B)}).on("end",function(){U.streamInfo.crc32!==O.decompressed.crc32?N(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}p.exports=function(O,D){var N=this;return D=m.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:y.utf8decode}),E.isNode&&E.isStream(O)?v.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):m.prepareContent("the loaded zip file",O,!0,D.optimizedBinaryString,D.base64).then(function(U){var B=new b(D);return B.load(U),B}).then(function(U){var B=[v.Promise.resolve(U)],F=U.files;if(D.checkCRC32)for(var T=0;T<F.length;T++)B.push(I(F[T]));return v.Promise.all(B)}).then(function(U){for(var B=U.shift(),F=B.files,T=0;T<F.length;T++){var P=F[T],_=P.fileNameStr,C=m.resolve(P.fileNameStr);N.file(C,P.decompressed,{binary:!0,optimizedBinaryString:!0,date:P.date,dir:P.dir,comment:P.fileCommentStr.length?P.fileCommentStr:null,unixPermissions:P.unixPermissions,dosPermissions:P.dosPermissions,createFolders:D.createFolders}),P.dir||(N.file(C).unsafeOriginalName=_)}return B.zipComment.length&&(N.comment=B.zipComment),N})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(h,p,g){var m=h("../utils"),v=h("../stream/GenericWorker");function y(b,w){v.call(this,"Nodejs stream input adapter for "+b),this._upstreamEnded=!1,this._bindStream(w)}m.inherits(y,v),y.prototype._bindStream=function(b){var w=this;(this._stream=b).pause(),b.on("data",function(E){w.push({data:E,meta:{percent:0}})}).on("error",function(E){w.isPaused?this.generatedError=E:w.error(E)}).on("end",function(){w.isPaused?w._upstreamEnded=!0:w.end()})},y.prototype.pause=function(){return!!v.prototype.pause.call(this)&&(this._stream.pause(),!0)},y.prototype.resume=function(){return!!v.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},p.exports=y},{"../stream/GenericWorker":28,"../utils":32}],13:[function(h,p,g){var m=h("readable-stream").Readable;function v(y,b,w){m.call(this,b),this._helper=y;var E=this;y.on("data",function(I,O){E.push(I)||E._helper.pause(),w&&w(O)}).on("error",function(I){E.emit("error",I)}).on("end",function(){E.push(null)})}h("../utils").inherits(v,m),v.prototype._read=function(){this._helper.resume()},p.exports=v},{"../utils":32,"readable-stream":16}],14:[function(h,p,g){p.exports={isNode:s!==void 0,newBufferFrom:function(m,v){if(s.from&&s.from!==Uint8Array.from)return s.from(m,v);if(typeof m=="number")throw new Error('The "data" argument must not be a number');return new s(m,v)},allocBuffer:function(m){if(s.alloc)return s.alloc(m);var v=new s(m);return v.fill(0),v},isBuffer:function(m){return s.isBuffer(m)},isStream:function(m){return m&&typeof m.on=="function"&&typeof m.pause=="function"&&typeof m.resume=="function"}}},{}],15:[function(h,p,g){function m(C,S,x){var k,L=y.getTypeOf(S),j=y.extend(x||{},E);j.date=j.date||new Date,j.compression!==null&&(j.compression=j.compression.toUpperCase()),typeof j.unixPermissions=="string"&&(j.unixPermissions=parseInt(j.unixPermissions,8)),j.unixPermissions&&16384&j.unixPermissions&&(j.dir=!0),j.dosPermissions&&16&j.dosPermissions&&(j.dir=!0),j.dir&&(C=F(C)),j.createFolders&&(k=B(C))&&T.call(this,k,!0);var z=L==="string"&&j.binary===!1&&j.base64===!1;x&&x.binary!==void 0||(j.binary=!z),(S instanceof I&&S.uncompressedSize===0||j.dir||!S||S.length===0)&&(j.base64=!1,j.binary=!0,S="",j.compression="STORE",L="string");var Y;Y=S instanceof I||S instanceof b?S:N.isNode&&N.isStream(S)?new U(C,S):y.prepareContent(C,S,j.binary,j.optimizedBinaryString,j.base64);var K=new O(C,Y,j);this.files[C]=K}var v=h("./utf8"),y=h("./utils"),b=h("./stream/GenericWorker"),w=h("./stream/StreamHelper"),E=h("./defaults"),I=h("./compressedObject"),O=h("./zipObject"),D=h("./generate"),N=h("./nodejsUtils"),U=h("./nodejs/NodejsStreamInputAdapter"),B=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var S=C.lastIndexOf("/");return 0<S?C.substring(0,S):""},F=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},T=function(C,S){return S=S!==void 0?S:E.createFolders,C=F(C),this.files[C]||m.call(this,C,null,{dir:!0,createFolders:S}),this.files[C]};function P(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var S,x,k;for(S in this.files)k=this.files[S],(x=S.slice(this.root.length,S.length))&&S.slice(0,this.root.length)===this.root&&C(x,k)},filter:function(C){var S=[];return this.forEach(function(x,k){C(x,k)&&S.push(k)}),S},file:function(C,S,x){if(arguments.length!==1)return C=this.root+C,m.call(this,C,S,x),this;if(P(C)){var k=C;return this.filter(function(j,z){return!z.dir&&k.test(j)})}var L=this.files[this.root+C];return L&&!L.dir?L:null},folder:function(C){if(!C)return this;if(P(C))return this.filter(function(L,j){return j.dir&&C.test(L)});var S=this.root+C,x=T.call(this,S),k=this.clone();return k.root=x.name,k},remove:function(C){C=this.root+C;var S=this.files[C];if(S||(C.slice(-1)!=="/"&&(C+="/"),S=this.files[C]),S&&!S.dir)delete this.files[C];else for(var x=this.filter(function(L,j){return j.name.slice(0,C.length)===C}),k=0;k<x.length;k++)delete this.files[x[k].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var S,x={};try{if((x=y.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:v.utf8encode})).type=x.type.toLowerCase(),x.compression=x.compression.toUpperCase(),x.type==="binarystring"&&(x.type="string"),!x.type)throw new Error("No output type specified.");y.checkSupport(x.type),x.platform!=="darwin"&&x.platform!=="freebsd"&&x.platform!=="linux"&&x.platform!=="sunos"||(x.platform="UNIX"),x.platform==="win32"&&(x.platform="DOS");var k=x.comment||this.comment||"";S=D.generateWorker(this,x,k)}catch(L){(S=new b("error")).error(L)}return new w(S,x.type||"string",x.mimeType)},generateAsync:function(C,S){return this.generateInternalStream(C).accumulate(S)},generateNodeStream:function(C,S){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(S)}};p.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(h,p,g){p.exports=h("stream")},{stream:void 0}],17:[function(h,p,g){var m=h("./DataReader");function v(y){m.call(this,y);for(var b=0;b<this.data.length;b++)y[b]=255&y[b]}h("../utils").inherits(v,m),v.prototype.byteAt=function(y){return this.data[this.zero+y]},v.prototype.lastIndexOfSignature=function(y){for(var b=y.charCodeAt(0),w=y.charCodeAt(1),E=y.charCodeAt(2),I=y.charCodeAt(3),O=this.length-4;0<=O;--O)if(this.data[O]===b&&this.data[O+1]===w&&this.data[O+2]===E&&this.data[O+3]===I)return O-this.zero;return-1},v.prototype.readAndCheckSignature=function(y){var b=y.charCodeAt(0),w=y.charCodeAt(1),E=y.charCodeAt(2),I=y.charCodeAt(3),O=this.readData(4);return b===O[0]&&w===O[1]&&E===O[2]&&I===O[3]},v.prototype.readData=function(y){if(this.checkOffset(y),y===0)return[];var b=this.data.slice(this.zero+this.index,this.zero+this.index+y);return this.index+=y,b},p.exports=v},{"../utils":32,"./DataReader":18}],18:[function(h,p,g){var m=h("../utils");function v(y){this.data=y,this.length=y.length,this.index=0,this.zero=0}v.prototype={checkOffset:function(y){this.checkIndex(this.index+y)},checkIndex:function(y){if(this.length<this.zero+y||y<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+y+"). Corrupted zip ?")},setIndex:function(y){this.checkIndex(y),this.index=y},skip:function(y){this.setIndex(this.index+y)},byteAt:function(){},readInt:function(y){var b,w=0;for(this.checkOffset(y),b=this.index+y-1;b>=this.index;b--)w=(w<<8)+this.byteAt(b);return this.index+=y,w},readString:function(y){return m.transformTo("string",this.readData(y))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var y=this.readInt(4);return new Date(Date.UTC(1980+(y>>25&127),(y>>21&15)-1,y>>16&31,y>>11&31,y>>5&63,(31&y)<<1))}},p.exports=v},{"../utils":32}],19:[function(h,p,g){var m=h("./Uint8ArrayReader");function v(y){m.call(this,y)}h("../utils").inherits(v,m),v.prototype.readData=function(y){this.checkOffset(y);var b=this.data.slice(this.zero+this.index,this.zero+this.index+y);return this.index+=y,b},p.exports=v},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(h,p,g){var m=h("./DataReader");function v(y){m.call(this,y)}h("../utils").inherits(v,m),v.prototype.byteAt=function(y){return this.data.charCodeAt(this.zero+y)},v.prototype.lastIndexOfSignature=function(y){return this.data.lastIndexOf(y)-this.zero},v.prototype.readAndCheckSignature=function(y){return y===this.readData(4)},v.prototype.readData=function(y){this.checkOffset(y);var b=this.data.slice(this.zero+this.index,this.zero+this.index+y);return this.index+=y,b},p.exports=v},{"../utils":32,"./DataReader":18}],21:[function(h,p,g){var m=h("./ArrayReader");function v(y){m.call(this,y)}h("../utils").inherits(v,m),v.prototype.readData=function(y){if(this.checkOffset(y),y===0)return new Uint8Array(0);var b=this.data.subarray(this.zero+this.index,this.zero+this.index+y);return this.index+=y,b},p.exports=v},{"../utils":32,"./ArrayReader":17}],22:[function(h,p,g){var m=h("../utils"),v=h("../support"),y=h("./ArrayReader"),b=h("./StringReader"),w=h("./NodeBufferReader"),E=h("./Uint8ArrayReader");p.exports=function(I){var O=m.getTypeOf(I);return m.checkSupport(O),O!=="string"||v.uint8array?O==="nodebuffer"?new w(I):v.uint8array?new E(m.transformTo("uint8array",I)):new y(m.transformTo("array",I)):new b(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(h,p,g){g.LOCAL_FILE_HEADER="PK",g.CENTRAL_FILE_HEADER="PK",g.CENTRAL_DIRECTORY_END="PK",g.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",g.ZIP64_CENTRAL_DIRECTORY_END="PK",g.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(h,p,g){var m=h("./GenericWorker"),v=h("../utils");function y(b){m.call(this,"ConvertWorker to "+b),this.destType=b}v.inherits(y,m),y.prototype.processChunk=function(b){this.push({data:v.transformTo(this.destType,b.data),meta:b.meta})},p.exports=y},{"../utils":32,"./GenericWorker":28}],25:[function(h,p,g){var m=h("./GenericWorker"),v=h("../crc32");function y(){m.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}h("../utils").inherits(y,m),y.prototype.processChunk=function(b){this.streamInfo.crc32=v(b.data,this.streamInfo.crc32||0),this.push(b)},p.exports=y},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(h,p,g){var m=h("../utils"),v=h("./GenericWorker");function y(b){v.call(this,"DataLengthProbe for "+b),this.propName=b,this.withStreamInfo(b,0)}m.inherits(y,v),y.prototype.processChunk=function(b){if(b){var w=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=w+b.data.length}v.prototype.processChunk.call(this,b)},p.exports=y},{"../utils":32,"./GenericWorker":28}],27:[function(h,p,g){var m=h("../utils"),v=h("./GenericWorker");function y(b){v.call(this,"DataWorker");var w=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,b.then(function(E){w.dataIsReady=!0,w.data=E,w.max=E&&E.length||0,w.type=m.getTypeOf(E),w.isPaused||w._tickAndRepeat()},function(E){w.error(E)})}m.inherits(y,v),y.prototype.cleanUp=function(){v.prototype.cleanUp.call(this),this.data=null},y.prototype.resume=function(){return!!v.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,m.delay(this._tickAndRepeat,[],this)),!0)},y.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(m.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},y.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var b=null,w=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,w);break;case"uint8array":b=this.data.subarray(this.index,w);break;case"array":case"nodebuffer":b=this.data.slice(this.index,w)}return this.index=w,this.push({data:b,meta:{percent:this.max?this.index/this.max*100:0}})},p.exports=y},{"../utils":32,"./GenericWorker":28}],28:[function(h,p,g){function m(v){this.name=v||"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}m.prototype={push:function(v){this.emit("data",v)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(v){this.emit("error",v)}return!0},error:function(v){return!this.isFinished&&(this.isPaused?this.generatedError=v:(this.isFinished=!0,this.emit("error",v),this.previous&&this.previous.error(v),this.cleanUp()),!0)},on:function(v,y){return this._listeners[v].push(y),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(v,y){if(this._listeners[v])for(var b=0;b<this._listeners[v].length;b++)this._listeners[v][b].call(this,y)},pipe:function(v){return v.registerPrevious(this)},registerPrevious:function(v){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=v.streamInfo,this.mergeStreamInfo(),this.previous=v;var y=this;return v.on("data",function(b){y.processChunk(b)}),v.on("end",function(){y.end()}),v.on("error",function(b){y.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 v=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),v=!0),this.previous&&this.previous.resume(),!v},flush:function(){},processChunk:function(v){this.push(v)},withStreamInfo:function(v,y){return this.extraStreamInfo[v]=y,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var v in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,v)&&(this.streamInfo[v]=this.extraStreamInfo[v])},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 v="Worker "+this.name;return this.previous?this.previous+" -> "+v:v}},p.exports=m},{}],29:[function(h,p,g){var m=h("../utils"),v=h("./ConvertWorker"),y=h("./GenericWorker"),b=h("../base64"),w=h("../support"),E=h("../external"),I=null;if(w.nodestream)try{I=h("../nodejs/NodejsStreamOutputAdapter")}catch{}function O(D,N,U){var B=N;switch(N){case"blob":case"arraybuffer":B="uint8array";break;case"base64":B="string"}try{this._internalType=B,this._outputType=N,this._mimeType=U,m.checkSupport(B),this._worker=D.pipe(new v(B)),D.lock()}catch(F){this._worker=new y("error"),this._worker.error(F)}}O.prototype={accumulate:function(D){return function(N,U){return new E.Promise(function(B,F){var T=[],P=N._internalType,_=N._outputType,C=N._mimeType;N.on("data",function(S,x){T.push(S),U&&U(x)}).on("error",function(S){T=[],F(S)}).on("end",function(){try{var S=function(x,k,L){switch(x){case"blob":return m.newBlob(m.transformTo("arraybuffer",k),L);case"base64":return b.encode(k);default:return m.transformTo(x,k)}}(_,function(x,k){var L,j=0,z=null,Y=0;for(L=0;L<k.length;L++)Y+=k[L].length;switch(x){case"string":return k.join("");case"array":return Array.prototype.concat.apply([],k);case"uint8array":for(z=new Uint8Array(Y),L=0;L<k.length;L++)z.set(k[L],j),j+=k[L].length;return z;case"nodebuffer":return s.concat(k);default:throw new Error("concat : unsupported type '"+x+"'")}}(P,T),C);B(S)}catch(x){F(x)}T=[]}).resume()})}(this,D)},on:function(D,N){var U=this;return D==="data"?this._worker.on(D,function(B){N.call(U,B.data,B.meta)}):this._worker.on(D,function(){m.delay(N,arguments,U)}),this},resume:function(){return m.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(D){if(m.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},D)}},p.exports=O},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(h,p,g){if(g.base64=!0,g.array=!0,g.string=!0,g.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",g.nodebuffer=s!==void 0,g.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")g.blob=!1;else{var m=new ArrayBuffer(0);try{g.blob=new Blob([m],{type:"application/zip"}).size===0}catch{try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);v.append(m),g.blob=v.getBlob("application/zip").size===0}catch{g.blob=!1}}}try{g.nodestream=!!h("readable-stream").Readable}catch{g.nodestream=!1}},{"readable-stream":16}],31:[function(h,p,g){for(var m=h("./utils"),v=h("./support"),y=h("./nodejsUtils"),b=h("./stream/GenericWorker"),w=new Array(256),E=0;E<256;E++)w[E]=252<=E?6:248<=E?5:240<=E?4:224<=E?3:192<=E?2:1;function I(){b.call(this,"utf-8 decode"),this.leftOver=null}function O(){b.call(this,"utf-8 encode")}w[254]=w[254]=1,g.utf8encode=function(D){return v.nodebuffer?y.newBufferFrom(D,"utf-8"):function(N){var U,B,F,T,P,_=N.length,C=0;for(T=0;T<_;T++)(64512&(B=N.charCodeAt(T)))==55296&&T+1<_&&(64512&(F=N.charCodeAt(T+1)))==56320&&(B=65536+(B-55296<<10)+(F-56320),T++),C+=B<128?1:B<2048?2:B<65536?3:4;for(U=v.uint8array?new Uint8Array(C):new Array(C),T=P=0;P<C;T++)(64512&(B=N.charCodeAt(T)))==55296&&T+1<_&&(64512&(F=N.charCodeAt(T+1)))==56320&&(B=65536+(B-55296<<10)+(F-56320),T++),B<128?U[P++]=B:(B<2048?U[P++]=192|B>>>6:(B<65536?U[P++]=224|B>>>12:(U[P++]=240|B>>>18,U[P++]=128|B>>>12&63),U[P++]=128|B>>>6&63),U[P++]=128|63&B);return U}(D)},g.utf8decode=function(D){return v.nodebuffer?m.transformTo("nodebuffer",D).toString("utf-8"):function(N){var U,B,F,T,P=N.length,_=new Array(2*P);for(U=B=0;U<P;)if((F=N[U++])<128)_[B++]=F;else if(4<(T=w[F]))_[B++]=65533,U+=T-1;else{for(F&=T===2?31:T===3?15:7;1<T&&U<P;)F=F<<6|63&N[U++],T--;1<T?_[B++]=65533:F<65536?_[B++]=F:(F-=65536,_[B++]=55296|F>>10&1023,_[B++]=56320|1023&F)}return _.length!==B&&(_.subarray?_=_.subarray(0,B):_.length=B),m.applyFromCharCode(_)}(D=m.transformTo(v.uint8array?"uint8array":"array",D))},m.inherits(I,b),I.prototype.processChunk=function(D){var N=m.transformTo(v.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(v.uint8array){var U=N;(N=new Uint8Array(U.length+this.leftOver.length)).set(this.leftOver,0),N.set(U,this.leftOver.length)}else N=this.leftOver.concat(N);this.leftOver=null}var B=function(T,P){var _;for((P=P||T.length)>T.length&&(P=T.length),_=P-1;0<=_&&(192&T[_])==128;)_--;return _<0||_===0?P:_+w[T[_]]>P?_:P}(N),F=N;B!==N.length&&(v.uint8array?(F=N.subarray(0,B),this.leftOver=N.subarray(B,N.length)):(F=N.slice(0,B),this.leftOver=N.slice(B,N.length))),this.push({data:g.utf8decode(F),meta:D.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:g.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},g.Utf8DecodeWorker=I,m.inherits(O,b),O.prototype.processChunk=function(D){this.push({data:g.utf8encode(D.data),meta:D.meta})},g.Utf8EncodeWorker=O},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(h,p,g){var m=h("./support"),v=h("./base64"),y=h("./nodejsUtils"),b=h("./external");function w(U){return U}function E(U,B){for(var F=0;F<U.length;++F)B[F]=255&U.charCodeAt(F);return B}h("setimmediate"),g.newBlob=function(U,B){g.checkSupport("blob");try{return new Blob([U],{type:B})}catch{try{var F=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return F.append(U),F.getBlob(B)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(U,B,F){var T=[],P=0,_=U.length;if(_<=F)return String.fromCharCode.apply(null,U);for(;P<_;)B==="array"||B==="nodebuffer"?T.push(String.fromCharCode.apply(null,U.slice(P,Math.min(P+F,_)))):T.push(String.fromCharCode.apply(null,U.subarray(P,Math.min(P+F,_)))),P+=F;return T.join("")},stringifyByChar:function(U){for(var B="",F=0;F<U.length;F++)B+=String.fromCharCode(U[F]);return B},applyCanBeUsed:{uint8array:function(){try{return m.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return m.nodebuffer&&String.fromCharCode.apply(null,y.allocBuffer(1)).length===1}catch{return!1}}()}};function O(U){var B=65536,F=g.getTypeOf(U),T=!0;if(F==="uint8array"?T=I.applyCanBeUsed.uint8array:F==="nodebuffer"&&(T=I.applyCanBeUsed.nodebuffer),T)for(;1<B;)try{return I.stringifyByChunk(U,F,B)}catch{B=Math.floor(B/2)}return I.stringifyByChar(U)}function D(U,B){for(var F=0;F<U.length;F++)B[F]=U[F];return B}g.applyFromCharCode=O;var N={};N.string={string:w,array:function(U){return E(U,new Array(U.length))},arraybuffer:function(U){return N.string.uint8array(U).buffer},uint8array:function(U){return E(U,new Uint8Array(U.length))},nodebuffer:function(U){return E(U,y.allocBuffer(U.length))}},N.array={string:O,array:w,arraybuffer:function(U){return new Uint8Array(U).buffer},uint8array:function(U){return new Uint8Array(U)},nodebuffer:function(U){return y.newBufferFrom(U)}},N.arraybuffer={string:function(U){return O(new Uint8Array(U))},array:function(U){return D(new Uint8Array(U),new Array(U.byteLength))},arraybuffer:w,uint8array:function(U){return new Uint8Array(U)},nodebuffer:function(U){return y.newBufferFrom(new Uint8Array(U))}},N.uint8array={string:O,array:function(U){return D(U,new Array(U.length))},arraybuffer:function(U){return U.buffer},uint8array:w,nodebuffer:function(U){return y.newBufferFrom(U)}},N.nodebuffer={string:O,array:function(U){return D(U,new Array(U.length))},arraybuffer:function(U){return N.nodebuffer.uint8array(U).buffer},uint8array:function(U){return D(U,new Uint8Array(U.length))},nodebuffer:w},g.transformTo=function(U,B){if(B=B||"",!U)return B;g.checkSupport(U);var F=g.getTypeOf(B);return N[F][U](B)},g.resolve=function(U){for(var B=U.split("/"),F=[],T=0;T<B.length;T++){var P=B[T];P==="."||P===""&&T!==0&&T!==B.length-1||(P===".."?F.pop():F.push(P))}return F.join("/")},g.getTypeOf=function(U){return typeof U=="string"?"string":Object.prototype.toString.call(U)==="[object Array]"?"array":m.nodebuffer&&y.isBuffer(U)?"nodebuffer":m.uint8array&&U instanceof Uint8Array?"uint8array":m.arraybuffer&&U instanceof ArrayBuffer?"arraybuffer":void 0},g.checkSupport=function(U){if(!m[U.toLowerCase()])throw new Error(U+" is not supported by this platform")},g.MAX_VALUE_16BITS=65535,g.MAX_VALUE_32BITS=-1,g.pretty=function(U){var B,F,T="";for(F=0;F<(U||"").length;F++)T+="\\x"+((B=U.charCodeAt(F))<16?"0":"")+B.toString(16).toUpperCase();return T},g.delay=function(U,B,F){d(function(){U.apply(F||null,B||[])})},g.inherits=function(U,B){function F(){}F.prototype=B.prototype,U.prototype=new F},g.extend=function(){var U,B,F={};for(U=0;U<arguments.length;U++)for(B in arguments[U])Object.prototype.hasOwnProperty.call(arguments[U],B)&&F[B]===void 0&&(F[B]=arguments[U][B]);return F},g.prepareContent=function(U,B,F,T,P){return b.Promise.resolve(B).then(function(_){return m.blob&&(_ instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(_))!==-1)&&typeof FileReader<"u"?new b.Promise(function(C,S){var x=new FileReader;x.onload=function(k){C(k.target.result)},x.onerror=function(k){S(k.target.error)},x.readAsArrayBuffer(_)}):_}).then(function(_){var C=g.getTypeOf(_);return C?(C==="arraybuffer"?_=g.transformTo("uint8array",_):C==="string"&&(P?_=v.decode(_):F&&T!==!0&&(_=function(S){return E(S,m.uint8array?new Uint8Array(S.length):new Array(S.length))}(_))),_):b.Promise.reject(new Error("Can't read the data of '"+U+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(h,p,g){var m=h("./reader/readerFor"),v=h("./utils"),y=h("./signature"),b=h("./zipEntry"),w=h("./support");function E(I){this.files=[],this.loadOptions=I}E.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var O=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+v.pretty(O)+", expected "+v.pretty(I)+")")}},isSignature:function(I,O){var D=this.reader.index;this.reader.setIndex(I);var N=this.reader.readString(4)===O;return this.reader.setIndex(D),N},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var I=this.reader.readData(this.zipCommentLength),O=w.uint8array?"uint8array":"array",D=v.transformTo(O,I);this.zipComment=this.loadOptions.decodeFileName(D)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var I,O,D,N=this.zip64EndOfCentralSize-44;0<N;)I=this.reader.readInt(2),O=this.reader.readInt(4),D=this.reader.readData(O),this.zip64ExtensibleData[I]={id:I,length:O,value:D}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var I,O;for(I=0;I<this.files.length;I++)O=this.files[I],this.reader.setIndex(O.localHeaderOffset),this.checkSignature(y.LOCAL_FILE_HEADER),O.readLocalPart(this.reader),O.handleUTF8(),O.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(y.CENTRAL_FILE_HEADER);)(I=new b({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var I=this.reader.lastIndexOfSignature(y.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,y.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(I);var O=I;if(this.checkSignature(y.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===v.MAX_VALUE_16BITS||this.diskWithCentralDirStart===v.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===v.MAX_VALUE_16BITS||this.centralDirRecords===v.MAX_VALUE_16BITS||this.centralDirSize===v.MAX_VALUE_32BITS||this.centralDirOffset===v.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(y.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(y.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,y.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(y.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(y.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var N=O-D;if(0<N)this.isSignature(O,y.CENTRAL_FILE_HEADER)||(this.reader.zero=N);else if(N<0)throw new Error("Corrupted zip: missing "+Math.abs(N)+" bytes.")},prepareReader:function(I){this.reader=m(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},p.exports=E},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(h,p,g){var m=h("./reader/readerFor"),v=h("./utils"),y=h("./compressedObject"),b=h("./crc32"),w=h("./utf8"),E=h("./compressions"),I=h("./support");function O(D,N){this.options=D,this.loadOptions=N}O.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var N,U;if(D.skip(22),this.fileNameLength=D.readInt(2),U=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(U),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((N=function(B){for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F)&&E[F].magic===B)return E[F];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+v.pretty(this.compressionMethod)+" unknown (inner file : "+v.transformTo("string",this.fileName)+")");this.decompressed=new y(this.compressedSize,this.uncompressedSize,this.crc32,N,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var N=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(N),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=m(this.extraFields[1].value);this.uncompressedSize===v.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===v.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===v.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===v.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var N,U,B,F=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<F;)N=D.readInt(2),U=D.readInt(2),B=D.readData(U),this.extraFields[N]={id:N,length:U,value:B};D.setIndex(F)},handleUTF8:function(){var D=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=w.utf8decode(this.fileName),this.fileCommentStr=w.utf8decode(this.fileComment);else{var N=this.findExtraFieldUnicodePath();if(N!==null)this.fileNameStr=N;else{var U=v.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(U)}var B=this.findExtraFieldUnicodeComment();if(B!==null)this.fileCommentStr=B;else{var F=v.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(F)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var N=m(D.value);return N.readInt(1)!==1||b(this.fileName)!==N.readInt(4)?null:w.utf8decode(N.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var N=m(D.value);return N.readInt(1)!==1||b(this.fileComment)!==N.readInt(4)?null:w.utf8decode(N.readData(D.length-5))}return null}},p.exports=O},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(h,p,g){function m(N,U,B){this.name=N,this.dir=B.dir,this.date=B.date,this.comment=B.comment,this.unixPermissions=B.unixPermissions,this.dosPermissions=B.dosPermissions,this._data=U,this._dataBinary=B.binary,this.options={compression:B.compression,compressionOptions:B.compressionOptions}}var v=h("./stream/StreamHelper"),y=h("./stream/DataWorker"),b=h("./utf8"),w=h("./compressedObject"),E=h("./stream/GenericWorker");m.prototype={internalStream:function(N){var U=null,B="string";try{if(!N)throw new Error("No output type specified.");var F=(B=N.toLowerCase())==="string"||B==="text";B!=="binarystring"&&B!=="text"||(B="string"),U=this._decompressWorker();var T=!this._dataBinary;T&&!F&&(U=U.pipe(new b.Utf8EncodeWorker)),!T&&F&&(U=U.pipe(new b.Utf8DecodeWorker))}catch(P){(U=new E("error")).error(P)}return new v(U,B,"")},async:function(N,U){return this.internalStream(N).accumulate(U)},nodeStream:function(N,U){return this.internalStream(N||"nodebuffer").toNodejsStream(U)},_compressWorker:function(N,U){if(this._data instanceof w&&this._data.compression.magic===N.magic)return this._data.getCompressedWorker();var B=this._decompressWorker();return this._dataBinary||(B=B.pipe(new b.Utf8EncodeWorker)),w.createWorkerFrom(B,N,U)},_decompressWorker:function(){return this._data instanceof w?this._data.getContentWorker():this._data instanceof E?this._data:new y(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],O=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<I.length;D++)m.prototype[I[D]]=O;p.exports=m},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(h,p,g){(function(m){var v,y,b=m.MutationObserver||m.WebKitMutationObserver;if(b){var w=0,E=new b(N),I=m.document.createTextNode("");E.observe(I,{characterData:!0}),v=function(){I.data=w=++w%2}}else if(m.setImmediate||m.MessageChannel===void 0)v="document"in m&&"onreadystatechange"in m.document.createElement("script")?function(){var U=m.document.createElement("script");U.onreadystatechange=function(){N(),U.onreadystatechange=null,U.parentNode.removeChild(U),U=null},m.document.documentElement.appendChild(U)}:function(){setTimeout(N,0)};else{var O=new m.MessageChannel;O.port1.onmessage=N,v=function(){O.port2.postMessage(0)}}var D=[];function N(){var U,B;y=!0;for(var F=D.length;F;){for(B=D,D=[],U=-1;++U<F;)B[U]();F=D.length}y=!1}p.exports=function(U){D.push(U)!==1||y||v()}}).call(this,a!==void 0?a:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(h,p,g){var m=h("immediate");function v(){}var y={},b=["REJECTED"],w=["FULFILLED"],E=["PENDING"];function I(F){if(typeof F!="function")throw new TypeError("resolver must be a function");this.state=E,this.queue=[],this.outcome=void 0,F!==v&&U(this,F)}function O(F,T,P){this.promise=F,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof P=="function"&&(this.onRejected=P,this.callRejected=this.otherCallRejected)}function D(F,T,P){m(function(){var _;try{_=T(P)}catch(C){return y.reject(F,C)}_===F?y.reject(F,new TypeError("Cannot resolve promise with itself")):y.resolve(F,_)})}function N(F){var T=F&&F.then;if(F&&(typeof F=="object"||typeof F=="function")&&typeof T=="function")return function(){T.apply(F,arguments)}}function U(F,T){var P=!1;function _(x){P||(P=!0,y.reject(F,x))}function C(x){P||(P=!0,y.resolve(F,x))}var S=B(function(){T(C,_)});S.status==="error"&&_(S.value)}function B(F,T){var P={};try{P.value=F(T),P.status="success"}catch(_){P.status="error",P.value=_}return P}(p.exports=I).prototype.finally=function(F){if(typeof F!="function")return this;var T=this.constructor;return this.then(function(P){return T.resolve(F()).then(function(){return P})},function(P){return T.resolve(F()).then(function(){throw P})})},I.prototype.catch=function(F){return this.then(null,F)},I.prototype.then=function(F,T){if(typeof F!="function"&&this.state===w||typeof T!="function"&&this.state===b)return this;var P=new this.constructor(v);return this.state!==E?D(P,this.state===w?F:T,this.outcome):this.queue.push(new O(P,F,T)),P},O.prototype.callFulfilled=function(F){y.resolve(this.promise,F)},O.prototype.otherCallFulfilled=function(F){D(this.promise,this.onFulfilled,F)},O.prototype.callRejected=function(F){y.reject(this.promise,F)},O.prototype.otherCallRejected=function(F){D(this.promise,this.onRejected,F)},y.resolve=function(F,T){var P=B(N,T);if(P.status==="error")return y.reject(F,P.value);var _=P.value;if(_)U(F,_);else{F.state=w,F.outcome=T;for(var C=-1,S=F.queue.length;++C<S;)F.queue[C].callFulfilled(T)}return F},y.reject=function(F,T){F.state=b,F.outcome=T;for(var P=-1,_=F.queue.length;++P<_;)F.queue[P].callRejected(T);return F},I.resolve=function(F){return F instanceof this?F:y.resolve(new this(v),F)},I.reject=function(F){var T=new this(v);return y.reject(T,F)},I.all=function(F){var T=this;if(Object.prototype.toString.call(F)!=="[object Array]")return this.reject(new TypeError("must be an array"));var P=F.length,_=!1;if(!P)return this.resolve([]);for(var C=new Array(P),S=0,x=-1,k=new this(v);++x<P;)L(F[x],x);return k;function L(j,z){T.resolve(j).then(function(Y){C[z]=Y,++S!==P||_||(_=!0,y.resolve(k,C))},function(Y){_||(_=!0,y.reject(k,Y))})}},I.race=function(F){if(Object.prototype.toString.call(F)!=="[object Array]")return this.reject(new TypeError("must be an array"));var T=F.length,P=!1;if(!T)return this.resolve([]);for(var _,C=-1,S=new this(v);++C<T;)_=F[C],this.resolve(_).then(function(x){P||(P=!0,y.resolve(S,x))},function(x){P||(P=!0,y.reject(S,x))});return S}},{immediate:36}],38:[function(h,p,g){var m={};(0,h("./lib/utils/common").assign)(m,h("./lib/deflate"),h("./lib/inflate"),h("./lib/zlib/constants")),p.exports=m},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(h,p,g){var m=h("./zlib/deflate"),v=h("./utils/common"),y=h("./utils/strings"),b=h("./zlib/messages"),w=h("./zlib/zstream"),E=Object.prototype.toString;function I(D){if(!(this instanceof I))return new I(D);this.options=v.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},D||{});var N=this.options;N.raw&&0<N.windowBits?N.windowBits=-N.windowBits:N.gzip&&0<N.windowBits&&N.windowBits<16&&(N.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var U=m.deflateInit2(this.strm,N.level,N.method,N.windowBits,N.memLevel,N.strategy);if(U!==0)throw new Error(b[U]);if(N.header&&m.deflateSetHeader(this.strm,N.header),N.dictionary){var B;if(B=typeof N.dictionary=="string"?y.string2buf(N.dictionary):E.call(N.dictionary)==="[object ArrayBuffer]"?new Uint8Array(N.dictionary):N.dictionary,(U=m.deflateSetDictionary(this.strm,B))!==0)throw new Error(b[U]);this._dict_set=!0}}function O(D,N){var U=new I(N);if(U.push(D,!0),U.err)throw U.msg||b[U.err];return U.result}I.prototype.push=function(D,N){var U,B,F=this.strm,T=this.options.chunkSize;if(this.ended)return!1;B=N===~~N?N:N===!0?4:0,typeof D=="string"?F.input=y.string2buf(D):E.call(D)==="[object ArrayBuffer]"?F.input=new Uint8Array(D):F.input=D,F.next_in=0,F.avail_in=F.input.length;do{if(F.avail_out===0&&(F.output=new v.Buf8(T),F.next_out=0,F.avail_out=T),(U=m.deflate(F,B))!==1&&U!==0)return this.onEnd(U),!(this.ended=!0);F.avail_out!==0&&(F.avail_in!==0||B!==4&&B!==2)||(this.options.to==="string"?this.onData(y.buf2binstring(v.shrinkBuf(F.output,F.next_out))):this.onData(v.shrinkBuf(F.output,F.next_out)))}while((0<F.avail_in||F.avail_out===0)&&U!==1);return B===4?(U=m.deflateEnd(this.strm),this.onEnd(U),this.ended=!0,U===0):B!==2||(this.onEnd(0),!(F.avail_out=0))},I.prototype.onData=function(D){this.chunks.push(D)},I.prototype.onEnd=function(D){D===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=v.flattenChunks(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg},g.Deflate=I,g.deflate=O,g.deflateRaw=function(D,N){return(N=N||{}).raw=!0,O(D,N)},g.gzip=function(D,N){return(N=N||{}).gzip=!0,O(D,N)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(h,p,g){var m=h("./zlib/inflate"),v=h("./utils/common"),y=h("./utils/strings"),b=h("./zlib/constants"),w=h("./zlib/messages"),E=h("./zlib/zstream"),I=h("./zlib/gzheader"),O=Object.prototype.toString;function D(U){if(!(this instanceof D))return new D(U);this.options=v.assign({chunkSize:16384,windowBits:0,to:""},U||{});var B=this.options;B.raw&&0<=B.windowBits&&B.windowBits<16&&(B.windowBits=-B.windowBits,B.windowBits===0&&(B.windowBits=-15)),!(0<=B.windowBits&&B.windowBits<16)||U&&U.windowBits||(B.windowBits+=32),15<B.windowBits&&B.windowBits<48&&!(15&B.windowBits)&&(B.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new E,this.strm.avail_out=0;var F=m.inflateInit2(this.strm,B.windowBits);if(F!==b.Z_OK)throw new Error(w[F]);this.header=new I,m.inflateGetHeader(this.strm,this.header)}function N(U,B){var F=new D(B);if(F.push(U,!0),F.err)throw F.msg||w[F.err];return F.result}D.prototype.push=function(U,B){var F,T,P,_,C,S,x=this.strm,k=this.options.chunkSize,L=this.options.dictionary,j=!1;if(this.ended)return!1;T=B===~~B?B:B===!0?b.Z_FINISH:b.Z_NO_FLUSH,typeof U=="string"?x.input=y.binstring2buf(U):O.call(U)==="[object ArrayBuffer]"?x.input=new Uint8Array(U):x.input=U,x.next_in=0,x.avail_in=x.input.length;do{if(x.avail_out===0&&(x.output=new v.Buf8(k),x.next_out=0,x.avail_out=k),(F=m.inflate(x,b.Z_NO_FLUSH))===b.Z_NEED_DICT&&L&&(S=typeof L=="string"?y.string2buf(L):O.call(L)==="[object ArrayBuffer]"?new Uint8Array(L):L,F=m.inflateSetDictionary(this.strm,S)),F===b.Z_BUF_ERROR&&j===!0&&(F=b.Z_OK,j=!1),F!==b.Z_STREAM_END&&F!==b.Z_OK)return this.onEnd(F),!(this.ended=!0);x.next_out&&(x.avail_out!==0&&F!==b.Z_STREAM_END&&(x.avail_in!==0||T!==b.Z_FINISH&&T!==b.Z_SYNC_FLUSH)||(this.options.to==="string"?(P=y.utf8border(x.output,x.next_out),_=x.next_out-P,C=y.buf2string(x.output,P),x.next_out=_,x.avail_out=k-_,_&&v.arraySet(x.output,x.output,P,_,0),this.onData(C)):this.onData(v.shrinkBuf(x.output,x.next_out)))),x.avail_in===0&&x.avail_out===0&&(j=!0)}while((0<x.avail_in||x.avail_out===0)&&F!==b.Z_STREAM_END);return F===b.Z_STREAM_END&&(T=b.Z_FINISH),T===b.Z_FINISH?(F=m.inflateEnd(this.strm),this.onEnd(F),this.ended=!0,F===b.Z_OK):T!==b.Z_SYNC_FLUSH||(this.onEnd(b.Z_OK),!(x.avail_out=0))},D.prototype.onData=function(U){this.chunks.push(U)},D.prototype.onEnd=function(U){U===b.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=v.flattenChunks(this.chunks)),this.chunks=[],this.err=U,this.msg=this.strm.msg},g.Inflate=D,g.inflate=N,g.inflateRaw=function(U,B){return(B=B||{}).raw=!0,N(U,B)},g.ungzip=N},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(h,p,g){var m=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";g.assign=function(b){for(var w=Array.prototype.slice.call(arguments,1);w.length;){var E=w.shift();if(E){if(typeof E!="object")throw new TypeError(E+"must be non-object");for(var I in E)E.hasOwnProperty(I)&&(b[I]=E[I])}}return b},g.shrinkBuf=function(b,w){return b.length===w?b:b.subarray?b.subarray(0,w):(b.length=w,b)};var v={arraySet:function(b,w,E,I,O){if(w.subarray&&b.subarray)b.set(w.subarray(E,E+I),O);else for(var D=0;D<I;D++)b[O+D]=w[E+D]},flattenChunks:function(b){var w,E,I,O,D,N;for(w=I=0,E=b.length;w<E;w++)I+=b[w].length;for(N=new Uint8Array(I),w=O=0,E=b.length;w<E;w++)D=b[w],N.set(D,O),O+=D.length;return N}},y={arraySet:function(b,w,E,I,O){for(var D=0;D<I;D++)b[O+D]=w[E+D]},flattenChunks:function(b){return[].concat.apply([],b)}};g.setTyped=function(b){b?(g.Buf8=Uint8Array,g.Buf16=Uint16Array,g.Buf32=Int32Array,g.assign(g,v)):(g.Buf8=Array,g.Buf16=Array,g.Buf32=Array,g.assign(g,y))},g.setTyped(m)},{}],42:[function(h,p,g){var m=h("./common"),v=!0,y=!0;try{String.fromCharCode.apply(null,[0])}catch{v=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{y=!1}for(var b=new m.Buf8(256),w=0;w<256;w++)b[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;function E(I,O){if(O<65537&&(I.subarray&&y||!I.subarray&&v))return String.fromCharCode.apply(null,m.shrinkBuf(I,O));for(var D="",N=0;N<O;N++)D+=String.fromCharCode(I[N]);return D}b[254]=b[254]=1,g.string2buf=function(I){var O,D,N,U,B,F=I.length,T=0;for(U=0;U<F;U++)(64512&(D=I.charCodeAt(U)))==55296&&U+1<F&&(64512&(N=I.charCodeAt(U+1)))==56320&&(D=65536+(D-55296<<10)+(N-56320),U++),T+=D<128?1:D<2048?2:D<65536?3:4;for(O=new m.Buf8(T),U=B=0;B<T;U++)(64512&(D=I.charCodeAt(U)))==55296&&U+1<F&&(64512&(N=I.charCodeAt(U+1)))==56320&&(D=65536+(D-55296<<10)+(N-56320),U++),D<128?O[B++]=D:(D<2048?O[B++]=192|D>>>6:(D<65536?O[B++]=224|D>>>12:(O[B++]=240|D>>>18,O[B++]=128|D>>>12&63),O[B++]=128|D>>>6&63),O[B++]=128|63&D);return O},g.buf2binstring=function(I){return E(I,I.length)},g.binstring2buf=function(I){for(var O=new m.Buf8(I.length),D=0,N=O.length;D<N;D++)O[D]=I.charCodeAt(D);return O},g.buf2string=function(I,O){var D,N,U,B,F=O||I.length,T=new Array(2*F);for(D=N=0;D<F;)if((U=I[D++])<128)T[N++]=U;else if(4<(B=b[U]))T[N++]=65533,D+=B-1;else{for(U&=B===2?31:B===3?15:7;1<B&&D<F;)U=U<<6|63&I[D++],B--;1<B?T[N++]=65533:U<65536?T[N++]=U:(U-=65536,T[N++]=55296|U>>10&1023,T[N++]=56320|1023&U)}return E(T,N)},g.utf8border=function(I,O){var D;for((O=O||I.length)>I.length&&(O=I.length),D=O-1;0<=D&&(192&I[D])==128;)D--;return D<0||D===0?O:D+b[I[D]]>O?D:O}},{"./common":41}],43:[function(h,p,g){p.exports=function(m,v,y,b){for(var w=65535&m|0,E=m>>>16&65535|0,I=0;y!==0;){for(y-=I=2e3<y?2e3:y;E=E+(w=w+v[b++]|0)|0,--I;);w%=65521,E%=65521}return w|E<<16|0}},{}],44:[function(h,p,g){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(h,p,g){var m=function(){for(var v,y=[],b=0;b<256;b++){v=b;for(var w=0;w<8;w++)v=1&v?3988292384^v>>>1:v>>>1;y[b]=v}return y}();p.exports=function(v,y,b,w){var E=m,I=w+b;v^=-1;for(var O=w;O<I;O++)v=v>>>8^E[255&(v^y[O])];return-1^v}},{}],46:[function(h,p,g){var m,v=h("../utils/common"),y=h("./trees"),b=h("./adler32"),w=h("./crc32"),E=h("./messages"),I=-2,O=258,D=262,N=113;function U(q,J){return q.msg=E[J],J}function B(q){return(q<<1)-(4<q?9:0)}function F(q){for(var J=q.length;0<=--J;)q[J]=0}function T(q){var J=q.state,G=J.pending;G>q.avail_out&&(G=q.avail_out),G!==0&&(v.arraySet(q.output,J.pending_buf,J.pending_out,G,q.next_out),q.next_out+=G,J.pending_out+=G,q.total_out+=G,q.avail_out-=G,J.pending-=G,J.pending===0&&(J.pending_out=0))}function P(q,J){y._tr_flush_block(q,0<=q.block_start?q.block_start:-1,q.strstart-q.block_start,J),q.block_start=q.strstart,T(q.strm)}function _(q,J){q.pending_buf[q.pending++]=J}function C(q,J){q.pending_buf[q.pending++]=J>>>8&255,q.pending_buf[q.pending++]=255&J}function S(q,J){var G,V,X=q.max_chain_length,te=q.strstart,ee=q.prev_length,re=q.nice_match,se=q.strstart>q.w_size-D?q.strstart-(q.w_size-D):0,pe=q.window,ce=q.w_mask,ne=q.prev,he=q.strstart+O,oe=pe[te+ee-1],le=pe[te+ee];q.prev_length>=q.good_match&&(X>>=2),re>q.lookahead&&(re=q.lookahead);do if(pe[(G=J)+ee]===le&&pe[G+ee-1]===oe&&pe[G]===pe[te]&&pe[++G]===pe[te+1]){te+=2,G++;do;while(pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&pe[++te]===pe[++G]&&te<he);if(V=O-(he-te),te=he-O,ee<V){if(q.match_start=J,re<=(ee=V))break;oe=pe[te+ee-1],le=pe[te+ee]}}while((J=ne[J&ce])>se&&--X!=0);return ee<=q.lookahead?ee:q.lookahead}function x(q){var J,G,V,X,te,ee,re,se,pe,ce,ne=q.w_size;do{if(X=q.window_size-q.lookahead-q.strstart,q.strstart>=ne+(ne-D)){for(v.arraySet(q.window,q.window,ne,ne,0),q.match_start-=ne,q.strstart-=ne,q.block_start-=ne,J=G=q.hash_size;V=q.head[--J],q.head[J]=ne<=V?V-ne:0,--G;);for(J=G=ne;V=q.prev[--J],q.prev[J]=ne<=V?V-ne:0,--G;);X+=ne}if(q.strm.avail_in===0)break;if(ee=q.strm,re=q.window,se=q.strstart+q.lookahead,ce=void 0,(pe=X)<(ce=ee.avail_in)&&(ce=pe),G=ce===0?0:(ee.avail_in-=ce,v.arraySet(re,ee.input,ee.next_in,ce,se),ee.state.wrap===1?ee.adler=b(ee.adler,re,ce,se):ee.state.wrap===2&&(ee.adler=w(ee.adler,re,ce,se)),ee.next_in+=ce,ee.total_in+=ce,ce),q.lookahead+=G,q.lookahead+q.insert>=3)for(te=q.strstart-q.insert,q.ins_h=q.window[te],q.ins_h=(q.ins_h<<q.hash_shift^q.window[te+1])&q.hash_mask;q.insert&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[te+3-1])&q.hash_mask,q.prev[te&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=te,te++,q.insert--,!(q.lookahead+q.insert<3)););}while(q.lookahead<D&&q.strm.avail_in!==0)}function k(q,J){for(var G,V;;){if(q.lookahead<D){if(x(q),q.lookahead<D&&J===0)return 1;if(q.lookahead===0)break}if(G=0,q.lookahead>=3&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+3-1])&q.hash_mask,G=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),G!==0&&q.strstart-G<=q.w_size-D&&(q.match_length=S(q,G)),q.match_length>=3)if(V=y._tr_tally(q,q.strstart-q.match_start,q.match_length-3),q.lookahead-=q.match_length,q.match_length<=q.max_lazy_match&&q.lookahead>=3){for(q.match_length--;q.strstart++,q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+3-1])&q.hash_mask,G=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart,--q.match_length!=0;);q.strstart++}else q.strstart+=q.match_length,q.match_length=0,q.ins_h=q.window[q.strstart],q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+1])&q.hash_mask;else V=y._tr_tally(q,0,q.window[q.strstart]),q.lookahead--,q.strstart++;if(V&&(P(q,!1),q.strm.avail_out===0))return 1}return q.insert=q.strstart<2?q.strstart:2,J===4?(P(q,!0),q.strm.avail_out===0?3:4):q.last_lit&&(P(q,!1),q.strm.avail_out===0)?1:2}function L(q,J){for(var G,V,X;;){if(q.lookahead<D){if(x(q),q.lookahead<D&&J===0)return 1;if(q.lookahead===0)break}if(G=0,q.lookahead>=3&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+3-1])&q.hash_mask,G=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),q.prev_length=q.match_length,q.prev_match=q.match_start,q.match_length=2,G!==0&&q.prev_length<q.max_lazy_match&&q.strstart-G<=q.w_size-D&&(q.match_length=S(q,G),q.match_length<=5&&(q.strategy===1||q.match_length===3&&4096<q.strstart-q.match_start)&&(q.match_length=2)),q.prev_length>=3&&q.match_length<=q.prev_length){for(X=q.strstart+q.lookahead-3,V=y._tr_tally(q,q.strstart-1-q.prev_match,q.prev_length-3),q.lookahead-=q.prev_length-1,q.prev_length-=2;++q.strstart<=X&&(q.ins_h=(q.ins_h<<q.hash_shift^q.window[q.strstart+3-1])&q.hash_mask,G=q.prev[q.strstart&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=q.strstart),--q.prev_length!=0;);if(q.match_available=0,q.match_length=2,q.strstart++,V&&(P(q,!1),q.strm.avail_out===0))return 1}else if(q.match_available){if((V=y._tr_tally(q,0,q.window[q.strstart-1]))&&P(q,!1),q.strstart++,q.lookahead--,q.strm.avail_out===0)return 1}else q.match_available=1,q.strstart++,q.lookahead--}return q.match_available&&(V=y._tr_tally(q,0,q.window[q.strstart-1]),q.match_available=0),q.insert=q.strstart<2?q.strstart:2,J===4?(P(q,!0),q.strm.avail_out===0?3:4):q.last_lit&&(P(q,!1),q.strm.avail_out===0)?1:2}function j(q,J,G,V,X){this.good_length=q,this.max_lazy=J,this.nice_length=G,this.max_chain=V,this.func=X}function z(){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 v.Buf16(1146),this.dyn_dtree=new v.Buf16(122),this.bl_tree=new v.Buf16(78),F(this.dyn_ltree),F(this.dyn_dtree),F(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new v.Buf16(16),this.heap=new v.Buf16(573),F(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new v.Buf16(573),F(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(q){var J;return q&&q.state?(q.total_in=q.total_out=0,q.data_type=2,(J=q.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?42:N,q.adler=J.wrap===2?0:1,J.last_flush=0,y._tr_init(J),0):U(q,I)}function K(q){var J=Y(q);return J===0&&function(G){G.window_size=2*G.w_size,F(G.head),G.max_lazy_match=m[G.level].max_lazy,G.good_match=m[G.level].good_length,G.nice_match=m[G.level].nice_length,G.max_chain_length=m[G.level].max_chain,G.strstart=0,G.block_start=0,G.lookahead=0,G.insert=0,G.match_length=G.prev_length=2,G.match_available=0,G.ins_h=0}(q.state),J}function Q(q,J,G,V,X,te){if(!q)return I;var ee=1;if(J===-1&&(J=6),V<0?(ee=0,V=-V):15<V&&(ee=2,V-=16),X<1||9<X||G!==8||V<8||15<V||J<0||9<J||te<0||4<te)return U(q,I);V===8&&(V=9);var re=new z;return(q.state=re).strm=q,re.wrap=ee,re.gzhead=null,re.w_bits=V,re.w_size=1<<re.w_bits,re.w_mask=re.w_size-1,re.hash_bits=X+7,re.hash_size=1<<re.hash_bits,re.hash_mask=re.hash_size-1,re.hash_shift=~~((re.hash_bits+3-1)/3),re.window=new v.Buf8(2*re.w_size),re.head=new v.Buf16(re.hash_size),re.prev=new v.Buf16(re.w_size),re.lit_bufsize=1<<X+6,re.pending_buf_size=4*re.lit_bufsize,re.pending_buf=new v.Buf8(re.pending_buf_size),re.d_buf=1*re.lit_bufsize,re.l_buf=3*re.lit_bufsize,re.level=J,re.strategy=te,re.method=G,K(q)}m=[new j(0,0,0,0,function(q,J){var G=65535;for(G>q.pending_buf_size-5&&(G=q.pending_buf_size-5);;){if(q.lookahead<=1){if(x(q),q.lookahead===0&&J===0)return 1;if(q.lookahead===0)break}q.strstart+=q.lookahead,q.lookahead=0;var V=q.block_start+G;if((q.strstart===0||q.strstart>=V)&&(q.lookahead=q.strstart-V,q.strstart=V,P(q,!1),q.strm.avail_out===0)||q.strstart-q.block_start>=q.w_size-D&&(P(q,!1),q.strm.avail_out===0))return 1}return q.insert=0,J===4?(P(q,!0),q.strm.avail_out===0?3:4):(q.strstart>q.block_start&&(P(q,!1),q.strm.avail_out),1)}),new j(4,4,8,4,k),new j(4,5,16,8,k),new j(4,6,32,32,k),new j(4,4,16,16,L),new j(8,16,32,32,L),new j(8,16,128,128,L),new j(8,32,128,256,L),new j(32,128,258,1024,L),new j(32,258,258,4096,L)],g.deflateInit=function(q,J){return Q(q,J,8,15,8,0)},g.deflateInit2=Q,g.deflateReset=K,g.deflateResetKeep=Y,g.deflateSetHeader=function(q,J){return q&&q.state?q.state.wrap!==2?I:(q.state.gzhead=J,0):I},g.deflate=function(q,J){var G,V,X,te;if(!q||!q.state||5<J||J<0)return q?U(q,I):I;if(V=q.state,!q.output||!q.input&&q.avail_in!==0||V.status===666&&J!==4)return U(q,q.avail_out===0?-5:I);if(V.strm=q,G=V.last_flush,V.last_flush=J,V.status===42)if(V.wrap===2)q.adler=0,_(V,31),_(V,139),_(V,8),V.gzhead?(_(V,(V.gzhead.text?1:0)+(V.gzhead.hcrc?2:0)+(V.gzhead.extra?4:0)+(V.gzhead.name?8:0)+(V.gzhead.comment?16:0)),_(V,255&V.gzhead.time),_(V,V.gzhead.time>>8&255),_(V,V.gzhead.time>>16&255),_(V,V.gzhead.time>>24&255),_(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),_(V,255&V.gzhead.os),V.gzhead.extra&&V.gzhead.extra.length&&(_(V,255&V.gzhead.extra.length),_(V,V.gzhead.extra.length>>8&255)),V.gzhead.hcrc&&(q.adler=w(q.adler,V.pending_buf,V.pending,0)),V.gzindex=0,V.status=69):(_(V,0),_(V,0),_(V,0),_(V,0),_(V,0),_(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),_(V,3),V.status=N);else{var ee=8+(V.w_bits-8<<4)<<8;ee|=(2<=V.strategy||V.level<2?0:V.level<6?1:V.level===6?2:3)<<6,V.strstart!==0&&(ee|=32),ee+=31-ee%31,V.status=N,C(V,ee),V.strstart!==0&&(C(V,q.adler>>>16),C(V,65535&q.adler)),q.adler=1}if(V.status===69)if(V.gzhead.extra){for(X=V.pending;V.gzindex<(65535&V.gzhead.extra.length)&&(V.pending!==V.pending_buf_size||(V.gzhead.hcrc&&V.pending>X&&(q.adler=w(q.adler,V.pending_buf,V.pending-X,X)),T(q),X=V.pending,V.pending!==V.pending_buf_size));)_(V,255&V.gzhead.extra[V.gzindex]),V.gzindex++;V.gzhead.hcrc&&V.pending>X&&(q.adler=w(q.adler,V.pending_buf,V.pending-X,X)),V.gzindex===V.gzhead.extra.length&&(V.gzindex=0,V.status=73)}else V.status=73;if(V.status===73)if(V.gzhead.name){X=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>X&&(q.adler=w(q.adler,V.pending_buf,V.pending-X,X)),T(q),X=V.pending,V.pending===V.pending_buf_size)){te=1;break}te=V.gzindex<V.gzhead.name.length?255&V.gzhead.name.charCodeAt(V.gzindex++):0,_(V,te)}while(te!==0);V.gzhead.hcrc&&V.pending>X&&(q.adler=w(q.adler,V.pending_buf,V.pending-X,X)),te===0&&(V.gzindex=0,V.status=91)}else V.status=91;if(V.status===91)if(V.gzhead.comment){X=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>X&&(q.adler=w(q.adler,V.pending_buf,V.pending-X,X)),T(q),X=V.pending,V.pending===V.pending_buf_size)){te=1;break}te=V.gzindex<V.gzhead.comment.length?255&V.gzhead.comment.charCodeAt(V.gzindex++):0,_(V,te)}while(te!==0);V.gzhead.hcrc&&V.pending>X&&(q.adler=w(q.adler,V.pending_buf,V.pending-X,X)),te===0&&(V.status=103)}else V.status=103;if(V.status===103&&(V.gzhead.hcrc?(V.pending+2>V.pending_buf_size&&T(q),V.pending+2<=V.pending_buf_size&&(_(V,255&q.adler),_(V,q.adler>>8&255),q.adler=0,V.status=N)):V.status=N),V.pending!==0){if(T(q),q.avail_out===0)return V.last_flush=-1,0}else if(q.avail_in===0&&B(J)<=B(G)&&J!==4)return U(q,-5);if(V.status===666&&q.avail_in!==0)return U(q,-5);if(q.avail_in!==0||V.lookahead!==0||J!==0&&V.status!==666){var re=V.strategy===2?function(se,pe){for(var ce;;){if(se.lookahead===0&&(x(se),se.lookahead===0)){if(pe===0)return 1;break}if(se.match_length=0,ce=y._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++,ce&&(P(se,!1),se.strm.avail_out===0))return 1}return se.insert=0,pe===4?(P(se,!0),se.strm.avail_out===0?3:4):se.last_lit&&(P(se,!1),se.strm.avail_out===0)?1:2}(V,J):V.strategy===3?function(se,pe){for(var ce,ne,he,oe,le=se.window;;){if(se.lookahead<=O){if(x(se),se.lookahead<=O&&pe===0)return 1;if(se.lookahead===0)break}if(se.match_length=0,se.lookahead>=3&&0<se.strstart&&(ne=le[he=se.strstart-1])===le[++he]&&ne===le[++he]&&ne===le[++he]){oe=se.strstart+O;do;while(ne===le[++he]&&ne===le[++he]&&ne===le[++he]&&ne===le[++he]&&ne===le[++he]&&ne===le[++he]&&ne===le[++he]&&ne===le[++he]&&he<oe);se.match_length=O-(oe-he),se.match_length>se.lookahead&&(se.match_length=se.lookahead)}if(se.match_length>=3?(ce=y._tr_tally(se,1,se.match_length-3),se.lookahead-=se.match_length,se.strstart+=se.match_length,se.match_length=0):(ce=y._tr_tally(se,0,se.window[se.strstart]),se.lookahead--,se.strstart++),ce&&(P(se,!1),se.strm.avail_out===0))return 1}return se.insert=0,pe===4?(P(se,!0),se.strm.avail_out===0?3:4):se.last_lit&&(P(se,!1),se.strm.avail_out===0)?1:2}(V,J):m[V.level].func(V,J);if(re!==3&&re!==4||(V.status=666),re===1||re===3)return q.avail_out===0&&(V.last_flush=-1),0;if(re===2&&(J===1?y._tr_align(V):J!==5&&(y._tr_stored_block(V,0,0,!1),J===3&&(F(V.head),V.lookahead===0&&(V.strstart=0,V.block_start=0,V.insert=0))),T(q),q.avail_out===0))return V.last_flush=-1,0}return J!==4?0:V.wrap<=0?1:(V.wrap===2?(_(V,255&q.adler),_(V,q.adler>>8&255),_(V,q.adler>>16&255),_(V,q.adler>>24&255),_(V,255&q.total_in),_(V,q.total_in>>8&255),_(V,q.total_in>>16&255),_(V,q.total_in>>24&255)):(C(V,q.adler>>>16),C(V,65535&q.adler)),T(q),0<V.wrap&&(V.wrap=-V.wrap),V.pending!==0?0:1)},g.deflateEnd=function(q){var J;return q&&q.state?(J=q.state.status)!==42&&J!==69&&J!==73&&J!==91&&J!==103&&J!==N&&J!==666?U(q,I):(q.state=null,J===N?U(q,-3):0):I},g.deflateSetDictionary=function(q,J){var G,V,X,te,ee,re,se,pe,ce=J.length;if(!q||!q.state||(te=(G=q.state).wrap)===2||te===1&&G.status!==42||G.lookahead)return I;for(te===1&&(q.adler=b(q.adler,J,ce,0)),G.wrap=0,ce>=G.w_size&&(te===0&&(F(G.head),G.strstart=0,G.block_start=0,G.insert=0),pe=new v.Buf8(G.w_size),v.arraySet(pe,J,ce-G.w_size,G.w_size,0),J=pe,ce=G.w_size),ee=q.avail_in,re=q.next_in,se=q.input,q.avail_in=ce,q.next_in=0,q.input=J,x(G);G.lookahead>=3;){for(V=G.strstart,X=G.lookahead-2;G.ins_h=(G.ins_h<<G.hash_shift^G.window[V+3-1])&G.hash_mask,G.prev[V&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=V,V++,--X;);G.strstart=V,G.lookahead=2,x(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=2,G.match_available=0,q.next_in=re,q.input=se,q.avail_in=ee,G.wrap=te,0},g.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(h,p,g){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(h,p,g){p.exports=function(m,v){var y,b,w,E,I,O,D,N,U,B,F,T,P,_,C,S,x,k,L,j,z,Y,K,Q,q;y=m.state,b=m.next_in,Q=m.input,w=b+(m.avail_in-5),E=m.next_out,q=m.output,I=E-(v-m.avail_out),O=E+(m.avail_out-257),D=y.dmax,N=y.wsize,U=y.whave,B=y.wnext,F=y.window,T=y.hold,P=y.bits,_=y.lencode,C=y.distcode,S=(1<<y.lenbits)-1,x=(1<<y.distbits)-1;e:do{P<15&&(T+=Q[b++]<<P,P+=8,T+=Q[b++]<<P,P+=8),k=_[T&S];t:for(;;){if(T>>>=L=k>>>24,P-=L,(L=k>>>16&255)==0)q[E++]=65535&k;else{if(!(16&L)){if(!(64&L)){k=_[(65535&k)+(T&(1<<L)-1)];continue t}if(32&L){y.mode=12;break e}m.msg="invalid literal/length code",y.mode=30;break e}j=65535&k,(L&=15)&&(P<L&&(T+=Q[b++]<<P,P+=8),j+=T&(1<<L)-1,T>>>=L,P-=L),P<15&&(T+=Q[b++]<<P,P+=8,T+=Q[b++]<<P,P+=8),k=C[T&x];r:for(;;){if(T>>>=L=k>>>24,P-=L,!(16&(L=k>>>16&255))){if(!(64&L)){k=C[(65535&k)+(T&(1<<L)-1)];continue r}m.msg="invalid distance code",y.mode=30;break e}if(z=65535&k,P<(L&=15)&&(T+=Q[b++]<<P,(P+=8)<L&&(T+=Q[b++]<<P,P+=8)),D<(z+=T&(1<<L)-1)){m.msg="invalid distance too far back",y.mode=30;break e}if(T>>>=L,P-=L,(L=E-I)<z){if(U<(L=z-L)&&y.sane){m.msg="invalid distance too far back",y.mode=30;break e}if(K=F,(Y=0)===B){if(Y+=N-L,L<j){for(j-=L;q[E++]=F[Y++],--L;);Y=E-z,K=q}}else if(B<L){if(Y+=N+B-L,(L-=B)<j){for(j-=L;q[E++]=F[Y++],--L;);if(Y=0,B<j){for(j-=L=B;q[E++]=F[Y++],--L;);Y=E-z,K=q}}}else if(Y+=B-L,L<j){for(j-=L;q[E++]=F[Y++],--L;);Y=E-z,K=q}for(;2<j;)q[E++]=K[Y++],q[E++]=K[Y++],q[E++]=K[Y++],j-=3;j&&(q[E++]=K[Y++],1<j&&(q[E++]=K[Y++]))}else{for(Y=E-z;q[E++]=q[Y++],q[E++]=q[Y++],q[E++]=q[Y++],2<(j-=3););j&&(q[E++]=q[Y++],1<j&&(q[E++]=q[Y++]))}break}}break}}while(b<w&&E<O);b-=j=P>>3,T&=(1<<(P-=j<<3))-1,m.next_in=b,m.next_out=E,m.avail_in=b<w?w-b+5:5-(b-w),m.avail_out=E<O?O-E+257:257-(E-O),y.hold=T,y.bits=P}},{}],49:[function(h,p,g){var m=h("../utils/common"),v=h("./adler32"),y=h("./crc32"),b=h("./inffast"),w=h("./inftrees"),E=-2;function I(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function O(){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 m.Buf16(320),this.work=new m.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function D(S){var x;return S&&S.state?(x=S.state,S.total_in=S.total_out=x.total=0,S.msg="",x.wrap&&(S.adler=1&x.wrap),x.mode=1,x.last=0,x.havedict=0,x.dmax=32768,x.head=null,x.hold=0,x.bits=0,x.lencode=x.lendyn=new m.Buf32(852),x.distcode=x.distdyn=new m.Buf32(592),x.sane=1,x.back=-1,0):E}function N(S){var x;return S&&S.state?((x=S.state).wsize=0,x.whave=0,x.wnext=0,D(S)):E}function U(S,x){var k,L;return S&&S.state?(L=S.state,x<0?(k=0,x=-x):(k=1+(x>>4),x<48&&(x&=15)),x&&(x<8||15<x)?E:(L.window!==null&&L.wbits!==x&&(L.window=null),L.wrap=k,L.wbits=x,N(S))):E}function B(S,x){var k,L;return S?(L=new O,(S.state=L).window=null,(k=U(S,x))!==0&&(S.state=null),k):E}var F,T,P=!0;function _(S){if(P){var x;for(F=new m.Buf32(512),T=new m.Buf32(32),x=0;x<144;)S.lens[x++]=8;for(;x<256;)S.lens[x++]=9;for(;x<280;)S.lens[x++]=7;for(;x<288;)S.lens[x++]=8;for(w(1,S.lens,0,288,F,0,S.work,{bits:9}),x=0;x<32;)S.lens[x++]=5;w(2,S.lens,0,32,T,0,S.work,{bits:5}),P=!1}S.lencode=F,S.lenbits=9,S.distcode=T,S.distbits=5}function C(S,x,k,L){var j,z=S.state;return z.window===null&&(z.wsize=1<<z.wbits,z.wnext=0,z.whave=0,z.window=new m.Buf8(z.wsize)),L>=z.wsize?(m.arraySet(z.window,x,k-z.wsize,z.wsize,0),z.wnext=0,z.whave=z.wsize):(L<(j=z.wsize-z.wnext)&&(j=L),m.arraySet(z.window,x,k-L,j,z.wnext),(L-=j)?(m.arraySet(z.window,x,k-L,L,0),z.wnext=L,z.whave=z.wsize):(z.wnext+=j,z.wnext===z.wsize&&(z.wnext=0),z.whave<z.wsize&&(z.whave+=j))),0}g.inflateReset=N,g.inflateReset2=U,g.inflateResetKeep=D,g.inflateInit=function(S){return B(S,15)},g.inflateInit2=B,g.inflate=function(S,x){var k,L,j,z,Y,K,Q,q,J,G,V,X,te,ee,re,se,pe,ce,ne,he,oe,le,de,ve,we=0,ie=new m.Buf8(4),ge=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return E;(k=S.state).mode===12&&(k.mode=13),Y=S.next_out,j=S.output,Q=S.avail_out,z=S.next_in,L=S.input,K=S.avail_in,q=k.hold,J=k.bits,G=K,V=Q,le=0;e:for(;;)switch(k.mode){case 1:if(k.wrap===0){k.mode=13;break}for(;J<16;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(2&k.wrap&&q===35615){ie[k.check=0]=255&q,ie[1]=q>>>8&255,k.check=y(k.check,ie,2,0),J=q=0,k.mode=2;break}if(k.flags=0,k.head&&(k.head.done=!1),!(1&k.wrap)||(((255&q)<<8)+(q>>8))%31){S.msg="incorrect header check",k.mode=30;break}if((15&q)!=8){S.msg="unknown compression method",k.mode=30;break}if(J-=4,oe=8+(15&(q>>>=4)),k.wbits===0)k.wbits=oe;else if(oe>k.wbits){S.msg="invalid window size",k.mode=30;break}k.dmax=1<<oe,S.adler=k.check=1,k.mode=512&q?10:12,J=q=0;break;case 2:for(;J<16;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(k.flags=q,(255&k.flags)!=8){S.msg="unknown compression method",k.mode=30;break}if(57344&k.flags){S.msg="unknown header flags set",k.mode=30;break}k.head&&(k.head.text=q>>8&1),512&k.flags&&(ie[0]=255&q,ie[1]=q>>>8&255,k.check=y(k.check,ie,2,0)),J=q=0,k.mode=3;case 3:for(;J<32;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}k.head&&(k.head.time=q),512&k.flags&&(ie[0]=255&q,ie[1]=q>>>8&255,ie[2]=q>>>16&255,ie[3]=q>>>24&255,k.check=y(k.check,ie,4,0)),J=q=0,k.mode=4;case 4:for(;J<16;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}k.head&&(k.head.xflags=255&q,k.head.os=q>>8),512&k.flags&&(ie[0]=255&q,ie[1]=q>>>8&255,k.check=y(k.check,ie,2,0)),J=q=0,k.mode=5;case 5:if(1024&k.flags){for(;J<16;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}k.length=q,k.head&&(k.head.extra_len=q),512&k.flags&&(ie[0]=255&q,ie[1]=q>>>8&255,k.check=y(k.check,ie,2,0)),J=q=0}else k.head&&(k.head.extra=null);k.mode=6;case 6:if(1024&k.flags&&(K<(X=k.length)&&(X=K),X&&(k.head&&(oe=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Array(k.head.extra_len)),m.arraySet(k.head.extra,L,z,X,oe)),512&k.flags&&(k.check=y(k.check,L,X,z)),K-=X,z+=X,k.length-=X),k.length))break e;k.length=0,k.mode=7;case 7:if(2048&k.flags){if(K===0)break e;for(X=0;oe=L[z+X++],k.head&&oe&&k.length<65536&&(k.head.name+=String.fromCharCode(oe)),oe&&X<K;);if(512&k.flags&&(k.check=y(k.check,L,X,z)),K-=X,z+=X,oe)break e}else k.head&&(k.head.name=null);k.length=0,k.mode=8;case 8:if(4096&k.flags){if(K===0)break e;for(X=0;oe=L[z+X++],k.head&&oe&&k.length<65536&&(k.head.comment+=String.fromCharCode(oe)),oe&&X<K;);if(512&k.flags&&(k.check=y(k.check,L,X,z)),K-=X,z+=X,oe)break e}else k.head&&(k.head.comment=null);k.mode=9;case 9:if(512&k.flags){for(;J<16;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(q!==(65535&k.check)){S.msg="header crc mismatch",k.mode=30;break}J=q=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),S.adler=k.check=0,k.mode=12;break;case 10:for(;J<32;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}S.adler=k.check=I(q),J=q=0,k.mode=11;case 11:if(k.havedict===0)return S.next_out=Y,S.avail_out=Q,S.next_in=z,S.avail_in=K,k.hold=q,k.bits=J,2;S.adler=k.check=1,k.mode=12;case 12:if(x===5||x===6)break e;case 13:if(k.last){q>>>=7&J,J-=7&J,k.mode=27;break}for(;J<3;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}switch(k.last=1&q,J-=1,3&(q>>>=1)){case 0:k.mode=14;break;case 1:if(_(k),k.mode=20,x!==6)break;q>>>=2,J-=2;break e;case 2:k.mode=17;break;case 3:S.msg="invalid block type",k.mode=30}q>>>=2,J-=2;break;case 14:for(q>>>=7&J,J-=7&J;J<32;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if((65535&q)!=(q>>>16^65535)){S.msg="invalid stored block lengths",k.mode=30;break}if(k.length=65535&q,J=q=0,k.mode=15,x===6)break e;case 15:k.mode=16;case 16:if(X=k.length){if(K<X&&(X=K),Q<X&&(X=Q),X===0)break e;m.arraySet(j,L,z,X,Y),K-=X,z+=X,Q-=X,Y+=X,k.length-=X;break}k.mode=12;break;case 17:for(;J<14;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(k.nlen=257+(31&q),q>>>=5,J-=5,k.ndist=1+(31&q),q>>>=5,J-=5,k.ncode=4+(15&q),q>>>=4,J-=4,286<k.nlen||30<k.ndist){S.msg="too many length or distance symbols",k.mode=30;break}k.have=0,k.mode=18;case 18:for(;k.have<k.ncode;){for(;J<3;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}k.lens[ge[k.have++]]=7&q,q>>>=3,J-=3}for(;k.have<19;)k.lens[ge[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,de={bits:k.lenbits},le=w(0,k.lens,0,19,k.lencode,0,k.work,de),k.lenbits=de.bits,le){S.msg="invalid code lengths set",k.mode=30;break}k.have=0,k.mode=19;case 19:for(;k.have<k.nlen+k.ndist;){for(;se=(we=k.lencode[q&(1<<k.lenbits)-1])>>>16&255,pe=65535&we,!((re=we>>>24)<=J);){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(pe<16)q>>>=re,J-=re,k.lens[k.have++]=pe;else{if(pe===16){for(ve=re+2;J<ve;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(q>>>=re,J-=re,k.have===0){S.msg="invalid bit length repeat",k.mode=30;break}oe=k.lens[k.have-1],X=3+(3&q),q>>>=2,J-=2}else if(pe===17){for(ve=re+3;J<ve;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}J-=re,oe=0,X=3+(7&(q>>>=re)),q>>>=3,J-=3}else{for(ve=re+7;J<ve;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}J-=re,oe=0,X=11+(127&(q>>>=re)),q>>>=7,J-=7}if(k.have+X>k.nlen+k.ndist){S.msg="invalid bit length repeat",k.mode=30;break}for(;X--;)k.lens[k.have++]=oe}}if(k.mode===30)break;if(k.lens[256]===0){S.msg="invalid code -- missing end-of-block",k.mode=30;break}if(k.lenbits=9,de={bits:k.lenbits},le=w(1,k.lens,0,k.nlen,k.lencode,0,k.work,de),k.lenbits=de.bits,le){S.msg="invalid literal/lengths set",k.mode=30;break}if(k.distbits=6,k.distcode=k.distdyn,de={bits:k.distbits},le=w(2,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,de),k.distbits=de.bits,le){S.msg="invalid distances set",k.mode=30;break}if(k.mode=20,x===6)break e;case 20:k.mode=21;case 21:if(6<=K&&258<=Q){S.next_out=Y,S.avail_out=Q,S.next_in=z,S.avail_in=K,k.hold=q,k.bits=J,b(S,V),Y=S.next_out,j=S.output,Q=S.avail_out,z=S.next_in,L=S.input,K=S.avail_in,q=k.hold,J=k.bits,k.mode===12&&(k.back=-1);break}for(k.back=0;se=(we=k.lencode[q&(1<<k.lenbits)-1])>>>16&255,pe=65535&we,!((re=we>>>24)<=J);){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(se&&!(240&se)){for(ce=re,ne=se,he=pe;se=(we=k.lencode[he+((q&(1<<ce+ne)-1)>>ce)])>>>16&255,pe=65535&we,!(ce+(re=we>>>24)<=J);){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}q>>>=ce,J-=ce,k.back+=ce}if(q>>>=re,J-=re,k.back+=re,k.length=pe,se===0){k.mode=26;break}if(32&se){k.back=-1,k.mode=12;break}if(64&se){S.msg="invalid literal/length code",k.mode=30;break}k.extra=15&se,k.mode=22;case 22:if(k.extra){for(ve=k.extra;J<ve;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}k.length+=q&(1<<k.extra)-1,q>>>=k.extra,J-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=23;case 23:for(;se=(we=k.distcode[q&(1<<k.distbits)-1])>>>16&255,pe=65535&we,!((re=we>>>24)<=J);){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(!(240&se)){for(ce=re,ne=se,he=pe;se=(we=k.distcode[he+((q&(1<<ce+ne)-1)>>ce)])>>>16&255,pe=65535&we,!(ce+(re=we>>>24)<=J);){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}q>>>=ce,J-=ce,k.back+=ce}if(q>>>=re,J-=re,k.back+=re,64&se){S.msg="invalid distance code",k.mode=30;break}k.offset=pe,k.extra=15&se,k.mode=24;case 24:if(k.extra){for(ve=k.extra;J<ve;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}k.offset+=q&(1<<k.extra)-1,q>>>=k.extra,J-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){S.msg="invalid distance too far back",k.mode=30;break}k.mode=25;case 25:if(Q===0)break e;if(X=V-Q,k.offset>X){if((X=k.offset-X)>k.whave&&k.sane){S.msg="invalid distance too far back",k.mode=30;break}te=X>k.wnext?(X-=k.wnext,k.wsize-X):k.wnext-X,X>k.length&&(X=k.length),ee=k.window}else ee=j,te=Y-k.offset,X=k.length;for(Q<X&&(X=Q),Q-=X,k.length-=X;j[Y++]=ee[te++],--X;);k.length===0&&(k.mode=21);break;case 26:if(Q===0)break e;j[Y++]=k.length,Q--,k.mode=21;break;case 27:if(k.wrap){for(;J<32;){if(K===0)break e;K--,q|=L[z++]<<J,J+=8}if(V-=Q,S.total_out+=V,k.total+=V,V&&(S.adler=k.check=k.flags?y(k.check,j,V,Y-V):v(k.check,j,V,Y-V)),V=Q,(k.flags?q:I(q))!==k.check){S.msg="incorrect data check",k.mode=30;break}J=q=0}k.mode=28;case 28:if(k.wrap&&k.flags){for(;J<32;){if(K===0)break e;K--,q+=L[z++]<<J,J+=8}if(q!==(4294967295&k.total)){S.msg="incorrect length check",k.mode=30;break}J=q=0}k.mode=29;case 29:le=1;break e;case 30:le=-3;break e;case 31:return-4;case 32:default:return E}return S.next_out=Y,S.avail_out=Q,S.next_in=z,S.avail_in=K,k.hold=q,k.bits=J,(k.wsize||V!==S.avail_out&&k.mode<30&&(k.mode<27||x!==4))&&C(S,S.output,S.next_out,V-S.avail_out)?(k.mode=31,-4):(G-=S.avail_in,V-=S.avail_out,S.total_in+=G,S.total_out+=V,k.total+=V,k.wrap&&V&&(S.adler=k.check=k.flags?y(k.check,j,V,S.next_out-V):v(k.check,j,V,S.next_out-V)),S.data_type=k.bits+(k.last?64:0)+(k.mode===12?128:0)+(k.mode===20||k.mode===15?256:0),(G==0&&V===0||x===4)&&le===0&&(le=-5),le)},g.inflateEnd=function(S){if(!S||!S.state)return E;var x=S.state;return x.window&&(x.window=null),S.state=null,0},g.inflateGetHeader=function(S,x){var k;return S&&S.state&&2&(k=S.state).wrap?((k.head=x).done=!1,0):E},g.inflateSetDictionary=function(S,x){var k,L=x.length;return S&&S.state?(k=S.state).wrap!==0&&k.mode!==11?E:k.mode===11&&v(1,x,L,0)!==k.check?-3:C(S,x,L,L)?(k.mode=31,-4):(k.havedict=1,0):E},g.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(h,p,g){var m=h("../utils/common"),v=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],y=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],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],w=[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(E,I,O,D,N,U,B,F){var T,P,_,C,S,x,k,L,j,z=F.bits,Y=0,K=0,Q=0,q=0,J=0,G=0,V=0,X=0,te=0,ee=0,re=null,se=0,pe=new m.Buf16(16),ce=new m.Buf16(16),ne=null,he=0;for(Y=0;Y<=15;Y++)pe[Y]=0;for(K=0;K<D;K++)pe[I[O+K]]++;for(J=z,q=15;1<=q&&pe[q]===0;q--);if(q<J&&(J=q),q===0)return N[U++]=20971520,N[U++]=20971520,F.bits=1,0;for(Q=1;Q<q&&pe[Q]===0;Q++);for(J<Q&&(J=Q),Y=X=1;Y<=15;Y++)if(X<<=1,(X-=pe[Y])<0)return-1;if(0<X&&(E===0||q!==1))return-1;for(ce[1]=0,Y=1;Y<15;Y++)ce[Y+1]=ce[Y]+pe[Y];for(K=0;K<D;K++)I[O+K]!==0&&(B[ce[I[O+K]]++]=K);if(x=E===0?(re=ne=B,19):E===1?(re=v,se-=257,ne=y,he-=257,256):(re=b,ne=w,-1),Y=Q,S=U,V=K=ee=0,_=-1,C=(te=1<<(G=J))-1,E===1&&852<te||E===2&&592<te)return 1;for(;;){for(k=Y-V,j=B[K]<x?(L=0,B[K]):B[K]>x?(L=ne[he+B[K]],re[se+B[K]]):(L=96,0),T=1<<Y-V,Q=P=1<<G;N[S+(ee>>V)+(P-=T)]=k<<24|L<<16|j|0,P!==0;);for(T=1<<Y-1;ee&T;)T>>=1;if(T!==0?(ee&=T-1,ee+=T):ee=0,K++,--pe[Y]==0){if(Y===q)break;Y=I[O+B[K]]}if(J<Y&&(ee&C)!==_){for(V===0&&(V=J),S+=Q,X=1<<(G=Y-V);G+V<q&&!((X-=pe[G+V])<=0);)G++,X<<=1;if(te+=1<<G,E===1&&852<te||E===2&&592<te)return 1;N[_=ee&C]=J<<24|G<<16|S-U|0}}return ee!==0&&(N[S+ee]=Y-V<<24|64<<16|0),F.bits=J,0}},{"../utils/common":41}],51:[function(h,p,g){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(h,p,g){var m=h("../utils/common");function v(ne){for(var he=ne.length;0<=--he;)ne[he]=0}var y=256,b=286,w=30,E=15,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[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],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=new Array(576);v(U);var B=new Array(60);v(B);var F=new Array(512);v(F);var T=new Array(256);v(T);var P=new Array(29);v(P);var _,C,S,x=new Array(w);function k(ne,he,oe,le,de){this.static_tree=ne,this.extra_bits=he,this.extra_base=oe,this.elems=le,this.max_length=de,this.has_stree=ne&&ne.length}function L(ne,he){this.dyn_tree=ne,this.max_code=0,this.stat_desc=he}function j(ne){return ne<256?F[ne]:F[256+(ne>>>7)]}function z(ne,he){ne.pending_buf[ne.pending++]=255&he,ne.pending_buf[ne.pending++]=he>>>8&255}function Y(ne,he,oe){ne.bi_valid>16-oe?(ne.bi_buf|=he<<ne.bi_valid&65535,z(ne,ne.bi_buf),ne.bi_buf=he>>16-ne.bi_valid,ne.bi_valid+=oe-16):(ne.bi_buf|=he<<ne.bi_valid&65535,ne.bi_valid+=oe)}function K(ne,he,oe){Y(ne,oe[2*he],oe[2*he+1])}function Q(ne,he){for(var oe=0;oe|=1&ne,ne>>>=1,oe<<=1,0<--he;);return oe>>>1}function q(ne,he,oe){var le,de,ve=new Array(16),we=0;for(le=1;le<=E;le++)ve[le]=we=we+oe[le-1]<<1;for(de=0;de<=he;de++){var ie=ne[2*de+1];ie!==0&&(ne[2*de]=Q(ve[ie]++,ie))}}function J(ne){var he;for(he=0;he<b;he++)ne.dyn_ltree[2*he]=0;for(he=0;he<w;he++)ne.dyn_dtree[2*he]=0;for(he=0;he<19;he++)ne.bl_tree[2*he]=0;ne.dyn_ltree[512]=1,ne.opt_len=ne.static_len=0,ne.last_lit=ne.matches=0}function G(ne){8<ne.bi_valid?z(ne,ne.bi_buf):0<ne.bi_valid&&(ne.pending_buf[ne.pending++]=ne.bi_buf),ne.bi_buf=0,ne.bi_valid=0}function V(ne,he,oe,le){var de=2*he,ve=2*oe;return ne[de]<ne[ve]||ne[de]===ne[ve]&&le[he]<=le[oe]}function X(ne,he,oe){for(var le=ne.heap[oe],de=oe<<1;de<=ne.heap_len&&(de<ne.heap_len&&V(he,ne.heap[de+1],ne.heap[de],ne.depth)&&de++,!V(he,le,ne.heap[de],ne.depth));)ne.heap[oe]=ne.heap[de],oe=de,de<<=1;ne.heap[oe]=le}function te(ne,he,oe){var le,de,ve,we,ie=0;if(ne.last_lit!==0)for(;le=ne.pending_buf[ne.d_buf+2*ie]<<8|ne.pending_buf[ne.d_buf+2*ie+1],de=ne.pending_buf[ne.l_buf+ie],ie++,le===0?K(ne,de,he):(K(ne,(ve=T[de])+y+1,he),(we=I[ve])!==0&&Y(ne,de-=P[ve],we),K(ne,ve=j(--le),oe),(we=O[ve])!==0&&Y(ne,le-=x[ve],we)),ie<ne.last_lit;);K(ne,256,he)}function ee(ne,he){var oe,le,de,ve=he.dyn_tree,we=he.stat_desc.static_tree,ie=he.stat_desc.has_stree,ge=he.stat_desc.elems,Pe=-1;for(ne.heap_len=0,ne.heap_max=573,oe=0;oe<ge;oe++)ve[2*oe]!==0?(ne.heap[++ne.heap_len]=Pe=oe,ne.depth[oe]=0):ve[2*oe+1]=0;for(;ne.heap_len<2;)ve[2*(de=ne.heap[++ne.heap_len]=Pe<2?++Pe:0)]=1,ne.depth[de]=0,ne.opt_len--,ie&&(ne.static_len-=we[2*de+1]);for(he.max_code=Pe,oe=ne.heap_len>>1;1<=oe;oe--)X(ne,ve,oe);for(de=ge;oe=ne.heap[1],ne.heap[1]=ne.heap[ne.heap_len--],X(ne,ve,1),le=ne.heap[1],ne.heap[--ne.heap_max]=oe,ne.heap[--ne.heap_max]=le,ve[2*de]=ve[2*oe]+ve[2*le],ne.depth[de]=(ne.depth[oe]>=ne.depth[le]?ne.depth[oe]:ne.depth[le])+1,ve[2*oe+1]=ve[2*le+1]=de,ne.heap[1]=de++,X(ne,ve,1),2<=ne.heap_len;);ne.heap[--ne.heap_max]=ne.heap[1],function(Fe,Ie){var Oe,$e,et,Ze,Ne,Qe,Xe=Ie.dyn_tree,rt=Ie.max_code,ht=Ie.stat_desc.static_tree,At=Ie.stat_desc.has_stree,Qt=Ie.stat_desc.extra_bits,Nt=Ie.stat_desc.extra_base,Ue=Ie.stat_desc.max_length,Ye=0;for(Ze=0;Ze<=E;Ze++)Fe.bl_count[Ze]=0;for(Xe[2*Fe.heap[Fe.heap_max]+1]=0,Oe=Fe.heap_max+1;Oe<573;Oe++)Ue<(Ze=Xe[2*Xe[2*($e=Fe.heap[Oe])+1]+1]+1)&&(Ze=Ue,Ye++),Xe[2*$e+1]=Ze,rt<$e||(Fe.bl_count[Ze]++,Ne=0,Nt<=$e&&(Ne=Qt[$e-Nt]),Qe=Xe[2*$e],Fe.opt_len+=Qe*(Ze+Ne),At&&(Fe.static_len+=Qe*(ht[2*$e+1]+Ne)));if(Ye!==0){do{for(Ze=Ue-1;Fe.bl_count[Ze]===0;)Ze--;Fe.bl_count[Ze]--,Fe.bl_count[Ze+1]+=2,Fe.bl_count[Ue]--,Ye-=2}while(0<Ye);for(Ze=Ue;Ze!==0;Ze--)for($e=Fe.bl_count[Ze];$e!==0;)rt<(et=Fe.heap[--Oe])||(Xe[2*et+1]!==Ze&&(Fe.opt_len+=(Ze-Xe[2*et+1])*Xe[2*et],Xe[2*et+1]=Ze),$e--)}}(ne,he),q(ve,Pe,ne.bl_count)}function re(ne,he,oe){var le,de,ve=-1,we=he[1],ie=0,ge=7,Pe=4;for(we===0&&(ge=138,Pe=3),he[2*(oe+1)+1]=65535,le=0;le<=oe;le++)de=we,we=he[2*(le+1)+1],++ie<ge&&de===we||(ie<Pe?ne.bl_tree[2*de]+=ie:de!==0?(de!==ve&&ne.bl_tree[2*de]++,ne.bl_tree[32]++):ie<=10?ne.bl_tree[34]++:ne.bl_tree[36]++,ve=de,Pe=(ie=0)===we?(ge=138,3):de===we?(ge=6,3):(ge=7,4))}function se(ne,he,oe){var le,de,ve=-1,we=he[1],ie=0,ge=7,Pe=4;for(we===0&&(ge=138,Pe=3),le=0;le<=oe;le++)if(de=we,we=he[2*(le+1)+1],!(++ie<ge&&de===we)){if(ie<Pe)for(;K(ne,de,ne.bl_tree),--ie!=0;);else de!==0?(de!==ve&&(K(ne,de,ne.bl_tree),ie--),K(ne,16,ne.bl_tree),Y(ne,ie-3,2)):ie<=10?(K(ne,17,ne.bl_tree),Y(ne,ie-3,3)):(K(ne,18,ne.bl_tree),Y(ne,ie-11,7));ve=de,Pe=(ie=0)===we?(ge=138,3):de===we?(ge=6,3):(ge=7,4)}}v(x);var pe=!1;function ce(ne,he,oe,le){Y(ne,0+(le?1:0),3),function(de,ve,we,ie){G(de),z(de,we),z(de,~we),m.arraySet(de.pending_buf,de.window,ve,we,de.pending),de.pending+=we}(ne,he,oe)}g._tr_init=function(ne){pe||(function(){var he,oe,le,de,ve,we=new Array(16);for(de=le=0;de<28;de++)for(P[de]=le,he=0;he<1<<I[de];he++)T[le++]=de;for(T[le-1]=de,de=ve=0;de<16;de++)for(x[de]=ve,he=0;he<1<<O[de];he++)F[ve++]=de;for(ve>>=7;de<w;de++)for(x[de]=ve<<7,he=0;he<1<<O[de]-7;he++)F[256+ve++]=de;for(oe=0;oe<=E;oe++)we[oe]=0;for(he=0;he<=143;)U[2*he+1]=8,he++,we[8]++;for(;he<=255;)U[2*he+1]=9,he++,we[9]++;for(;he<=279;)U[2*he+1]=7,he++,we[7]++;for(;he<=287;)U[2*he+1]=8,he++,we[8]++;for(q(U,287,we),he=0;he<w;he++)B[2*he+1]=5,B[2*he]=Q(he,5);_=new k(U,I,257,b,E),C=new k(B,O,0,w,E),S=new k(new Array(0),D,0,19,7)}(),pe=!0),ne.l_desc=new L(ne.dyn_ltree,_),ne.d_desc=new L(ne.dyn_dtree,C),ne.bl_desc=new L(ne.bl_tree,S),ne.bi_buf=0,ne.bi_valid=0,J(ne)},g._tr_stored_block=ce,g._tr_flush_block=function(ne,he,oe,le){var de,ve,we=0;0<ne.level?(ne.strm.data_type===2&&(ne.strm.data_type=function(ie){var ge,Pe=4093624447;for(ge=0;ge<=31;ge++,Pe>>>=1)if(1&Pe&&ie.dyn_ltree[2*ge]!==0)return 0;if(ie.dyn_ltree[18]!==0||ie.dyn_ltree[20]!==0||ie.dyn_ltree[26]!==0)return 1;for(ge=32;ge<y;ge++)if(ie.dyn_ltree[2*ge]!==0)return 1;return 0}(ne)),ee(ne,ne.l_desc),ee(ne,ne.d_desc),we=function(ie){var ge;for(re(ie,ie.dyn_ltree,ie.l_desc.max_code),re(ie,ie.dyn_dtree,ie.d_desc.max_code),ee(ie,ie.bl_desc),ge=18;3<=ge&&ie.bl_tree[2*N[ge]+1]===0;ge--);return ie.opt_len+=3*(ge+1)+5+5+4,ge}(ne),de=ne.opt_len+3+7>>>3,(ve=ne.static_len+3+7>>>3)<=de&&(de=ve)):de=ve=oe+5,oe+4<=de&&he!==-1?ce(ne,he,oe,le):ne.strategy===4||ve===de?(Y(ne,2+(le?1:0),3),te(ne,U,B)):(Y(ne,4+(le?1:0),3),function(ie,ge,Pe,Fe){var Ie;for(Y(ie,ge-257,5),Y(ie,Pe-1,5),Y(ie,Fe-4,4),Ie=0;Ie<Fe;Ie++)Y(ie,ie.bl_tree[2*N[Ie]+1],3);se(ie,ie.dyn_ltree,ge-1),se(ie,ie.dyn_dtree,Pe-1)}(ne,ne.l_desc.max_code+1,ne.d_desc.max_code+1,we+1),te(ne,ne.dyn_ltree,ne.dyn_dtree)),J(ne),le&&G(ne)},g._tr_tally=function(ne,he,oe){return ne.pending_buf[ne.d_buf+2*ne.last_lit]=he>>>8&255,ne.pending_buf[ne.d_buf+2*ne.last_lit+1]=255&he,ne.pending_buf[ne.l_buf+ne.last_lit]=255&oe,ne.last_lit++,he===0?ne.dyn_ltree[2*oe]++:(ne.matches++,he--,ne.dyn_ltree[2*(T[oe]+y+1)]++,ne.dyn_dtree[2*j(he)]++),ne.last_lit===ne.lit_bufsize-1},g._tr_align=function(ne){Y(ne,2,3),K(ne,256,U),function(he){he.bi_valid===16?(z(he,he.bi_buf),he.bi_buf=0,he.bi_valid=0):8<=he.bi_valid&&(he.pending_buf[he.pending++]=255&he.bi_buf,he.bi_buf>>=8,he.bi_valid-=8)}(ne)}},{"../utils/common":41}],53:[function(h,p,g){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(h,p,g){(function(m){(function(v,y){if(!v.setImmediate){var b,w,E,I,O=1,D={},N=!1,U=v.document,B=Object.getPrototypeOf&&Object.getPrototypeOf(v);B=B&&B.setTimeout?B:v,b={}.toString.call(v.process)==="[object process]"?function(_){i.nextTick(function(){T(_)})}:function(){if(v.postMessage&&!v.importScripts){var _=!0,C=v.onmessage;return v.onmessage=function(){_=!1},v.postMessage("","*"),v.onmessage=C,_}}()?(I="setImmediate$"+Math.random()+"$",v.addEventListener?v.addEventListener("message",P,!1):v.attachEvent("onmessage",P),function(_){v.postMessage(I+_,"*")}):v.MessageChannel?((E=new MessageChannel).port1.onmessage=function(_){T(_.data)},function(_){E.port2.postMessage(_)}):U&&"onreadystatechange"in U.createElement("script")?(w=U.documentElement,function(_){var C=U.createElement("script");C.onreadystatechange=function(){T(_),C.onreadystatechange=null,w.removeChild(C),C=null},w.appendChild(C)}):function(_){setTimeout(T,0,_)},B.setImmediate=function(_){typeof _!="function"&&(_=new Function(""+_));for(var C=new Array(arguments.length-1),S=0;S<C.length;S++)C[S]=arguments[S+1];var x={callback:_,args:C};return D[O]=x,b(O),O++},B.clearImmediate=F}function F(_){delete D[_]}function T(_){if(N)setTimeout(T,0,_);else{var C=D[_];if(C){N=!0;try{(function(S){var x=S.callback,k=S.args;switch(k.length){case 0:x();break;case 1:x(k[0]);break;case 2:x(k[0],k[1]);break;case 3:x(k[0],k[1],k[2]);break;default:x.apply(void 0,k)}})(C)}finally{F(_),N=!1}}}}function P(_){_.source===v&&typeof _.data=="string"&&_.data.indexOf(I)===0&&T(+_.data.slice(I.length))}})(typeof self>"u"?m===void 0?this:m:self)}).call(this,a!==void 0?a:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],r("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(r,n,o){(function(i){(function(){var a=/[\\^$.*+?()[\]{}|]/g,s=RegExp(a.source),c=typeof i=="object"&&i&&i.Object===Object&&i,l=typeof self=="object"&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),f=Object.prototype.toString,d=u.Symbol,h=d?d.prototype:void 0,p=h?h.toString:void 0;function g(m){if(typeof m=="string")return m;if(function(y){return typeof y=="symbol"||function(b){return!!b&&typeof b=="object"}(y)&&f.call(y)=="[object Symbol]"}(m))return p?p.call(m):"";var v=m+"";return v=="0"&&1/m==-1/0?"-0":v}n.exports=function(m){var v;return(m=(v=m)==null?"":g(v))&&s.test(m)?m.replace(a,"\\$&"):m}}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(r,n,o){(function(i){(function(){var a="[object Arguments]",s="[object Map]",c="[object Object]",l="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,f=/^\w*$/,d=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[a]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v["[object Function]"]=v[s]=v["[object Number]"]=v[c]=v["[object RegExp]"]=v[l]=v["[object String]"]=v["[object WeakMap]"]=!1;var y=typeof i=="object"&&i&&i.Object===Object&&i,b=typeof self=="object"&&self&&self.Object===Object&&self,w=y||b||Function("return this")(),E=typeof o=="object"&&o&&!o.nodeType&&o,I=E&&typeof n=="object"&&n&&!n.nodeType&&n,O=I&&I.exports===E&&y.process,D=function(){try{return O&&O.binding("util")}catch{}}(),N=D&&D.isTypedArray;function U(Se,He,ct,xt){for(var Zt=-1,Rt=Se?Se.length:0;++Zt<Rt;){var Ht=Se[Zt];He(xt,Ht,ct(Ht),Se)}return xt}function B(Se,He){for(var ct=-1,xt=Se?Se.length:0;++ct<xt;)if(He(Se[ct],ct,Se))return!0;return!1}function F(Se){var He=!1;if(Se!=null&&typeof Se.toString!="function")try{He=!!(Se+"")}catch{}return He}function T(Se){var He=-1,ct=Array(Se.size);return Se.forEach(function(xt,Zt){ct[++He]=[Zt,xt]}),ct}function P(Se){var He=-1,ct=Array(Se.size);return Se.forEach(function(xt){ct[++He]=xt}),ct}var _,C,S,x=Array.prototype,k=Function.prototype,L=Object.prototype,j=w["__core-js_shared__"],z=(_=/[^.]+$/.exec(j&&j.keys&&j.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",Y=k.toString,K=L.hasOwnProperty,Q=L.toString,q=RegExp("^"+Y.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),J=w.Symbol,G=w.Uint8Array,V=L.propertyIsEnumerable,X=x.splice,te=(C=Object.keys,S=Object,function(Se){return C(S(Se))}),ee=_t(w,"DataView"),re=_t(w,"Map"),se=_t(w,"Promise"),pe=_t(w,"Set"),ce=_t(w,"WeakMap"),ne=_t(Object,"create"),he=Ge(ee),oe=Ge(re),le=Ge(se),de=Ge(pe),ve=Ge(ce),we=J?J.prototype:void 0,ie=we?we.valueOf:void 0,ge=we?we.toString:void 0;function Pe(Se){var He=-1,ct=Se?Se.length:0;for(this.clear();++He<ct;){var xt=Se[He];this.set(xt[0],xt[1])}}function Fe(Se){var He=-1,ct=Se?Se.length:0;for(this.clear();++He<ct;){var xt=Se[He];this.set(xt[0],xt[1])}}function Ie(Se){var He=-1,ct=Se?Se.length:0;for(this.clear();++He<ct;){var xt=Se[He];this.set(xt[0],xt[1])}}function Oe(Se){var He=-1,ct=Se?Se.length:0;for(this.__data__=new Ie;++He<ct;)this.add(Se[He])}function $e(Se){this.__data__=new Fe(Se)}function et(Se,He){var ct=Ee(Se)||Ce(Se)?function(Ht,Nr){for(var kr=-1,_r=Array(Ht);++kr<Ht;)_r[kr]=Nr(kr);return _r}(Se.length,String):[],xt=ct.length,Zt=!!xt;for(var Rt in Se)!He&&!K.call(Se,Rt)||Zt&&(Rt=="length"||Ut(Rt,xt))||ct.push(Rt);return ct}function Ze(Se,He){for(var ct=Se.length;ct--;)if(be(Se[ct][0],He))return ct;return-1}function Ne(Se,He,ct,xt){return Xe(Se,function(Zt,Rt,Ht){He(xt,Zt,ct(Zt),Ht)}),xt}Pe.prototype.clear=function(){this.__data__=ne?ne(null):{}},Pe.prototype.delete=function(Se){return this.has(Se)&&delete this.__data__[Se]},Pe.prototype.get=function(Se){var He=this.__data__;if(ne){var ct=He[Se];return ct==="__lodash_hash_undefined__"?void 0:ct}return K.call(He,Se)?He[Se]:void 0},Pe.prototype.has=function(Se){var He=this.__data__;return ne?He[Se]!==void 0:K.call(He,Se)},Pe.prototype.set=function(Se,He){return this.__data__[Se]=ne&&He===void 0?"__lodash_hash_undefined__":He,this},Fe.prototype.clear=function(){this.__data__=[]},Fe.prototype.delete=function(Se){var He=this.__data__,ct=Ze(He,Se);return!(ct<0)&&(ct==He.length-1?He.pop():X.call(He,ct,1),!0)},Fe.prototype.get=function(Se){var He=this.__data__,ct=Ze(He,Se);return ct<0?void 0:He[ct][1]},Fe.prototype.has=function(Se){return Ze(this.__data__,Se)>-1},Fe.prototype.set=function(Se,He){var ct=this.__data__,xt=Ze(ct,Se);return xt<0?ct.push([Se,He]):ct[xt][1]=He,this},Ie.prototype.clear=function(){this.__data__={hash:new Pe,map:new(re||Fe),string:new Pe}},Ie.prototype.delete=function(Se){return mt(this,Se).delete(Se)},Ie.prototype.get=function(Se){return mt(this,Se).get(Se)},Ie.prototype.has=function(Se){return mt(this,Se).has(Se)},Ie.prototype.set=function(Se,He){return mt(this,Se).set(Se,He),this},Oe.prototype.add=Oe.prototype.push=function(Se){return this.__data__.set(Se,"__lodash_hash_undefined__"),this},Oe.prototype.has=function(Se){return this.__data__.has(Se)},$e.prototype.clear=function(){this.__data__=new Fe},$e.prototype.delete=function(Se){return this.__data__.delete(Se)},$e.prototype.get=function(Se){return this.__data__.get(Se)},$e.prototype.has=function(Se){return this.__data__.has(Se)},$e.prototype.set=function(Se,He){var ct=this.__data__;if(ct instanceof Fe){var xt=ct.__data__;if(!re||xt.length<199)return xt.push([Se,He]),this;ct=this.__data__=new Ie(xt)}return ct.set(Se,He),this};var Qe,Xe=(Qe=function(Se,He){return Se&&rt(Se,He,vt)},function(Se,He){if(Se==null)return Se;if(!me(Se))return Qe(Se,He);for(var ct=Se.length,xt=-1,Zt=Object(Se);++xt<ct&&He(Zt[xt],xt,Zt)!==!1;);return Se}),rt=function(Se){return function(He,ct,xt){for(var Zt=-1,Rt=Object(He),Ht=xt(He),Nr=Ht.length;Nr--;){var kr=Ht[Se?Nr:++Zt];if(ct(Rt[kr],kr,Rt)===!1)break}return He}}();function ht(Se,He){for(var ct=0,xt=(He=wt(He,Se)?[He]:tt(He)).length;Se!=null&&ct<xt;)Se=Se[Me(He[ct++])];return ct&&ct==xt?Se:void 0}function At(Se,He){return Se!=null&&He in Object(Se)}function Qt(Se,He,ct,xt,Zt){return Se===He||(Se==null||He==null||!De(Se)&&!je(He)?Se!=Se&&He!=He:function(Rt,Ht,Nr,kr,_r,br){var qr=Ee(Rt),Xn=Ee(Ht),fn="[object Array]",Zn="[object Array]";qr||(fn=(fn=Pt(Rt))==a?c:fn),Xn||(Zn=(Zn=Pt(Ht))==a?c:Zn);var so=fn==c&&!F(Rt),bi=Zn==c&&!F(Ht),Pa=fn==Zn;if(Pa&&!so)return br||(br=new $e),qr||lt(Rt)?st(Rt,Ht,Nr,kr,_r,br):function(xn,an,Al,Pl,Xs,Po,Di){switch(Al){case"[object DataView]":if(xn.byteLength!=an.byteLength||xn.byteOffset!=an.byteOffset)return!1;xn=xn.buffer,an=an.buffer;case"[object ArrayBuffer]":return!(xn.byteLength!=an.byteLength||!Pl(new G(xn),new G(an)));case"[object Boolean]":case"[object Date]":case"[object Number]":return be(+xn,+an);case"[object Error]":return xn.name==an.name&&xn.message==an.message;case"[object RegExp]":case"[object String]":return xn==an+"";case s:var Fi=T;case l:var du=2&Po;if(Fi||(Fi=P),xn.size!=an.size&&!du)return!1;var Tf=Di.get(xn);if(Tf)return Tf==an;Po|=1,Di.set(xn,an);var _c=st(Fi(xn),Fi(an),Pl,Xs,Po,Di);return Di.delete(xn),_c;case"[object Symbol]":if(ie)return ie.call(xn)==ie.call(an)}return!1}(Rt,Ht,fn,Nr,kr,_r,br);if(!(2&_r)){var pa=so&&K.call(Rt,"__wrapped__"),Cc=bi&&K.call(Ht,"__wrapped__");if(pa||Cc){var uu=pa?Rt.value():Rt,Sc=Cc?Ht.value():Ht;return br||(br=new $e),Nr(uu,Sc,kr,_r,br)}}return Pa?(br||(br=new $e),function(xn,an,Al,Pl,Xs,Po){var Di=2&Xs,Fi=vt(xn),du=Fi.length,Tf=vt(an).length;if(du!=Tf&&!Di)return!1;for(var _c=du;_c--;){var Qs=Fi[_c];if(!(Di?Qs in an:K.call(an,Qs)))return!1}var mp=Po.get(xn);if(mp&&Po.get(an))return mp==an;var pd=!0;Po.set(xn,an),Po.set(an,xn);for(var If=Di;++_c<du;){Qs=Fi[_c];var Ts=xn[Qs],Af=an[Qs];if(Pl)var Pf=Di?Pl(Af,Ts,Qs,an,xn,Po):Pl(Ts,Af,Qs,xn,an,Po);if(!(Pf===void 0?Ts===Af||Al(Ts,Af,Pl,Xs,Po):Pf)){pd=!1;break}If||(If=Qs=="constructor")}if(pd&&!If){var Mf=xn.constructor,fu=an.constructor;Mf==fu||!("constructor"in xn)||!("constructor"in an)||typeof Mf=="function"&&Mf instanceof Mf&&typeof fu=="function"&&fu instanceof fu||(pd=!1)}return Po.delete(xn),Po.delete(an),pd}(Rt,Ht,Nr,kr,_r,br)):!1}(Se,He,Qt,ct,xt,Zt))}function Nt(Se){return!(!De(Se)||function(He){return!!z&&z in He}(Se))&&(_e(Se)||F(Se)?q:g).test(Ge(Se))}function Ue(Se){return typeof Se=="function"?Se:Se==null?Bt:typeof Se=="object"?Ee(Se)?function(xt,Zt){return wt(xt)&&Dt(Zt)?qt(Me(xt),Zt):function(Rt){var Ht=function(Nr,kr,_r){var br=Nr==null?void 0:ht(Nr,kr);return br===void 0?_r:br}(Rt,xt);return Ht===void 0&&Ht===Zt?function(Nr,kr){return Nr!=null&&function(_r,br,qr){br=wt(br,_r)?[br]:tt(br);for(var Xn,fn=-1,Zn=br.length;++fn<Zn;){var so=Me(br[fn]);if(!(Xn=_r!=null&&qr(_r,so)))break;_r=_r[so]}return Xn||!!(Zn=_r?_r.length:0)&&Be(Zn)&&Ut(so,Zn)&&(Ee(_r)||Ce(_r))}(Nr,kr,At)}(Rt,xt):Qt(Zt,Ht,void 0,3)}}(Se[0],Se[1]):function(xt){var Zt=function(Rt){for(var Ht=vt(Rt),Nr=Ht.length;Nr--;){var kr=Ht[Nr],_r=Rt[kr];Ht[Nr]=[kr,_r,Dt(_r)]}return Ht}(xt);return Zt.length==1&&Zt[0][2]?qt(Zt[0][0],Zt[0][1]):function(Rt){return Rt===xt||function(Ht,Nr,kr,_r){var br=kr.length,qr=br,Xn=!_r;if(Ht==null)return!qr;for(Ht=Object(Ht);br--;){var fn=kr[br];if(Xn&&fn[2]?fn[1]!==Ht[fn[0]]:!(fn[0]in Ht))return!1}for(;++br<qr;){var Zn=(fn=kr[br])[0],so=Ht[Zn],bi=fn[1];if(Xn&&fn[2]){if(so===void 0&&!(Zn in Ht))return!1}else{var Pa=new $e;if(_r)var pa=_r(so,bi,Zn,Ht,Nr,Pa);if(!(pa===void 0?Qt(bi,so,_r,3,Pa):pa))return!1}}return!0}(Rt,xt,Zt)}}(Se):wt(He=Se)?(ct=Me(He),function(xt){return xt==null?void 0:xt[ct]}):function(xt){return function(Zt){return ht(Zt,xt)}}(He);var He,ct}function Ye(Se){if(ct=(He=Se)&&He.constructor,xt=typeof ct=="function"&&ct.prototype||L,He!==xt)return te(Se);var He,ct,xt,Zt=[];for(var Rt in Object(Se))K.call(Se,Rt)&&Rt!="constructor"&&Zt.push(Rt);return Zt}function tt(Se){return Ee(Se)?Se:Tt(Se)}function st(Se,He,ct,xt,Zt,Rt){var Ht=2&Zt,Nr=Se.length,kr=He.length;if(Nr!=kr&&!(Ht&&kr>Nr))return!1;var _r=Rt.get(Se);if(_r&&Rt.get(He))return _r==He;var br=-1,qr=!0,Xn=1&Zt?new Oe:void 0;for(Rt.set(Se,He),Rt.set(He,Se);++br<Nr;){var fn=Se[br],Zn=He[br];if(xt)var so=Ht?xt(Zn,fn,br,He,Se,Rt):xt(fn,Zn,br,Se,He,Rt);if(so!==void 0){if(so)continue;qr=!1;break}if(Xn){if(!B(He,function(bi,Pa){if(!Xn.has(Pa)&&(fn===bi||ct(fn,bi,xt,Zt,Rt)))return Xn.add(Pa)})){qr=!1;break}}else if(fn!==Zn&&!ct(fn,Zn,xt,Zt,Rt)){qr=!1;break}}return Rt.delete(Se),Rt.delete(He),qr}function mt(Se,He){var ct,xt,Zt=Se.__data__;return((xt=typeof(ct=He))=="string"||xt=="number"||xt=="symbol"||xt=="boolean"?ct!=="__proto__":ct===null)?Zt[typeof He=="string"?"string":"hash"]:Zt.map}function _t(Se,He){var ct=function(xt,Zt){return xt==null?void 0:xt[Zt]}(Se,He);return Nt(ct)?ct:void 0}var Pt=function(Se){return Q.call(Se)};function Ut(Se,He){return!!(He=He??9007199254740991)&&(typeof Se=="number"||m.test(Se))&&Se>-1&&Se%1==0&&Se<He}function wt(Se,He){if(Ee(Se))return!1;var ct=typeof Se;return!(ct!="number"&&ct!="symbol"&&ct!="boolean"&&Se!=null&&!Le(Se))||f.test(Se)||!u.test(Se)||He!=null&&Se in Object(He)}function Dt(Se){return Se==Se&&!De(Se)}function qt(Se,He){return function(ct){return ct!=null&&ct[Se]===He&&(He!==void 0||Se in Object(ct))}}(ee&&Pt(new ee(new ArrayBuffer(1)))!="[object DataView]"||re&&Pt(new re)!=s||se&&Pt(se.resolve())!="[object Promise]"||pe&&Pt(new pe)!=l||ce&&Pt(new ce)!="[object WeakMap]")&&(Pt=function(Se){var He=Q.call(Se),ct=He==c?Se.constructor:void 0,xt=ct?Ge(ct):void 0;if(xt)switch(xt){case he:return"[object DataView]";case oe:return s;case le:return"[object Promise]";case de:return l;case ve:return"[object WeakMap]"}return He});var Tt=ke(function(Se){var He;Se=(He=Se)==null?"":function(xt){if(typeof xt=="string")return xt;if(Le(xt))return ge?ge.call(xt):"";var Zt=xt+"";return Zt=="0"&&1/xt==-1/0?"-0":Zt}(He);var ct=[];return d.test(Se)&&ct.push(""),Se.replace(h,function(xt,Zt,Rt,Ht){ct.push(Rt?Ht.replace(p,"$1"):Zt||xt)}),ct});function Me(Se){if(typeof Se=="string"||Le(Se))return Se;var He=Se+"";return He=="0"&&1/Se==-1/0?"-0":He}function Ge(Se){if(Se!=null){try{return Y.call(Se)}catch{}try{return Se+""}catch{}}return""}var nt,fe=(nt=function(Se,He,ct){K.call(Se,ct)?Se[ct].push(He):Se[ct]=[He]},function(Se,He){var ct=Ee(Se)?U:Ne,xt={};return ct(Se,nt,Ue(He),xt)});function ke(Se,He){if(typeof Se!="function"||He&&typeof He!="function")throw new TypeError("Expected a function");var ct=function(){var xt=arguments,Zt=He?He.apply(this,xt):xt[0],Rt=ct.cache;if(Rt.has(Zt))return Rt.get(Zt);var Ht=Se.apply(this,xt);return ct.cache=Rt.set(Zt,Ht),Ht};return ct.cache=new(ke.Cache||Ie),ct}function be(Se,He){return Se===He||Se!=Se&&He!=He}function Ce(Se){return function(He){return je(He)&&me(He)}(Se)&&K.call(Se,"callee")&&(!V.call(Se,"callee")||Q.call(Se)==a)}ke.Cache=Ie;var Ee=Array.isArray;function me(Se){return Se!=null&&Be(Se.length)&&!_e(Se)}function _e(Se){var He=De(Se)?Q.call(Se):"";return He=="[object Function]"||He=="[object GeneratorFunction]"}function Be(Se){return typeof Se=="number"&&Se>-1&&Se%1==0&&Se<=9007199254740991}function De(Se){var He=typeof Se;return!!Se&&(He=="object"||He=="function")}function je(Se){return!!Se&&typeof Se=="object"}function Le(Se){return typeof Se=="symbol"||je(Se)&&Q.call(Se)=="[object Symbol]"}var lt=N?function(Se){return function(He){return Se(He)}}(N):function(Se){return je(Se)&&Be(Se.length)&&!!v[Q.call(Se)]};function vt(Se){return me(Se)?et(Se):Ye(Se)}function Bt(Se){return Se}n.exports=fe}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(r,n,o){var i=Object.prototype.toString;n.exports=function(a){return a===!0||a===!1||function(s){return!!s&&typeof s=="object"}(a)&&i.call(a)=="[object Boolean]"}},{}],445:[function(r,n,o){(function(i){(function(){var a="[object Arguments]",s="[object Map]",c="[object Object]",l="[object Set]",u=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,d={};d["[object Float32Array]"]=d["[object Float64Array]"]=d["[object Int8Array]"]=d["[object Int16Array]"]=d["[object Int32Array]"]=d["[object Uint8Array]"]=d["[object Uint8ClampedArray]"]=d["[object Uint16Array]"]=d["[object Uint32Array]"]=!0,d[a]=d["[object Array]"]=d["[object ArrayBuffer]"]=d["[object Boolean]"]=d["[object DataView]"]=d["[object Date]"]=d["[object Error]"]=d["[object Function]"]=d[s]=d["[object Number]"]=d[c]=d["[object RegExp]"]=d[l]=d["[object String]"]=d["[object WeakMap]"]=!1;var h=typeof i=="object"&&i&&i.Object===Object&&i,p=typeof self=="object"&&self&&self.Object===Object&&self,g=h||p||Function("return this")(),m=typeof o=="object"&&o&&!o.nodeType&&o,v=m&&typeof n=="object"&&n&&!n.nodeType&&n,y=v&&v.exports===m,b=y&&h.process,w=function(){try{return b&&b.binding&&b.binding("util")}catch{}}(),E=w&&w.isTypedArray;function I(Me,Ge){for(var nt=-1,fe=Me==null?0:Me.length;++nt<fe;)if(Ge(Me[nt],nt,Me))return!0;return!1}function O(Me){var Ge=-1,nt=Array(Me.size);return Me.forEach(function(fe,ke){nt[++Ge]=[ke,fe]}),nt}function D(Me){var Ge=-1,nt=Array(Me.size);return Me.forEach(function(fe){nt[++Ge]=fe}),nt}var N,U,B,F=Array.prototype,T=Function.prototype,P=Object.prototype,_=g["__core-js_shared__"],C=T.toString,S=P.hasOwnProperty,x=(N=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",k=P.toString,L=RegExp("^"+C.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=y?g.Buffer:void 0,z=g.Symbol,Y=g.Uint8Array,K=P.propertyIsEnumerable,Q=F.splice,q=z?z.toStringTag:void 0,J=Object.getOwnPropertySymbols,G=j?j.isBuffer:void 0,V=(U=Object.keys,B=Object,function(Me){return U(B(Me))}),X=At(g,"DataView"),te=At(g,"Map"),ee=At(g,"Promise"),re=At(g,"Set"),se=At(g,"WeakMap"),pe=At(Object,"create"),ce=Ye(X),ne=Ye(te),he=Ye(ee),oe=Ye(re),le=Ye(se),de=z?z.prototype:void 0,ve=de?de.valueOf:void 0;function we(Me){var Ge=-1,nt=Me==null?0:Me.length;for(this.clear();++Ge<nt;){var fe=Me[Ge];this.set(fe[0],fe[1])}}function ie(Me){var Ge=-1,nt=Me==null?0:Me.length;for(this.clear();++Ge<nt;){var fe=Me[Ge];this.set(fe[0],fe[1])}}function ge(Me){var Ge=-1,nt=Me==null?0:Me.length;for(this.clear();++Ge<nt;){var fe=Me[Ge];this.set(fe[0],fe[1])}}function Pe(Me){var Ge=-1,nt=Me==null?0:Me.length;for(this.__data__=new ge;++Ge<nt;)this.add(Me[Ge])}function Fe(Me){var Ge=this.__data__=new ie(Me);this.size=Ge.size}function Ie(Me,Ge){var nt=mt(Me),fe=!nt&&st(Me),ke=!nt&&!fe&&_t(Me),be=!nt&&!fe&&!ke&&qt(Me),Ce=nt||fe||ke||be,Ee=Ce?function(Be,De){for(var je=-1,Le=Array(Be);++je<Be;)Le[je]=De(je);return Le}(Me.length,String):[],me=Ee.length;for(var _e in Me)!Ge&&!S.call(Me,_e)||Ce&&(_e=="length"||ke&&(_e=="offset"||_e=="parent")||be&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||Ue(_e,me))||Ee.push(_e);return Ee}function Oe(Me,Ge){for(var nt=Me.length;nt--;)if(tt(Me[nt][0],Ge))return nt;return-1}function $e(Me){return Me==null?Me===void 0?"[object Undefined]":"[object Null]":q&&q in Object(Me)?function(Ge){var nt=S.call(Ge,q),fe=Ge[q];try{Ge[q]=void 0;var ke=!0}catch{}var be=k.call(Ge);return ke&&(nt?Ge[q]=fe:delete Ge[q]),be}(Me):function(Ge){return k.call(Ge)}(Me)}function et(Me){return Dt(Me)&&$e(Me)==a}function Ze(Me,Ge,nt,fe,ke){return Me===Ge||(Me==null||Ge==null||!Dt(Me)&&!Dt(Ge)?Me!=Me&&Ge!=Ge:function(be,Ce,Ee,me,_e,Be){var De=mt(be),je=mt(Ce),Le=De?"[object Array]":Nt(be),lt=je?"[object Array]":Nt(Ce),vt=(Le=Le==a?c:Le)==c,Bt=(lt=lt==a?c:lt)==c,Se=Le==lt;if(Se&&_t(be)){if(!_t(Ce))return!1;De=!0,vt=!1}if(Se&&!vt)return Be||(Be=new Fe),De||qt(be)?Xe(be,Ce,Ee,me,_e,Be):function(Rt,Ht,Nr,kr,_r,br,qr){switch(Nr){case"[object DataView]":if(Rt.byteLength!=Ht.byteLength||Rt.byteOffset!=Ht.byteOffset)return!1;Rt=Rt.buffer,Ht=Ht.buffer;case"[object ArrayBuffer]":return!(Rt.byteLength!=Ht.byteLength||!br(new Y(Rt),new Y(Ht)));case"[object Boolean]":case"[object Date]":case"[object Number]":return tt(+Rt,+Ht);case"[object Error]":return Rt.name==Ht.name&&Rt.message==Ht.message;case"[object RegExp]":case"[object String]":return Rt==Ht+"";case s:var Xn=O;case l:var fn=1&kr;if(Xn||(Xn=D),Rt.size!=Ht.size&&!fn)return!1;var Zn=qr.get(Rt);if(Zn)return Zn==Ht;kr|=2,qr.set(Rt,Ht);var so=Xe(Xn(Rt),Xn(Ht),kr,_r,br,qr);return qr.delete(Rt),so;case"[object Symbol]":if(ve)return ve.call(Rt)==ve.call(Ht)}return!1}(be,Ce,Le,Ee,me,_e,Be);if(!(1&Ee)){var He=vt&&S.call(be,"__wrapped__"),ct=Bt&&S.call(Ce,"__wrapped__");if(He||ct){var xt=He?be.value():be,Zt=ct?Ce.value():Ce;return Be||(Be=new Fe),_e(xt,Zt,Ee,me,Be)}}return Se?(Be||(Be=new Fe),function(Rt,Ht,Nr,kr,_r,br){var qr=1&Nr,Xn=rt(Rt),fn=Xn.length,Zn=rt(Ht).length;if(fn!=Zn&&!qr)return!1;for(var so=fn;so--;){var bi=Xn[so];if(!(qr?bi in Ht:S.call(Ht,bi)))return!1}var Pa=br.get(Rt);if(Pa&&br.get(Ht))return Pa==Ht;var pa=!0;br.set(Rt,Ht),br.set(Ht,Rt);for(var Cc=qr;++so<fn;){bi=Xn[so];var uu=Rt[bi],Sc=Ht[bi];if(kr)var xn=qr?kr(Sc,uu,bi,Ht,Rt,br):kr(uu,Sc,bi,Rt,Ht,br);if(!(xn===void 0?uu===Sc||_r(uu,Sc,Nr,kr,br):xn)){pa=!1;break}Cc||(Cc=bi=="constructor")}if(pa&&!Cc){var an=Rt.constructor,Al=Ht.constructor;an==Al||!("constructor"in Rt)||!("constructor"in Ht)||typeof an=="function"&&an instanceof an&&typeof Al=="function"&&Al instanceof Al||(pa=!1)}return br.delete(Rt),br.delete(Ht),pa}(be,Ce,Ee,me,_e,Be)):!1}(Me,Ge,nt,fe,Ze,ke))}function Ne(Me){return!(!wt(Me)||function(Ge){return!!x&&x in Ge}(Me))&&(Pt(Me)?L:u).test(Ye(Me))}function Qe(Me){if(nt=(Ge=Me)&&Ge.constructor,fe=typeof nt=="function"&&nt.prototype||P,Ge!==fe)return V(Me);var Ge,nt,fe,ke=[];for(var be in Object(Me))S.call(Me,be)&&be!="constructor"&&ke.push(be);return ke}function Xe(Me,Ge,nt,fe,ke,be){var Ce=1&nt,Ee=Me.length,me=Ge.length;if(Ee!=me&&!(Ce&&me>Ee))return!1;var _e=be.get(Me);if(_e&&be.get(Ge))return _e==Ge;var Be=-1,De=!0,je=2&nt?new Pe:void 0;for(be.set(Me,Ge),be.set(Ge,Me);++Be<Ee;){var Le=Me[Be],lt=Ge[Be];if(fe)var vt=Ce?fe(lt,Le,Be,Ge,Me,be):fe(Le,lt,Be,Me,Ge,be);if(vt!==void 0){if(vt)continue;De=!1;break}if(je){if(!I(Ge,function(Bt,Se){if(He=Se,!je.has(He)&&(Le===Bt||ke(Le,Bt,nt,fe,be)))return je.push(Se);var He})){De=!1;break}}else if(Le!==lt&&!ke(Le,lt,nt,fe,be)){De=!1;break}}return be.delete(Me),be.delete(Ge),De}function rt(Me){return function(Ge,nt,fe){var ke=nt(Ge);return mt(Ge)?ke:function(be,Ce){for(var Ee=-1,me=Ce.length,_e=be.length;++Ee<me;)be[_e+Ee]=Ce[Ee];return be}(ke,fe(Ge))}(Me,Tt,Qt)}function ht(Me,Ge){var nt,fe,ke=Me.__data__;return((fe=typeof(nt=Ge))=="string"||fe=="number"||fe=="symbol"||fe=="boolean"?nt!=="__proto__":nt===null)?ke[typeof Ge=="string"?"string":"hash"]:ke.map}function At(Me,Ge){var nt=function(fe,ke){return fe==null?void 0:fe[ke]}(Me,Ge);return Ne(nt)?nt:void 0}we.prototype.clear=function(){this.__data__=pe?pe(null):{},this.size=0},we.prototype.delete=function(Me){var Ge=this.has(Me)&&delete this.__data__[Me];return this.size-=Ge?1:0,Ge},we.prototype.get=function(Me){var Ge=this.__data__;if(pe){var nt=Ge[Me];return nt==="__lodash_hash_undefined__"?void 0:nt}return S.call(Ge,Me)?Ge[Me]:void 0},we.prototype.has=function(Me){var Ge=this.__data__;return pe?Ge[Me]!==void 0:S.call(Ge,Me)},we.prototype.set=function(Me,Ge){var nt=this.__data__;return this.size+=this.has(Me)?0:1,nt[Me]=pe&&Ge===void 0?"__lodash_hash_undefined__":Ge,this},ie.prototype.clear=function(){this.__data__=[],this.size=0},ie.prototype.delete=function(Me){var Ge=this.__data__,nt=Oe(Ge,Me);return!(nt<0)&&(nt==Ge.length-1?Ge.pop():Q.call(Ge,nt,1),--this.size,!0)},ie.prototype.get=function(Me){var Ge=this.__data__,nt=Oe(Ge,Me);return nt<0?void 0:Ge[nt][1]},ie.prototype.has=function(Me){return Oe(this.__data__,Me)>-1},ie.prototype.set=function(Me,Ge){var nt=this.__data__,fe=Oe(nt,Me);return fe<0?(++this.size,nt.push([Me,Ge])):nt[fe][1]=Ge,this},ge.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(te||ie),string:new we}},ge.prototype.delete=function(Me){var Ge=ht(this,Me).delete(Me);return this.size-=Ge?1:0,Ge},ge.prototype.get=function(Me){return ht(this,Me).get(Me)},ge.prototype.has=function(Me){return ht(this,Me).has(Me)},ge.prototype.set=function(Me,Ge){var nt=ht(this,Me),fe=nt.size;return nt.set(Me,Ge),this.size+=nt.size==fe?0:1,this},Pe.prototype.add=Pe.prototype.push=function(Me){return this.__data__.set(Me,"__lodash_hash_undefined__"),this},Pe.prototype.has=function(Me){return this.__data__.has(Me)},Fe.prototype.clear=function(){this.__data__=new ie,this.size=0},Fe.prototype.delete=function(Me){var Ge=this.__data__,nt=Ge.delete(Me);return this.size=Ge.size,nt},Fe.prototype.get=function(Me){return this.__data__.get(Me)},Fe.prototype.has=function(Me){return this.__data__.has(Me)},Fe.prototype.set=function(Me,Ge){var nt=this.__data__;if(nt instanceof ie){var fe=nt.__data__;if(!te||fe.length<199)return fe.push([Me,Ge]),this.size=++nt.size,this;nt=this.__data__=new ge(fe)}return nt.set(Me,Ge),this.size=nt.size,this};var Qt=J?function(Me){return Me==null?[]:(Me=Object(Me),function(Ge,nt){for(var fe=-1,ke=Ge==null?0:Ge.length,be=0,Ce=[];++fe<ke;){var Ee=Ge[fe];nt(Ee,fe,Ge)&&(Ce[be++]=Ee)}return Ce}(J(Me),function(Ge){return K.call(Me,Ge)}))}:function(){return[]},Nt=$e;function Ue(Me,Ge){return!!(Ge=Ge??9007199254740991)&&(typeof Me=="number"||f.test(Me))&&Me>-1&&Me%1==0&&Me<Ge}function Ye(Me){if(Me!=null){try{return C.call(Me)}catch{}try{return Me+""}catch{}}return""}function tt(Me,Ge){return Me===Ge||Me!=Me&&Ge!=Ge}(X&&Nt(new X(new ArrayBuffer(1)))!="[object DataView]"||te&&Nt(new te)!=s||ee&&Nt(ee.resolve())!="[object Promise]"||re&&Nt(new re)!=l||se&&Nt(new se)!="[object WeakMap]")&&(Nt=function(Me){var Ge=$e(Me),nt=Ge==c?Me.constructor:void 0,fe=nt?Ye(nt):"";if(fe)switch(fe){case ce:return"[object DataView]";case ne:return s;case he:return"[object Promise]";case oe:return l;case le:return"[object WeakMap]"}return Ge});var st=et(function(){return arguments}())?et:function(Me){return Dt(Me)&&S.call(Me,"callee")&&!K.call(Me,"callee")},mt=Array.isArray,_t=G||function(){return!1};function Pt(Me){if(!wt(Me))return!1;var Ge=$e(Me);return Ge=="[object Function]"||Ge=="[object GeneratorFunction]"||Ge=="[object AsyncFunction]"||Ge=="[object Proxy]"}function Ut(Me){return typeof Me=="number"&&Me>-1&&Me%1==0&&Me<=9007199254740991}function wt(Me){var Ge=typeof Me;return Me!=null&&(Ge=="object"||Ge=="function")}function Dt(Me){return Me!=null&&typeof Me=="object"}var qt=E?function(Me){return function(Ge){return Me(Ge)}}(E):function(Me){return Dt(Me)&&Ut(Me.length)&&!!d[$e(Me)]};function Tt(Me){return(Ge=Me)!=null&&Ut(Ge.length)&&!Pt(Ge)?Ie(Me):Qe(Me);var Ge}n.exports=function(Me,Ge){return Ze(Me,Ge)}}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(r,n,o){(function(i){(function(){var a=typeof i=="object"&&i&&i.Object===Object&&i,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")(),l=Object.prototype,u=l.hasOwnProperty,f=l.toString,d=c.Symbol,h=d?d.toStringTag:void 0;function p(g){return g==null?g===void 0?"[object Undefined]":"[object Null]":h&&h in Object(g)?function(m){var v=u.call(m,h),y=m[h];try{m[h]=void 0;var b=!0}catch{}var w=f.call(m);return b&&(v?m[h]=y:delete m[h]),w}(g):function(m){return f.call(m)}(g)}n.exports=function(g){if(!function(v){var y=typeof v;return v!=null&&(y=="object"||y=="function")}(g))return!1;var m=p(g);return m=="[object Function]"||m=="[object GeneratorFunction]"||m=="[object AsyncFunction]"||m=="[object Proxy]"}}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(r,n,o){n.exports=function(i){return i==null}},{}],448:[function(r,n,o){n.exports=function(i){return i===void 0}},{}],449:[function(r,n,o){(function(i){(function(){var a=/^\[object .+?Constructor\]$/,s=typeof i=="object"&&i&&i.Object===Object&&i,c=typeof self=="object"&&self&&self.Object===Object&&self,l=s||c||Function("return this")();function u(Y,K){return!!(Y&&Y.length)&&function(Q,q,J){if(q!=q)return function(X,te,ee,re){for(var se=X.length,pe=ee+(re?1:-1);re?pe--:++pe<se;)if(te(X[pe],pe,X))return pe;return-1}(Q,d,J);for(var G=J-1,V=Q.length;++G<V;)if(Q[G]===q)return G;return-1}(Y,K,0)>-1}function f(Y,K,Q){for(var q=-1,J=Y?Y.length:0;++q<J;)if(Q(K,Y[q]))return!0;return!1}function d(Y){return Y!=Y}function h(Y,K){return Y.has(K)}function p(Y){var K=-1,Q=Array(Y.size);return Y.forEach(function(q){Q[++K]=q}),Q}var g,m=Array.prototype,v=Function.prototype,y=Object.prototype,b=l["__core-js_shared__"],w=(g=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",E=v.toString,I=y.hasOwnProperty,O=y.toString,D=RegExp("^"+E.call(I).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=m.splice,U=j(l,"Map"),B=j(l,"Set"),F=j(Object,"create");function T(Y){var K=-1,Q=Y?Y.length:0;for(this.clear();++K<Q;){var q=Y[K];this.set(q[0],q[1])}}function P(Y){var K=-1,Q=Y?Y.length:0;for(this.clear();++K<Q;){var q=Y[K];this.set(q[0],q[1])}}function _(Y){var K=-1,Q=Y?Y.length:0;for(this.clear();++K<Q;){var q=Y[K];this.set(q[0],q[1])}}function C(Y){var K=-1,Q=Y?Y.length:0;for(this.__data__=new _;++K<Q;)this.add(Y[K])}function S(Y,K){for(var Q,q,J=Y.length;J--;)if((Q=Y[J][0])===(q=K)||Q!=Q&&q!=q)return J;return-1}function x(Y){return!(!z(Y)||(K=Y,w&&w in K))&&(function(Q){var q=z(Q)?O.call(Q):"";return q=="[object Function]"||q=="[object GeneratorFunction]"}(Y)||function(Q){var q=!1;if(Q!=null&&typeof Q.toString!="function")try{q=!!(Q+"")}catch{}return q}(Y)?D:a).test(function(Q){if(Q!=null){try{return E.call(Q)}catch{}try{return Q+""}catch{}}return""}(Y));var K}T.prototype.clear=function(){this.__data__=F?F(null):{}},T.prototype.delete=function(Y){return this.has(Y)&&delete this.__data__[Y]},T.prototype.get=function(Y){var K=this.__data__;if(F){var Q=K[Y];return Q==="__lodash_hash_undefined__"?void 0:Q}return I.call(K,Y)?K[Y]:void 0},T.prototype.has=function(Y){var K=this.__data__;return F?K[Y]!==void 0:I.call(K,Y)},T.prototype.set=function(Y,K){return this.__data__[Y]=F&&K===void 0?"__lodash_hash_undefined__":K,this},P.prototype.clear=function(){this.__data__=[]},P.prototype.delete=function(Y){var K=this.__data__,Q=S(K,Y);return!(Q<0)&&(Q==K.length-1?K.pop():N.call(K,Q,1),!0)},P.prototype.get=function(Y){var K=this.__data__,Q=S(K,Y);return Q<0?void 0:K[Q][1]},P.prototype.has=function(Y){return S(this.__data__,Y)>-1},P.prototype.set=function(Y,K){var Q=this.__data__,q=S(Q,Y);return q<0?Q.push([Y,K]):Q[q][1]=K,this},_.prototype.clear=function(){this.__data__={hash:new T,map:new(U||P),string:new T}},_.prototype.delete=function(Y){return L(this,Y).delete(Y)},_.prototype.get=function(Y){return L(this,Y).get(Y)},_.prototype.has=function(Y){return L(this,Y).has(Y)},_.prototype.set=function(Y,K){return L(this,Y).set(Y,K),this},C.prototype.add=C.prototype.push=function(Y){return this.__data__.set(Y,"__lodash_hash_undefined__"),this},C.prototype.has=function(Y){return this.__data__.has(Y)};var k=B&&1/p(new B([,-0]))[1]==1/0?function(Y){return new B(Y)}:function(){};function L(Y,K){var Q,q,J=Y.__data__;return((q=typeof(Q=K))=="string"||q=="number"||q=="symbol"||q=="boolean"?Q!=="__proto__":Q===null)?J[typeof K=="string"?"string":"hash"]:J.map}function j(Y,K){var Q=function(q,J){return q==null?void 0:q[J]}(Y,K);return x(Q)?Q:void 0}function z(Y){var K=typeof Y;return!!Y&&(K=="object"||K=="function")}n.exports=function(Y){return Y&&Y.length?function(K,Q,q){var J=-1,G=u,V=K.length,X=!0,te=[],ee=te;if(q)X=!1,G=f;else if(V>=200){var re=Q?null:k(K);if(re)return p(re);X=!1,G=h,ee=new C}else ee=Q?[]:te;e:for(;++J<V;){var se=K[J],pe=Q?Q(se):se;if(se=q||se!==0?se:0,X&&pe==pe){for(var ce=ee.length;ce--;)if(ee[ce]===pe)continue e;Q&&ee.push(pe),te.push(se)}else G(ee,pe,q)||(ee!==te&&ee.push(pe),te.push(se))}return te}(Y):[]}}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(r,n,o){var i=r("inherits"),a=r("hash-base"),s=r("safe-buffer").Buffer,c=new Array(16);function l(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(g,m){return g<<m|g>>>32-m}function f(g,m,v,y,b,w,E){return u(g+(m&v|~m&y)+b+w|0,E)+m|0}function d(g,m,v,y,b,w,E){return u(g+(m&y|v&~y)+b+w|0,E)+m|0}function h(g,m,v,y,b,w,E){return u(g+(m^v^y)+b+w|0,E)+m|0}function p(g,m,v,y,b,w,E){return u(g+(v^(m|~y))+b+w|0,E)+m|0}i(l,a),l.prototype._update=function(){for(var g=c,m=0;m<16;++m)g[m]=this._block.readInt32LE(4*m);var v=this._a,y=this._b,b=this._c,w=this._d;v=f(v,y,b,w,g[0],3614090360,7),w=f(w,v,y,b,g[1],3905402710,12),b=f(b,w,v,y,g[2],606105819,17),y=f(y,b,w,v,g[3],3250441966,22),v=f(v,y,b,w,g[4],4118548399,7),w=f(w,v,y,b,g[5],1200080426,12),b=f(b,w,v,y,g[6],2821735955,17),y=f(y,b,w,v,g[7],4249261313,22),v=f(v,y,b,w,g[8],1770035416,7),w=f(w,v,y,b,g[9],2336552879,12),b=f(b,w,v,y,g[10],4294925233,17),y=f(y,b,w,v,g[11],2304563134,22),v=f(v,y,b,w,g[12],1804603682,7),w=f(w,v,y,b,g[13],4254626195,12),b=f(b,w,v,y,g[14],2792965006,17),v=d(v,y=f(y,b,w,v,g[15],1236535329,22),b,w,g[1],4129170786,5),w=d(w,v,y,b,g[6],3225465664,9),b=d(b,w,v,y,g[11],643717713,14),y=d(y,b,w,v,g[0],3921069994,20),v=d(v,y,b,w,g[5],3593408605,5),w=d(w,v,y,b,g[10],38016083,9),b=d(b,w,v,y,g[15],3634488961,14),y=d(y,b,w,v,g[4],3889429448,20),v=d(v,y,b,w,g[9],568446438,5),w=d(w,v,y,b,g[14],3275163606,9),b=d(b,w,v,y,g[3],4107603335,14),y=d(y,b,w,v,g[8],1163531501,20),v=d(v,y,b,w,g[13],2850285829,5),w=d(w,v,y,b,g[2],4243563512,9),b=d(b,w,v,y,g[7],1735328473,14),v=h(v,y=d(y,b,w,v,g[12],2368359562,20),b,w,g[5],4294588738,4),w=h(w,v,y,b,g[8],2272392833,11),b=h(b,w,v,y,g[11],1839030562,16),y=h(y,b,w,v,g[14],4259657740,23),v=h(v,y,b,w,g[1],2763975236,4),w=h(w,v,y,b,g[4],1272893353,11),b=h(b,w,v,y,g[7],4139469664,16),y=h(y,b,w,v,g[10],3200236656,23),v=h(v,y,b,w,g[13],681279174,4),w=h(w,v,y,b,g[0],3936430074,11),b=h(b,w,v,y,g[3],3572445317,16),y=h(y,b,w,v,g[6],76029189,23),v=h(v,y,b,w,g[9],3654602809,4),w=h(w,v,y,b,g[12],3873151461,11),b=h(b,w,v,y,g[15],530742520,16),v=p(v,y=h(y,b,w,v,g[2],3299628645,23),b,w,g[0],4096336452,6),w=p(w,v,y,b,g[7],1126891415,10),b=p(b,w,v,y,g[14],2878612391,15),y=p(y,b,w,v,g[5],4237533241,21),v=p(v,y,b,w,g[12],1700485571,6),w=p(w,v,y,b,g[3],2399980690,10),b=p(b,w,v,y,g[10],4293915773,15),y=p(y,b,w,v,g[1],2240044497,21),v=p(v,y,b,w,g[8],1873313359,6),w=p(w,v,y,b,g[15],4264355552,10),b=p(b,w,v,y,g[6],2734768916,15),y=p(y,b,w,v,g[13],1309151649,21),v=p(v,y,b,w,g[4],4149444226,6),w=p(w,v,y,b,g[11],3174756917,10),b=p(b,w,v,y,g[2],718787259,15),y=p(y,b,w,v,g[9],3951481745,21),this._a=this._a+v|0,this._b=this._b+y|0,this._c=this._c+b|0,this._d=this._d+w|0},l.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 g=s.allocUnsafe(16);return g.writeInt32LE(this._a,0),g.writeInt32LE(this._b,4),g.writeInt32LE(this._c,8),g.writeInt32LE(this._d,12),g},n.exports=l},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(r,n,o){var i=r("bn.js"),a=r("brorand");function s(c){this.rand=c||new a.Rand}n.exports=s,s.create=function(c){return new s(c)},s.prototype._randbelow=function(c){var l=c.bitLength(),u=Math.ceil(l/8);do var f=new i(this.rand.generate(u));while(f.cmp(c)>=0);return f},s.prototype._randrange=function(c,l){var u=l.sub(c);return c.add(this._randbelow(u))},s.prototype.test=function(c,l,u){var f=c.bitLength(),d=i.mont(c),h=new i(1).toRed(d);l||(l=Math.max(1,f/48|0));for(var p=c.subn(1),g=0;!p.testn(g);g++);for(var m=c.shrn(g),v=p.toRed(d);l>0;l--){var y=this._randrange(new i(2),p);u&&u(y);var b=y.toRed(d).redPow(m);if(b.cmp(h)!==0&&b.cmp(v)!==0){for(var w=1;w<g;w++){if((b=b.redSqr()).cmp(h)===0)return!1;if(b.cmp(v)===0)break}if(w===g)return!1}}return!0},s.prototype.getDivisor=function(c,l){var u=c.bitLength(),f=i.mont(c),d=new i(1).toRed(f);l||(l=Math.max(1,u/48|0));for(var h=c.subn(1),p=0;!h.testn(p);p++);for(var g=c.shrn(p),m=h.toRed(f);l>0;l--){var v=this._randrange(new i(2),h),y=c.gcd(v);if(y.cmpn(1)!==0)return y;var b=v.toRed(f).redPow(g);if(b.cmp(d)!==0&&b.cmp(m)!==0){for(var w=1;w<p;w++){if((b=b.redSqr()).cmp(d)===0)return b.fromRed().subn(1).gcd(c);if(b.cmp(m)===0)break}if(w===p)return(b=b.redSqr()).fromRed().subn(1).gcd(c)}}return!1}},{"bn.js":452,brorand:187}],452:[function(r,n,o){arguments[4][184][0].apply(o,arguments)},{buffer:188,dup:184}],453:[function(r,n,o){function i(a,s){if(!a)throw new Error(s||"Assertion failed")}n.exports=i,i.equal=function(a,s,c){if(a!=s)throw new Error(c||"Assertion failed: "+a+" != "+s)}},{}],454:[function(r,n,o){var i=o;function a(c){return c.length===1?"0"+c:c}function s(c){for(var l="",u=0;u<c.length;u++)l+=a(c[u].toString(16));return l}i.toArray=function(c,l){if(Array.isArray(c))return c.slice();if(!c)return[];var u=[];if(typeof c!="string"){for(var f=0;f<c.length;f++)u[f]=0|c[f];return u}if(l==="hex")for((c=c.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(c="0"+c),f=0;f<c.length;f+=2)u.push(parseInt(c[f]+c[f+1],16));else for(f=0;f<c.length;f++){var d=c.charCodeAt(f),h=d>>8,p=255&d;h?u.push(h,p):u.push(p)}return u},i.zero2=a,i.toHex=s,i.encode=function(c,l){return l==="hex"?s(c):c}},{}],455:[function(r,n,o){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(r,n,o){var i=r("asn1.js");o.certificate=r("./certificate");var a=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});o.RSAPrivateKey=a;var s=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});o.RSAPublicKey=s;var c=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(l),this.key("subjectPublicKey").bitstr())});o.PublicKey=c;var l=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),u=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(l),this.key("subjectPrivateKey").octstr())});o.PrivateKey=u;var f=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});o.EncryptedPrivateKey=f;var d=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});o.DSAPrivateKey=d,o.DSAparam=i.define("DSAparam",function(){this.int()});var h=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())});o.ECPrivateKey=h;var p=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});o.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"./certificate":457,"asn1.js":170}],457:[function(r,n,o){var i=r("asn1.js"),a=i.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),s=i.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),c=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),l=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(c),this.key("subjectPublicKey").bitstr())}),u=i.define("RelativeDistinguishedName",function(){this.setof(s)}),f=i.define("RDNSequence",function(){this.seqof(u)}),d=i.define("Name",function(){this.choice({rdnSequence:this.use(f)})}),h=i.define("Validity",function(){this.seq().obj(this.key("notBefore").use(a),this.key("notAfter").use(a))}),p=i.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),g=i.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(c),this.key("issuer").use(d),this.key("validity").use(h),this.key("subject").use(d),this.key("subjectPublicKeyInfo").use(l),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())}),m=i.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(g),this.key("signatureAlgorithm").use(c),this.key("signatureValue").bitstr())});n.exports=m},{"asn1.js":170}],458:[function(r,n,o){var i=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,s=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,c=r("evp_bytestokey"),l=r("browserify-aes"),u=r("safe-buffer").Buffer;n.exports=function(f,d){var h,p=f.toString(),g=p.match(i);if(g){var m="aes"+g[1],v=u.from(g[2],"hex"),y=u.from(g[3].replace(/[\r\n]/g,""),"base64"),b=c(d,v.slice(0,8),parseInt(g[1],10)).key,w=[],E=l.createDecipheriv(m,b,v);w.push(E.update(y)),w.push(E.final()),h=u.concat(w)}else{var I=p.match(s);h=u.from(I[2].replace(/[\r\n]/g,""),"base64")}return{tag:p.match(a)[1],data:h}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(r,n,o){var i=r("./asn1"),a=r("./aesid.json"),s=r("./fixProc"),c=r("browserify-aes"),l=r("pbkdf2"),u=r("safe-buffer").Buffer;function f(d){var h;typeof d!="object"||u.isBuffer(d)||(h=d.passphrase,d=d.key),typeof d=="string"&&(d=u.from(d));var p,g,m=s(d,h),v=m.tag,y=m.data;switch(v){case"CERTIFICATE":g=i.certificate.decode(y,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(g||(g=i.PublicKey.decode(y,"der")),p=g.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(g.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return g.subjectPrivateKey=g.subjectPublicKey,{type:"ec",data:g};case"1.2.840.10040.4.1":return g.algorithm.params.pub_key=i.DSAparam.decode(g.subjectPublicKey.data,"der"),{type:"dsa",data:g.algorithm.params};default:throw new Error("unknown key id "+p)}case"ENCRYPTED PRIVATE KEY":y=function(b,w){var E=b.algorithm.decrypt.kde.kdeparams.salt,I=parseInt(b.algorithm.decrypt.kde.kdeparams.iters.toString(),10),O=a[b.algorithm.decrypt.cipher.algo.join(".")],D=b.algorithm.decrypt.cipher.iv,N=b.subjectPrivateKey,U=parseInt(O.split("-")[1],10)/8,B=l.pbkdf2Sync(w,E,I,U,"sha1"),F=c.createDecipheriv(O,B,D),T=[];return T.push(F.update(N)),T.push(F.final()),u.concat(T)}(y=i.EncryptedPrivateKey.decode(y,"der"),h);case"PRIVATE KEY":switch(p=(g=i.PrivateKey.decode(y,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(g.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:g.algorithm.curve,privateKey:i.ECPrivateKey.decode(g.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return g.algorithm.params.priv_key=i.DSAparam.decode(g.subjectPrivateKey,"der"),{type:"dsa",params:g.algorithm.params};default:throw new Error("unknown key id "+p)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(y,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(y,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(y,"der")};case"EC PRIVATE KEY":return{curve:(y=i.ECPrivateKey.decode(y,"der")).parameters.value,privateKey:y.privateKey};default:throw new Error("unknown key type "+v)}}n.exports=f,f.signature=i.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(r,n,o){o.pbkdf2=r("./lib/async"),o.pbkdf2Sync=r("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(r,n,o){(function(i){(function(){var a,s,c=r("safe-buffer").Buffer,l=r("./precondition"),u=r("./default-encoding"),f=r("./sync"),d=r("./to-buffer"),h=i.crypto&&i.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"},g=[];function m(){return s||(s=i.process&&i.process.nextTick?i.process.nextTick:i.queueMicrotask?i.queueMicrotask:i.setImmediate?i.setImmediate:i.setTimeout)}function v(y,b,w,E,I){return h.importKey("raw",y,{name:"PBKDF2"},!1,["deriveBits"]).then(function(O){return h.deriveBits({name:"PBKDF2",salt:b,iterations:w,hash:{name:I}},O,E<<3)}).then(function(O){return c.from(O)})}n.exports=function(y,b,w,E,I,O){typeof I=="function"&&(O=I,I=void 0);var D=p[(I=I||"sha1").toLowerCase()];if(D&&typeof i.Promise=="function"){if(l(w,E),y=d(y,u,"Password"),b=d(b,u,"Salt"),typeof O!="function")throw new Error("No callback provided to pbkdf2");(function(N,U){N.then(function(B){m()(function(){U(null,B)})},function(B){m()(function(){U(B)})})})(function(N){if(i.process&&!i.process.browser||!h||!h.importKey||!h.deriveBits)return Promise.resolve(!1);if(g[N]!==void 0)return g[N];var U=v(a=a||c.alloc(8),a,10,128,N).then(function(){return!0}).catch(function(){return!1});return g[N]=U,U}(D).then(function(N){return N?v(y,b,w,E,D):f(y,b,w,E,I)}),O)}else m()(function(){var N;try{N=f(y,b,w,E,I)}catch(U){return O(U)}O(null,N)})}}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(r,n,o){(function(i,a){(function(){var s;a.process&&a.process.browser?s="utf-8":a.process&&a.process.version?s=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":s="utf-8",n.exports=s}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(r,n,o){var i=Math.pow(2,30)-1;n.exports=function(a,s){if(typeof a!="number")throw new TypeError("Iterations not a number");if(a<0)throw new TypeError("Bad iterations");if(typeof s!="number")throw new TypeError("Key length not a number");if(s<0||s>i||s!=s)throw new TypeError("Bad key length")}},{}],464:[function(r,n,o){var i=r("create-hash/md5"),a=r("ripemd160"),s=r("sha.js"),c=r("safe-buffer").Buffer,l=r("./precondition"),u=r("./default-encoding"),f=r("./to-buffer"),d=c.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(g,m,v){var y=function(D){function N(U){return s(D).update(U).digest()}return D==="rmd160"||D==="ripemd160"?function(U){return new a().update(U).digest()}:D==="md5"?i:N}(g),b=g==="sha512"||g==="sha384"?128:64;m.length>b?m=y(m):m.length<b&&(m=c.concat([m,d],b));for(var w=c.allocUnsafe(b+h[g]),E=c.allocUnsafe(b+h[g]),I=0;I<b;I++)w[I]=54^m[I],E[I]=92^m[I];var O=c.allocUnsafe(b+v+4);w.copy(O,0,0,b),this.ipad1=O,this.ipad2=w,this.opad=E,this.alg=g,this.blocksize=b,this.hash=y,this.size=h[g]}p.prototype.run=function(g,m){return g.copy(m,this.blocksize),this.hash(m).copy(this.opad,this.blocksize),this.hash(this.opad)},n.exports=function(g,m,v,y,b){l(v,y);var w=new p(b=b||"sha1",g=f(g,u,"Password"),(m=f(m,u,"Salt")).length),E=c.allocUnsafe(y),I=c.allocUnsafe(m.length+4);m.copy(I,0,0,m.length);for(var O=0,D=h[b],N=Math.ceil(y/D),U=1;U<=N;U++){I.writeUInt32BE(U,m.length);for(var B=w.run(I,w.ipad1),F=B,T=1;T<v;T++){F=w.run(F,w.ipad2);for(var P=0;P<D;P++)B[P]^=F[P]}B.copy(E,O),O+=D}return E}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(r,n,o){var i=r("safe-buffer").Buffer;n.exports=function(a,s,c){if(i.isBuffer(a))return a;if(typeof a=="string")return i.from(a,s);if(ArrayBuffer.isView(a))return i.from(a.buffer);throw new TypeError(c+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(r,n,o){(function(i){(function(){i===void 0||!i.version||i.version.indexOf("v0.")===0||i.version.indexOf("v1.")===0&&i.version.indexOf("v1.8.")!==0?n.exports={nextTick:function(a,s,c,l){if(typeof a!="function")throw new TypeError('"callback" argument must be a function');var u,f,d=arguments.length;switch(d){case 0:case 1:return i.nextTick(a);case 2:return i.nextTick(function(){a.call(null,s)});case 3:return i.nextTick(function(){a.call(null,s,c)});case 4:return i.nextTick(function(){a.call(null,s,c,l)});default:for(u=new Array(d-1),f=0;f<u.length;)u[f++]=arguments[f];return i.nextTick(function(){a.apply(null,u)})}}}:n.exports=i}).call(this)}).call(this,r("_process"))},{_process:467}],467:[function(r,n,o){var i,a,s=n.exports={};function c(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function u(b){if(i===setTimeout)return setTimeout(b,0);if((i===c||!i)&&setTimeout)return i=setTimeout,setTimeout(b,0);try{return i(b,0)}catch{try{return i.call(null,b,0)}catch{return i.call(this,b,0)}}}(function(){try{i=typeof setTimeout=="function"?setTimeout:c}catch{i=c}try{a=typeof clearTimeout=="function"?clearTimeout:l}catch{a=l}})();var f,d=[],h=!1,p=-1;function g(){h&&f&&(h=!1,f.length?d=f.concat(d):p=-1,d.length&&m())}function m(){if(!h){var b=u(g);h=!0;for(var w=d.length;w;){for(f=d,d=[];++p<w;)f&&f[p].run();p=-1,w=d.length}f=null,h=!1,function(E){if(a===clearTimeout)return clearTimeout(E);if((a===l||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(E);try{a(E)}catch{try{return a.call(null,E)}catch{return a.call(this,E)}}}(b)}}function v(b,w){this.fun=b,this.array=w}function y(){}s.nextTick=function(b){var w=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)w[E-1]=arguments[E];d.push(new v(b,w)),d.length!==1||h||u(m)},v.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=y,s.addListener=y,s.once=y,s.off=y,s.removeListener=y,s.removeAllListeners=y,s.emit=y,s.prependListener=y,s.prependOnceListener=y,s.listeners=function(b){return[]},s.binding=function(b){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(b){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],468:[function(r,n,o){o.publicEncrypt=r("./publicEncrypt"),o.privateDecrypt=r("./privateDecrypt"),o.privateEncrypt=function(i,a){return o.publicEncrypt(i,a,!0)},o.publicDecrypt=function(i,a){return o.privateDecrypt(i,a,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(r,n,o){var i=r("create-hash"),a=r("safe-buffer").Buffer;function s(c){var l=a.allocUnsafe(4);return l.writeUInt32BE(c,0),l}n.exports=function(c,l){for(var u,f=a.alloc(0),d=0;f.length<l;)u=s(d++),f=a.concat([f,i("sha1").update(c).update(u).digest()]);return f.slice(0,l)}},{"create-hash":386,"safe-buffer":494}],470:[function(r,n,o){arguments[4][184][0].apply(o,arguments)},{buffer:188,dup:184}],471:[function(r,n,o){var i=r("parse-asn1"),a=r("./mgf"),s=r("./xor"),c=r("bn.js"),l=r("browserify-rsa"),u=r("create-hash"),f=r("./withPublic"),d=r("safe-buffer").Buffer;n.exports=function(h,p,g){var m;m=h.padding?h.padding:g?1:4;var v,y=i(h),b=y.modulus.byteLength();if(p.length>b||new c(p).cmp(y.modulus)>=0)throw new Error("decryption error");v=g?f(new c(p),y):l(p,y);var w=d.alloc(b-v.length);if(v=d.concat([w,v],b),m===4)return function(E,I){var O=E.modulus.byteLength(),D=u("sha1").update(d.alloc(0)).digest(),N=D.length;if(I[0]!==0)throw new Error("decryption error");var U=I.slice(1,N+1),B=I.slice(N+1),F=s(U,a(B,N)),T=s(B,a(F,O-N-1));if(function(_,C){_=d.from(_),C=d.from(C);var S=0,x=_.length;_.length!==C.length&&(S++,x=Math.min(_.length,C.length));for(var k=-1;++k<x;)S+=_[k]^C[k];return S}(D,T.slice(0,N)))throw new Error("decryption error");for(var P=N;T[P]===0;)P++;if(T[P++]!==1)throw new Error("decryption error");return T.slice(P)}(y,v);if(m===1)return function(E,I,O){for(var D=I.slice(0,2),N=2,U=0;I[N++]!==0;)if(N>=I.length){U++;break}var B=I.slice(2,N-1);if((D.toString("hex")!=="0002"&&!O||D.toString("hex")!=="0001"&&O)&&U++,B.length<8&&U++,U)throw new Error("decryption error");return I.slice(N)}(0,v,g);if(m===3)return v;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(r,n,o){var i=r("parse-asn1"),a=r("randombytes"),s=r("create-hash"),c=r("./mgf"),l=r("./xor"),u=r("bn.js"),f=r("./withPublic"),d=r("browserify-rsa"),h=r("safe-buffer").Buffer;n.exports=function(p,g,m){var v;v=p.padding?p.padding:m?1:4;var y,b=i(p);if(v===4)y=function(w,E){var I=w.modulus.byteLength(),O=E.length,D=s("sha1").update(h.alloc(0)).digest(),N=D.length,U=2*N;if(O>I-U-2)throw new Error("message too long");var B=h.alloc(I-O-U-2),F=I-N-1,T=a(N),P=l(h.concat([D,B,h.alloc(1,1),E],F),c(T,F)),_=l(T,c(P,N));return new u(h.concat([h.alloc(1),_,P],I))}(b,g);else if(v===1)y=function(w,E,I){var O,D=E.length,N=w.modulus.byteLength();if(D>N-11)throw new Error("message too long");return O=I?h.alloc(N-D-3,255):function(U){for(var B,F=h.allocUnsafe(U),T=0,P=a(2*U),_=0;T<U;)_===P.length&&(P=a(2*U),_=0),(B=P[_++])&&(F[T++]=B);return F}(N-D-3),new u(h.concat([h.from([0,I?1:2]),O,h.alloc(1),E],N))}(b,g,m);else{if(v!==3)throw new Error("unknown padding");if((y=new u(g)).cmp(b.modulus)>=0)throw new Error("data too long for modulus")}return m?d(y,b):f(y,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(r,n,o){var i=r("bn.js"),a=r("safe-buffer").Buffer;n.exports=function(s,c){return a.from(s.toRed(i.mont(c.modulus)).redPow(new i(c.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(r,n,o){n.exports=function(i,a){for(var s=i.length,c=-1;++c<s;)i[c]^=a[c];return i}},{}],475:[function(r,n,o){(function(i,a){(function(){var s=r("safe-buffer").Buffer,c=a.crypto||a.msCrypto;c&&c.getRandomValues?n.exports=function(l,u){if(l>4294967295)throw new RangeError("requested too many random bytes");var f=s.allocUnsafe(l);if(l>0)if(l>65536)for(var d=0;d<l;d+=65536)c.getRandomValues(f.slice(d,d+65536));else c.getRandomValues(f);return typeof u=="function"?i.nextTick(function(){u(null,f)}):f}: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,r("_process"),typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(r,n,o){(function(i,a){(function(){function s(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var c=r("safe-buffer"),l=r("randombytes"),u=c.Buffer,f=c.kMaxLength,d=a.crypto||a.msCrypto,h=Math.pow(2,32)-1;function p(v,y){if(typeof v!="number"||v!=v)throw new TypeError("offset must be a number");if(v>h||v<0)throw new TypeError("offset must be a uint32");if(v>f||v>y)throw new RangeError("offset out of range")}function g(v,y,b){if(typeof v!="number"||v!=v)throw new TypeError("size must be a number");if(v>h||v<0)throw new TypeError("size must be a uint32");if(v+y>b||v>f)throw new RangeError("buffer too small")}function m(v,y,b,w){if(i.browser){var E=v.buffer,I=new Uint8Array(E,y,b);return d.getRandomValues(I),w?void i.nextTick(function(){w(null,v)}):v}if(!w)return l(b).copy(v,y),v;l(b,function(O,D){if(O)return w(O);D.copy(v,y),w(null,v)})}d&&d.getRandomValues||!i.browser?(o.randomFill=function(v,y,b,w){if(!(u.isBuffer(v)||v instanceof a.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof y=="function")w=y,y=0,b=v.length;else if(typeof b=="function")w=b,b=v.length-y;else if(typeof w!="function")throw new TypeError('"cb" argument must be a function');return p(y,v.length),g(b,y,v.length),m(v,y,b,w)},o.randomFillSync=function(v,y,b){if(y===void 0&&(y=0),!(u.isBuffer(v)||v instanceof a.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return p(y,v.length),b===void 0&&(b=v.length-y),g(b,y,v.length),m(v,y,b)}):(o.randomFill=s,o.randomFillSync=s)}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(r,n,o){var i={};function a(c,l,u){u||(u=Error);var f=function(d){var h,p;function g(m,v,y){return d.call(this,function(b,w,E){return typeof l=="string"?l:l(b,w,E)}(m,v,y))||this}return p=d,(h=g).prototype=Object.create(p.prototype),h.prototype.constructor=h,h.__proto__=p,g}(u);f.prototype.name=u.name,f.prototype.code=c,i[c]=f}function s(c,l){if(Array.isArray(c)){var u=c.length;return c=c.map(function(f){return String(f)}),u>2?"one of ".concat(l," ").concat(c.slice(0,u-1).join(", "),", or ")+c[u-1]:u===2?"one of ".concat(l," ").concat(c[0]," or ").concat(c[1]):"of ".concat(l," ").concat(c[0])}return"of ".concat(l," ").concat(String(c))}a("ERR_INVALID_OPT_VALUE",function(c,l){return'The value "'+l+'" is invalid for option "'+c+'"'},TypeError),a("ERR_INVALID_ARG_TYPE",function(c,l,u){var f,d,h;if(typeof l=="string"&&(d="not ",l.substr(0,d.length)===d)?(f="must not be",l=l.replace(/^not /,"")):f="must be",function(g,m,v){return(v===void 0||v>g.length)&&(v=g.length),g.substring(v-m.length,v)===m}(c," argument"))h="The ".concat(c," ").concat(f," ").concat(s(l,"type"));else{var p=function(g,m,v){return typeof v!="number"&&(v=0),!(v+m.length>g.length)&&g.indexOf(m,v)!==-1}(c,".")?"property":"argument";h='The "'.concat(c,'" ').concat(p," ").concat(f," ").concat(s(l,"type"))}return h+=". Received type ".concat(typeof u)},TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",function(c){return"The "+c+" method is not implemented"}),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",function(c){return"Cannot call "+c+" after a stream was destroyed"}),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",function(c){return"Unknown encoding: "+c},TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),n.exports.codes=i},{}],478:[function(r,n,o){(function(i){(function(){var a=Object.keys||function(g){var m=[];for(var v in g)m.push(v);return m};n.exports=d;var s=r("./_stream_readable"),c=r("./_stream_writable");r("inherits")(d,s);for(var l=a(c.prototype),u=0;u<l.length;u++){var f=l[u];d.prototype[f]||(d.prototype[f]=c.prototype[f])}function d(g){if(!(this instanceof d))return new d(g);s.call(this,g),c.call(this,g),this.allowHalfOpen=!0,g&&(g.readable===!1&&(this.readable=!1),g.writable===!1&&(this.writable=!1),g.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||i.nextTick(p,this)}function p(g){g.end()}Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(d.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(d.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(d.prototype,"destroyed",{enumerable:!1,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)}})}).call(this)}).call(this,r("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(r,n,o){n.exports=a;var i=r("./_stream_transform");function a(s){if(!(this instanceof a))return new a(s);i.call(this,s)}r("inherits")(a,i),a.prototype._transform=function(s,c,l){l(null,s)}},{"./_stream_transform":481,inherits:440}],480:[function(r,n,o){(function(i,a){(function(){var s;n.exports=F,F.ReadableState=B,r("events").EventEmitter;var c=function(G,V){return G.listeners(V).length},l=r("./internal/streams/stream"),u=r("buffer").Buffer,f=(a!==void 0?a:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},d,h=r("util");d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,g,m,v=r("./internal/streams/buffer_list"),y=r("./internal/streams/destroy"),b=r("./internal/streams/state").getHighWaterMark,w=r("../errors").codes,E=w.ERR_INVALID_ARG_TYPE,I=w.ERR_STREAM_PUSH_AFTER_EOF,O=w.ERR_METHOD_NOT_IMPLEMENTED,D=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r("inherits")(F,l);var N=y.errorOrDestroy,U=["error","close","destroy","pause","resume"];function B(G,V,X){s=s||r("./_stream_duplex"),G=G||{},typeof X!="boolean"&&(X=V instanceof s),this.objectMode=!!G.objectMode,X&&(this.objectMode=this.objectMode||!!G.readableObjectMode),this.highWaterMark=b(this,G,"readableHighWaterMark",X),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.paused=!0,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.destroyed=!1,this.defaultEncoding=G.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,G.encoding&&(p||(p=r("string_decoder/").StringDecoder),this.decoder=new p(G.encoding),this.encoding=G.encoding)}function F(G){if(s=s||r("./_stream_duplex"),!(this instanceof F))return new F(G);var V=this instanceof s;this._readableState=new B(G,this,V),this.readable=!0,G&&(typeof G.read=="function"&&(this._read=G.read),typeof G.destroy=="function"&&(this._destroy=G.destroy)),l.call(this)}function T(G,V,X,te,ee){d("readableAddChunk",V);var re,se=G._readableState;if(V===null)se.reading=!1,function(pe,ce){if(d("onEofChunk"),!ce.ended){if(ce.decoder){var ne=ce.decoder.end();ne&&ne.length&&(ce.buffer.push(ne),ce.length+=ce.objectMode?1:ne.length)}ce.ended=!0,ce.sync?C(pe):(ce.needReadable=!1,ce.emittedReadable||(ce.emittedReadable=!0,S(pe)))}}(G,se);else if(ee||(re=function(pe,ce){var ne;he=ce,u.isBuffer(he)||he instanceof f||typeof ce=="string"||ce===void 0||pe.objectMode||(ne=new E("chunk",["string","Buffer","Uint8Array"],ce));var he;return ne}(se,V)),re)N(G,re);else if(se.objectMode||V&&V.length>0)if(typeof V=="string"||se.objectMode||Object.getPrototypeOf(V)===u.prototype||(V=function(pe){return u.from(pe)}(V)),te)se.endEmitted?N(G,new D):P(G,se,V,!0);else if(se.ended)N(G,new I);else{if(se.destroyed)return!1;se.reading=!1,se.decoder&&!X?(V=se.decoder.write(V),se.objectMode||V.length!==0?P(G,se,V,!1):x(G,se)):P(G,se,V,!1)}else te||(se.reading=!1,x(G,se));return!se.ended&&(se.length<se.highWaterMark||se.length===0)}function P(G,V,X,te){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,G.emit("data",X)):(V.length+=V.objectMode?1:X.length,te?V.buffer.unshift(X):V.buffer.push(X),V.needReadable&&C(G)),x(G,V)}Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(G){this._readableState&&(this._readableState.destroyed=G)}}),F.prototype.destroy=y.destroy,F.prototype._undestroy=y.undestroy,F.prototype._destroy=function(G,V){V(G)},F.prototype.push=function(G,V){var X,te=this._readableState;return te.objectMode?X=!0:typeof G=="string"&&((V=V||te.defaultEncoding)!==te.encoding&&(G=u.from(G,V),V=""),X=!0),T(this,G,V,!1,X)},F.prototype.unshift=function(G){return T(this,G,null,!0,!1)},F.prototype.isPaused=function(){return this._readableState.flowing===!1},F.prototype.setEncoding=function(G){p||(p=r("string_decoder/").StringDecoder);var V=new p(G);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var X=this._readableState.buffer.head,te="";X!==null;)te+=V.write(X.data),X=X.next;return this._readableState.buffer.clear(),te!==""&&this._readableState.buffer.push(te),this._readableState.length=te.length,this};function _(G,V){return G<=0||V.length===0&&V.ended?0:V.objectMode?1:G!=G?V.flowing&&V.length?V.buffer.head.data.length:V.length:(G>V.highWaterMark&&(V.highWaterMark=function(X){return X>=1073741824?X=1073741824:(X--,X|=X>>>1,X|=X>>>2,X|=X>>>4,X|=X>>>8,X|=X>>>16,X++),X}(G)),G<=V.length?G:V.ended?V.length:(V.needReadable=!0,0))}function C(G){var V=G._readableState;d("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(d("emitReadable",V.flowing),V.emittedReadable=!0,i.nextTick(S,G))}function S(G){var V=G._readableState;d("emitReadable_",V.destroyed,V.length,V.ended),V.destroyed||!V.length&&!V.ended||(G.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,Y(G)}function x(G,V){V.readingMore||(V.readingMore=!0,i.nextTick(k,G,V))}function k(G,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var X=V.length;if(d("maybeReadMore read 0"),G.read(0),X===V.length)break}V.readingMore=!1}function L(G){var V=G._readableState;V.readableListening=G.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:G.listenerCount("data")>0&&G.resume()}function j(G){d("readable nexttick read 0"),G.read(0)}function z(G,V){d("resume",V.reading),V.reading||G.read(0),V.resumeScheduled=!1,G.emit("resume"),Y(G),V.flowing&&!V.reading&&G.read(0)}function Y(G){var V=G._readableState;for(d("flow",V.flowing);V.flowing&&G.read()!==null;);}function K(G,V){return V.length===0?null:(V.objectMode?X=V.buffer.shift():!G||G>=V.length?(X=V.decoder?V.buffer.join(""):V.buffer.length===1?V.buffer.first():V.buffer.concat(V.length),V.buffer.clear()):X=V.buffer.consume(G,V.decoder),X);var X}function Q(G){var V=G._readableState;d("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,i.nextTick(q,V,G))}function q(G,V){if(d("endReadableNT",G.endEmitted,G.length),!G.endEmitted&&G.length===0&&(G.endEmitted=!0,V.readable=!1,V.emit("end"),G.autoDestroy)){var X=V._writableState;(!X||X.autoDestroy&&X.finished)&&V.destroy()}}function J(G,V){for(var X=0,te=G.length;X<te;X++)if(G[X]===V)return X;return-1}F.prototype.read=function(G){d("read",G),G=parseInt(G,10);var V=this._readableState,X=G;if(G!==0&&(V.emittedReadable=!1),G===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return d("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?Q(this):C(this),null;if((G=_(G,V))===0&&V.ended)return V.length===0&&Q(this),null;var te,ee=V.needReadable;return d("need readable",ee),(V.length===0||V.length-G<V.highWaterMark)&&d("length less than watermark",ee=!0),V.ended||V.reading?d("reading or ended",ee=!1):ee&&(d("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(G=_(X,V))),(te=G>0?K(G,V):null)===null?(V.needReadable=V.length<=V.highWaterMark,G=0):(V.length-=G,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),X!==G&&V.ended&&Q(this)),te!==null&&this.emit("data",te),te},F.prototype._read=function(G){N(this,new O("_read()"))},F.prototype.pipe=function(G,V){var X=this,te=this._readableState;switch(te.pipesCount){case 0:te.pipes=G;break;case 1:te.pipes=[te.pipes,G];break;default:te.pipes.push(G)}te.pipesCount+=1,d("pipe count=%d opts=%j",te.pipesCount,V);var ee=(!V||V.end!==!1)&&G!==i.stdout&&G!==i.stderr?se:de;function re(ve,we){d("onunpipe"),ve===X&&we&&we.hasUnpiped===!1&&(we.hasUnpiped=!0,d("cleanup"),G.removeListener("close",oe),G.removeListener("finish",le),G.removeListener("drain",pe),G.removeListener("error",he),G.removeListener("unpipe",re),X.removeListener("end",se),X.removeListener("end",de),X.removeListener("data",ne),ce=!0,!te.awaitDrain||G._writableState&&!G._writableState.needDrain||pe())}function se(){d("onend"),G.end()}te.endEmitted?i.nextTick(ee):X.once("end",ee),G.on("unpipe",re);var pe=function(ve){return function(){var we=ve._readableState;d("pipeOnDrain",we.awaitDrain),we.awaitDrain&&we.awaitDrain--,we.awaitDrain===0&&c(ve,"data")&&(we.flowing=!0,Y(ve))}}(X);G.on("drain",pe);var ce=!1;function ne(ve){d("ondata");var we=G.write(ve);d("dest.write",we),we===!1&&((te.pipesCount===1&&te.pipes===G||te.pipesCount>1&&J(te.pipes,G)!==-1)&&!ce&&(d("false write response, pause",te.awaitDrain),te.awaitDrain++),X.pause())}function he(ve){d("onerror",ve),de(),G.removeListener("error",he),c(G,"error")===0&&N(G,ve)}function oe(){G.removeListener("finish",le),de()}function le(){d("onfinish"),G.removeListener("close",oe),de()}function de(){d("unpipe"),X.unpipe(G)}return X.on("data",ne),function(ve,we,ie){if(typeof ve.prependListener=="function")return ve.prependListener(we,ie);ve._events&&ve._events[we]?Array.isArray(ve._events[we])?ve._events[we].unshift(ie):ve._events[we]=[ie,ve._events[we]]:ve.on(we,ie)}(G,"error",he),G.once("close",oe),G.once("finish",le),G.emit("pipe",X),te.flowing||(d("pipe resume"),X.resume()),G},F.prototype.unpipe=function(G){var V=this._readableState,X={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return G&&G!==V.pipes||(G||(G=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,G&&G.emit("unpipe",this,X)),this;if(!G){var te=V.pipes,ee=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var re=0;re<ee;re++)te[re].emit("unpipe",this,{hasUnpiped:!1});return this}var se=J(V.pipes,G);return se===-1||(V.pipes.splice(se,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),G.emit("unpipe",this,X)),this},F.prototype.on=function(G,V){var X=l.prototype.on.call(this,G,V),te=this._readableState;return G==="data"?(te.readableListening=this.listenerCount("readable")>0,te.flowing!==!1&&this.resume()):G==="readable"&&(te.endEmitted||te.readableListening||(te.readableListening=te.needReadable=!0,te.flowing=!1,te.emittedReadable=!1,d("on readable",te.length,te.reading),te.length?C(this):te.reading||i.nextTick(j,this))),X},F.prototype.addListener=F.prototype.on,F.prototype.removeListener=function(G,V){var X=l.prototype.removeListener.call(this,G,V);return G==="readable"&&i.nextTick(L,this),X},F.prototype.removeAllListeners=function(G){var V=l.prototype.removeAllListeners.apply(this,arguments);return G!=="readable"&&G!==void 0||i.nextTick(L,this),V},F.prototype.resume=function(){var G=this._readableState;return G.flowing||(d("resume"),G.flowing=!G.readableListening,function(V,X){X.resumeScheduled||(X.resumeScheduled=!0,i.nextTick(z,V,X))}(this,G)),G.paused=!1,this},F.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},F.prototype.wrap=function(G){var V=this,X=this._readableState,te=!1;for(var ee in G.on("end",function(){if(d("wrapped end"),X.decoder&&!X.ended){var se=X.decoder.end();se&&se.length&&V.push(se)}V.push(null)}),G.on("data",function(se){d("wrapped data"),X.decoder&&(se=X.decoder.write(se)),X.objectMode&&se==null||(X.objectMode||se&&se.length)&&(V.push(se)||(te=!0,G.pause()))}),G)this[ee]===void 0&&typeof G[ee]=="function"&&(this[ee]=function(se){return function(){return G[se].apply(G,arguments)}}(ee));for(var re=0;re<U.length;re++)G.on(U[re],this.emit.bind(this,U[re]));return this._read=function(se){d("wrapped _read",se),te&&(te=!1,G.resume())},this},typeof Symbol=="function"&&(F.prototype[Symbol.asyncIterator]=function(){return g===void 0&&(g=r("./internal/streams/async_iterator")),g(this)}),Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(F.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(F.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(G){this._readableState&&(this._readableState.flowing=G)}}),F._fromList=K,Object.defineProperty(F.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(F.from=function(G,V){return m===void 0&&(m=r("./internal/streams/from")),m(F,G,V)})}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er: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(r,n,o){n.exports=d;var i=r("../errors").codes,a=i.ERR_METHOD_NOT_IMPLEMENTED,s=i.ERR_MULTIPLE_CALLBACK,c=i.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=i.ERR_TRANSFORM_WITH_LENGTH_0,u=r("./_stream_duplex");function f(g,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(y===null)return this.emit("error",new s);v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(g);var b=this._readableState;b.reading=!1,(b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}function d(g){if(!(this instanceof d))return new d(g);u.call(this,g),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,g&&(typeof g.transform=="function"&&(this._transform=g.transform),typeof g.flush=="function"&&(this._flush=g.flush)),this.on("prefinish",h)}function h(){var g=this;typeof this._flush!="function"||this._readableState.destroyed?p(this,null,null):this._flush(function(m,v){p(g,m,v)})}function p(g,m,v){if(m)return g.emit("error",m);if(v!=null&&g.push(v),g._writableState.length)throw new l;if(g._transformState.transforming)throw new c;return g.push(null)}r("inherits")(d,u),d.prototype.push=function(g,m){return this._transformState.needTransform=!1,u.prototype.push.call(this,g,m)},d.prototype._transform=function(g,m,v){v(new a("_transform()"))},d.prototype._write=function(g,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=g,y.writeencoding=m,!y.transforming){var b=this._readableState;(y.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark)}},d.prototype._read=function(g){var m=this._transformState;m.writechunk===null||m.transforming?m.needTransform=!0:(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform))},d.prototype._destroy=function(g,m){u.prototype._destroy.call(this,g,function(v){m(v)})}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(r,n,o){(function(i,a){(function(){function s(k){var L=this;this.next=null,this.entry=null,this.finish=function(){(function(j,z,Y){var K=j.entry;for(j.entry=null;K;){var Q=K.callback;z.pendingcb--,Q(Y),K=K.next}z.corkedRequestsFree.next=j})(L,k)}}var c;n.exports=F,F.WritableState=B;var l={deprecate:r("util-deprecate")},u=r("./internal/streams/stream"),f=r("buffer").Buffer,d=(a!==void 0?a:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},h,p=r("./internal/streams/destroy"),g=r("./internal/streams/state").getHighWaterMark,m=r("../errors").codes,v=m.ERR_INVALID_ARG_TYPE,y=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_MULTIPLE_CALLBACK,w=m.ERR_STREAM_CANNOT_PIPE,E=m.ERR_STREAM_DESTROYED,I=m.ERR_STREAM_NULL_VALUES,O=m.ERR_STREAM_WRITE_AFTER_END,D=m.ERR_UNKNOWN_ENCODING,N=p.errorOrDestroy;function U(){}function B(k,L,j){c=c||r("./_stream_duplex"),k=k||{},typeof j!="boolean"&&(j=L instanceof c),this.objectMode=!!k.objectMode,j&&(this.objectMode=this.objectMode||!!k.writableObjectMode),this.highWaterMark=g(this,k,"writableHighWaterMark",j),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var z=k.decodeStrings===!1;this.decodeStrings=!z,this.defaultEncoding=k.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){(function(K,Q){var q=K._writableState,J=q.sync,G=q.writecb;if(typeof G!="function")throw new b;if(function(X){X.writing=!1,X.writecb=null,X.length-=X.writelen,X.writelen=0}(q),Q)(function(X,te,ee,re,se){--te.pendingcb,ee?(i.nextTick(se,re),i.nextTick(x,X,te),X._writableState.errorEmitted=!0,N(X,re)):(se(re),X._writableState.errorEmitted=!0,N(X,re),x(X,te))})(K,q,J,Q,G);else{var V=C(q)||K.destroyed;V||q.corked||q.bufferProcessing||!q.bufferedRequest||_(K,q),J?i.nextTick(P,K,q,V,G):P(K,q,V,G)}})(L,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=k.emitClose!==!1,this.autoDestroy=!!k.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function F(k){var L=this instanceof(c=c||r("./_stream_duplex"));if(!L&&!h.call(F,this))return new F(k);this._writableState=new B(k,this,L),this.writable=!0,k&&(typeof k.write=="function"&&(this._write=k.write),typeof k.writev=="function"&&(this._writev=k.writev),typeof k.destroy=="function"&&(this._destroy=k.destroy),typeof k.final=="function"&&(this._final=k.final)),u.call(this)}function T(k,L,j,z,Y,K,Q){L.writelen=z,L.writecb=Q,L.writing=!0,L.sync=!0,L.destroyed?L.onwrite(new E("write")):j?k._writev(Y,L.onwrite):k._write(Y,K,L.onwrite),L.sync=!1}function P(k,L,j,z){j||function(Y,K){K.length===0&&K.needDrain&&(K.needDrain=!1,Y.emit("drain"))}(k,L),L.pendingcb--,z(),x(k,L)}function _(k,L){L.bufferProcessing=!0;var j=L.bufferedRequest;if(k._writev&&j&&j.next){var z=L.bufferedRequestCount,Y=new Array(z),K=L.corkedRequestsFree;K.entry=j;for(var Q=0,q=!0;j;)Y[Q]=j,j.isBuf||(q=!1),j=j.next,Q+=1;Y.allBuffers=q,T(k,L,!0,L.length,Y,"",K.finish),L.pendingcb++,L.lastBufferedRequest=null,K.next?(L.corkedRequestsFree=K.next,K.next=null):L.corkedRequestsFree=new s(L),L.bufferedRequestCount=0}else{for(;j;){var J=j.chunk,G=j.encoding,V=j.callback;if(T(k,L,!1,L.objectMode?1:J.length,J,G,V),j=j.next,L.bufferedRequestCount--,L.writing)break}j===null&&(L.lastBufferedRequest=null)}L.bufferedRequest=j,L.bufferProcessing=!1}function C(k){return k.ending&&k.length===0&&k.bufferedRequest===null&&!k.finished&&!k.writing}function S(k,L){k._final(function(j){L.pendingcb--,j&&N(k,j),L.prefinished=!0,k.emit("prefinish"),x(k,L)})}function x(k,L){var j=C(L);if(j&&(function(Y,K){K.prefinished||K.finalCalled||(typeof Y._final!="function"||K.destroyed?(K.prefinished=!0,Y.emit("prefinish")):(K.pendingcb++,K.finalCalled=!0,i.nextTick(S,Y,K)))}(k,L),L.pendingcb===0&&(L.finished=!0,k.emit("finish"),L.autoDestroy))){var z=k._readableState;(!z||z.autoDestroy&&z.endEmitted)&&k.destroy()}return j}r("inherits")(F,u),B.prototype.getBuffer=function(){for(var k=this.bufferedRequest,L=[];k;)L.push(k),k=k.next;return L},function(){try{Object.defineProperty(B.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(F,Symbol.hasInstance,{value:function(k){return!!h.call(this,k)||this===F&&k&&k._writableState instanceof B}})):h=function(k){return k instanceof this},F.prototype.pipe=function(){N(this,new w)},F.prototype.write=function(k,L,j){var z,Y=this._writableState,K=!1,Q=!Y.objectMode&&(z=k,f.isBuffer(z)||z instanceof d);return Q&&!f.isBuffer(k)&&(k=function(q){return f.from(q)}(k)),typeof L=="function"&&(j=L,L=null),Q?L="buffer":L||(L=Y.defaultEncoding),typeof j!="function"&&(j=U),Y.ending?function(q,J){var G=new O;N(q,G),i.nextTick(J,G)}(this,j):(Q||function(q,J,G,V){var X;return G===null?X=new I:typeof G=="string"||J.objectMode||(X=new v("chunk",["string","Buffer"],G)),!X||(N(q,X),i.nextTick(V,X),!1)}(this,Y,k,j))&&(Y.pendingcb++,K=function(q,J,G,V,X,te){if(!G){var ee=function(ce,ne,he){return ce.objectMode||ce.decodeStrings===!1||typeof ne!="string"||(ne=f.from(ne,he)),ne}(J,V,X);V!==ee&&(G=!0,X="buffer",V=ee)}var re=J.objectMode?1:V.length;J.length+=re;var se=J.length<J.highWaterMark;if(se||(J.needDrain=!0),J.writing||J.corked){var pe=J.lastBufferedRequest;J.lastBufferedRequest={chunk:V,encoding:X,isBuf:G,callback:te,next:null},pe?pe.next=J.lastBufferedRequest:J.bufferedRequest=J.lastBufferedRequest,J.bufferedRequestCount+=1}else T(q,J,!1,re,V,X,te);return se}(this,Y,Q,k,L,j)),K},F.prototype.cork=function(){this._writableState.corked++},F.prototype.uncork=function(){var k=this._writableState;k.corked&&(k.corked--,k.writing||k.corked||k.bufferProcessing||!k.bufferedRequest||_(this,k))},F.prototype.setDefaultEncoding=function(k){if(typeof k=="string"&&(k=k.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((k+"").toLowerCase())>-1))throw new D(k);return this._writableState.defaultEncoding=k,this},Object.defineProperty(F.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),F.prototype._write=function(k,L,j){j(new y("_write()"))},F.prototype._writev=null,F.prototype.end=function(k,L,j){var z=this._writableState;return typeof k=="function"?(j=k,k=null,L=null):typeof L=="function"&&(j=L,L=null),k!=null&&this.write(k,L),z.corked&&(z.corked=1,this.uncork()),z.ending||function(Y,K,Q){K.ending=!0,x(Y,K),Q&&(K.finished?i.nextTick(Q):Y.once("finish",Q)),K.ended=!0,Y.writable=!1}(this,z,j),this},Object.defineProperty(F.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(F.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(k){this._writableState&&(this._writableState.destroyed=k)}}),F.prototype.destroy=p.destroy,F.prototype._undestroy=p.undestroy,F.prototype._destroy=function(k,L){L(k)}}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er: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(r,n,o){(function(i){(function(){var a;function s(E,I,O){return(I=function(D){var N=function(U,B){if(typeof U!="object"||U===null)return U;var F=U[Symbol.toPrimitive];if(F!==void 0){var T=F.call(U,B||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(B==="string"?String:Number)(U)}(D,"string");return typeof N=="symbol"?N:String(N)}(I))in E?Object.defineProperty(E,I,{value:O,enumerable:!0,configurable:!0,writable:!0}):E[I]=O,E}var c=r("./end-of-stream"),l=Symbol("lastResolve"),u=Symbol("lastReject"),f=Symbol("error"),d=Symbol("ended"),h=Symbol("lastPromise"),p=Symbol("handlePromise"),g=Symbol("stream");function m(E,I){return{value:E,done:I}}function v(E){var I=E[l];if(I!==null){var O=E[g].read();O!==null&&(E[h]=null,E[l]=null,E[u]=null,I(m(O,!1)))}}function y(E){i.nextTick(v,E)}var b=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((s(a={get stream(){return this[g]},next:function(){var E=this,I=this[f];if(I!==null)return Promise.reject(I);if(this[d])return Promise.resolve(m(void 0,!0));if(this[g].destroyed)return new Promise(function(U,B){i.nextTick(function(){E[f]?B(E[f]):U(m(void 0,!0))})});var O,D=this[h];if(D)O=new Promise(function(U,B){return function(F,T){U.then(function(){B[d]?F(m(void 0,!0)):B[p](F,T)},T)}}(D,this));else{var N=this[g].read();if(N!==null)return Promise.resolve(m(N,!1));O=new Promise(this[p])}return this[h]=O,O}},Symbol.asyncIterator,function(){return this}),s(a,"return",function(){var E=this;return new Promise(function(I,O){E[g].destroy(null,function(D){D?O(D):I(m(void 0,!0))})})}),a),b);n.exports=function(E){var I,O=Object.create(w,(s(I={},g,{value:E,writable:!0}),s(I,l,{value:null,writable:!0}),s(I,u,{value:null,writable:!0}),s(I,f,{value:null,writable:!0}),s(I,d,{value:E._readableState.endEmitted,writable:!0}),s(I,p,{value:function(D,N){var U=O[g].read();U?(O[h]=null,O[l]=null,O[u]=null,D(m(U,!1))):(O[l]=D,O[u]=N)},writable:!0}),I));return O[h]=null,c(E,function(D){if(D&&D.code!=="ERR_STREAM_PREMATURE_CLOSE"){var N=O[u];return N!==null&&(O[h]=null,O[l]=null,O[u]=null,N(D)),void(O[f]=D)}var U=O[l];U!==null&&(O[h]=null,O[l]=null,O[u]=null,U(m(void 0,!0))),O[d]=!0}),E.on("readable",y.bind(null,O)),O}}).call(this)}).call(this,r("_process"))},{"./end-of-stream":486,_process:467}],484:[function(r,n,o){function i(h,p){var g=Object.keys(h);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(h);p&&(m=m.filter(function(v){return Object.getOwnPropertyDescriptor(h,v).enumerable})),g.push.apply(g,m)}return g}function a(h){for(var p=1;p<arguments.length;p++){var g=arguments[p]!=null?arguments[p]:{};p%2?i(Object(g),!0).forEach(function(m){s(h,m,g[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(g)):i(Object(g)).forEach(function(m){Object.defineProperty(h,m,Object.getOwnPropertyDescriptor(g,m))})}return h}function s(h,p,g){return(p=l(p))in h?Object.defineProperty(h,p,{value:g,enumerable:!0,configurable:!0,writable:!0}):h[p]=g,h}function c(h,p){for(var g=0;g<p.length;g++){var m=p[g];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(h,l(m.key),m)}}function l(h){var p=function(g,m){if(typeof g!="object"||g===null)return g;var v=g[Symbol.toPrimitive];if(v!==void 0){var y=v.call(g,m||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(g)}(h,"string");return typeof p=="symbol"?p:String(p)}var u=r("buffer").Buffer,f=r("util").inspect,d=f&&f.custom||"inspect";n.exports=function(){function h(){(function(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")})(this,h),this.head=null,this.tail=null,this.length=0}var p,g;return p=h,(g=[{key:"push",value:function(m){var v={data:m,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(m){var v={data:m,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=m+v.data;return y}},{key:"concat",value:function(m){if(this.length===0)return u.alloc(0);for(var v,y,b,w=u.allocUnsafe(m>>>0),E=this.head,I=0;E;)v=E.data,y=w,b=I,u.prototype.copy.call(v,y,b),I+=E.data.length,E=E.next;return w}},{key:"consume",value:function(m,v){var y;return m<this.head.data.length?(y=this.head.data.slice(0,m),this.head.data=this.head.data.slice(m)):y=m===this.head.data.length?this.shift():v?this._getString(m):this._getBuffer(m),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(m){var v=this.head,y=1,b=v.data;for(m-=b.length;v=v.next;){var w=v.data,E=m>w.length?w.length:m;if(E===w.length?b+=w:b+=w.slice(0,m),(m-=E)==0){E===w.length?(++y,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(E));break}++y}return this.length-=y,b}},{key:"_getBuffer",value:function(m){var v=u.allocUnsafe(m),y=this.head,b=1;for(y.data.copy(v),m-=y.data.length;y=y.next;){var w=y.data,E=m>w.length?w.length:m;if(w.copy(v,v.length-m,0,E),(m-=E)==0){E===w.length?(++b,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(E));break}++b}return this.length-=b,v}},{key:d,value:function(m,v){return f(this,a(a({},v),{},{depth:0,customInspect:!1}))}}])&&c(p.prototype,g),Object.defineProperty(p,"prototype",{writable:!1}),h}()},{buffer:220,util:188}],485:[function(r,n,o){(function(i){(function(){function a(l,u){c(l,u),s(l)}function s(l){l._writableState&&!l._writableState.emitClose||l._readableState&&!l._readableState.emitClose||l.emit("close")}function c(l,u){l.emit("error",u)}n.exports={destroy:function(l,u){var f=this,d=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return d||h?(u?u(l):l&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(c,this,l)):i.nextTick(c,this,l)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(p){!u&&p?f._writableState?f._writableState.errorEmitted?i.nextTick(s,f):(f._writableState.errorEmitted=!0,i.nextTick(a,f,p)):i.nextTick(a,f,p):u?(i.nextTick(s,f),u(p)):i.nextTick(s,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)},errorOrDestroy:function(l,u){var f=l._readableState,d=l._writableState;f&&f.autoDestroy||d&&d.autoDestroy?l.destroy(u):l.emit("error",u)}}}).call(this)}).call(this,r("_process"))},{_process:467}],486:[function(r,n,o){var i=r("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}n.exports=function s(c,l,u){if(typeof l=="function")return s(c,null,l);l||(l={}),u=function(E){var I=!1;return function(){if(!I){I=!0;for(var O=arguments.length,D=new Array(O),N=0;N<O;N++)D[N]=arguments[N];E.apply(this,D)}}}(u||a);var f=l.readable||l.readable!==!1&&c.readable,d=l.writable||l.writable!==!1&&c.writable,h=function(){c.writable||g()},p=c._writableState&&c._writableState.finished,g=function(){d=!1,p=!0,f||u.call(c)},m=c._readableState&&c._readableState.endEmitted,v=function(){f=!1,m=!0,d||u.call(c)},y=function(E){u.call(c,E)},b=function(){var E;return f&&!m?(c._readableState&&c._readableState.ended||(E=new i),u.call(c,E)):d&&!p?(c._writableState&&c._writableState.ended||(E=new i),u.call(c,E)):void 0},w=function(){c.req.on("finish",g)};return function(E){return E.setHeader&&typeof E.abort=="function"}(c)?(c.on("complete",g),c.on("abort",b),c.req?w():c.on("request",w)):d&&!c._writableState&&(c.on("end",h),c.on("close",h)),c.on("end",v),c.on("finish",g),l.error!==!1&&c.on("error",y),c.on("close",b),function(){c.removeListener("complete",g),c.removeListener("abort",b),c.removeListener("request",w),c.req&&c.req.removeListener("finish",g),c.removeListener("end",h),c.removeListener("close",h),c.removeListener("finish",g),c.removeListener("end",v),c.removeListener("error",y),c.removeListener("close",b)}}},{"../../../errors":477}],487:[function(r,n,o){n.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(r,n,o){var i,a=r("../../../errors").codes,s=a.ERR_MISSING_ARGS,c=a.ERR_STREAM_DESTROYED;function l(p){if(p)throw p}function u(p,g,m,v){v=function(w){var E=!1;return function(){E||(E=!0,w.apply(void 0,arguments))}}(v);var y=!1;p.on("close",function(){y=!0}),i===void 0&&(i=r("./end-of-stream")),i(p,{readable:g,writable:m},function(w){if(w)return v(w);y=!0,v()});var b=!1;return function(w){if(!y&&!b)return b=!0,function(E){return E.setHeader&&typeof E.abort=="function"}(p)?p.abort():typeof p.destroy=="function"?p.destroy():void v(w||new c("pipe"))}}function f(p){p()}function d(p,g){return p.pipe(g)}function h(p){return p.length?typeof p[p.length-1]!="function"?l:p.pop():l}n.exports=function(){for(var p=arguments.length,g=new Array(p),m=0;m<p;m++)g[m]=arguments[m];var v,y=h(g);if(Array.isArray(g[0])&&(g=g[0]),g.length<2)throw new s("streams");var b=g.map(function(w,E){var I=E<g.length-1;return u(w,I,E>0,function(O){v||(v=O),O&&b.forEach(f),I||(b.forEach(f),y(v))})});return g.reduce(d)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(r,n,o){var i=r("../../../errors").codes.ERR_INVALID_OPT_VALUE;n.exports={getHighWaterMark:function(a,s,c,l){var u=function(f,d,h){return f.highWaterMark!=null?f.highWaterMark:d?f[h]:null}(s,l,c);if(u!=null){if(!isFinite(u)||Math.floor(u)!==u||u<0)throw new i(l?c:"highWaterMark",u);return Math.floor(u)}return a.objectMode?16:16384}}},{"../../../errors":477}],490:[function(r,n,o){n.exports=r("events").EventEmitter},{events:422}],491:[function(r,n,o){(o=n.exports=r("./lib/_stream_readable.js")).Stream=o,o.Readable=o,o.Writable=r("./lib/_stream_writable.js"),o.Duplex=r("./lib/_stream_duplex.js"),o.Transform=r("./lib/_stream_transform.js"),o.PassThrough=r("./lib/_stream_passthrough.js"),o.finished=r("./lib/internal/streams/end-of-stream.js"),o.pipeline=r("./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(r,n,o){var i=function(a){var s=Object.prototype,c=s.hasOwnProperty,l=Object.defineProperty||function(x,k,L){x[k]=L.value},u=typeof Symbol=="function"?Symbol:{},f=u.iterator||"@@iterator",d=u.asyncIterator||"@@asyncIterator",h=u.toStringTag||"@@toStringTag";function p(x,k,L){return Object.defineProperty(x,k,{value:L,enumerable:!0,configurable:!0,writable:!0}),x[k]}try{p({},"")}catch{p=function(k,L,j){return k[L]=j}}function g(x,k,L,j){var z=k&&k.prototype instanceof y?k:y,Y=Object.create(z.prototype),K=new _(j||[]);return l(Y,"_invoke",{value:B(x,L,K)}),Y}function m(x,k,L){try{return{type:"normal",arg:x.call(k,L)}}catch(j){return{type:"throw",arg:j}}}a.wrap=g;var v={};function y(){}function b(){}function w(){}var E={};p(E,f,function(){return this});var I=Object.getPrototypeOf,O=I&&I(I(C([])));O&&O!==s&&c.call(O,f)&&(E=O);var D=w.prototype=y.prototype=Object.create(E);function N(x){["next","throw","return"].forEach(function(k){p(x,k,function(L){return this._invoke(k,L)})})}function U(x,k){var L;l(this,"_invoke",{value:function(j,z){function Y(){return new k(function(K,Q){(function q(J,G,V,X){var te=m(x[J],x,G);if(te.type!=="throw"){var ee=te.arg,re=ee.value;return re&&typeof re=="object"&&c.call(re,"__await")?k.resolve(re.__await).then(function(se){q("next",se,V,X)},function(se){q("throw",se,V,X)}):k.resolve(re).then(function(se){ee.value=se,V(ee)},function(se){return q("throw",se,V,X)})}X(te.arg)})(j,z,K,Q)})}return L=L?L.then(Y,Y):Y()}})}function B(x,k,L){var j="suspendedStart";return function(z,Y){if(j==="executing")throw new Error("Generator is already running");if(j==="completed"){if(z==="throw")throw Y;return S()}for(L.method=z,L.arg=Y;;){var K=L.delegate;if(K){var Q=F(K,L);if(Q){if(Q===v)continue;return Q}}if(L.method==="next")L.sent=L._sent=L.arg;else if(L.method==="throw"){if(j==="suspendedStart")throw j="completed",L.arg;L.dispatchException(L.arg)}else L.method==="return"&&L.abrupt("return",L.arg);j="executing";var q=m(x,k,L);if(q.type==="normal"){if(j=L.done?"completed":"suspendedYield",q.arg===v)continue;return{value:q.arg,done:L.done}}q.type==="throw"&&(j="completed",L.method="throw",L.arg=q.arg)}}}function F(x,k){var L=k.method,j=x.iterator[L];if(j===void 0)return k.delegate=null,L==="throw"&&x.iterator.return&&(k.method="return",k.arg=void 0,F(x,k),k.method==="throw")||L!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+L+"' method")),v;var z=m(j,x.iterator,k.arg);if(z.type==="throw")return k.method="throw",k.arg=z.arg,k.delegate=null,v;var Y=z.arg;return Y?Y.done?(k[x.resultName]=Y.value,k.next=x.nextLoc,k.method!=="return"&&(k.method="next",k.arg=void 0),k.delegate=null,v):Y:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,v)}function T(x){var k={tryLoc:x[0]};1 in x&&(k.catchLoc=x[1]),2 in x&&(k.finallyLoc=x[2],k.afterLoc=x[3]),this.tryEntries.push(k)}function P(x){var k=x.completion||{};k.type="normal",delete k.arg,x.completion=k}function _(x){this.tryEntries=[{tryLoc:"root"}],x.forEach(T,this),this.reset(!0)}function C(x){if(x){var k=x[f];if(k)return k.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length)){var L=-1,j=function z(){for(;++L<x.length;)if(c.call(x,L))return z.value=x[L],z.done=!1,z;return z.value=void 0,z.done=!0,z};return j.next=j}}return{next:S}}function S(){return{value:void 0,done:!0}}return b.prototype=w,l(D,"constructor",{value:w,configurable:!0}),l(w,"constructor",{value:b,configurable:!0}),b.displayName=p(w,h,"GeneratorFunction"),a.isGeneratorFunction=function(x){var k=typeof x=="function"&&x.constructor;return!!k&&(k===b||(k.displayName||k.name)==="GeneratorFunction")},a.mark=function(x){return Object.setPrototypeOf?Object.setPrototypeOf(x,w):(x.__proto__=w,p(x,h,"GeneratorFunction")),x.prototype=Object.create(D),x},a.awrap=function(x){return{__await:x}},N(U.prototype),p(U.prototype,d,function(){return this}),a.AsyncIterator=U,a.async=function(x,k,L,j,z){z===void 0&&(z=Promise);var Y=new U(g(x,k,L,j),z);return a.isGeneratorFunction(k)?Y:Y.next().then(function(K){return K.done?K.value:Y.next()})},N(D),p(D,h,"Generator"),p(D,f,function(){return this}),p(D,"toString",function(){return"[object Generator]"}),a.keys=function(x){var k=Object(x),L=[];for(var j in k)L.push(j);return L.reverse(),function z(){for(;L.length;){var Y=L.pop();if(Y in k)return z.value=Y,z.done=!1,z}return z.done=!0,z}},a.values=C,_.prototype={constructor:_,reset:function(x){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(P),!x)for(var k in this)k.charAt(0)==="t"&&c.call(this,k)&&!isNaN(+k.slice(1))&&(this[k]=void 0)},stop:function(){this.done=!0;var x=this.tryEntries[0].completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(x){if(this.done)throw x;var k=this;function L(q,J){return Y.type="throw",Y.arg=x,k.next=q,J&&(k.method="next",k.arg=void 0),!!J}for(var j=this.tryEntries.length-1;j>=0;--j){var z=this.tryEntries[j],Y=z.completion;if(z.tryLoc==="root")return L("end");if(z.tryLoc<=this.prev){var K=c.call(z,"catchLoc"),Q=c.call(z,"finallyLoc");if(K&&Q){if(this.prev<z.catchLoc)return L(z.catchLoc,!0);if(this.prev<z.finallyLoc)return L(z.finallyLoc)}else if(K){if(this.prev<z.catchLoc)return L(z.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<z.finallyLoc)return L(z.finallyLoc)}}}},abrupt:function(x,k){for(var L=this.tryEntries.length-1;L>=0;--L){var j=this.tryEntries[L];if(j.tryLoc<=this.prev&&c.call(j,"finallyLoc")&&this.prev<j.finallyLoc){var z=j;break}}z&&(x==="break"||x==="continue")&&z.tryLoc<=k&&k<=z.finallyLoc&&(z=null);var Y=z?z.completion:{};return Y.type=x,Y.arg=k,z?(this.method="next",this.next=z.finallyLoc,v):this.complete(Y)},complete:function(x,k){if(x.type==="throw")throw x.arg;return x.type==="break"||x.type==="continue"?this.next=x.arg:x.type==="return"?(this.rval=this.arg=x.arg,this.method="return",this.next="end"):x.type==="normal"&&k&&(this.next=k),v},finish:function(x){for(var k=this.tryEntries.length-1;k>=0;--k){var L=this.tryEntries[k];if(L.finallyLoc===x)return this.complete(L.completion,L.afterLoc),P(L),v}},catch:function(x){for(var k=this.tryEntries.length-1;k>=0;--k){var L=this.tryEntries[k];if(L.tryLoc===x){var j=L.completion;if(j.type==="throw"){var z=j.arg;P(L)}return z}}throw new Error("illegal catch attempt")},delegateYield:function(x,k,L){return this.delegate={iterator:C(x),resultName:k,nextLoc:L},this.method==="next"&&(this.arg=void 0),v}},a}(typeof n=="object"?n.exports:{});try{regeneratorRuntime=i}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},{}],493:[function(r,n,o){var i=r("buffer").Buffer,a=r("inherits"),s=r("hash-base"),c=new Array(16),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[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],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function g(){s.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function m(I,O){return I<<O|I>>>32-O}function v(I,O,D,N,U,B,F,T){return m(I+(O^D^N)+B+F|0,T)+U|0}function y(I,O,D,N,U,B,F,T){return m(I+(O&D|~O&N)+B+F|0,T)+U|0}function b(I,O,D,N,U,B,F,T){return m(I+((O|~D)^N)+B+F|0,T)+U|0}function w(I,O,D,N,U,B,F,T){return m(I+(O&N|D&~N)+B+F|0,T)+U|0}function E(I,O,D,N,U,B,F,T){return m(I+(O^(D|~N))+B+F|0,T)+U|0}a(g,s),g.prototype._update=function(){for(var I=c,O=0;O<16;++O)I[O]=this._block.readInt32LE(4*O);for(var D=0|this._a,N=0|this._b,U=0|this._c,B=0|this._d,F=0|this._e,T=0|this._a,P=0|this._b,_=0|this._c,C=0|this._d,S=0|this._e,x=0;x<80;x+=1){var k,L;x<16?(k=v(D,N,U,B,F,I[l[x]],h[0],f[x]),L=E(T,P,_,C,S,I[u[x]],p[0],d[x])):x<32?(k=y(D,N,U,B,F,I[l[x]],h[1],f[x]),L=w(T,P,_,C,S,I[u[x]],p[1],d[x])):x<48?(k=b(D,N,U,B,F,I[l[x]],h[2],f[x]),L=b(T,P,_,C,S,I[u[x]],p[2],d[x])):x<64?(k=w(D,N,U,B,F,I[l[x]],h[3],f[x]),L=y(T,P,_,C,S,I[u[x]],p[3],d[x])):(k=E(D,N,U,B,F,I[l[x]],h[4],f[x]),L=v(T,P,_,C,S,I[u[x]],p[4],d[x])),D=F,F=B,B=m(U,10),U=N,N=k,T=S,S=C,C=m(_,10),_=P,P=L}var j=this._b+U+C|0;this._b=this._c+B+S|0,this._c=this._d+F+T|0,this._d=this._e+D+P|0,this._e=this._a+N+_|0,this._a=j},g.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var I=i.alloc?i.alloc(20):new i(20);return I.writeInt32LE(this._a,0),I.writeInt32LE(this._b,4),I.writeInt32LE(this._c,8),I.writeInt32LE(this._d,12),I.writeInt32LE(this._e,16),I},n.exports=g},{buffer:220,"hash-base":425,inherits:440}],494:[function(r,n,o){/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var i=r("buffer"),a=i.Buffer;function s(l,u){for(var f in l)u[f]=l[f]}function c(l,u,f){return a(l,u,f)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?n.exports=i:(s(i,o),o.Buffer=c),c.prototype=Object.create(a.prototype),s(a,c),c.from=function(l,u,f){if(typeof l=="number")throw new TypeError("Argument must not be a number");return a(l,u,f)},c.alloc=function(l,u,f){if(typeof l!="number")throw new TypeError("Argument must be a number");var d=a(l);return u!==void 0?typeof f=="string"?d.fill(u,f):d.fill(u):d.fill(0),d},c.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return a(l)},c.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return i.SlowBuffer(l)}},{buffer:220}],495:[function(r,n,o){(function(i){(function(){var a,s=r("buffer"),c=s.Buffer,l={};for(a in s)s.hasOwnProperty(a)&&a!=="SlowBuffer"&&a!=="Buffer"&&(l[a]=s[a]);var u=l.Buffer={};for(a in c)c.hasOwnProperty(a)&&a!=="allocUnsafe"&&a!=="allocUnsafeSlow"&&(u[a]=c[a]);if(l.Buffer.prototype=c.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(f,d,h){if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof f);if(f&&f.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 f);return c(f,d,h)}),u.alloc||(u.alloc=function(f,d,h){if(typeof f!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof f);if(f<0||f>=2*(1<<30))throw new RangeError('The value "'+f+'" is invalid for option "size"');var p=c(f);return d&&d.length!==0?typeof h=="string"?p.fill(d,h):p.fill(d):p.fill(0),p}),!l.kStringMaxLength)try{l.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch{}l.constants||(l.constants={MAX_LENGTH:l.kMaxLength},l.kStringMaxLength&&(l.constants.MAX_STRING_LENGTH=l.kStringMaxLength)),n.exports=l}).call(this)}).call(this,r("_process"))},{_process:467,buffer:220}],496:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0});const i=r("xmlchars/xml/1.0/ed5"),a=r("xmlchars/xml/1.1/ed2"),s=r("xmlchars/xmlns/1.0/ed3");var c=i.isS,l=i.isChar,u=i.isNameStartChar,f=i.isNameChar,d=i.S_LIST,h=i.NAME_RE,p=a.isChar,g=s.isNCNameStartChar,m=s.isNCNameChar,v=s.NC_NAME_RE;const y="http://www.w3.org/XML/1998/namespace",b="http://www.w3.org/2000/xmlns/",w={__proto__:null,xml:y,xmlns:b},E={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},I=C=>C===34||C===39,O=[34,39],D=[...O,91,62],N=[...O,60,93],U=[61,63,...d],B=[...d,62,38,60];function F(C,S,x){switch(S){case"xml":x!==y&&C.fail(`xml prefix must be bound to ${y}.`);break;case"xmlns":x!==b&&C.fail(`xmlns prefix must be bound to ${b}.`)}switch(x){case b:C.fail(S===""?`the default namespace may not be set to ${x}.`:`may not assign a prefix (even "xmlns") to the URI ${b}.`);break;case y:switch(S){case"xml":break;case"":C.fail(`the default namespace may not be set to ${x}.`);break;default:C.fail("may not assign the xml namespace to another prefix.")}}}const T=C=>v.test(C),P=C=>h.test(C);o.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const _={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"};o.SaxesParser=class{constructor(C){this.opt=C??{},this.fragmentOpt=!!this.opt.fragment;const S=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,S){this.nameStartCheck=g,this.nameCheck=m,this.isName=T,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},w);const x=this.opt.additionalNamespaces;x!=null&&(function(k,L){for(const j of Object.keys(L))F(k,j,L[j])}(this,x),Object.assign(this.ns,x))}else this.nameStartCheck=u,this.nameCheck=f,this.isName=P,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 C;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:S}=this;this.state=S?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=S,this.xmlDeclPossible=!S,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:x}=this.opt;if(x===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");x="1.0"}this.setXMLVersion(x),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(E),(C=this.readyHandler)===null||C===void 0||C.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(C,S){this[_[C]]=S}off(C){this[_[C]]=void 0}makeError(C){var S;let x=(S=this.fileName)!==null&&S!==void 0?S:"";return this.trackPosition&&(x.length>0&&(x+=":"),x+=`${this.line}:${this.column}`),x.length>0&&(x+=": "),new Error(x+C)}fail(C){const S=this.makeError(C),x=this.errorHandler;if(x===void 0)throw S;return x(S),this}write(C){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let S=!1;C===null?(S=!0,C=""):typeof C=="object"&&(C=C.toString()),this.carriedFromPrevious!==void 0&&(C=`${this.carriedFromPrevious}${C}`,this.carriedFromPrevious=void 0);let x=C.length;const k=C.charCodeAt(x-1);!S&&(k===13||k>=55296&&k<=56319)&&(this.carriedFromPrevious=C[x-1],x--,C=C.slice(0,x));const{stateTable:L}=this;for(this.chunk=C,this.i=0;this.i<x;)L[this.state].call(this);return this.chunkPosition+=x,S?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:C,i:S}=this;if(this.prevI=S,this.i=S+1,S>=C.length)return-1;const x=C.charCodeAt(S);if(this.column++,x<55296){if(x>=32||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return C.charCodeAt(S+1)===10&&(this.i=S+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const k=65536+1024*(x-55296)+(C.charCodeAt(S+1)-56320);return this.i=S+2,k>1114111&&this.fail("disallowed character."),k}getCode11(){const{chunk:C,i:S}=this;if(this.prevI=S,this.i=S+1,S>=C.length)return-1;const x=C.charCodeAt(S);if(this.column++,x<55296){if(x>31&&x<127||x>159&&x!==8232||x===9)return x;switch(x){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const L=C.charCodeAt(S+1);L!==10&&L!==133||(this.i=S+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),x}}if(x>56319)return x>=57344&&x<=65533||this.fail("disallowed character."),x;const k=65536+1024*(x-55296)+(C.charCodeAt(S+1)-56320);return this.i=S+2,k>1114111&&this.fail("disallowed character."),k}getCodeNorm(){const C=this.getCode();return C===-2?10:C}unget(){this.i=this.prevI,this.column--}captureTo(C){let{i:S}=this;const{chunk:x}=this;for(;;){const k=this.getCode(),L=k===-2,j=L?10:k;if(j===-1||C.includes(j))return this.text+=x.slice(S,this.prevI),j;L&&(this.text+=x.slice(S,this.prevI)+`
`,S=this.i)}}captureToChar(C){let{i:S}=this;const{chunk:x}=this;for(;;){let k=this.getCode();switch(k){case-2:this.text+=x.slice(S,this.prevI)+`
`,S=this.i,k=10;break;case-1:return this.text+=x.slice(S),!1}if(k===C)return this.text+=x.slice(S,this.prevI),!0}}captureNameChars(){const{chunk:C,i:S}=this;for(;;){const x=this.getCode();if(x===-1)return this.name+=C.slice(S),-1;if(!f(x))return this.name+=C.slice(S,this.prevI),x===-2?10:x}}skipSpaces(){for(;;){const C=this.getCodeNorm();if(C===-1||!c(C))return C}}setXMLVersion(C){this.currentXMLVersion=C,C==="1.0"?(this.isChar=l,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 C=this.i,S=this.skipSpaces();switch(this.prevI!==C&&(this.xmlDeclPossible=!1),S){case 60:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var C;const S=this.captureTo(D);switch(S){case 62:(C=this.doctypeHandler)===null||C===void 0||C.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(S),S===91?this.state=4:I(S)&&(this.state=3,this.q=S)}}sDoctypeQuote(){const C=this.q;this.captureToChar(C)&&(this.text+=String.fromCodePoint(C),this.q=null,this.state=2)}sDTD(){const C=this.captureTo(N);C!==-1&&(this.text+=String.fromCodePoint(C),C===93?this.state=2:C===60?this.state=6:I(C)&&(this.state=5,this.q=C))}sDTDQuoted(){const C=this.q;this.captureToChar(C)&&(this.text+=String.fromCodePoint(C),this.state=4,this.q=null)}sDTDOpenWaka(){const C=this.getCodeNorm();switch(this.text+=String.fromCodePoint(C),C){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const C=String.fromCodePoint(this.getCodeNorm()),S=this.openWakaBang+=C;this.text+=C,S!=="-"&&(this.state=S==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const C=this.getCodeNorm();this.text+=String.fromCodePoint(C),this.state=C===45?10:8}sDTDCommentEnded(){const C=this.getCodeNorm();this.text+=String.fromCodePoint(C),C===62?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const C=this.getCodeNorm();this.text+=String.fromCodePoint(C),C===62&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:C}=this;const{chunk:S}=this;e:for(;;)switch(this.getCode()){case-2:this.entity+=S.slice(C,this.prevI)+`
`,C=this.i;break;case 59:{const{entityReturnState:x}=this,k=this.entity+S.slice(C,this.prevI);let L;this.state=x,k===""?(this.fail("empty entity name."),L="&;"):(L=this.parseEntity(k),this.entity=""),x===13&&this.textHandler===void 0||(this.text+=L);break e}case-1:this.entity+=S.slice(C);break e}}sOpenWaka(){const C=this.getCode();if(u(C))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(C){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 C;const S=this.getCodeNorm();S===45?(this.state=19,(C=this.commentHandler)===null||C===void 0||C.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(S),this.state=17)}sCommentEnded(){const C=this.getCodeNorm();C!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(C),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const C=this.getCodeNorm();C===93?this.state=22:(this.text+="]"+String.fromCodePoint(C),this.state=20)}sCDataEnding2(){var C;const S=this.getCodeNorm();switch(S){case 62:(C=this.cdataHandler)===null||C===void 0||C.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(S),this.state=20}}sPIFirstChar(){const C=this.getCodeNorm();this.nameStartCheck(C)?(this.piTarget+=String.fromCodePoint(C),this.state=24):C===63||c(C)?(this.fail("processing instruction without a target."),this.state=C===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(C),this.state=24)}sPIRest(){const{chunk:C,i:S}=this;for(;;){const x=this.getCodeNorm();if(x===-1)return void(this.piTarget+=C.slice(S));if(!this.nameCheck(x)){this.piTarget+=C.slice(S,this.prevI);const k=x===63;k||c(x)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=k?33:27):this.state=k?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(x));break}}}sPIBody(){if(this.text.length===0){const C=this.getCodeNorm();C===63?this.state=26:c(C)||(this.text=String.fromCodePoint(C))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var C;const S=this.getCodeNorm();if(S===62){const{piTarget:x}=this;x.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(C=this.piHandler)===null||C===void 0||C.call(this,{target:x,body:this.text}),this.piTarget=this.text="",this.state=13}else S===63?this.text+="?":(this.text+="?"+String.fromCodePoint(S),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const C=this.skipSpaces();C!==63?C!==-1&&(this.state=28,this.name=String.fromCodePoint(C)):this.state=33}sXMLDeclName(){const C=this.captureTo(U);if(C===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(c(C)||C===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=C===61?30:29}}sXMLDeclEq(){const C=this.getCodeNorm();if(C===63)return this.state=33,void this.fail("XML declaration is incomplete.");c(C)||(C!==61&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const C=this.getCodeNorm();if(C===63)return this.state=33,void this.fail("XML declaration is incomplete.");c(C)||(I(C)?this.q=C:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const C=this.captureTo([this.q,63]);if(C===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(C===-1)return;const S=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const x=S;this.xmlDecl.version=x,/^1\.[0-9]+$/.test(x)?this.opt.forceXMLVersion||this.setXMLVersion(x):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(S)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=S;break;case"standalone":S!=="yes"&&S!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=S}this.name="",this.state=32}sXMLDeclSeparator(){const C=this.getCodeNorm();C!==63?(c(C)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var C;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."),(C=this.xmldeclHandler)===null||C===void 0||C.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 C;const S=this.captureNameChars();if(S===-1)return;const x=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=x.ns=Object.create(null)),(C=this.openTagStartHandler)===null||C===void 0||C.call(this,x),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),S){case 62:this.openTag();break;case 47:this.state=35;break;default:c(S)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===62?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const C=this.skipSpaces();C!==-1&&(u(C)?(this.unget(),this.state=37):C===62?this.openTag():C===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const C=this.captureNameChars();C===61?this.state=39:c(C)?this.state=38:C===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):C!==-1&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const C=this.skipSpaces();switch(C){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",C===62?this.openTag():u(C)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const C=this.getCodeNorm();I(C)?(this.q=C,this.state=40):c(C)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:C,chunk:S}=this;let{i:x}=this;for(;;)switch(this.getCode()){case C:return this.pushAttrib(this.name,this.text+S.slice(x,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=S.slice(x,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=S.slice(x,this.prevI)+" ",x=this.i;break;case 60:return this.text+=S.slice(x,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=S.slice(x))}}sAttribValueClosed(){const C=this.getCodeNorm();c(C)?this.state=36:C===62?this.openTag():C===47?this.state=35:u(C)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const C=this.captureTo(B);switch(C){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="",C===62?this.openTag():this.state=36}}sCloseTag(){const C=this.captureNameChars();C===62?this.closeTag():c(C)?this.state=44:C!==-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:C,forbiddenState:S}=this;const{chunk:x,textHandler:k}=this;e:for(;;)switch(this.getCode()){case 60:if(this.state=15,k!==void 0){const{text:L}=this,j=x.slice(C,this.prevI);L.length!==0?(k(L+j),this.text=""):j.length!==0&&k(j)}S=0;break e;case 38:this.state=14,this.entityReturnState=13,k!==void 0&&(this.text+=x.slice(C,this.prevI)),S=0;break e;case 93:switch(S){case 0:S=1;break;case 1:S=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:S===2&&this.fail('the string "]]>" is disallowed in char data.'),S=0;break;case-2:k!==void 0&&(this.text+=x.slice(C,this.prevI)+`
`),C=this.i,S=0;break;case-1:k!==void 0&&(this.text+=x.slice(C));break e;default:S=0}this.forbiddenState=S}handleTextOutsideRoot(){let{i:C}=this;const{chunk:S,textHandler:x}=this;let k=!1;e:for(;;){const L=this.getCode();switch(L){case 60:if(this.state=15,x!==void 0){const{text:j}=this,z=S.slice(C,this.prevI);j.length!==0?(x(j+z),this.text=""):z.length!==0&&x(z)}break e;case 38:this.state=14,this.entityReturnState=13,x!==void 0&&(this.text+=S.slice(C,this.prevI)),k=!0;break e;case-2:x!==void 0&&(this.text+=S.slice(C,this.prevI)+`
`),C=this.i;break;case-1:x!==void 0&&(this.text+=S.slice(C));break e;default:c(L)||(k=!0)}}k&&(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(C,S){var x;const{prefix:k,local:L}=this.qname(C),j={name:C,prefix:k,local:L,value:S};if(this.attribList.push(j),(x=this.attributeHandler)===null||x===void 0||x.call(this,j),k==="xmlns"){const z=S.trim();this.currentXMLVersion==="1.0"&&z===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[L]=z,F(this,L,z)}else if(C==="xmlns"){const z=S.trim();this.topNS[""]=z,F(this,"",z)}}pushAttribPlain(C,S){var x;const k={name:C,value:S};this.attribList.push(k),(x=this.attributeHandler)===null||x===void 0||x.call(this,k)}end(){var C,S;this.sawRoot||this.fail("document must contain a root element.");const{tags:x}=this;for(;x.length>0;){const L=x.pop();this.fail("unclosed tag: "+L.name)}this.state!==0&&this.state!==13&&this.fail("unexpected end.");const{text:k}=this;return k.length!==0&&((C=this.textHandler)===null||C===void 0||C.call(this,k),this.text=""),this._closed=!0,(S=this.endHandler)===null||S===void 0||S.call(this),this._init(),this}resolve(C){var S,x;let k=this.topNS[C];if(k!==void 0)return k;const{tags:L}=this;for(let j=L.length-1;j>=0;j--)if(k=L[j].ns[C],k!==void 0)return k;return k=this.ns[C],k!==void 0?k:(x=(S=this.opt).resolvePrefix)===null||x===void 0?void 0:x.call(S,C)}qname(C){const S=C.indexOf(":");if(S===-1)return{prefix:"",local:C};const x=C.slice(S+1),k=C.slice(0,S);return(k===""||x===""||x.includes(":"))&&this.fail(`malformed name: ${C}.`),{prefix:k,local:x}}processAttribsNS(){var C;const{attribList:S}=this,x=this.tag;{const{prefix:j,local:z}=this.qname(x.name);x.prefix=j,x.local=z;const Y=x.uri=(C=this.resolve(j))!==null&&C!==void 0?C:"";j!==""&&(j==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),Y===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(j)}.`),x.uri=j))}if(S.length===0)return;const{attributes:k}=x,L=new Set;for(const j of S){const{name:z,prefix:Y,local:K}=j;let Q,q;Y===""?(Q=z==="xmlns"?b:"",q=z):(Q=this.resolve(Y),Q===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(Y)}.`),Q=Y),q=`{${Q}}${K}`),L.has(q)&&this.fail(`duplicate attribute: ${q}.`),L.add(q),j.uri=Q,k[z]=j}this.attribList=[]}processAttribsPlain(){const{attribList:C}=this,S=this.tag.attributes;for(const{name:x,value:k}of C)S[x]!==void 0&&this.fail(`duplicate attribute: ${x}.`),S[x]=k;this.attribList=[]}openTag(){var C;this.processAttribs();const{tags:S}=this,x=this.tag;x.isSelfClosing=!1,(C=this.openTagHandler)===null||C===void 0||C.call(this,x),S.push(x),this.state=13,this.name=""}openSelfClosingTag(){var C,S,x;this.processAttribs();const{tags:k}=this,L=this.tag;L.isSelfClosing=!0,(C=this.openTagHandler)===null||C===void 0||C.call(this,L),(S=this.closeTagHandler)===null||S===void 0||S.call(this,L),(this.tag=(x=k[k.length-1])!==null&&x!==void 0?x:null)===null&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:C,name:S}=this;if(this.state=13,this.name="",S==="")return this.fail("weird empty close tag."),void(this.text+="</>");const x=this.closeTagHandler;let k=C.length;for(;k-- >0;){const L=this.tag=C.pop();if(this.topNS=L.ns,x==null||x(L),L.name===S)break;this.fail("unexpected close tag.")}k===0?this.closedRoot=!0:k<0&&(this.fail(`unmatched closing tag: ${S}.`),this.text+=`</${S}>`)}parseEntity(C){if(C[0]!=="#"){const x=this.ENTITIES[C];return x!==void 0?x:(this.fail(this.isName(C)?"undefined entity.":"disallowed character in entity name."),`&${C};`)}let S=NaN;return C[1]==="x"&&/^#x[0-9a-f]+$/i.test(C)?S=parseInt(C.slice(2),16):/^#[0-9]+$/.test(C)&&(S=parseInt(C.slice(1),10)),this.isChar(S)?String.fromCodePoint(S):(this.fail("malformed character entity."),`&${C};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(r,n,o){var i=r("safe-buffer").Buffer;function a(s,c){this._block=i.alloc(s),this._finalSize=c,this._blockSize=s,this._len=0}a.prototype.update=function(s,c){typeof s=="string"&&(c=c||"utf8",s=i.from(s,c));for(var l=this._block,u=this._blockSize,f=s.length,d=this._len,h=0;h<f;){for(var p=d%u,g=Math.min(f-h,u-p),m=0;m<g;m++)l[p+m]=s[h+m];h+=g,(d+=g)%u==0&&this._update(l)}return this._len+=f,this},a.prototype.digest=function(s){var c=this._len%this._blockSize;this._block[c]=128,this._block.fill(0,c+1),c>=this._finalSize&&(this._update(this._block),this._block.fill(0));var l=8*this._len;if(l<=4294967295)this._block.writeUInt32BE(l,this._blockSize-4);else{var u=(4294967295&l)>>>0,f=(l-u)/4294967296;this._block.writeUInt32BE(f,this._blockSize-8),this._block.writeUInt32BE(u,this._blockSize-4)}this._update(this._block);var d=this._hash();return s?d.toString(s):d},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},n.exports=a},{"safe-buffer":494}],498:[function(r,n,o){var i=n.exports=function(a){a=a.toLowerCase();var s=i[a];if(!s)throw new Error(a+" is not supported (we accept pull requests)");return new s};i.sha=r("./sha"),i.sha1=r("./sha1"),i.sha224=r("./sha224"),i.sha256=r("./sha256"),i.sha384=r("./sha384"),i.sha512=r("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(r,n,o){var i=r("inherits"),a=r("./hash"),s=r("safe-buffer").Buffer,c=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function u(){this.init(),this._w=l,a.call(this,64,56)}function f(h){return h<<30|h>>>2}function d(h,p,g,m){return h===0?p&g|~p&m:h===2?p&g|p&m|g&m:p^g^m}i(u,a),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(h){for(var p,g=this._w,m=0|this._a,v=0|this._b,y=0|this._c,b=0|this._d,w=0|this._e,E=0;E<16;++E)g[E]=h.readInt32BE(4*E);for(;E<80;++E)g[E]=g[E-3]^g[E-8]^g[E-14]^g[E-16];for(var I=0;I<80;++I){var O=~~(I/20),D=0|((p=m)<<5|p>>>27)+d(O,v,y,b)+w+g[I]+c[O];w=b,b=y,y=f(v),v=m,m=D}this._a=m+this._a|0,this._b=v+this._b|0,this._c=y+this._c|0,this._d=b+this._d|0,this._e=w+this._e|0},u.prototype._hash=function(){var h=s.allocUnsafe(20);return h.writeInt32BE(0|this._a,0),h.writeInt32BE(0|this._b,4),h.writeInt32BE(0|this._c,8),h.writeInt32BE(0|this._d,12),h.writeInt32BE(0|this._e,16),h},n.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(r,n,o){var i=r("inherits"),a=r("./hash"),s=r("safe-buffer").Buffer,c=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function u(){this.init(),this._w=l,a.call(this,64,56)}function f(p){return p<<5|p>>>27}function d(p){return p<<30|p>>>2}function h(p,g,m,v){return p===0?g&m|~g&v:p===2?g&m|g&v|m&v:g^m^v}i(u,a),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(p){for(var g,m=this._w,v=0|this._a,y=0|this._b,b=0|this._c,w=0|this._d,E=0|this._e,I=0;I<16;++I)m[I]=p.readInt32BE(4*I);for(;I<80;++I)m[I]=(g=m[I-3]^m[I-8]^m[I-14]^m[I-16])<<1|g>>>31;for(var O=0;O<80;++O){var D=~~(O/20),N=f(v)+h(D,y,b,w)+E+m[O]+c[D]|0;E=w,w=b,b=d(y),y=v,v=N}this._a=v+this._a|0,this._b=y+this._b|0,this._c=b+this._c|0,this._d=w+this._d|0,this._e=E+this._e|0},u.prototype._hash=function(){var p=s.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=u},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(r,n,o){var i=r("inherits"),a=r("./sha256"),s=r("./hash"),c=r("safe-buffer").Buffer,l=new Array(64);function u(){this.init(),this._w=l,s.call(this,64,56)}i(u,a),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var f=c.allocUnsafe(28);return f.writeInt32BE(this._a,0),f.writeInt32BE(this._b,4),f.writeInt32BE(this._c,8),f.writeInt32BE(this._d,12),f.writeInt32BE(this._e,16),f.writeInt32BE(this._f,20),f.writeInt32BE(this._g,24),f},n.exports=u},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(r,n,o){var i=r("inherits"),a=r("./hash"),s=r("safe-buffer").Buffer,c=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=new Array(64);function u(){this.init(),this._w=l,a.call(this,64,56)}function f(m,v,y){return y^m&(v^y)}function d(m,v,y){return m&v|y&(m|v)}function h(m){return(m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10)}function p(m){return(m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7)}function g(m){return(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3}i(u,a),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(m){for(var v,y=this._w,b=0|this._a,w=0|this._b,E=0|this._c,I=0|this._d,O=0|this._e,D=0|this._f,N=0|this._g,U=0|this._h,B=0;B<16;++B)y[B]=m.readInt32BE(4*B);for(;B<64;++B)y[B]=0|(((v=y[B-2])>>>17|v<<15)^(v>>>19|v<<13)^v>>>10)+y[B-7]+g(y[B-15])+y[B-16];for(var F=0;F<64;++F){var T=U+p(O)+f(O,D,N)+c[F]+y[F]|0,P=h(b)+d(b,w,E)|0;U=N,N=D,D=O,O=I+T|0,I=E,E=w,w=b,b=T+P|0}this._a=b+this._a|0,this._b=w+this._b|0,this._c=E+this._c|0,this._d=I+this._d|0,this._e=O+this._e|0,this._f=D+this._f|0,this._g=N+this._g|0,this._h=U+this._h|0},u.prototype._hash=function(){var m=s.allocUnsafe(32);return m.writeInt32BE(this._a,0),m.writeInt32BE(this._b,4),m.writeInt32BE(this._c,8),m.writeInt32BE(this._d,12),m.writeInt32BE(this._e,16),m.writeInt32BE(this._f,20),m.writeInt32BE(this._g,24),m.writeInt32BE(this._h,28),m},n.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(r,n,o){var i=r("inherits"),a=r("./sha512"),s=r("./hash"),c=r("safe-buffer").Buffer,l=new Array(160);function u(){this.init(),this._w=l,s.call(this,128,112)}i(u,a),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var f=c.allocUnsafe(48);function d(h,p,g){f.writeInt32BE(h,g),f.writeInt32BE(p,g+4)}return d(this._ah,this._al,0),d(this._bh,this._bl,8),d(this._ch,this._cl,16),d(this._dh,this._dl,24),d(this._eh,this._el,32),d(this._fh,this._fl,40),f},n.exports=u},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(r,n,o){var i=r("inherits"),a=r("./hash"),s=r("safe-buffer").Buffer,c=[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],l=new Array(160);function u(){this.init(),this._w=l,a.call(this,128,112)}function f(w,E,I){return I^w&(E^I)}function d(w,E,I){return w&E|I&(w|E)}function h(w,E){return(w>>>28|E<<4)^(E>>>2|w<<30)^(E>>>7|w<<25)}function p(w,E){return(w>>>14|E<<18)^(w>>>18|E<<14)^(E>>>9|w<<23)}function g(w,E){return(w>>>1|E<<31)^(w>>>8|E<<24)^w>>>7}function m(w,E){return(w>>>1|E<<31)^(w>>>8|E<<24)^(w>>>7|E<<25)}function v(w,E){return(w>>>19|E<<13)^(E>>>29|w<<3)^w>>>6}function y(w,E){return(w>>>19|E<<13)^(E>>>29|w<<3)^(w>>>6|E<<26)}function b(w,E){return w>>>0<E>>>0?1:0}i(u,a),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(w){for(var E=this._w,I=0|this._ah,O=0|this._bh,D=0|this._ch,N=0|this._dh,U=0|this._eh,B=0|this._fh,F=0|this._gh,T=0|this._hh,P=0|this._al,_=0|this._bl,C=0|this._cl,S=0|this._dl,x=0|this._el,k=0|this._fl,L=0|this._gl,j=0|this._hl,z=0;z<32;z+=2)E[z]=w.readInt32BE(4*z),E[z+1]=w.readInt32BE(4*z+4);for(;z<160;z+=2){var Y=E[z-30],K=E[z-30+1],Q=g(Y,K),q=m(K,Y),J=v(Y=E[z-4],K=E[z-4+1]),G=y(K,Y),V=E[z-14],X=E[z-14+1],te=E[z-32],ee=E[z-32+1],re=q+X|0,se=Q+V+b(re,q)|0;se=(se=se+J+b(re=re+G|0,G)|0)+te+b(re=re+ee|0,ee)|0,E[z]=se,E[z+1]=re}for(var pe=0;pe<160;pe+=2){se=E[pe],re=E[pe+1];var ce=d(I,O,D),ne=d(P,_,C),he=h(I,P),oe=h(P,I),le=p(U,x),de=p(x,U),ve=c[pe],we=c[pe+1],ie=f(U,B,F),ge=f(x,k,L),Pe=j+de|0,Fe=T+le+b(Pe,j)|0;Fe=(Fe=(Fe=Fe+ie+b(Pe=Pe+ge|0,ge)|0)+ve+b(Pe=Pe+we|0,we)|0)+se+b(Pe=Pe+re|0,re)|0;var Ie=oe+ne|0,Oe=he+ce+b(Ie,oe)|0;T=F,j=L,F=B,L=k,B=U,k=x,U=N+Fe+b(x=S+Pe|0,S)|0,N=D,S=C,D=O,C=_,O=I,_=P,I=Fe+Oe+b(P=Pe+Ie|0,Pe)|0}this._al=this._al+P|0,this._bl=this._bl+_|0,this._cl=this._cl+C|0,this._dl=this._dl+S|0,this._el=this._el+x|0,this._fl=this._fl+k|0,this._gl=this._gl+L|0,this._hl=this._hl+j|0,this._ah=this._ah+I+b(this._al,P)|0,this._bh=this._bh+O+b(this._bl,_)|0,this._ch=this._ch+D+b(this._cl,C)|0,this._dh=this._dh+N+b(this._dl,S)|0,this._eh=this._eh+U+b(this._el,x)|0,this._fh=this._fh+B+b(this._fl,k)|0,this._gh=this._gh+F+b(this._gl,L)|0,this._hh=this._hh+T+b(this._hl,j)|0},u.prototype._hash=function(){var w=s.allocUnsafe(64);function E(I,O,D){w.writeInt32BE(I,D),w.writeInt32BE(O,D+4)}return E(this._ah,this._al,0),E(this._bh,this._bl,8),E(this._ch,this._cl,16),E(this._dh,this._dl,24),E(this._eh,this._el,32),E(this._fh,this._fl,40),E(this._gh,this._gl,48),E(this._hh,this._hl,56),w},n.exports=u},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(r,n,o){n.exports=a;var i=r("events").EventEmitter;function a(){i.call(this)}r("inherits")(a,i),a.Readable=r("readable-stream/readable.js"),a.Writable=r("readable-stream/writable.js"),a.Duplex=r("readable-stream/duplex.js"),a.Transform=r("readable-stream/transform.js"),a.PassThrough=r("readable-stream/passthrough.js"),a.Stream=a,a.prototype.pipe=function(s,c){var l=this;function u(v){s.writable&&s.write(v)===!1&&l.pause&&l.pause()}function f(){l.readable&&l.resume&&l.resume()}l.on("data",u),s.on("drain",f),s._isStdio||c&&c.end===!1||(l.on("end",h),l.on("close",p));var d=!1;function h(){d||(d=!0,s.end())}function p(){d||(d=!0,typeof s.destroy=="function"&&s.destroy())}function g(v){if(m(),i.listenerCount(this,"error")===0)throw v}function m(){l.removeListener("data",u),s.removeListener("drain",f),l.removeListener("end",h),l.removeListener("close",p),l.removeListener("error",g),s.removeListener("error",g),l.removeListener("end",m),l.removeListener("close",m),s.removeListener("close",m)}return l.on("error",g),s.on("error",g),l.on("end",m),l.on("close",m),s.on("close",m),s.emit("pipe",l),s}},{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(r,n,o){var i={}.toString;n.exports=Array.isArray||function(a){return i.call(a)=="[object Array]"}},{}],507:[function(r,n,o){n.exports=r("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(r,n,o){var i=r("process-nextick-args"),a=Object.keys||function(m){var v=[];for(var y in m)v.push(y);return v};n.exports=h;var s=Object.create(r("core-util-is"));s.inherits=r("inherits");var c=r("./_stream_readable"),l=r("./_stream_writable");s.inherits(h,c);for(var u=a(l.prototype),f=0;f<u.length;f++){var d=u[f];h.prototype[d]||(h.prototype[d]=l.prototype[d])}function h(m){if(!(this instanceof h))return new h(m);c.call(this,m),l.call(this,m),m&&m.readable===!1&&(this.readable=!1),m&&m.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,m&&m.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||i.nextTick(g,this)}function g(m){m.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(m){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=m,this._writableState.destroyed=m)}}),h.prototype._destroy=function(m,v){this.push(null),this.end(),i.nextTick(v,m)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(r,n,o){n.exports=s;var i=r("./_stream_transform"),a=Object.create(r("core-util-is"));function s(c){if(!(this instanceof s))return new s(c);i.call(this,c)}a.inherits=r("inherits"),a.inherits(s,i),s.prototype._transform=function(c,l,u){u(null,c)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(r,n,o){(function(i,a){(function(){var s=r("process-nextick-args");n.exports=I;var c,l=r("isarray");I.ReadableState=E,r("events").EventEmitter;var u=function(j,z){return j.listeners(z).length},f=r("./internal/streams/stream"),d=r("safe-buffer").Buffer,h=(a!==void 0?a:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},p=Object.create(r("core-util-is"));p.inherits=r("inherits");var g=r("util"),m=void 0;m=g&&g.debuglog?g.debuglog("stream"):function(){};var v,y=r("./internal/streams/BufferList"),b=r("./internal/streams/destroy");p.inherits(I,f);var w=["error","close","destroy","pause","resume"];function E(j,z){j=j||{};var Y=z instanceof(c=c||r("./_stream_duplex"));this.objectMode=!!j.objectMode,Y&&(this.objectMode=this.objectMode||!!j.readableObjectMode);var K=j.highWaterMark,Q=j.readableHighWaterMark,q=this.objectMode?16:16384;this.highWaterMark=K||K===0?K:Y&&(Q||Q===0)?Q:q,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=j.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,j.encoding&&(v||(v=r("string_decoder/").StringDecoder),this.decoder=new v(j.encoding),this.encoding=j.encoding)}function I(j){if(c=c||r("./_stream_duplex"),!(this instanceof I))return new I(j);this._readableState=new E(j,this),this.readable=!0,j&&(typeof j.read=="function"&&(this._read=j.read),typeof j.destroy=="function"&&(this._destroy=j.destroy)),f.call(this)}function O(j,z,Y,K,Q){var q,J=j._readableState;return z===null?(J.reading=!1,function(G,V){if(!V.ended){if(V.decoder){var X=V.decoder.end();X&&X.length&&(V.buffer.push(X),V.length+=V.objectMode?1:X.length)}V.ended=!0,U(G)}}(j,J)):(Q||(q=function(G,V){var X;te=V,d.isBuffer(te)||te instanceof h||typeof V=="string"||V===void 0||G.objectMode||(X=new TypeError("Invalid non-string/buffer chunk"));var te;return X}(J,z)),q?j.emit("error",q):J.objectMode||z&&z.length>0?(typeof z=="string"||J.objectMode||Object.getPrototypeOf(z)===d.prototype||(z=function(G){return d.from(G)}(z)),K?J.endEmitted?j.emit("error",new Error("stream.unshift() after end event")):D(j,J,z,!0):J.ended?j.emit("error",new Error("stream.push() after EOF")):(J.reading=!1,J.decoder&&!Y?(z=J.decoder.write(z),J.objectMode||z.length!==0?D(j,J,z,!1):F(j,J)):D(j,J,z,!1))):K||(J.reading=!1)),function(G){return!G.ended&&(G.needReadable||G.length<G.highWaterMark||G.length===0)}(J)}function D(j,z,Y,K){z.flowing&&z.length===0&&!z.sync?(j.emit("data",Y),j.read(0)):(z.length+=z.objectMode?1:Y.length,K?z.buffer.unshift(Y):z.buffer.push(Y),z.needReadable&&U(j)),F(j,z)}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(j){this._readableState&&(this._readableState.destroyed=j)}}),I.prototype.destroy=b.destroy,I.prototype._undestroy=b.undestroy,I.prototype._destroy=function(j,z){this.push(null),z(j)},I.prototype.push=function(j,z){var Y,K=this._readableState;return K.objectMode?Y=!0:typeof j=="string"&&((z=z||K.defaultEncoding)!==K.encoding&&(j=d.from(j,z),z=""),Y=!0),O(this,j,z,!1,Y)},I.prototype.unshift=function(j){return O(this,j,null,!0,!1)},I.prototype.isPaused=function(){return this._readableState.flowing===!1},I.prototype.setEncoding=function(j){return v||(v=r("string_decoder/").StringDecoder),this._readableState.decoder=new v(j),this._readableState.encoding=j,this};function N(j,z){return j<=0||z.length===0&&z.ended?0:z.objectMode?1:j!=j?z.flowing&&z.length?z.buffer.head.data.length:z.length:(j>z.highWaterMark&&(z.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}(j)),j<=z.length?j:z.ended?z.length:(z.needReadable=!0,0))}function U(j){var z=j._readableState;z.needReadable=!1,z.emittedReadable||(m("emitReadable",z.flowing),z.emittedReadable=!0,z.sync?s.nextTick(B,j):B(j))}function B(j){m("emit readable"),j.emit("readable"),C(j)}function F(j,z){z.readingMore||(z.readingMore=!0,s.nextTick(T,j,z))}function T(j,z){for(var Y=z.length;!z.reading&&!z.flowing&&!z.ended&&z.length<z.highWaterMark&&(m("maybeReadMore read 0"),j.read(0),Y!==z.length);)Y=z.length;z.readingMore=!1}function P(j){m("readable nexttick read 0"),j.read(0)}function _(j,z){z.reading||(m("resume read 0"),j.read(0)),z.resumeScheduled=!1,z.awaitDrain=0,j.emit("resume"),C(j),z.flowing&&!z.reading&&j.read(0)}function C(j){var z=j._readableState;for(m("flow",z.flowing);z.flowing&&j.read()!==null;);}function S(j,z){return z.length===0?null:(z.objectMode?Y=z.buffer.shift():!j||j>=z.length?(Y=z.decoder?z.buffer.join(""):z.buffer.length===1?z.buffer.head.data:z.buffer.concat(z.length),z.buffer.clear()):Y=function(K,Q,q){var J;return K<Q.head.data.length?(J=Q.head.data.slice(0,K),Q.head.data=Q.head.data.slice(K)):J=K===Q.head.data.length?Q.shift():q?function(G,V){var X=V.head,te=1,ee=X.data;for(G-=ee.length;X=X.next;){var re=X.data,se=G>re.length?re.length:G;if(se===re.length?ee+=re:ee+=re.slice(0,G),(G-=se)===0){se===re.length?(++te,X.next?V.head=X.next:V.head=V.tail=null):(V.head=X,X.data=re.slice(se));break}++te}return V.length-=te,ee}(K,Q):function(G,V){var X=d.allocUnsafe(G),te=V.head,ee=1;for(te.data.copy(X),G-=te.data.length;te=te.next;){var re=te.data,se=G>re.length?re.length:G;if(re.copy(X,X.length-G,0,se),(G-=se)===0){se===re.length?(++ee,te.next?V.head=te.next:V.head=V.tail=null):(V.head=te,te.data=re.slice(se));break}++ee}return V.length-=ee,X}(K,Q),J}(j,z.buffer,z.decoder),Y);var Y}function x(j){var z=j._readableState;if(z.length>0)throw new Error('"endReadable()" called on non-empty stream');z.endEmitted||(z.ended=!0,s.nextTick(k,z,j))}function k(j,z){j.endEmitted||j.length!==0||(j.endEmitted=!0,z.readable=!1,z.emit("end"))}function L(j,z){for(var Y=0,K=j.length;Y<K;Y++)if(j[Y]===z)return Y;return-1}I.prototype.read=function(j){m("read",j),j=parseInt(j,10);var z=this._readableState,Y=j;if(j!==0&&(z.emittedReadable=!1),j===0&&z.needReadable&&(z.length>=z.highWaterMark||z.ended))return m("read: emitReadable",z.length,z.ended),z.length===0&&z.ended?x(this):U(this),null;if((j=N(j,z))===0&&z.ended)return z.length===0&&x(this),null;var K,Q=z.needReadable;return m("need readable",Q),(z.length===0||z.length-j<z.highWaterMark)&&m("length less than watermark",Q=!0),z.ended||z.reading?m("reading or ended",Q=!1):Q&&(m("do read"),z.reading=!0,z.sync=!0,z.length===0&&(z.needReadable=!0),this._read(z.highWaterMark),z.sync=!1,z.reading||(j=N(Y,z))),(K=j>0?S(j,z):null)===null?(z.needReadable=!0,j=0):z.length-=j,z.length===0&&(z.ended||(z.needReadable=!0),Y!==j&&z.ended&&x(this)),K!==null&&this.emit("data",K),K},I.prototype._read=function(j){this.emit("error",new Error("_read() is not implemented"))},I.prototype.pipe=function(j,z){var Y=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=j;break;case 1:K.pipes=[K.pipes,j];break;default:K.pipes.push(j)}K.pipesCount+=1,m("pipe count=%d opts=%j",K.pipesCount,z);var Q=(!z||z.end!==!1)&&j!==i.stdout&&j!==i.stderr?J:pe;function q(ce,ne){m("onunpipe"),ce===Y&&ne&&ne.hasUnpiped===!1&&(ne.hasUnpiped=!0,m("cleanup"),j.removeListener("close",re),j.removeListener("finish",se),j.removeListener("drain",G),j.removeListener("error",ee),j.removeListener("unpipe",q),Y.removeListener("end",J),Y.removeListener("end",pe),Y.removeListener("data",te),V=!0,!K.awaitDrain||j._writableState&&!j._writableState.needDrain||G())}function J(){m("onend"),j.end()}K.endEmitted?s.nextTick(Q):Y.once("end",Q),j.on("unpipe",q);var G=function(ce){return function(){var ne=ce._readableState;m("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&u(ce,"data")&&(ne.flowing=!0,C(ce))}}(Y);j.on("drain",G);var V=!1,X=!1;function te(ce){m("ondata"),X=!1,j.write(ce)!==!1||X||((K.pipesCount===1&&K.pipes===j||K.pipesCount>1&&L(K.pipes,j)!==-1)&&!V&&(m("false write response, pause",K.awaitDrain),K.awaitDrain++,X=!0),Y.pause())}function ee(ce){m("onerror",ce),pe(),j.removeListener("error",ee),u(j,"error")===0&&j.emit("error",ce)}function re(){j.removeListener("finish",se),pe()}function se(){m("onfinish"),j.removeListener("close",re),pe()}function pe(){m("unpipe"),Y.unpipe(j)}return Y.on("data",te),function(ce,ne,he){if(typeof ce.prependListener=="function")return ce.prependListener(ne,he);ce._events&&ce._events[ne]?l(ce._events[ne])?ce._events[ne].unshift(he):ce._events[ne]=[he,ce._events[ne]]:ce.on(ne,he)}(j,"error",ee),j.once("close",re),j.once("finish",se),j.emit("pipe",Y),K.flowing||(m("pipe resume"),Y.resume()),j},I.prototype.unpipe=function(j){var z=this._readableState,Y={hasUnpiped:!1};if(z.pipesCount===0)return this;if(z.pipesCount===1)return j&&j!==z.pipes||(j||(j=z.pipes),z.pipes=null,z.pipesCount=0,z.flowing=!1,j&&j.emit("unpipe",this,Y)),this;if(!j){var K=z.pipes,Q=z.pipesCount;z.pipes=null,z.pipesCount=0,z.flowing=!1;for(var q=0;q<Q;q++)K[q].emit("unpipe",this,{hasUnpiped:!1});return this}var J=L(z.pipes,j);return J===-1||(z.pipes.splice(J,1),z.pipesCount-=1,z.pipesCount===1&&(z.pipes=z.pipes[0]),j.emit("unpipe",this,Y)),this},I.prototype.on=function(j,z){var Y=f.prototype.on.call(this,j,z);if(j==="data")this._readableState.flowing!==!1&&this.resume();else if(j==="readable"){var K=this._readableState;K.endEmitted||K.readableListening||(K.readableListening=K.needReadable=!0,K.emittedReadable=!1,K.reading?K.length&&U(this):s.nextTick(P,this))}return Y},I.prototype.addListener=I.prototype.on,I.prototype.resume=function(){var j=this._readableState;return j.flowing||(m("resume"),j.flowing=!0,function(z,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,s.nextTick(_,z,Y))}(this,j)),this},I.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this},I.prototype.wrap=function(j){var z=this,Y=this._readableState,K=!1;for(var Q in j.on("end",function(){if(m("wrapped end"),Y.decoder&&!Y.ended){var J=Y.decoder.end();J&&J.length&&z.push(J)}z.push(null)}),j.on("data",function(J){m("wrapped data"),Y.decoder&&(J=Y.decoder.write(J)),Y.objectMode&&J==null||(Y.objectMode||J&&J.length)&&(z.push(J)||(K=!0,j.pause()))}),j)this[Q]===void 0&&typeof j[Q]=="function"&&(this[Q]=function(J){return function(){return j[J].apply(j,arguments)}}(Q));for(var q=0;q<w.length;q++)j.on(w[q],this.emit.bind(this,w[q]));return this._read=function(J){m("wrapped _read",J),K&&(K=!1,j.resume())},this},Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),I._fromList=S}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er: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(r,n,o){n.exports=c;var i=r("./_stream_duplex"),a=Object.create(r("core-util-is"));function s(f,d){var h=this._transformState;h.transforming=!1;var p=h.writecb;if(!p)return this.emit("error",new Error("write callback called multiple times"));h.writechunk=null,h.writecb=null,d!=null&&this.push(d),p(f);var g=this._readableState;g.reading=!1,(g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}function c(f){if(!(this instanceof c))return new c(f);i.call(this,f),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",l)}function l(){var f=this;typeof this._flush=="function"?this._flush(function(d,h){u(f,d,h)}):u(this,null,null)}function u(f,d,h){if(d)return f.emit("error",d);if(h!=null&&f.push(h),f._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(f._transformState.transforming)throw new Error("Calling transform done when still transforming");return f.push(null)}a.inherits=r("inherits"),a.inherits(c,i),c.prototype.push=function(f,d){return this._transformState.needTransform=!1,i.prototype.push.call(this,f,d)},c.prototype._transform=function(f,d,h){throw new Error("_transform() is not implemented")},c.prototype._write=function(f,d,h){var p=this._transformState;if(p.writecb=h,p.writechunk=f,p.writeencoding=d,!p.transforming){var g=this._readableState;(p.needTransform||g.needReadable||g.length<g.highWaterMark)&&this._read(g.highWaterMark)}},c.prototype._read=function(f){var d=this._transformState;d.writechunk!==null&&d.writecb&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},c.prototype._destroy=function(f,d){var h=this;i.prototype._destroy.call(this,f,function(p){d(p),h.emit("close")})}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(r,n,o){(function(i,a,s){(function(){var c=r("process-nextick-args");function l(F){var T=this;this.next=null,this.entry=null,this.finish=function(){(function(P,_,C){var S=P.entry;for(P.entry=null;S;){var x=S.callback;_.pendingcb--,x(C),S=S.next}_.corkedRequestsFree.next=P})(T,F)}}n.exports=E;var u,f=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-1?s:c.nextTick;E.WritableState=w;var d=Object.create(r("core-util-is"));d.inherits=r("inherits");var h={deprecate:r("util-deprecate")},p=r("./internal/streams/stream"),g=r("safe-buffer").Buffer,m=(a!==void 0?a:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},v,y=r("./internal/streams/destroy");function b(){}function w(F,T){u=u||r("./_stream_duplex"),F=F||{};var P=T instanceof u;this.objectMode=!!F.objectMode,P&&(this.objectMode=this.objectMode||!!F.writableObjectMode);var _=F.highWaterMark,C=F.writableHighWaterMark,S=this.objectMode?16:16384;this.highWaterMark=_||_===0?_:P&&(C||C===0)?C:S,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var x=F.decodeStrings===!1;this.decodeStrings=!x,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(k){(function(L,j){var z=L._writableState,Y=z.sync,K=z.writecb;if(function(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}(z),j)(function(q,J,G,V,X){--J.pendingcb,G?(c.nextTick(X,V),c.nextTick(B,q,J),q._writableState.errorEmitted=!0,q.emit("error",V)):(X(V),q._writableState.errorEmitted=!0,q.emit("error",V),B(q,J))})(L,z,Y,j,K);else{var Q=N(z);Q||z.corked||z.bufferProcessing||!z.bufferedRequest||D(L,z),Y?f(O,L,z,Q,K):O(L,z,Q,K)}})(T,k)},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 l(this)}function E(F){if(u=u||r("./_stream_duplex"),!(v.call(E,this)||this instanceof u))return new E(F);this._writableState=new w(F,this),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),p.call(this)}function I(F,T,P,_,C,S,x){T.writelen=_,T.writecb=x,T.writing=!0,T.sync=!0,P?F._writev(C,T.onwrite):F._write(C,S,T.onwrite),T.sync=!1}function O(F,T,P,_){P||function(C,S){S.length===0&&S.needDrain&&(S.needDrain=!1,C.emit("drain"))}(F,T),T.pendingcb--,_(),B(F,T)}function D(F,T){T.bufferProcessing=!0;var P=T.bufferedRequest;if(F._writev&&P&&P.next){var _=T.bufferedRequestCount,C=new Array(_),S=T.corkedRequestsFree;S.entry=P;for(var x=0,k=!0;P;)C[x]=P,P.isBuf||(k=!1),P=P.next,x+=1;C.allBuffers=k,I(F,T,!0,T.length,C,"",S.finish),T.pendingcb++,T.lastBufferedRequest=null,S.next?(T.corkedRequestsFree=S.next,S.next=null):T.corkedRequestsFree=new l(T),T.bufferedRequestCount=0}else{for(;P;){var L=P.chunk,j=P.encoding,z=P.callback;if(I(F,T,!1,T.objectMode?1:L.length,L,j,z),P=P.next,T.bufferedRequestCount--,T.writing)break}P===null&&(T.lastBufferedRequest=null)}T.bufferedRequest=P,T.bufferProcessing=!1}function N(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function U(F,T){F._final(function(P){T.pendingcb--,P&&F.emit("error",P),T.prefinished=!0,F.emit("prefinish"),B(F,T)})}function B(F,T){var P=N(T);return P&&(function(_,C){C.prefinished||C.finalCalled||(typeof _._final=="function"?(C.pendingcb++,C.finalCalled=!0,c.nextTick(U,_,C)):(C.prefinished=!0,_.emit("prefinish")))}(F,T),T.pendingcb===0&&(T.finished=!0,F.emit("finish"))),P}d.inherits(E,p),w.prototype.getBuffer=function(){for(var F=this.bufferedRequest,T=[];F;)T.push(F),F=F.next;return T},function(){try{Object.defineProperty(w.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(v=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(F){return!!v.call(this,F)||this===E&&F&&F._writableState instanceof w}})):v=function(F){return F instanceof this},E.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},E.prototype.write=function(F,T,P){var _,C=this._writableState,S=!1,x=!C.objectMode&&(_=F,g.isBuffer(_)||_ instanceof m);return x&&!g.isBuffer(F)&&(F=function(k){return g.from(k)}(F)),typeof T=="function"&&(P=T,T=null),x?T="buffer":T||(T=C.defaultEncoding),typeof P!="function"&&(P=b),C.ended?function(k,L){var j=new Error("write after end");k.emit("error",j),c.nextTick(L,j)}(this,P):(x||function(k,L,j,z){var Y=!0,K=!1;return j===null?K=new TypeError("May not write null values to stream"):typeof j=="string"||j===void 0||L.objectMode||(K=new TypeError("Invalid non-string/buffer chunk")),K&&(k.emit("error",K),c.nextTick(z,K),Y=!1),Y}(this,C,F,P))&&(C.pendingcb++,S=function(k,L,j,z,Y,K){if(!j){var Q=function(V,X,te){return V.objectMode||V.decodeStrings===!1||typeof X!="string"||(X=g.from(X,te)),X}(L,z,Y);z!==Q&&(j=!0,Y="buffer",z=Q)}var q=L.objectMode?1:z.length;L.length+=q;var J=L.length<L.highWaterMark;if(J||(L.needDrain=!0),L.writing||L.corked){var G=L.lastBufferedRequest;L.lastBufferedRequest={chunk:z,encoding:Y,isBuf:j,callback:K,next:null},G?G.next=L.lastBufferedRequest:L.bufferedRequest=L.lastBufferedRequest,L.bufferedRequestCount+=1}else I(k,L,!1,q,z,Y,K);return J}(this,C,x,F,T,P)),S},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,F.writing||F.corked||F.bufferProcessing||!F.bufferedRequest||D(this,F))},E.prototype.setDefaultEncoding=function(F){if(typeof F=="string"&&(F=F.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((F+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+F);return this._writableState.defaultEncoding=F,this},Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(F,T,P){P(new Error("_write() is not implemented"))},E.prototype._writev=null,E.prototype.end=function(F,T,P){var _=this._writableState;typeof F=="function"?(P=F,F=null,T=null):typeof T=="function"&&(P=T,T=null),F!=null&&this.write(F,T),_.corked&&(_.corked=1,this.uncork()),_.ending||function(C,S,x){S.ending=!0,B(C,S),x&&(S.finished?c.nextTick(x):C.once("finish",x)),S.ended=!0,C.writable=!1}(this,_,P)},Object.defineProperty(E.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),E.prototype.destroy=y.destroy,E.prototype._undestroy=y.undestroy,E.prototype._destroy=function(F,T){this.end(),T(F)}}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{},r("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(r,n,o){var i=r("safe-buffer").Buffer,a=r("util");n.exports=function(){function s(){(function(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}return s.prototype.push=function(c){var l={data:c,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length},s.prototype.unshift=function(c){var l={data:c,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length},s.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},s.prototype.clear=function(){this.head=this.tail=null,this.length=0},s.prototype.join=function(c){if(this.length===0)return"";for(var l=this.head,u=""+l.data;l=l.next;)u+=c+l.data;return u},s.prototype.concat=function(c){if(this.length===0)return i.alloc(0);for(var l,u,f,d=i.allocUnsafe(c>>>0),h=this.head,p=0;h;)l=h.data,u=d,f=p,l.copy(u,f),p+=h.data.length,h=h.next;return d},s}(),a&&a.inspect&&a.inspect.custom&&(n.exports.prototype[a.inspect.custom]=function(){var s=a.inspect({length:this.length});return this.constructor.name+" "+s})},{"safe-buffer":520,util:188}],514:[function(r,n,o){var i=r("process-nextick-args");function a(s,c){s.emit("error",c)}n.exports={destroy:function(s,c){var l=this,u=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return u||f?(c?c(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,i.nextTick(a,this,s)):i.nextTick(a,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,function(d){!c&&d?l._writableState?l._writableState.errorEmitted||(l._writableState.errorEmitted=!0,i.nextTick(a,l,d)):i.nextTick(a,l,d):c&&c(d)}),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(r,n,o){arguments[4][490][0].apply(o,arguments)},{dup:490,events:422}],516:[function(r,n,o){n.exports=r("./readable").PassThrough},{"./readable":517}],517:[function(r,n,o){(o=n.exports=r("./lib/_stream_readable.js")).Stream=o,o.Readable=o,o.Writable=r("./lib/_stream_writable.js"),o.Duplex=r("./lib/_stream_duplex.js"),o.Transform=r("./lib/_stream_transform.js"),o.PassThrough=r("./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(r,n,o){n.exports=r("./readable").Transform},{"./readable":517}],519:[function(r,n,o){n.exports=r("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(r,n,o){arguments[4][217][0].apply(o,arguments)},{buffer:220,dup:217}],521:[function(r,n,o){arguments[4][218][0].apply(o,arguments)},{dup:218,"safe-buffer":520}],522:[function(r,n,o){arguments[4][218][0].apply(o,arguments)},{dup:218,"safe-buffer":494}],523:[function(r,n,o){(function(i,a){(function(){var s=r("process/browser.js").nextTick,c=Function.prototype.apply,l=Array.prototype.slice,u={},f=0;function d(h,p){this._id=h,this._clearFn=p}o.setTimeout=function(){return new d(c.call(setTimeout,window,arguments),clearTimeout)},o.setInterval=function(){return new d(c.call(setInterval,window,arguments),clearInterval)},o.clearTimeout=o.clearInterval=function(h){h.close()},d.prototype.unref=d.prototype.ref=function(){},d.prototype.close=function(){this._clearFn.call(window,this._id)},o.enroll=function(h,p){clearTimeout(h._idleTimeoutId),h._idleTimeout=p},o.unenroll=function(h){clearTimeout(h._idleTimeoutId),h._idleTimeout=-1},o._unrefActive=o.active=function(h){clearTimeout(h._idleTimeoutId);var p=h._idleTimeout;p>=0&&(h._idleTimeoutId=setTimeout(function(){h._onTimeout&&h._onTimeout()},p))},o.setImmediate=typeof i=="function"?i:function(h){var p=f++,g=!(arguments.length<2)&&l.call(arguments,1);return u[p]=!0,s(function(){u[p]&&(g?h.apply(null,g):h.call(null),o.clearImmediate(p))}),p},o.clearImmediate=typeof a=="function"?a:function(h){delete u[h]}}).call(this)}).call(this,r("timers").setImmediate,r("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(r,n,o){(function(i){(function(){function a(s){try{if(!i.localStorage)return!1}catch{return!1}var c=i.localStorage[s];return c!=null&&String(c).toLowerCase()==="true"}n.exports=function(s,c){if(a("noDeprecation"))return s;var l=!1;return function(){if(!l){if(a("throwDeprecation"))throw new Error(c);a("traceDeprecation")?console.trace(c):console.warn(c),l=!0}return s.apply(this,arguments)}}}).call(this)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(r,n,o){typeof Object.create=="function"?n.exports=function(i,a){i.super_=a,i.prototype=Object.create(a.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}})}:n.exports=function(i,a){i.super_=a;var s=function(){};s.prototype=a.prototype,i.prototype=new s,i.prototype.constructor=i}},{}],526:[function(r,n,o){n.exports=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}},{}],527:[function(r,n,o){(function(i,a){(function(){var s=/%[sdj%]/g;o.format=function(C){if(!w(C)){for(var S=[],x=0;x<arguments.length;x++)S.push(u(arguments[x]));return S.join(" ")}x=1;for(var k=arguments,L=k.length,j=String(C).replace(s,function(Y){if(Y==="%%")return"%";if(x>=L)return Y;switch(Y){case"%s":return String(k[x++]);case"%d":return Number(k[x++]);case"%j":try{return JSON.stringify(k[x++])}catch{return"[Circular]"}default:return Y}}),z=k[x];x<L;z=k[++x])y(z)||!O(z)?j+=" "+z:j+=" "+u(z);return j},o.deprecate=function(C,S){if(E(a.process))return function(){return o.deprecate(C,S).apply(this,arguments)};if(i.noDeprecation===!0)return C;var x=!1;return function(){if(!x){if(i.throwDeprecation)throw new Error(S);i.traceDeprecation?console.trace(S):console.error(S),x=!0}return C.apply(this,arguments)}};var c,l={};function u(C,S){var x={seen:[],stylize:d};return arguments.length>=3&&(x.depth=arguments[2]),arguments.length>=4&&(x.colors=arguments[3]),v(S)?x.showHidden=S:S&&o._extend(x,S),E(x.showHidden)&&(x.showHidden=!1),E(x.depth)&&(x.depth=2),E(x.colors)&&(x.colors=!1),E(x.customInspect)&&(x.customInspect=!0),x.colors&&(x.stylize=f),h(x,C,x.depth)}function f(C,S){var x=u.styles[S];return x?"\x1B["+u.colors[x][0]+"m"+C+"\x1B["+u.colors[x][1]+"m":C}function d(C,S){return C}function h(C,S,x){if(C.customInspect&&S&&U(S.inspect)&&S.inspect!==o.inspect&&(!S.constructor||S.constructor.prototype!==S)){var k=S.inspect(x,C);return w(k)||(k=h(C,k,x)),k}var L=function(G,V){if(E(V))return G.stylize("undefined","undefined");if(w(V)){var X="'"+JSON.stringify(V).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return G.stylize(X,"string")}if(b(V))return G.stylize(""+V,"number");if(v(V))return G.stylize(""+V,"boolean");if(y(V))return G.stylize("null","null")}(C,S);if(L)return L;var j=Object.keys(S),z=function(G){var V={};return G.forEach(function(X,te){V[X]=!0}),V}(j);if(C.showHidden&&(j=Object.getOwnPropertyNames(S)),N(S)&&(j.indexOf("message")>=0||j.indexOf("description")>=0))return p(S);if(j.length===0){if(U(S)){var Y=S.name?": "+S.name:"";return C.stylize("[Function"+Y+"]","special")}if(I(S))return C.stylize(RegExp.prototype.toString.call(S),"regexp");if(D(S))return C.stylize(Date.prototype.toString.call(S),"date");if(N(S))return p(S)}var K,Q="",q=!1,J=["{","}"];return m(S)&&(q=!0,J=["[","]"]),U(S)&&(Q=" [Function"+(S.name?": "+S.name:"")+"]"),I(S)&&(Q=" "+RegExp.prototype.toString.call(S)),D(S)&&(Q=" "+Date.prototype.toUTCString.call(S)),N(S)&&(Q=" "+p(S)),j.length!==0||q&&S.length!=0?x<0?I(S)?C.stylize(RegExp.prototype.toString.call(S),"regexp"):C.stylize("[Object]","special"):(C.seen.push(S),K=q?function(G,V,X,te,ee){for(var re=[],se=0,pe=V.length;se<pe;++se)_(V,String(se))?re.push(g(G,V,X,te,String(se),!0)):re.push("");return ee.forEach(function(ce){ce.match(/^\d+$/)||re.push(g(G,V,X,te,ce,!0))}),re}(C,S,x,z,j):j.map(function(G){return g(C,S,x,z,G,q)}),C.seen.pop(),function(G,V,X){return G.reduce(function(te,ee){return ee.indexOf(`
`)>=0,te+ee.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?X[0]+(V===""?"":V+`
 `)+" "+G.join(`,
  `)+" "+X[1]:X[0]+V+" "+G.join(", ")+" "+X[1]}(K,Q,J)):J[0]+Q+J[1]}function p(C){return"["+Error.prototype.toString.call(C)+"]"}function g(C,S,x,k,L,j){var z,Y,K;if((K=Object.getOwnPropertyDescriptor(S,L)||{value:S[L]}).get?Y=K.set?C.stylize("[Getter/Setter]","special"):C.stylize("[Getter]","special"):K.set&&(Y=C.stylize("[Setter]","special")),_(k,L)||(z="["+L+"]"),Y||(C.seen.indexOf(K.value)<0?(Y=y(x)?h(C,K.value,null):h(C,K.value,x-1)).indexOf(`
`)>-1&&(Y=j?Y.split(`
`).map(function(Q){return"  "+Q}).join(`
`).substr(2):`
`+Y.split(`
`).map(function(Q){return"   "+Q}).join(`
`)):Y=C.stylize("[Circular]","special")),E(z)){if(j&&L.match(/^\d+$/))return Y;(z=JSON.stringify(""+L)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(z=z.substr(1,z.length-2),z=C.stylize(z,"name")):(z=z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),z=C.stylize(z,"string"))}return z+": "+Y}function m(C){return Array.isArray(C)}function v(C){return typeof C=="boolean"}function y(C){return C===null}function b(C){return typeof C=="number"}function w(C){return typeof C=="string"}function E(C){return C===void 0}function I(C){return O(C)&&B(C)==="[object RegExp]"}function O(C){return typeof C=="object"&&C!==null}function D(C){return O(C)&&B(C)==="[object Date]"}function N(C){return O(C)&&(B(C)==="[object Error]"||C instanceof Error)}function U(C){return typeof C=="function"}function B(C){return Object.prototype.toString.call(C)}function F(C){return C<10?"0"+C.toString(10):C.toString(10)}o.debuglog=function(C){if(E(c)&&(c=i.env.NODE_DEBUG||""),C=C.toUpperCase(),!l[C])if(new RegExp("\\b"+C+"\\b","i").test(c)){var S=i.pid;l[C]=function(){var x=o.format.apply(o,arguments);console.error("%s %d: %s",C,S,x)}}else l[C]=function(){};return l[C]},o.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},o.isArray=m,o.isBoolean=v,o.isNull=y,o.isNullOrUndefined=function(C){return C==null},o.isNumber=b,o.isString=w,o.isSymbol=function(C){return typeof C=="symbol"},o.isUndefined=E,o.isRegExp=I,o.isObject=O,o.isDate=D,o.isError=N,o.isFunction=U,o.isPrimitive=function(C){return C===null||typeof C=="boolean"||typeof C=="number"||typeof C=="string"||typeof C=="symbol"||C===void 0},o.isBuffer=r("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var C=new Date,S=[F(C.getHours()),F(C.getMinutes()),F(C.getSeconds())].join(":");return[C.getDate(),T[C.getMonth()],S].join(" ")}function _(C,S){return Object.prototype.hasOwnProperty.call(C,S)}o.log=function(){console.log("%s - %s",P(),o.format.apply(o,arguments))},o.inherits=r("inherits"),o._extend=function(C,S){if(!S||!O(S))return C;for(var x=Object.keys(S),k=x.length;k--;)C[x[k]]=S[x[k]];return C}}).call(this)}).call(this,r("_process"),typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"v1",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(o,"v3",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(o,"v4",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(o,"v5",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(o,"NIL",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(o,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(o,"validate",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(o,"stringify",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(o,"parse",{enumerable:!0,get:function(){return h.default}});var i=p(r("./v1.js")),a=p(r("./v3.js")),s=p(r("./v4.js")),c=p(r("./v5.js")),l=p(r("./nil.js")),u=p(r("./version.js")),f=p(r("./validate.js")),d=p(r("./stringify.js")),h=p(r("./parse.js"));function p(g){return g&&g.__esModule?g:{default:g}}},{"./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(r,n,o){function i(h){return 14+(h+64>>>9<<4)+1}function a(h,p){const g=(65535&h)+(65535&p);return(h>>16)+(p>>16)+(g>>16)<<16|65535&g}function s(h,p,g,m,v,y){return a((b=a(a(p,h),a(m,y)))<<(w=v)|b>>>32-w,g);var b,w}function c(h,p,g,m,v,y,b){return s(p&g|~p&m,h,p,v,y,b)}function l(h,p,g,m,v,y,b){return s(p&m|g&~m,h,p,v,y,b)}function u(h,p,g,m,v,y,b){return s(p^g^m,h,p,v,y,b)}function f(h,p,g,m,v,y,b){return s(g^(p|~m),h,p,v,y,b)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var d=function(h){if(typeof h=="string"){const p=unescape(encodeURIComponent(h));h=new Uint8Array(p.length);for(let g=0;g<p.length;++g)h[g]=p.charCodeAt(g)}return function(p){const g=[],m=32*p.length;for(let v=0;v<m;v+=8){const y=p[v>>5]>>>v%32&255,b=parseInt("0123456789abcdef".charAt(y>>>4&15)+"0123456789abcdef".charAt(15&y),16);g.push(b)}return g}(function(p,g){p[g>>5]|=128<<g%32,p[i(g)-1]=g;let m=1732584193,v=-271733879,y=-1732584194,b=271733878;for(let w=0;w<p.length;w+=16){const E=m,I=v,O=y,D=b;m=c(m,v,y,b,p[w],7,-680876936),b=c(b,m,v,y,p[w+1],12,-389564586),y=c(y,b,m,v,p[w+2],17,606105819),v=c(v,y,b,m,p[w+3],22,-1044525330),m=c(m,v,y,b,p[w+4],7,-176418897),b=c(b,m,v,y,p[w+5],12,1200080426),y=c(y,b,m,v,p[w+6],17,-1473231341),v=c(v,y,b,m,p[w+7],22,-45705983),m=c(m,v,y,b,p[w+8],7,1770035416),b=c(b,m,v,y,p[w+9],12,-1958414417),y=c(y,b,m,v,p[w+10],17,-42063),v=c(v,y,b,m,p[w+11],22,-1990404162),m=c(m,v,y,b,p[w+12],7,1804603682),b=c(b,m,v,y,p[w+13],12,-40341101),y=c(y,b,m,v,p[w+14],17,-1502002290),v=c(v,y,b,m,p[w+15],22,1236535329),m=l(m,v,y,b,p[w+1],5,-165796510),b=l(b,m,v,y,p[w+6],9,-1069501632),y=l(y,b,m,v,p[w+11],14,643717713),v=l(v,y,b,m,p[w],20,-373897302),m=l(m,v,y,b,p[w+5],5,-701558691),b=l(b,m,v,y,p[w+10],9,38016083),y=l(y,b,m,v,p[w+15],14,-660478335),v=l(v,y,b,m,p[w+4],20,-405537848),m=l(m,v,y,b,p[w+9],5,568446438),b=l(b,m,v,y,p[w+14],9,-1019803690),y=l(y,b,m,v,p[w+3],14,-187363961),v=l(v,y,b,m,p[w+8],20,1163531501),m=l(m,v,y,b,p[w+13],5,-1444681467),b=l(b,m,v,y,p[w+2],9,-51403784),y=l(y,b,m,v,p[w+7],14,1735328473),v=l(v,y,b,m,p[w+12],20,-1926607734),m=u(m,v,y,b,p[w+5],4,-378558),b=u(b,m,v,y,p[w+8],11,-2022574463),y=u(y,b,m,v,p[w+11],16,1839030562),v=u(v,y,b,m,p[w+14],23,-35309556),m=u(m,v,y,b,p[w+1],4,-1530992060),b=u(b,m,v,y,p[w+4],11,1272893353),y=u(y,b,m,v,p[w+7],16,-155497632),v=u(v,y,b,m,p[w+10],23,-1094730640),m=u(m,v,y,b,p[w+13],4,681279174),b=u(b,m,v,y,p[w],11,-358537222),y=u(y,b,m,v,p[w+3],16,-722521979),v=u(v,y,b,m,p[w+6],23,76029189),m=u(m,v,y,b,p[w+9],4,-640364487),b=u(b,m,v,y,p[w+12],11,-421815835),y=u(y,b,m,v,p[w+15],16,530742520),v=u(v,y,b,m,p[w+2],23,-995338651),m=f(m,v,y,b,p[w],6,-198630844),b=f(b,m,v,y,p[w+7],10,1126891415),y=f(y,b,m,v,p[w+14],15,-1416354905),v=f(v,y,b,m,p[w+5],21,-57434055),m=f(m,v,y,b,p[w+12],6,1700485571),b=f(b,m,v,y,p[w+3],10,-1894986606),y=f(y,b,m,v,p[w+10],15,-1051523),v=f(v,y,b,m,p[w+1],21,-2054922799),m=f(m,v,y,b,p[w+8],6,1873313359),b=f(b,m,v,y,p[w+15],10,-30611744),y=f(y,b,m,v,p[w+6],15,-1560198380),v=f(v,y,b,m,p[w+13],21,1309151649),m=f(m,v,y,b,p[w+4],6,-145523070),b=f(b,m,v,y,p[w+11],10,-1120210379),y=f(y,b,m,v,p[w+2],15,718787259),v=f(v,y,b,m,p[w+9],21,-343485551),m=a(m,E),v=a(v,I),y=a(y,O),b=a(b,D)}return[m,v,y,b]}(function(p){if(p.length===0)return[];const g=8*p.length,m=new Uint32Array(i(g));for(let v=0;v<g;v+=8)m[v>>5]|=(255&p[v/8])<<v%32;return m}(h),8*h.length))};o.default=d},{}],530:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i,a=(i=r("./validate.js"))&&i.__esModule?i:{default:i},s=function(c){if(!(0,a.default)(c))throw TypeError("Invalid UUID");let l;const u=new Uint8Array(16);return u[0]=(l=parseInt(c.slice(0,8),16))>>>24,u[1]=l>>>16&255,u[2]=l>>>8&255,u[3]=255&l,u[4]=(l=parseInt(c.slice(9,13),16))>>>8,u[5]=255&l,u[6]=(l=parseInt(c.slice(14,18),16))>>>8,u[7]=255&l,u[8]=(l=parseInt(c.slice(19,23),16))>>>8,u[9]=255&l,u[10]=(l=parseInt(c.slice(24,36),16))/1099511627776&255,u[11]=l/4294967296&255,u[12]=l>>>24&255,u[13]=l>>>16&255,u[14]=l>>>8&255,u[15]=255&l,u};o.default=s},{"./validate.js":541}],532:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.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(r,n,o){let i;Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(){if(!i&&(i=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(a)};const a=new Uint8Array(16)},{}],534:[function(r,n,o){function i(c,l,u,f){switch(c){case 0:return l&u^~l&f;case 1:return l^u^f;case 2:return l&u^l&f^u&f;case 3:return l^u^f}}function a(c,l){return c<<l|c>>>32-l}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var s=function(c){const l=[1518500249,1859775393,2400959708,3395469782],u=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof c=="string"){const p=unescape(encodeURIComponent(c));c=[];for(let g=0;g<p.length;++g)c.push(p.charCodeAt(g))}else Array.isArray(c)||(c=Array.prototype.slice.call(c));c.push(128);const f=c.length/4+2,d=Math.ceil(f/16),h=new Array(d);for(let p=0;p<d;++p){const g=new Uint32Array(16);for(let m=0;m<16;++m)g[m]=c[64*p+4*m]<<24|c[64*p+4*m+1]<<16|c[64*p+4*m+2]<<8|c[64*p+4*m+3];h[p]=g}h[d-1][14]=8*(c.length-1)/Math.pow(2,32),h[d-1][14]=Math.floor(h[d-1][14]),h[d-1][15]=8*(c.length-1)&4294967295;for(let p=0;p<d;++p){const g=new Uint32Array(80);for(let E=0;E<16;++E)g[E]=h[p][E];for(let E=16;E<80;++E)g[E]=a(g[E-3]^g[E-8]^g[E-14]^g[E-16],1);let m=u[0],v=u[1],y=u[2],b=u[3],w=u[4];for(let E=0;E<80;++E){const I=Math.floor(E/20),O=a(m,5)+i(I,v,y,b)+w+l[I]+g[E]>>>0;w=b,b=y,y=a(v,30)>>>0,v=m,m=O}u[0]=u[0]+m>>>0,u[1]=u[1]+v>>>0,u[2]=u[2]+y>>>0,u[3]=u[3]+b>>>0,u[4]=u[4]+w>>>0}return[u[0]>>24&255,u[0]>>16&255,u[0]>>8&255,255&u[0],u[1]>>24&255,u[1]>>16&255,u[1]>>8&255,255&u[1],u[2]>>24&255,u[2]>>16&255,u[2]>>8&255,255&u[2],u[3]>>24&255,u[3]>>16&255,u[3]>>8&255,255&u[3],u[4]>>24&255,u[4]>>16&255,u[4]>>8&255,255&u[4]]};o.default=s},{}],535:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i,a=(i=r("./validate.js"))&&i.__esModule?i:{default:i};const s=[];for(let l=0;l<256;++l)s.push((l+256).toString(16).substr(1));var c=function(l){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const f=(s[l[u+0]]+s[l[u+1]]+s[l[u+2]]+s[l[u+3]]+"-"+s[l[u+4]]+s[l[u+5]]+"-"+s[l[u+6]]+s[l[u+7]]+"-"+s[l[u+8]]+s[l[u+9]]+"-"+s[l[u+10]]+s[l[u+11]]+s[l[u+12]]+s[l[u+13]]+s[l[u+14]]+s[l[u+15]]).toLowerCase();if(!(0,a.default)(f))throw TypeError("Stringified UUID is invalid");return f};o.default=c},{"./validate.js":541}],536:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=s(r("./rng.js")),a=s(r("./stringify.js"));function s(h){return h&&h.__esModule?h:{default:h}}let c,l,u=0,f=0;var d=function(h,p,g){let m=p&&g||0;const v=p||new Array(16);let y=(h=h||{}).node||c,b=h.clockseq!==void 0?h.clockseq:l;if(y==null||b==null){const N=h.random||(h.rng||i.default)();y==null&&(y=c=[1|N[0],N[1],N[2],N[3],N[4],N[5]]),b==null&&(b=l=16383&(N[6]<<8|N[7]))}let w=h.msecs!==void 0?h.msecs:Date.now(),E=h.nsecs!==void 0?h.nsecs:f+1;const I=w-u+(E-f)/1e4;if(I<0&&h.clockseq===void 0&&(b=b+1&16383),(I<0||w>u)&&h.nsecs===void 0&&(E=0),E>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=w,f=E,l=b,w+=122192928e5;const O=(1e4*(268435455&w)+E)%4294967296;v[m++]=O>>>24&255,v[m++]=O>>>16&255,v[m++]=O>>>8&255,v[m++]=255&O;const D=w/4294967296*1e4&268435455;v[m++]=D>>>8&255,v[m++]=255&D,v[m++]=D>>>24&15|16,v[m++]=D>>>16&255,v[m++]=b>>>8|128,v[m++]=255&b;for(let N=0;N<6;++N)v[m+N]=y[N];return p||(0,a.default)(v)};o.default=d},{"./rng.js":533,"./stringify.js":535}],537:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=s(r("./v35.js")),a=s(r("./md5.js"));function s(l){return l&&l.__esModule?l:{default:l}}var c=(0,i.default)("v3",48,a.default);o.default=c},{"./md5.js":529,"./v35.js":538}],538:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u,f,d){function h(p,g,m,v){if(typeof p=="string"&&(p=function(b){b=unescape(encodeURIComponent(b));const w=[];for(let E=0;E<b.length;++E)w.push(b.charCodeAt(E));return w}(p)),typeof g=="string"&&(g=(0,a.default)(g)),g.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let y=new Uint8Array(16+p.length);if(y.set(g),y.set(p,g.length),y=d(y),y[6]=15&y[6]|f,y[8]=63&y[8]|128,m){v=v||0;for(let b=0;b<16;++b)m[v+b]=y[b];return m}return(0,i.default)(y)}try{h.name=u}catch{}return h.DNS=c,h.URL=l,h},o.URL=o.DNS=void 0;var i=s(r("./stringify.js")),a=s(r("./parse.js"));function s(u){return u&&u.__esModule?u:{default:u}}const c="6ba7b810-9dad-11d1-80b4-00c04fd430c8";o.DNS=c;const l="6ba7b811-9dad-11d1-80b4-00c04fd430c8";o.URL=l},{"./parse.js":531,"./stringify.js":535}],539:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=s(r("./rng.js")),a=s(r("./stringify.js"));function s(l){return l&&l.__esModule?l:{default:l}}var c=function(l,u,f){const d=(l=l||{}).random||(l.rng||i.default)();if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,u){f=f||0;for(let h=0;h<16;++h)u[f+h]=d[h];return u}return(0,a.default)(d)};o.default=c},{"./rng.js":533,"./stringify.js":535}],540:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=s(r("./v35.js")),a=s(r("./sha1.js"));function s(l){return l&&l.__esModule?l:{default:l}}var c=(0,i.default)("v5",80,a.default);o.default=c},{"./sha1.js":534,"./v35.js":538}],541:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i,a=(i=r("./regex.js"))&&i.__esModule?i:{default:i},s=function(c){return typeof c=="string"&&a.default.test(c)};o.default=s},{"./regex.js":532}],542:[function(r,n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i,a=(i=r("./validate.js"))&&i.__esModule?i:{default:i},s=function(c){if(!(0,a.default)(c))throw TypeError("Invalid UUID");return parseInt(c.substr(14,1),16)};o.default=s},{"./validate.js":541}],543:[function(r,n,o){/**
* 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(o,"__esModule",{value:!0}),o.CHAR=`	
\r -퟿-�𐀀-􏿿`,o.S=` 	\r
`,o.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",o.NAME_CHAR="-"+o.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",o.CHAR_RE=new RegExp("^["+o.CHAR+"]$","u"),o.S_RE=new RegExp("^["+o.S+"]+$","u"),o.NAME_START_CHAR_RE=new RegExp("^["+o.NAME_START_CHAR+"]$","u"),o.NAME_CHAR_RE=new RegExp("^["+o.NAME_CHAR+"]$","u"),o.NAME_RE=new RegExp("^["+o.NAME_START_CHAR+"]["+o.NAME_CHAR+"]*$","u"),o.NMTOKEN_RE=new RegExp("^["+o.NAME_CHAR+"]+$","u");function i(a){return a>=65&&a<=90||a>=97&&a<=122||a===58||a===95||a===8204||a===8205||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=880&&a<=893||a>=895&&a<=8191||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039}o.S_LIST=[32,10,13,9],o.isChar=function(a){return a>=32&&a<=55295||a===10||a===13||a===9||a>=57344&&a<=65533||a>=65536&&a<=1114111},o.isS=function(a){return a===32||a===10||a===13||a===9},o.isNameStartChar=i,o.isNameChar=function(a){return i(a)||a>=48&&a<=57||a===45||a===46||a===183||a>=768&&a<=879||a>=8255&&a<=8256}},{}],544:[function(r,n,o){/**
* 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(o,"__esModule",{value:!0}),o.CHAR="-퟿-�𐀀-􏿿",o.RESTRICTED_CHAR="-\b\v\f---",o.S=` 	\r
`,o.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",o.NAME_CHAR="-"+o.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",o.CHAR_RE=new RegExp("^["+o.CHAR+"]$","u"),o.RESTRICTED_CHAR_RE=new RegExp("^["+o.RESTRICTED_CHAR+"]$","u"),o.S_RE=new RegExp("^["+o.S+"]+$","u"),o.NAME_START_CHAR_RE=new RegExp("^["+o.NAME_START_CHAR+"]$","u"),o.NAME_CHAR_RE=new RegExp("^["+o.NAME_CHAR+"]$","u"),o.NAME_RE=new RegExp("^["+o.NAME_START_CHAR+"]["+o.NAME_CHAR+"]*$","u"),o.NMTOKEN_RE=new RegExp("^["+o.NAME_CHAR+"]+$","u");function i(a){return a>=65&&a<=90||a>=97&&a<=122||a===58||a===95||a===8204||a===8205||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=880&&a<=893||a>=895&&a<=8191||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039}o.S_LIST=[32,10,13,9],o.isChar=function(a){return a>=1&&a<=55295||a>=57344&&a<=65533||a>=65536&&a<=1114111},o.isRestrictedChar=function(a){return a>=1&&a<=8||a===11||a===12||a>=14&&a<=31||a>=127&&a<=132||a>=134&&a<=159},o.isCharAndNotRestricted=function(a){return a===9||a===10||a===13||a>31&&a<127||a===133||a>159&&a<=55295||a>=57344&&a<=65533||a>=65536&&a<=1114111},o.isS=function(a){return a===32||a===10||a===13||a===9},o.isNameStartChar=i,o.isNameChar=function(a){return i(a)||a>=48&&a<=57||a===45||a===46||a===183||a>=768&&a<=879||a>=8255&&a<=8256}},{}],545:[function(r,n,o){/**
* Character class utilities for XML NS 1.0 edition 3.
*
* @author Louis-Dominique Dubeau
* @license MIT
* @copyright Louis-Dominique Dubeau
*/function i(a){return a>=65&&a<=90||a===95||a>=97&&a<=122||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=767||a>=880&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039}Object.defineProperty(o,"__esModule",{value:!0}),o.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",o.NC_NAME_CHAR="-"+o.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",o.NC_NAME_START_CHAR_RE=new RegExp("^["+o.NC_NAME_START_CHAR+"]$","u"),o.NC_NAME_CHAR_RE=new RegExp("^["+o.NC_NAME_CHAR+"]$","u"),o.NC_NAME_RE=new RegExp("^["+o.NC_NAME_START_CHAR+"]["+o.NC_NAME_CHAR+"]*$","u"),o.isNCNameStartChar=i,o.isNCNameChar=function(a){return i(a)||a===45||a===46||a>=48&&a<=57||a===183||a>=768&&a<=879||a>=8255&&a<=8256}},{}]},{},[15])(15)})})(cre);var YKe=cre.exports,ure={exports:{}};(function(e,t){(function(r,n){n()})(Er,function(){function r(l,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function n(l,u,f){var d=new XMLHttpRequest;d.open("GET",l),d.responseType="blob",d.onload=function(){c(d.response,u,f)},d.onerror=function(){console.error("could not download file")},d.send()}function o(l){var u=new XMLHttpRequest;u.open("HEAD",l,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(u)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,u,f){var d=a.URL||a.webkitURL,h=document.createElement("a");u=u||l.name||"download",h.download=u,h.rel="noopener",typeof l=="string"?(h.href=l,h.origin===location.origin?i(h):o(h.href)?n(l,u,f):i(h,h.target="_blank")):(h.href=d.createObjectURL(l),setTimeout(function(){d.revokeObjectURL(h.href)},4e4),setTimeout(function(){i(h)},0))}:"msSaveOrOpenBlob"in navigator?function(l,u,f){if(u=u||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(r(l,f),u);else if(o(l))n(l,u,f);else{var d=document.createElement("a");d.href=l,d.target="_blank",setTimeout(function(){i(d)})}}:function(l,u,f,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof l=="string")return n(l,u,f);var h=l.type==="application/octet-stream",p=/constructor/i.test(a.HTMLElement)||a.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||h&&p||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var b=m.result;b=g?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=b:location=b,d=null},m.readAsDataURL(l)}else{var v=a.URL||a.webkitURL,y=v.createObjectURL(l);d?d.location=y:location.href=y,d=null,setTimeout(function(){v.revokeObjectURL(y)},4e4)}});a.saveAs=c.saveAs=c,e.exports=c})})(ure);var XKe=ure.exports;/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var dre=1252,QKe=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],oF={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},iF=function(e){QKe.indexOf(e)!=-1&&(dre=oF[0]=e)};function ZKe(){iF(1252)}var Kc=function(e){iF(e)};function fre(){Kc(1200),ZKe()}function ij(e){for(var t=[],r=0,n=e.length;r<n;++r)t[r]=e.charCodeAt(r);return t}function JKe(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function hre(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var Ob=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?JKe(e.slice(2)):t==254&&r==255?hre(e.slice(2)):t==65279?e.slice(1):e},a_=function(t){return String.fromCharCode(t)},aj=function(t){return String.fromCharCode(t)},ah,Eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function sj(e){for(var t="",r=0,n=0,o=0,i=0,a=0,s=0,c=0,l=0;l<e.length;)r=e.charCodeAt(l++),i=r>>2,n=e.charCodeAt(l++),a=(r&3)<<4|n>>4,o=e.charCodeAt(l++),s=(n&15)<<2|o>>6,c=o&63,isNaN(n)?s=c=64:isNaN(o)&&(c=64),t+=Eh.charAt(i)+Eh.charAt(a)+Eh.charAt(s)+Eh.charAt(c);return t}function Cl(e){var t="",r=0,n=0,o=0,i=0,a=0,s=0,c=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var l=0;l<e.length;)i=Eh.indexOf(e.charAt(l++)),a=Eh.indexOf(e.charAt(l++)),r=i<<2|a>>4,t+=String.fromCharCode(r),s=Eh.indexOf(e.charAt(l++)),n=(a&15)<<4|s>>2,s!==64&&(t+=String.fromCharCode(n)),c=Eh.indexOf(e.charAt(l++)),o=(s&3)<<6|c,c!==64&&(t+=String.fromCharCode(o));return t}var Sn=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),y0=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function Qh(e){return Sn?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function lj(e){return Sn?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Gc=function(t){return Sn?y0(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function b0(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function aF(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return aF(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var sh=Sn?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:y0(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var n=new Uint8Array(r),o=0;for(t=0,r=0;t<e.length;r+=o,++t)if(o=e[t].length,e[t]instanceof Uint8Array)n.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";n.set(new Uint8Array(e[t]),r)}return n}return[].concat.apply([],e.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function eYe(e){for(var t=[],r=0,n=e.length+250,o=Qh(e.length+255),i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a<128)o[r++]=a;else if(a<2048)o[r++]=192|a>>6&31,o[r++]=128|a&63;else if(a>=55296&&a<57344){a=(a&1023)+64;var s=e.charCodeAt(++i)&1023;o[r++]=240|a>>8&7,o[r++]=128|a>>2&63,o[r++]=128|s>>6&15|(a&3)<<4,o[r++]=128|s&63}else o[r++]=224|a>>12&15,o[r++]=128|a>>6&63,o[r++]=128|a&63;r>n&&(t.push(o.slice(0,r)),r=0,o=Qh(65535),n=65530)}return t.push(o.slice(0,r)),sh(t)}var bs=/\u0000/g,Db=/[\u0001-\u0006]/g;function gv(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function Yc(e,t){var r=""+e;return r.length>=t?r:ei("0",t-r.length)+r}function sF(e,t){var r=""+e;return r.length>=t?r:ei(" ",t-r.length)+r}function PE(e,t){var r=""+e;return r.length>=t?r:r+ei(" ",t-r.length)}function tYe(e,t){var r=""+Math.round(e);return r.length>=t?r:ei("0",t-r.length)+r}function rYe(e,t){var r=""+e;return r.length>=t?r:ei("0",t-r.length)+r}var cj=Math.pow(2,32);function pg(e,t){if(e>cj||e<-cj)return tYe(e,t);var r=Math.round(e);return rYe(r,t)}function ME(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var uj=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],mP=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function nYe(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var nn={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},dj={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},oYe={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function RE(e,t,r){for(var n=e<0?-1:1,o=e*n,i=0,a=1,s=0,c=1,l=0,u=0,f=Math.floor(o);l<t&&(f=Math.floor(o),s=f*a+i,u=f*l+c,!(o-f<5e-8));)o=1/(o-f),i=a,a=s,c=l,l=u;if(u>t&&(l>t?(u=c,s=i):(u=l,s=a)),!r)return[0,n*s,u];var d=Math.floor(n*s/u);return[d,n*s-d*u,u]}function Jp(e,t,r){if(e>2958465||e<0)return null;var n=e|0,o=Math.floor(86400*(e-n)),i=0,a=[],s={D:n,T:o,u:86400*(e-n)-o,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(s.u)<1e-6&&(s.u=0),t&&t.date1904&&(n+=1462),s.u>.9999&&(s.u=0,++o==86400&&(s.T=o=0,++n,++s.D)),n===60)a=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)a=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var c=new Date(1900,0,1);c.setDate(c.getDate()+n-1),a=[c.getFullYear(),c.getMonth()+1,c.getDate()],i=c.getDay(),n<60&&(i=(i+6)%7),r&&(i=uYe(c,a))}return s.y=a[0],s.m=a[1],s.d=a[2],s.S=o%60,o=Math.floor(o/60),s.M=o%60,o=Math.floor(o/60),s.H=o,s.q=i,s}var pre=new Date(1899,11,31,0,0,0),iYe=pre.getTime(),aYe=new Date(1900,2,1,0,0,0);function mre(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=aYe&&(r+=24*60*60*1e3),(r-(iYe+(e.getTimezoneOffset()-pre.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function lF(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function sYe(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function lYe(e){var t=e<0?12:11,r=lF(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function cYe(e){var t=lF(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function wx(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=lYe(e):t===10?r=e.toFixed(10).substr(0,12):r=cYe(e),lF(sYe(r.toUpperCase()))}function Ym(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):wx(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return mc(14,mre(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function uYe(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function dYe(e,t,r,n){var o="",i=0,a=0,s=r.y,c,l=0;switch(e){case 98:s=r.y+543;case 121:switch(t.length){case 1:case 2:c=s%100,l=2;break;default:c=s%1e4,l=4;break}break;case 109:switch(t.length){case 1:case 2:c=r.m,l=t.length;break;case 3:return mP[r.m-1][1];case 5:return mP[r.m-1][0];default:return mP[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:c=r.d,l=t.length;break;case 3:return uj[r.q][0];default:return uj[r.q][1]}break;case 104:switch(t.length){case 1:case 2:c=1+(r.H+11)%12,l=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:c=r.H,l=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:c=r.M,l=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?Yc(r.S,t.length):(n>=2?a=n===3?1e3:100:a=n===1?10:1,i=Math.round(a*(r.S+r.u)),i>=60*a&&(i=0),t==="s"?i===0?"0":""+i/a:(o=Yc(i,2+n),t==="ss"?o.substr(0,2):"."+o.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":c=r.D*24+r.H;break;case"[m]":case"[mm]":c=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":c=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}l=t.length===3?1:2;break;case 101:c=s,l=1;break}var u=l>0?Yc(c,l):"";return u}function Th(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,n=e.substr(0,r);r!=e.length;r+=t)n+=(n.length>0?",":"")+e.substr(r,t);return n}var gre=/%/g;function fYe(e,t,r){var n=t.replace(gre,""),o=t.length-n.length;return Xd(e,n,r*Math.pow(10,2*o))+ei("%",o)}function hYe(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return Xd(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function vre(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+vre(e,-t);var o=e.indexOf(".");o===-1&&(o=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%o;if(i<0&&(i+=o),r=(t/Math.pow(10,i)).toPrecision(n+1+(o+i)%o),r.indexOf("e")===-1){var a=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(a-r.length+i):r+="E+"+(a-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,o)+"."+r.substr(2+o),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,c,l,u){return c+l+u.substr(0,(o+i)%o)+"."+u.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var yre=/# (\?+)( ?)\/( ?)(\d+)/;function pYe(e,t,r){var n=parseInt(e[4],10),o=Math.round(t*n),i=Math.floor(o/n),a=o-i*n,s=n;return r+(i===0?"":""+i)+" "+(a===0?ei(" ",e[1].length+1+e[4].length):sF(a,e[1].length)+e[2]+"/"+e[3]+Yc(s,e[4].length))}function mYe(e,t,r){return r+(t===0?"":""+t)+ei(" ",e[1].length+2+e[4].length)}var bre=/^#*0*\.([0#]+)/,wre=/\).*[0#]/,xre=/\(###\) ###\\?-####/;function fs(e){for(var t="",r,n=0;n!=e.length;++n)switch(r=e.charCodeAt(n)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function fj(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function hj(e,t){var r=e-Math.floor(e),n=Math.pow(10,t);return t<(""+Math.round(r*n)).length?0:Math.round(r*n)}function gYe(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function vYe(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function Hl(e,t,r){if(e.charCodeAt(0)===40&&!t.match(wre)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Hl("n",n,r):"("+Hl("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return hYe(e,t,r);if(t.indexOf("%")!==-1)return fYe(e,t,r);if(t.indexOf("E")!==-1)return vre(t,r);if(t.charCodeAt(0)===36)return"$"+Hl(e,t.substr(t.charAt(1)==" "?2:1),r);var o,i,a,s,c=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+pg(c,t.length);if(t.match(/^[#?]+$/))return o=pg(r,0),o==="0"&&(o=""),o.length>t.length?o:fs(t.substr(0,t.length-o.length))+o;if(i=t.match(yre))return pYe(i,c,l);if(t.match(/^#+0+$/))return l+pg(c,t.length-t.indexOf("0"));if(i=t.match(bre))return o=fj(r,i[1].length).replace(/^([^\.]+)$/,"$1."+fs(i[1])).replace(/\.$/,"."+fs(i[1])).replace(/\.(\d*)$/,function(p,g){return"."+g+ei("0",fs(i[1]).length-g.length)}),t.indexOf("0.")!==-1?o:o.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+fj(c,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+Th(pg(c,0));if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Hl(e,t,-r):Th(""+(Math.floor(r)+gYe(r,i[1].length)))+"."+Yc(hj(r,i[1].length),i[1].length);if(i=t.match(/^#,#*,#0/))return Hl(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return o=gv(Hl(e,t.replace(/[\\-]/g,""),r)),a=0,gv(gv(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return a<o.length?o.charAt(a++):p==="0"?"0":""}));if(t.match(xre))return o=Hl(e,"##########",r),"("+o.substr(0,3)+") "+o.substr(3,3)+"-"+o.substr(6);var u="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(i[4].length,7),s=RE(c,Math.pow(10,a)-1,!1),o=""+l,u=Xd("n",i[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),o+=u+i[2]+"/"+i[3],u=PE(s[2],a),u.length<i[4].length&&(u=fs(i[4].substr(i[4].length-u.length))+u),o+=u,o;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(i[1].length,i[4].length),7),s=RE(c,Math.pow(10,a)-1,!0),l+(s[0]||(s[1]?"":"0"))+" "+(s[1]?sF(s[1],a)+i[2]+"/"+i[3]+PE(s[2],a):ei(" ",2*a+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return o=pg(r,0),t.length<=o.length?o:fs(t.substr(0,t.length-o.length))+o;if(i=t.match(/^([#0?]+)\.([#0]+)$/)){o=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),a=o.indexOf(".");var f=t.indexOf(".")-a,d=t.length-o.length-f;return fs(t.substr(0,f)+o+t.substr(t.length-d))}if(i=t.match(/^00,000\.([#0]*0)$/))return a=hj(r,i[1].length),r<0?"-"+Hl(e,t,-r):Th(vYe(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?Yc(0,3-p.length):"")+p})+"."+Yc(a,i[1].length);switch(t){case"###,##0.00":return Hl(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var h=Th(pg(c,0));return h!=="0"?l+h:"";case"###,###.00":return Hl(e,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return Hl(e,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+t+"|")}function yYe(e,t,r){for(var n=t.length-1;t.charCodeAt(n-1)===44;)--n;return Xd(e,t.substr(0,n),r/Math.pow(10,3*(t.length-n)))}function bYe(e,t,r){var n=t.replace(gre,""),o=t.length-n.length;return Xd(e,n,r*Math.pow(10,2*o))+ei("%",o)}function Cre(e,t){var r,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+Cre(e,-t);var o=e.indexOf(".");o===-1&&(o=e.indexOf("E"));var i=Math.floor(Math.log(t)*Math.LOG10E)%o;if(i<0&&(i+=o),r=(t/Math.pow(10,i)).toPrecision(n+1+(o+i)%o),!r.match(/[Ee]/)){var a=Math.floor(Math.log(t)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(a-r.length+i):r+="E+"+(a-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(s,c,l,u){return c+l+u.substr(0,(o+i)%o)+"."+u.substr(i)+"E"})}else r=t.toExponential(n);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}function xu(e,t,r){if(e.charCodeAt(0)===40&&!t.match(wre)){var n=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?xu("n",n,r):"("+xu("n",n,-r)+")"}if(t.charCodeAt(t.length-1)===44)return yYe(e,t,r);if(t.indexOf("%")!==-1)return bYe(e,t,r);if(t.indexOf("E")!==-1)return Cre(t,r);if(t.charCodeAt(0)===36)return"$"+xu(e,t.substr(t.charAt(1)==" "?2:1),r);var o,i,a,s,c=Math.abs(r),l=r<0?"-":"";if(t.match(/^00+$/))return l+Yc(c,t.length);if(t.match(/^[#?]+$/))return o=""+r,r===0&&(o=""),o.length>t.length?o:fs(t.substr(0,t.length-o.length))+o;if(i=t.match(yre))return mYe(i,c,l);if(t.match(/^#+0+$/))return l+Yc(c,t.length-t.indexOf("0"));if(i=t.match(bre))return o=(""+r).replace(/^([^\.]+)$/,"$1."+fs(i[1])).replace(/\.$/,"."+fs(i[1])),o=o.replace(/\.(\d*)$/,function(p,g){return"."+g+ei("0",fs(i[1]).length-g.length)}),t.indexOf("0.")!==-1?o:o.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),i=t.match(/^(0*)\.(#*)$/))return l+(""+c).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=t.match(/^#{1,3},##0(\.?)$/))return l+Th(""+c);if(i=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+xu(e,t,-r):Th(""+r)+"."+ei("0",i[1].length);if(i=t.match(/^#,#*,#0/))return xu(e,t.replace(/^#,#*,/,""),r);if(i=t.match(/^([0#]+)(\\?-([0#]+))+$/))return o=gv(xu(e,t.replace(/[\\-]/g,""),r)),a=0,gv(gv(t.replace(/\\/g,"")).replace(/[0#]/g,function(p){return a<o.length?o.charAt(a++):p==="0"?"0":""}));if(t.match(xre))return o=xu(e,"##########",r),"("+o.substr(0,3)+") "+o.substr(3,3)+"-"+o.substr(6);var u="";if(i=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(i[4].length,7),s=RE(c,Math.pow(10,a)-1,!1),o=""+l,u=Xd("n",i[1],s[1]),u.charAt(u.length-1)==" "&&(u=u.substr(0,u.length-1)+"0"),o+=u+i[2]+"/"+i[3],u=PE(s[2],a),u.length<i[4].length&&(u=fs(i[4].substr(i[4].length-u.length))+u),o+=u,o;if(i=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return a=Math.min(Math.max(i[1].length,i[4].length),7),s=RE(c,Math.pow(10,a)-1,!0),l+(s[0]||(s[1]?"":"0"))+" "+(s[1]?sF(s[1],a)+i[2]+"/"+i[3]+PE(s[2],a):ei(" ",2*a+1+i[2].length+i[3].length));if(i=t.match(/^[#0?]+$/))return o=""+r,t.length<=o.length?o:fs(t.substr(0,t.length-o.length))+o;if(i=t.match(/^([#0]+)\.([#0]+)$/)){o=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),a=o.indexOf(".");var f=t.indexOf(".")-a,d=t.length-o.length-f;return fs(t.substr(0,f)+o+t.substr(t.length-d))}if(i=t.match(/^00,000\.([#0]*0)$/))return r<0?"-"+xu(e,t,-r):Th(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(p){return"00,"+(p.length<3?Yc(0,3-p.length):"")+p})+"."+Yc(0,i[1].length);switch(t){case"###,###":case"##,###":case"#,###":var h=Th(""+c);return h!=="0"?l+h:"";default:if(t.match(/\.[0#?]*$/))return xu(e,t.slice(0,t.lastIndexOf(".")),r)+fs(t.slice(t.lastIndexOf(".")))}throw new Error("unsupported format |"+t+"|")}function Xd(e,t,r){return(r|0)===r?xu(e,t,r):Hl(e,t,r)}function wYe(e){for(var t=[],r=!1,n=0,o=0;n<e.length;++n)switch(e.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:t[t.length]=e.substr(o,n-o),o=n+1}if(t[t.length]=e.substr(o),r===!0)throw new Error("Format |"+e+"| unterminated string ");return t}var Sre=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function iy(e){for(var t=0,r="",n="";t<e.length;)switch(r=e.charAt(t)){case"G":ME(e,t)&&(t+=6),t++;break;case'"':for(;e.charCodeAt(++t)!==34&&t<e.length;);++t;break;case"\\":t+=2;break;case"_":t+=2;break;case"@":++t;break;case"B":case"b":if(e.charAt(t+1)==="1"||e.charAt(t+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(e.substr(t,3).toUpperCase()==="A/P"||e.substr(t,5).toUpperCase()==="AM/PM"||e.substr(t,5).toUpperCase()==="上午/下午")return!0;++t;break;case"[":for(n=r;e.charAt(t++)!=="]"&&t<e.length;)n+=e.charAt(t);if(n.match(Sre))return!0;break;case".":case"0":case"#":for(;t<e.length&&("0#?.,E+-%".indexOf(r=e.charAt(++t))>-1||r=="\\"&&e.charAt(t+1)=="-"&&"0#".indexOf(e.charAt(t+2))>-1););break;case"?":for(;e.charAt(++t)===r;);break;case"*":++t,(e.charAt(t)==" "||e.charAt(t)=="*")&&++t;break;case"(":case")":++t;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;t<e.length&&"0123456789".indexOf(e.charAt(++t))>-1;);break;case" ":++t;break;default:++t;break}return!1}function xYe(e,t,r,n){for(var o=[],i="",a=0,s="",c="t",l,u,f,d="H";a<e.length;)switch(s=e.charAt(a)){case"G":if(!ME(e,a))throw new Error("unrecognized character "+s+" in "+e);o[o.length]={t:"G",v:"General"},a+=7;break;case'"':for(i="";(f=e.charCodeAt(++a))!==34&&a<e.length;)i+=String.fromCharCode(f);o[o.length]={t:"t",v:i},++a;break;case"\\":var h=e.charAt(++a),p=h==="("||h===")"?h:"t";o[o.length]={t:p,v:h},++a;break;case"_":o[o.length]={t:"t",v:" "},a+=2;break;case"@":o[o.length]={t:"T",v:t},++a;break;case"B":case"b":if(e.charAt(a+1)==="1"||e.charAt(a+1)==="2"){if(l==null&&(l=Jp(t,r,e.charAt(a+1)==="2"),l==null))return"";o[o.length]={t:"X",v:e.substr(a,2)},c=s,a+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":s=s.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(t<0||l==null&&(l=Jp(t,r),l==null))return"";for(i=s;++a<e.length&&e.charAt(a).toLowerCase()===s;)i+=s;s==="m"&&c.toLowerCase()==="h"&&(s="M"),s==="h"&&(s=d),o[o.length]={t:s,v:i},c=s;break;case"A":case"a":case"上":var g={t:s,v:s};if(l==null&&(l=Jp(t,r)),e.substr(a,3).toUpperCase()==="A/P"?(l!=null&&(g.v=l.H>=12?"P":"A"),g.t="T",d="h",a+=3):e.substr(a,5).toUpperCase()==="AM/PM"?(l!=null&&(g.v=l.H>=12?"PM":"AM"),g.t="T",a+=5,d="h"):e.substr(a,5).toUpperCase()==="上午/下午"?(l!=null&&(g.v=l.H>=12?"下午":"上午"),g.t="T",a+=5,d="h"):(g.t="t",++a),l==null&&g.t==="T")return"";o[o.length]=g,c=s;break;case"[":for(i=s;e.charAt(a++)!=="]"&&a<e.length;)i+=e.charAt(a);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(Sre)){if(l==null&&(l=Jp(t,r),l==null))return"";o[o.length]={t:"Z",v:i.toLowerCase()},c=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",iy(e)||(o[o.length]={t:"t",v:i}));break;case".":if(l!=null){for(i=s;++a<e.length&&(s=e.charAt(a))==="0";)i+=s;o[o.length]={t:"s",v:i};break}case"0":case"#":for(i=s;++a<e.length&&"0#?.,E+-%".indexOf(s=e.charAt(a))>-1;)i+=s;o[o.length]={t:"n",v:i};break;case"?":for(i=s;e.charAt(++a)===s;)i+=s;o[o.length]={t:s,v:i},c=s;break;case"*":++a,(e.charAt(a)==" "||e.charAt(a)=="*")&&++a;break;case"(":case")":o[o.length]={t:n===1?"t":s,v:s},++a;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=s;a<e.length&&"0123456789".indexOf(e.charAt(++a))>-1;)i+=e.charAt(a);o[o.length]={t:"D",v:i};break;case" ":o[o.length]={t:s,v:s},++a;break;case"$":o[o.length]={t:"t",v:"$"},++a;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(s)===-1)throw new Error("unrecognized character "+s+" in "+e);o[o.length]={t:"t",v:s},++a;break}var m=0,v=0,y;for(a=o.length-1,c="t";a>=0;--a)switch(o[a].t){case"h":case"H":o[a].t=d,c="h",m<1&&(m=1);break;case"s":(y=o[a].v.match(/\.0+$/))&&(v=Math.max(v,y[0].length-1)),m<3&&(m=3);case"d":case"y":case"M":case"e":c=o[a].t;break;case"m":c==="s"&&(o[a].t="M",m<2&&(m=2));break;case"X":break;case"Z":m<1&&o[a].v.match(/[Hh]/)&&(m=1),m<2&&o[a].v.match(/[Mm]/)&&(m=2),m<3&&o[a].v.match(/[Ss]/)&&(m=3)}switch(m){case 0:break;case 1:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M),l.M>=60&&(l.M=0,++l.H);break;case 2:l.u>=.5&&(l.u=0,++l.S),l.S>=60&&(l.S=0,++l.M);break}var b="",w;for(a=0;a<o.length;++a)switch(o[a].t){case"t":case"T":case" ":case"D":break;case"X":o[a].v="",o[a].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":o[a].v=dYe(o[a].t.charCodeAt(0),o[a].v,l,v),o[a].t="t";break;case"n":case"?":for(w=a+1;o[w]!=null&&((s=o[w].t)==="?"||s==="D"||(s===" "||s==="t")&&o[w+1]!=null&&(o[w+1].t==="?"||o[w+1].t==="t"&&o[w+1].v==="/")||o[a].t==="("&&(s===" "||s==="n"||s===")")||s==="t"&&(o[w].v==="/"||o[w].v===" "&&o[w+1]!=null&&o[w+1].t=="?"));)o[a].v+=o[w].v,o[w]={v:"",t:";"},++w;b+=o[a].v,a=w-1;break;case"G":o[a].t="t",o[a].v=Ym(t,r);break}var E="",I,O;if(b.length>0){b.charCodeAt(0)==40?(I=t<0&&b.charCodeAt(0)===45?-t:t,O=Xd("n",b,I)):(I=t<0&&n>1?-t:t,O=Xd("n",b,I),I<0&&o[0]&&o[0].t=="t"&&(O=O.substr(1),o[0].v="-"+o[0].v)),w=O.length-1;var D=o.length;for(a=0;a<o.length;++a)if(o[a]!=null&&o[a].t!="t"&&o[a].v.indexOf(".")>-1){D=a;break}var N=o.length;if(D===o.length&&O.indexOf("E")===-1){for(a=o.length-1;a>=0;--a)o[a]==null||"n?".indexOf(o[a].t)===-1||(w>=o[a].v.length-1?(w-=o[a].v.length,o[a].v=O.substr(w+1,o[a].v.length)):w<0?o[a].v="":(o[a].v=O.substr(0,w+1),w=-1),o[a].t="t",N=a);w>=0&&N<o.length&&(o[N].v=O.substr(0,w+1)+o[N].v)}else if(D!==o.length&&O.indexOf("E")===-1){for(w=O.indexOf(".")-1,a=D;a>=0;--a)if(!(o[a]==null||"n?".indexOf(o[a].t)===-1)){for(u=o[a].v.indexOf(".")>-1&&a===D?o[a].v.indexOf(".")-1:o[a].v.length-1,E=o[a].v.substr(u+1);u>=0;--u)w>=0&&(o[a].v.charAt(u)==="0"||o[a].v.charAt(u)==="#")&&(E=O.charAt(w--)+E);o[a].v=E,o[a].t="t",N=a}for(w>=0&&N<o.length&&(o[N].v=O.substr(0,w+1)+o[N].v),w=O.indexOf(".")+1,a=D;a<o.length;++a)if(!(o[a]==null||"n?(".indexOf(o[a].t)===-1&&a!==D)){for(u=o[a].v.indexOf(".")>-1&&a===D?o[a].v.indexOf(".")+1:0,E=o[a].v.substr(0,u);u<o[a].v.length;++u)w<O.length&&(E+=O.charAt(w++));o[a].v=E,o[a].t="t",N=a}}}for(a=0;a<o.length;++a)o[a]!=null&&"n?".indexOf(o[a].t)>-1&&(I=n>1&&t<0&&a>0&&o[a-1].v==="-"?-t:t,o[a].v=Xd(o[a].t,o[a].v,I),o[a].t="t");var U="";for(a=0;a!==o.length;++a)o[a]!=null&&(U+=o[a].v);return U}var pj=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function mj(e,t){if(t==null)return!1;var r=parseFloat(t[2]);switch(t[1]){case"=":if(e==r)return!0;break;case">":if(e>r)return!0;break;case"<":if(e<r)return!0;break;case"<>":if(e!=r)return!0;break;case">=":if(e>=r)return!0;break;case"<=":if(e<=r)return!0;break}return!1}function CYe(e,t){var r=wYe(e),n=r.length,o=r[n-1].indexOf("@");if(n<4&&o>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof t!="number")return[4,r.length===4||o>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=o>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=o>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=o>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=t>0?r[0]:t<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var a=r[0].match(pj),s=r[1].match(pj);return mj(t,a)?[n,r[0]]:mj(t,s)?[n,r[1]]:[n,r[a!=null&&s!=null?2:1]]}return[n,i]}function mc(e,t,r){r==null&&(r={});var n="";switch(typeof e){case"string":e=="m/d/yy"&&r.dateNF?n=r.dateNF:n=e;break;case"number":e==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:nn)[e],n==null&&(n=r.table&&r.table[dj[e]]||nn[dj[e]]),n==null&&(n=oYe[e]||"General");break}if(ME(n,0))return Ym(t,r);t instanceof Date&&(t=mre(t,r.date1904));var o=CYe(n,t);if(ME(o[1]))return Ym(t,r);if(t===!0)t="TRUE";else if(t===!1)t="FALSE";else if(t===""||t==null)return"";return xYe(o[1],t,r,o[0])}function Tm(e,t){if(typeof t!="number"){t=+t||-1;for(var r=0;r<392;++r){if(nn[r]==null){t<0&&(t=r);continue}if(nn[r]==e){t=r;break}}t<0&&(t=391)}return nn[t]=e,t}function _re(){nn=nYe()}var SYe={5:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',23:"General",24:"General",25:"General",26:"General",27:"m/d/yy",28:"m/d/yy",29:"m/d/yy",30:"m/d/yy",31:"m/d/yy",32:"h:mm:ss",33:"h:mm:ss",34:"h:mm:ss",35:"h:mm:ss",36:"m/d/yy",41:'_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',50:"m/d/yy",51:"m/d/yy",52:"m/d/yy",53:"m/d/yy",54:"m/d/yy",55:"m/d/yy",56:"m/d/yy",57:"m/d/yy",58:"m/d/yy",59:"0",60:"0.00",61:"#,##0",62:"#,##0.00",63:'"$"#,##0_);\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',67:"0%",68:"0.00%",69:"# ?/?",70:"# ??/??",71:"m/d/yy",72:"m/d/yy",73:"d-mmm-yy",74:"d-mmm",75:"mmm-yy",76:"h:mm",77:"h:mm:ss",78:"m/d/yy h:mm",79:"mm:ss",80:"[h]:mm:ss",81:"mmss.0"},kre=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function _Ye(e){var t=typeof e=="number"?nn[e]:e;return t=t.replace(kre,"(\\d+)"),new RegExp("^"+t+"$")}function kYe(e,t,r){var n=-1,o=-1,i=-1,a=-1,s=-1,c=-1;(t.match(kre)||[]).forEach(function(f,d){var h=parseInt(r[d+1],10);switch(f.toLowerCase().charAt(0)){case"y":n=h;break;case"d":i=h;break;case"h":a=h;break;case"s":c=h;break;case"m":a>=0?s=h:o=h;break}}),c>=0&&s==-1&&o>=0&&(s=o,o=-1);var l=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(o>=1?o:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);l.length==7&&(l="0"+l),l.length==8&&(l="20"+l);var u=("00"+(a>=0?a:0)).slice(-2)+":"+("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(c>=0?c:0)).slice(-2);return a==-1&&s==-1&&c==-1?l:n==-1&&o==-1&&i==-1?u:l+"T"+u}var EYe=function(){var e={};e.version="1.2.0";function t(){for(var O=0,D=new Array(256),N=0;N!=256;++N)O=N,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,O=O&1?-306674912^O>>>1:O>>>1,D[N]=O;return typeof Int32Array<"u"?new Int32Array(D):D}var r=t();function n(O){var D=0,N=0,U=0,B=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(U=0;U!=256;++U)B[U]=O[U];for(U=0;U!=256;++U)for(N=O[U],D=256+U;D<4096;D+=256)N=B[D]=N>>>8^O[N&255];var F=[];for(U=1;U!=16;++U)F[U-1]=typeof Int32Array<"u"?B.subarray(U*256,U*256+256):B.slice(U*256,U*256+256);return F}var o=n(r),i=o[0],a=o[1],s=o[2],c=o[3],l=o[4],u=o[5],f=o[6],d=o[7],h=o[8],p=o[9],g=o[10],m=o[11],v=o[12],y=o[13],b=o[14];function w(O,D){for(var N=D^-1,U=0,B=O.length;U<B;)N=N>>>8^r[(N^O.charCodeAt(U++))&255];return~N}function E(O,D){for(var N=D^-1,U=O.length-15,B=0;B<U;)N=b[O[B++]^N&255]^y[O[B++]^N>>8&255]^v[O[B++]^N>>16&255]^m[O[B++]^N>>>24]^g[O[B++]]^p[O[B++]]^h[O[B++]]^d[O[B++]]^f[O[B++]]^u[O[B++]]^l[O[B++]]^c[O[B++]]^s[O[B++]]^a[O[B++]]^i[O[B++]]^r[O[B++]];for(U+=15;B<U;)N=N>>>8^r[(N^O[B++])&255];return~N}function I(O,D){for(var N=D^-1,U=0,B=O.length,F=0,T=0;U<B;)F=O.charCodeAt(U++),F<128?N=N>>>8^r[(N^F)&255]:F<2048?(N=N>>>8^r[(N^(192|F>>6&31))&255],N=N>>>8^r[(N^(128|F&63))&255]):F>=55296&&F<57344?(F=(F&1023)+64,T=O.charCodeAt(U++)&1023,N=N>>>8^r[(N^(240|F>>8&7))&255],N=N>>>8^r[(N^(128|F>>2&63))&255],N=N>>>8^r[(N^(128|T>>6&15|(F&3)<<4))&255],N=N>>>8^r[(N^(128|T&63))&255]):(N=N>>>8^r[(N^(224|F>>12&15))&255],N=N>>>8^r[(N^(128|F>>6&63))&255],N=N>>>8^r[(N^(128|F&63))&255]);return~N}return e.table=r,e.bstr=w,e.buf=E,e.str=I,e}(),En=function(){var t={};t.version="1.2.1";function r(fe,ke){for(var be=fe.split("/"),Ce=ke.split("/"),Ee=0,me=0,_e=Math.min(be.length,Ce.length);Ee<_e;++Ee){if(me=be[Ee].length-Ce[Ee].length)return me;if(be[Ee]!=Ce[Ee])return be[Ee]<Ce[Ee]?-1:1}return be.length-Ce.length}function n(fe){if(fe.charAt(fe.length-1)=="/")return fe.slice(0,-1).indexOf("/")===-1?fe:n(fe.slice(0,-1));var ke=fe.lastIndexOf("/");return ke===-1?fe:fe.slice(0,ke+1)}function o(fe){if(fe.charAt(fe.length-1)=="/")return o(fe.slice(0,-1));var ke=fe.lastIndexOf("/");return ke===-1?fe:fe.slice(ke+1)}function i(fe,ke){typeof ke=="string"&&(ke=new Date(ke));var be=ke.getHours();be=be<<6|ke.getMinutes(),be=be<<5|ke.getSeconds()>>>1,fe.write_shift(2,be);var Ce=ke.getFullYear()-1980;Ce=Ce<<4|ke.getMonth()+1,Ce=Ce<<5|ke.getDate(),fe.write_shift(2,Ce)}function a(fe){var ke=fe.read_shift(2)&65535,be=fe.read_shift(2)&65535,Ce=new Date,Ee=be&31;be>>>=5;var me=be&15;be>>>=4,Ce.setMilliseconds(0),Ce.setFullYear(be+1980),Ce.setMonth(me-1),Ce.setDate(Ee);var _e=ke&31;ke>>>=5;var Be=ke&63;return ke>>>=6,Ce.setHours(ke),Ce.setMinutes(Be),Ce.setSeconds(_e<<1),Ce}function s(fe){Sa(fe,0);for(var ke={},be=0;fe.l<=fe.length-4;){var Ce=fe.read_shift(2),Ee=fe.read_shift(2),me=fe.l+Ee,_e={};switch(Ce){case 21589:be=fe.read_shift(1),be&1&&(_e.mtime=fe.read_shift(4)),Ee>5&&(be&2&&(_e.atime=fe.read_shift(4)),be&4&&(_e.ctime=fe.read_shift(4))),_e.mtime&&(_e.mt=new Date(_e.mtime*1e3));break}fe.l=me,ke[Ce]=_e}return ke}var c;function l(){return c||(c={})}function u(fe,ke){if(fe[0]==80&&fe[1]==75)return Nt(fe,ke);if((fe[0]|32)==109&&(fe[1]|32)==105)return wt(fe,ke);if(fe.length<512)throw new Error("CFB file size "+fe.length+" < 512");var be=3,Ce=512,Ee=0,me=0,_e=0,Be=0,De=0,je=[],Le=fe.slice(0,512);Sa(Le,0);var lt=f(Le);switch(be=lt[0],be){case 3:Ce=512;break;case 4:Ce=4096;break;case 0:if(lt[1]==0)return Nt(fe,ke);default:throw new Error("Major Version: Expected 3 or 4 saw "+be)}Ce!==512&&(Le=fe.slice(0,Ce),Sa(Le,28));var vt=fe.slice(0,Ce);d(Le,be);var Bt=Le.read_shift(4,"i");if(be===3&&Bt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Bt);Le.l+=4,_e=Le.read_shift(4,"i"),Le.l+=4,Le.chk("00100000","Mini Stream Cutoff Size: "),Be=Le.read_shift(4,"i"),Ee=Le.read_shift(4,"i"),De=Le.read_shift(4,"i"),me=Le.read_shift(4,"i");for(var Se=-1,He=0;He<109&&(Se=Le.read_shift(4,"i"),!(Se<0));++He)je[He]=Se;var ct=h(fe,Ce);m(De,me,ct,Ce,je);var xt=y(ct,_e,je,Ce);xt[_e].name="!Directory",Ee>0&&Be!==T&&(xt[Be].name="!MiniFAT"),xt[je[0]].name="!FAT",xt.fat_addrs=je,xt.ssz=Ce;var Zt={},Rt=[],Ht=[],Nr=[];b(_e,xt,ct,Rt,Ee,Zt,Ht,Be),p(Ht,Nr,Rt),Rt.shift();var kr={FileIndex:Ht,FullPaths:Nr};return ke&&ke.raw&&(kr.raw={header:vt,sectors:ct}),kr}function f(fe){if(fe[fe.l]==80&&fe[fe.l+1]==75)return[0,0];fe.chk(P,"Header Signature: "),fe.l+=16;var ke=fe.read_shift(2,"u");return[fe.read_shift(2,"u"),ke]}function d(fe,ke){var be=9;switch(fe.l+=2,be=fe.read_shift(2)){case 9:if(ke!=3)throw new Error("Sector Shift: Expected 9 saw "+be);break;case 12:if(ke!=4)throw new Error("Sector Shift: Expected 12 saw "+be);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+be)}fe.chk("0600","Mini Sector Shift: "),fe.chk("000000000000","Reserved: ")}function h(fe,ke){for(var be=Math.ceil(fe.length/ke)-1,Ce=[],Ee=1;Ee<be;++Ee)Ce[Ee-1]=fe.slice(Ee*ke,(Ee+1)*ke);return Ce[be-1]=fe.slice(be*ke),Ce}function p(fe,ke,be){for(var Ce=0,Ee=0,me=0,_e=0,Be=0,De=be.length,je=[],Le=[];Ce<De;++Ce)je[Ce]=Le[Ce]=Ce,ke[Ce]=be[Ce];for(;Be<Le.length;++Be)Ce=Le[Be],Ee=fe[Ce].L,me=fe[Ce].R,_e=fe[Ce].C,je[Ce]===Ce&&(Ee!==-1&&je[Ee]!==Ee&&(je[Ce]=je[Ee]),me!==-1&&je[me]!==me&&(je[Ce]=je[me])),_e!==-1&&(je[_e]=Ce),Ee!==-1&&Ce!=je[Ce]&&(je[Ee]=je[Ce],Le.lastIndexOf(Ee)<Be&&Le.push(Ee)),me!==-1&&Ce!=je[Ce]&&(je[me]=je[Ce],Le.lastIndexOf(me)<Be&&Le.push(me));for(Ce=1;Ce<De;++Ce)je[Ce]===Ce&&(me!==-1&&je[me]!==me?je[Ce]=je[me]:Ee!==-1&&je[Ee]!==Ee&&(je[Ce]=je[Ee]));for(Ce=1;Ce<De;++Ce)if(fe[Ce].type!==0){if(Be=Ce,Be!=je[Be])do Be=je[Be],ke[Ce]=ke[Be]+"/"+ke[Ce];while(Be!==0&&je[Be]!==-1&&Be!=je[Be]);je[Ce]=-1}for(ke[0]+="/",Ce=1;Ce<De;++Ce)fe[Ce].type!==2&&(ke[Ce]+="/")}function g(fe,ke,be){for(var Ce=fe.start,Ee=fe.size,me=[],_e=Ce;be&&Ee>0&&_e>=0;)me.push(ke.slice(_e*F,_e*F+F)),Ee-=F,_e=zp(be,_e*4);return me.length===0?Ui(0):sh(me).slice(0,fe.size)}function m(fe,ke,be,Ce,Ee){var me=T;if(fe===T){if(ke!==0)throw new Error("DIFAT chain shorter than expected")}else if(fe!==-1){var _e=be[fe],Be=(Ce>>>2)-1;if(!_e)return;for(var De=0;De<Be&&(me=zp(_e,De*4))!==T;++De)Ee.push(me);m(zp(_e,Ce-4),ke-1,be,Ce,Ee)}}function v(fe,ke,be,Ce,Ee){var me=[],_e=[];Ee||(Ee=[]);var Be=Ce-1,De=0,je=0;for(De=ke;De>=0;){Ee[De]=!0,me[me.length]=De,_e.push(fe[De]);var Le=be[Math.floor(De*4/Ce)];if(je=De*4&Be,Ce<4+je)throw new Error("FAT boundary crossed: "+De+" 4 "+Ce);if(!fe[Le])break;De=zp(fe[Le],je)}return{nodes:me,data:kj([_e])}}function y(fe,ke,be,Ce){var Ee=fe.length,me=[],_e=[],Be=[],De=[],je=Ce-1,Le=0,lt=0,vt=0,Bt=0;for(Le=0;Le<Ee;++Le)if(Be=[],vt=Le+ke,vt>=Ee&&(vt-=Ee),!_e[vt]){De=[];var Se=[];for(lt=vt;lt>=0;){Se[lt]=!0,_e[lt]=!0,Be[Be.length]=lt,De.push(fe[lt]);var He=be[Math.floor(lt*4/Ce)];if(Bt=lt*4&je,Ce<4+Bt)throw new Error("FAT boundary crossed: "+lt+" 4 "+Ce);if(!fe[He]||(lt=zp(fe[He],Bt),Se[lt]))break}me[vt]={nodes:Be,data:kj([De])}}return me}function b(fe,ke,be,Ce,Ee,me,_e,Be){for(var De=0,je=Ce.length?2:0,Le=ke[fe].data,lt=0,vt=0,Bt;lt<Le.length;lt+=128){var Se=Le.slice(lt,lt+128);Sa(Se,64),vt=Se.read_shift(2),Bt=hF(Se,0,vt-je),Ce.push(Bt);var He={name:Bt,type:Se.read_shift(1),color:Se.read_shift(1),L:Se.read_shift(4,"i"),R:Se.read_shift(4,"i"),C:Se.read_shift(4,"i"),clsid:Se.read_shift(16),state:Se.read_shift(4,"i"),start:0,size:0},ct=Se.read_shift(2)+Se.read_shift(2)+Se.read_shift(2)+Se.read_shift(2);ct!==0&&(He.ct=w(Se,Se.l-8));var xt=Se.read_shift(2)+Se.read_shift(2)+Se.read_shift(2)+Se.read_shift(2);xt!==0&&(He.mt=w(Se,Se.l-8)),He.start=Se.read_shift(4,"i"),He.size=Se.read_shift(4,"i"),He.size<0&&He.start<0&&(He.size=He.type=0,He.start=T,He.name=""),He.type===5?(De=He.start,Ee>0&&De!==T&&(ke[De].name="!StreamData")):He.size>=4096?(He.storage="fat",ke[He.start]===void 0&&(ke[He.start]=v(be,He.start,ke.fat_addrs,ke.ssz)),ke[He.start].name=He.name,He.content=ke[He.start].data.slice(0,He.size)):(He.storage="minifat",He.size<0?He.size=0:De!==T&&He.start!==T&&ke[De]&&(He.content=g(He,ke[De].data,(ke[Be]||{}).data))),He.content&&Sa(He.content,0),me[Bt]=He,_e.push(He)}}function w(fe,ke){return new Date((fl(fe,ke+4)/1e7*Math.pow(2,32)+fl(fe,ke)/1e7-11644473600)*1e3)}function E(fe,ke){return l(),u(c.readFileSync(fe),ke)}function I(fe,ke){var be=ke&&ke.type;switch(be||Sn&&Buffer.isBuffer(fe)&&(be="buffer"),be||"base64"){case"file":return E(fe,ke);case"base64":return u(Gc(Cl(fe)),ke);case"binary":return u(Gc(fe),ke)}return u(fe,ke)}function O(fe,ke){var be=ke||{},Ce=be.root||"Root Entry";if(fe.FullPaths||(fe.FullPaths=[]),fe.FileIndex||(fe.FileIndex=[]),fe.FullPaths.length!==fe.FileIndex.length)throw new Error("inconsistent CFB structure");fe.FullPaths.length===0&&(fe.FullPaths[0]=Ce+"/",fe.FileIndex[0]={name:Ce,type:5}),be.CLSID&&(fe.FileIndex[0].clsid=be.CLSID),D(fe)}function D(fe){var ke="Sh33tJ5";if(!En.find(fe,"/"+ke)){var be=Ui(4);be[0]=55,be[1]=be[3]=50,be[2]=54,fe.FileIndex.push({name:ke,type:2,content:be,size:4,L:69,R:69,C:69}),fe.FullPaths.push(fe.FullPaths[0]+ke),N(fe)}}function N(fe,ke){O(fe);for(var be=!1,Ce=!1,Ee=fe.FullPaths.length-1;Ee>=0;--Ee){var me=fe.FileIndex[Ee];switch(me.type){case 0:Ce?be=!0:(fe.FileIndex.pop(),fe.FullPaths.pop());break;case 1:case 2:case 5:Ce=!0,isNaN(me.R*me.L*me.C)&&(be=!0),me.R>-1&&me.L>-1&&me.R==me.L&&(be=!0);break;default:be=!0;break}}if(!(!be&&!ke)){var _e=new Date(1987,1,19),Be=0,De=Object.create?Object.create(null):{},je=[];for(Ee=0;Ee<fe.FullPaths.length;++Ee)De[fe.FullPaths[Ee]]=!0,fe.FileIndex[Ee].type!==0&&je.push([fe.FullPaths[Ee],fe.FileIndex[Ee]]);for(Ee=0;Ee<je.length;++Ee){var Le=n(je[Ee][0]);Ce=De[Le],Ce||(je.push([Le,{name:o(Le).replace("/",""),type:1,clsid:C,ct:_e,mt:_e,content:null}]),De[Le]=!0)}for(je.sort(function(Bt,Se){return r(Bt[0],Se[0])}),fe.FullPaths=[],fe.FileIndex=[],Ee=0;Ee<je.length;++Ee)fe.FullPaths[Ee]=je[Ee][0],fe.FileIndex[Ee]=je[Ee][1];for(Ee=0;Ee<je.length;++Ee){var lt=fe.FileIndex[Ee],vt=fe.FullPaths[Ee];if(lt.name=o(vt).replace("/",""),lt.L=lt.R=lt.C=-(lt.color=1),lt.size=lt.content?lt.content.length:0,lt.start=0,lt.clsid=lt.clsid||C,Ee===0)lt.C=je.length>1?1:-1,lt.size=0,lt.type=5;else if(vt.slice(-1)=="/"){for(Be=Ee+1;Be<je.length&&n(fe.FullPaths[Be])!=vt;++Be);for(lt.C=Be>=je.length?-1:Be,Be=Ee+1;Be<je.length&&n(fe.FullPaths[Be])!=n(vt);++Be);lt.R=Be>=je.length?-1:Be,lt.type=1}else n(fe.FullPaths[Ee+1]||"")==n(vt)&&(lt.R=Ee+1),lt.type=2}}}function U(fe,ke){var be=ke||{};if(be.fileType=="mad")return Dt(fe,be);switch(N(fe),be.fileType){case"zip":return Ye(fe,be)}var Ce=function(Bt){for(var Se=0,He=0,ct=0;ct<Bt.FileIndex.length;++ct){var xt=Bt.FileIndex[ct];if(xt.content){var Zt=xt.content.length;Zt>0&&(Zt<4096?Se+=Zt+63>>6:He+=Zt+511>>9)}}for(var Rt=Bt.FullPaths.length+3>>2,Ht=Se+7>>3,Nr=Se+127>>7,kr=Ht+He+Rt+Nr,_r=kr+127>>7,br=_r<=109?0:Math.ceil((_r-109)/127);kr+_r+br+127>>7>_r;)br=++_r<=109?0:Math.ceil((_r-109)/127);var qr=[1,br,_r,Nr,Rt,He,Se,0];return Bt.FileIndex[0].size=Se<<6,qr[7]=(Bt.FileIndex[0].start=qr[0]+qr[1]+qr[2]+qr[3]+qr[4]+qr[5])+(qr[6]+7>>3),qr}(fe),Ee=Ui(Ce[7]<<9),me=0,_e=0;{for(me=0;me<8;++me)Ee.write_shift(1,_[me]);for(me=0;me<8;++me)Ee.write_shift(2,0);for(Ee.write_shift(2,62),Ee.write_shift(2,3),Ee.write_shift(2,65534),Ee.write_shift(2,9),Ee.write_shift(2,6),me=0;me<3;++me)Ee.write_shift(2,0);for(Ee.write_shift(4,0),Ee.write_shift(4,Ce[2]),Ee.write_shift(4,Ce[0]+Ce[1]+Ce[2]+Ce[3]-1),Ee.write_shift(4,0),Ee.write_shift(4,4096),Ee.write_shift(4,Ce[3]?Ce[0]+Ce[1]+Ce[2]-1:T),Ee.write_shift(4,Ce[3]),Ee.write_shift(-4,Ce[1]?Ce[0]-1:T),Ee.write_shift(4,Ce[1]),me=0;me<109;++me)Ee.write_shift(-4,me<Ce[2]?Ce[1]+me:-1)}if(Ce[1])for(_e=0;_e<Ce[1];++_e){for(;me<236+_e*127;++me)Ee.write_shift(-4,me<Ce[2]?Ce[1]+me:-1);Ee.write_shift(-4,_e===Ce[1]-1?T:_e+1)}var Be=function(Bt){for(_e+=Bt;me<_e-1;++me)Ee.write_shift(-4,me+1);Bt&&(++me,Ee.write_shift(-4,T))};for(_e=me=0,_e+=Ce[1];me<_e;++me)Ee.write_shift(-4,S.DIFSECT);for(_e+=Ce[2];me<_e;++me)Ee.write_shift(-4,S.FATSECT);Be(Ce[3]),Be(Ce[4]);for(var De=0,je=0,Le=fe.FileIndex[0];De<fe.FileIndex.length;++De)Le=fe.FileIndex[De],Le.content&&(je=Le.content.length,!(je<4096)&&(Le.start=_e,Be(je+511>>9)));for(Be(Ce[6]+7>>3);Ee.l&511;)Ee.write_shift(-4,S.ENDOFCHAIN);for(_e=me=0,De=0;De<fe.FileIndex.length;++De)Le=fe.FileIndex[De],Le.content&&(je=Le.content.length,!(!je||je>=4096)&&(Le.start=_e,Be(je+63>>6)));for(;Ee.l&511;)Ee.write_shift(-4,S.ENDOFCHAIN);for(me=0;me<Ce[4]<<2;++me){var lt=fe.FullPaths[me];if(!lt||lt.length===0){for(De=0;De<17;++De)Ee.write_shift(4,0);for(De=0;De<3;++De)Ee.write_shift(4,-1);for(De=0;De<12;++De)Ee.write_shift(4,0);continue}Le=fe.FileIndex[me],me===0&&(Le.start=Le.size?Le.start-1:T);var vt=me===0&&be.root||Le.name;if(je=2*(vt.length+1),Ee.write_shift(64,vt,"utf16le"),Ee.write_shift(2,je),Ee.write_shift(1,Le.type),Ee.write_shift(1,Le.color),Ee.write_shift(-4,Le.L),Ee.write_shift(-4,Le.R),Ee.write_shift(-4,Le.C),Le.clsid)Ee.write_shift(16,Le.clsid,"hex");else for(De=0;De<4;++De)Ee.write_shift(4,0);Ee.write_shift(4,Le.state||0),Ee.write_shift(4,0),Ee.write_shift(4,0),Ee.write_shift(4,0),Ee.write_shift(4,0),Ee.write_shift(4,Le.start),Ee.write_shift(4,Le.size),Ee.write_shift(4,0)}for(me=1;me<fe.FileIndex.length;++me)if(Le=fe.FileIndex[me],Le.size>=4096)if(Ee.l=Le.start+1<<9,Sn&&Buffer.isBuffer(Le.content))Le.content.copy(Ee,Ee.l,0,Le.size),Ee.l+=Le.size+511&-512;else{for(De=0;De<Le.size;++De)Ee.write_shift(1,Le.content[De]);for(;De&511;++De)Ee.write_shift(1,0)}for(me=1;me<fe.FileIndex.length;++me)if(Le=fe.FileIndex[me],Le.size>0&&Le.size<4096)if(Sn&&Buffer.isBuffer(Le.content))Le.content.copy(Ee,Ee.l,0,Le.size),Ee.l+=Le.size+63&-64;else{for(De=0;De<Le.size;++De)Ee.write_shift(1,Le.content[De]);for(;De&63;++De)Ee.write_shift(1,0)}if(Sn)Ee.l=Ee.length;else for(;Ee.l<Ee.length;)Ee.write_shift(1,0);return Ee}function B(fe,ke){var be=fe.FullPaths.map(function(De){return De.toUpperCase()}),Ce=be.map(function(De){var je=De.split("/");return je[je.length-(De.slice(-1)=="/"?2:1)]}),Ee=!1;ke.charCodeAt(0)===47?(Ee=!0,ke=be[0].slice(0,-1)+ke):Ee=ke.indexOf("/")!==-1;var me=ke.toUpperCase(),_e=Ee===!0?be.indexOf(me):Ce.indexOf(me);if(_e!==-1)return fe.FileIndex[_e];var Be=!me.match(Db);for(me=me.replace(bs,""),Be&&(me=me.replace(Db,"!")),_e=0;_e<be.length;++_e)if((Be?be[_e].replace(Db,"!"):be[_e]).replace(bs,"")==me||(Be?Ce[_e].replace(Db,"!"):Ce[_e]).replace(bs,"")==me)return fe.FileIndex[_e];return null}var F=64,T=-2,P="d0cf11e0a1b11ae1",_=[208,207,17,224,161,177,26,225],C="00000000000000000000000000000000",S={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:T,FREESECT:-1,HEADER_SIGNATURE:P,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:C,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function x(fe,ke,be){l();var Ce=U(fe,be);c.writeFileSync(ke,Ce)}function k(fe){for(var ke=new Array(fe.length),be=0;be<fe.length;++be)ke[be]=String.fromCharCode(fe[be]);return ke.join("")}function L(fe,ke){var be=U(fe,ke);switch(ke&&ke.type||"buffer"){case"file":return l(),c.writeFileSync(ke.filename,be),be;case"binary":return typeof be=="string"?be:k(be);case"base64":return sj(typeof be=="string"?be:k(be));case"buffer":if(Sn)return Buffer.isBuffer(be)?be:y0(be);case"array":return typeof be=="string"?Gc(be):be}return be}var j;function z(fe){try{var ke=fe.InflateRaw,be=new ke;if(be._processChunk(new Uint8Array([3,0]),be._finishFlushFlag),be.bytesRead)j=fe;else throw new Error("zlib does not expose bytesRead")}catch(Ce){console.error("cannot use native zlib: "+(Ce.message||Ce))}}function Y(fe,ke){if(!j)return At(fe,ke);var be=j.InflateRaw,Ce=new be,Ee=Ce._processChunk(fe.slice(fe.l),Ce._finishFlushFlag);return fe.l+=Ce.bytesRead,Ee}function K(fe){return j?j.deflateRawSync(fe):$e(fe)}var Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],q=[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],J=[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];function G(fe){var ke=(fe<<1|fe<<11)&139536|(fe<<5|fe<<15)&558144;return(ke>>16|ke>>8|ke)&255}for(var V=typeof Uint8Array<"u",X=V?new Uint8Array(256):[],te=0;te<256;++te)X[te]=G(te);function ee(fe,ke){var be=X[fe&255];return ke<=8?be>>>8-ke:(be=be<<8|X[fe>>8&255],ke<=16?be>>>16-ke:(be=be<<8|X[fe>>16&255],be>>>24-ke))}function re(fe,ke){var be=ke&7,Ce=ke>>>3;return(fe[Ce]|(be<=6?0:fe[Ce+1]<<8))>>>be&3}function se(fe,ke){var be=ke&7,Ce=ke>>>3;return(fe[Ce]|(be<=5?0:fe[Ce+1]<<8))>>>be&7}function pe(fe,ke){var be=ke&7,Ce=ke>>>3;return(fe[Ce]|(be<=4?0:fe[Ce+1]<<8))>>>be&15}function ce(fe,ke){var be=ke&7,Ce=ke>>>3;return(fe[Ce]|(be<=3?0:fe[Ce+1]<<8))>>>be&31}function ne(fe,ke){var be=ke&7,Ce=ke>>>3;return(fe[Ce]|(be<=1?0:fe[Ce+1]<<8))>>>be&127}function he(fe,ke,be){var Ce=ke&7,Ee=ke>>>3,me=(1<<be)-1,_e=fe[Ee]>>>Ce;return be<8-Ce||(_e|=fe[Ee+1]<<8-Ce,be<16-Ce)||(_e|=fe[Ee+2]<<16-Ce,be<24-Ce)||(_e|=fe[Ee+3]<<24-Ce),_e&me}function oe(fe,ke,be){var Ce=ke&7,Ee=ke>>>3;return Ce<=5?fe[Ee]|=(be&7)<<Ce:(fe[Ee]|=be<<Ce&255,fe[Ee+1]=(be&7)>>8-Ce),ke+3}function le(fe,ke,be){var Ce=ke&7,Ee=ke>>>3;return be=(be&1)<<Ce,fe[Ee]|=be,ke+1}function de(fe,ke,be){var Ce=ke&7,Ee=ke>>>3;return be<<=Ce,fe[Ee]|=be&255,be>>>=8,fe[Ee+1]=be,ke+8}function ve(fe,ke,be){var Ce=ke&7,Ee=ke>>>3;return be<<=Ce,fe[Ee]|=be&255,be>>>=8,fe[Ee+1]=be&255,fe[Ee+2]=be>>>8,ke+16}function we(fe,ke){var be=fe.length,Ce=2*be>ke?2*be:ke+5,Ee=0;if(be>=ke)return fe;if(Sn){var me=lj(Ce);if(fe.copy)fe.copy(me);else for(;Ee<fe.length;++Ee)me[Ee]=fe[Ee];return me}else if(V){var _e=new Uint8Array(Ce);if(_e.set)_e.set(fe);else for(;Ee<be;++Ee)_e[Ee]=fe[Ee];return _e}return fe.length=Ce,fe}function ie(fe){for(var ke=new Array(fe),be=0;be<fe;++be)ke[be]=0;return ke}function ge(fe,ke,be){var Ce=1,Ee=0,me=0,_e=0,Be=0,De=fe.length,je=V?new Uint16Array(32):ie(32);for(me=0;me<32;++me)je[me]=0;for(me=De;me<be;++me)fe[me]=0;De=fe.length;var Le=V?new Uint16Array(De):ie(De);for(me=0;me<De;++me)je[Ee=fe[me]]++,Ce<Ee&&(Ce=Ee),Le[me]=0;for(je[0]=0,me=1;me<=Ce;++me)je[me+16]=Be=Be+je[me-1]<<1;for(me=0;me<De;++me)Be=fe[me],Be!=0&&(Le[me]=je[Be+16]++);var lt=0;for(me=0;me<De;++me)if(lt=fe[me],lt!=0)for(Be=ee(Le[me],Ce)>>Ce-lt,_e=(1<<Ce+4-lt)-1;_e>=0;--_e)ke[Be|_e<<lt]=lt&15|me<<4;return Ce}var Pe=V?new Uint16Array(512):ie(512),Fe=V?new Uint16Array(32):ie(32);if(!V){for(var Ie=0;Ie<512;++Ie)Pe[Ie]=0;for(Ie=0;Ie<32;++Ie)Fe[Ie]=0}(function(){for(var fe=[],ke=0;ke<32;ke++)fe.push(5);ge(fe,Fe,32);var be=[];for(ke=0;ke<=143;ke++)be.push(8);for(;ke<=255;ke++)be.push(9);for(;ke<=279;ke++)be.push(7);for(;ke<=287;ke++)be.push(8);ge(be,Pe,288)})();var Oe=function(){for(var ke=V?new Uint8Array(32768):[],be=0,Ce=0;be<J.length-1;++be)for(;Ce<J[be+1];++Ce)ke[Ce]=be;for(;Ce<32768;++Ce)ke[Ce]=29;var Ee=V?new Uint8Array(259):[];for(be=0,Ce=0;be<q.length-1;++be)for(;Ce<q[be+1];++Ce)Ee[Ce]=be;function me(Be,De){for(var je=0;je<Be.length;){var Le=Math.min(65535,Be.length-je),lt=je+Le==Be.length;for(De.write_shift(1,+lt),De.write_shift(2,Le),De.write_shift(2,~Le&65535);Le-- >0;)De[De.l++]=Be[je++]}return De.l}function _e(Be,De){for(var je=0,Le=0,lt=V?new Uint16Array(32768):[];Le<Be.length;){var vt=Math.min(65535,Be.length-Le);if(vt<10){for(je=oe(De,je,+(Le+vt==Be.length)),je&7&&(je+=8-(je&7)),De.l=je/8|0,De.write_shift(2,vt),De.write_shift(2,~vt&65535);vt-- >0;)De[De.l++]=Be[Le++];je=De.l*8;continue}je=oe(De,je,+(Le+vt==Be.length)+2);for(var Bt=0;vt-- >0;){var Se=Be[Le];Bt=(Bt<<5^Se)&32767;var He=-1,ct=0;if((He=lt[Bt])&&(He|=Le&-32768,He>Le&&(He-=32768),He<Le))for(;Be[He+ct]==Be[Le+ct]&&ct<250;)++ct;if(ct>2){Se=Ee[ct],Se<=22?je=de(De,je,X[Se+1]>>1)-1:(de(De,je,3),je+=5,de(De,je,X[Se-23]>>5),je+=3);var xt=Se<8?0:Se-4>>2;xt>0&&(ve(De,je,ct-q[Se]),je+=xt),Se=ke[Le-He],je=de(De,je,X[Se]>>3),je-=3;var Zt=Se<4?0:Se-2>>1;Zt>0&&(ve(De,je,Le-He-J[Se]),je+=Zt);for(var Rt=0;Rt<ct;++Rt)lt[Bt]=Le&32767,Bt=(Bt<<5^Be[Le])&32767,++Le;vt-=ct-1}else Se<=143?Se=Se+48:je=le(De,je,1),je=de(De,je,X[Se]),lt[Bt]=Le&32767,++Le}je=de(De,je,0)-1}return De.l=(je+7)/8|0,De.l}return function(De,je){return De.length<8?me(De,je):_e(De,je)}}();function $e(fe){var ke=Ui(50+Math.floor(fe.length*1.1)),be=Oe(fe,ke);return ke.slice(0,be)}var et=V?new Uint16Array(32768):ie(32768),Ze=V?new Uint16Array(32768):ie(32768),Ne=V?new Uint16Array(128):ie(128),Qe=1,Xe=1;function rt(fe,ke){var be=ce(fe,ke)+257;ke+=5;var Ce=ce(fe,ke)+1;ke+=5;var Ee=pe(fe,ke)+4;ke+=4;for(var me=0,_e=V?new Uint8Array(19):ie(19),Be=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],De=1,je=V?new Uint8Array(8):ie(8),Le=V?new Uint8Array(8):ie(8),lt=_e.length,vt=0;vt<Ee;++vt)_e[Q[vt]]=me=se(fe,ke),De<me&&(De=me),je[me]++,ke+=3;var Bt=0;for(je[0]=0,vt=1;vt<=De;++vt)Le[vt]=Bt=Bt+je[vt-1]<<1;for(vt=0;vt<lt;++vt)(Bt=_e[vt])!=0&&(Be[vt]=Le[Bt]++);var Se=0;for(vt=0;vt<lt;++vt)if(Se=_e[vt],Se!=0){Bt=X[Be[vt]]>>8-Se;for(var He=(1<<7-Se)-1;He>=0;--He)Ne[Bt|He<<Se]=Se&7|vt<<3}var ct=[];for(De=1;ct.length<be+Ce;)switch(Bt=Ne[ne(fe,ke)],ke+=Bt&7,Bt>>>=3){case 16:for(me=3+re(fe,ke),ke+=2,Bt=ct[ct.length-1];me-- >0;)ct.push(Bt);break;case 17:for(me=3+se(fe,ke),ke+=3;me-- >0;)ct.push(0);break;case 18:for(me=11+ne(fe,ke),ke+=7;me-- >0;)ct.push(0);break;default:ct.push(Bt),De<Bt&&(De=Bt);break}var xt=ct.slice(0,be),Zt=ct.slice(be);for(vt=be;vt<286;++vt)xt[vt]=0;for(vt=Ce;vt<30;++vt)Zt[vt]=0;return Qe=ge(xt,et,286),Xe=ge(Zt,Ze,30),ke}function ht(fe,ke){if(fe[0]==3&&!(fe[1]&3))return[Qh(ke),2];for(var be=0,Ce=0,Ee=lj(ke||1<<18),me=0,_e=Ee.length>>>0,Be=0,De=0;!(Ce&1);){if(Ce=se(fe,be),be+=3,Ce>>>1)Ce>>1==1?(Be=9,De=5):(be=rt(fe,be),Be=Qe,De=Xe);else{be&7&&(be+=8-(be&7));var je=fe[be>>>3]|fe[(be>>>3)+1]<<8;if(be+=32,je>0)for(!ke&&_e<me+je&&(Ee=we(Ee,me+je),_e=Ee.length);je-- >0;)Ee[me++]=fe[be>>>3],be+=8;continue}for(;;){!ke&&_e<me+32767&&(Ee=we(Ee,me+32767),_e=Ee.length);var Le=he(fe,be,Be),lt=Ce>>>1==1?Pe[Le]:et[Le];if(be+=lt&15,lt>>>=4,!(lt>>>8&255))Ee[me++]=lt;else{if(lt==256)break;lt-=257;var vt=lt<8?0:lt-4>>2;vt>5&&(vt=0);var Bt=me+q[lt];vt>0&&(Bt+=he(fe,be,vt),be+=vt),Le=he(fe,be,De),lt=Ce>>>1==1?Fe[Le]:Ze[Le],be+=lt&15,lt>>>=4;var Se=lt<4?0:lt-2>>1,He=J[lt];for(Se>0&&(He+=he(fe,be,Se),be+=Se),!ke&&_e<Bt&&(Ee=we(Ee,Bt+100),_e=Ee.length);me<Bt;)Ee[me]=Ee[me-He],++me}}}return ke?[Ee,be+7>>>3]:[Ee.slice(0,me),be+7>>>3]}function At(fe,ke){var be=fe.slice(fe.l||0),Ce=ht(be,ke);return fe.l+=Ce[1],Ce[0]}function Qt(fe,ke){if(fe)typeof console<"u"&&console.error(ke);else throw new Error(ke)}function Nt(fe,ke){var be=fe;Sa(be,0);var Ce=[],Ee=[],me={FileIndex:Ce,FullPaths:Ee};O(me,{root:ke.root});for(var _e=be.length-4;(be[_e]!=80||be[_e+1]!=75||be[_e+2]!=5||be[_e+3]!=6)&&_e>=0;)--_e;be.l=_e+4,be.l+=4;var Be=be.read_shift(2);be.l+=6;var De=be.read_shift(4);for(be.l=De,_e=0;_e<Be;++_e){be.l+=20;var je=be.read_shift(4),Le=be.read_shift(4),lt=be.read_shift(2),vt=be.read_shift(2),Bt=be.read_shift(2);be.l+=8;var Se=be.read_shift(4),He=s(be.slice(be.l+lt,be.l+lt+vt));be.l+=lt+vt+Bt;var ct=be.l;be.l=Se+4,Ue(be,je,Le,me,He),be.l=ct}return me}function Ue(fe,ke,be,Ce,Ee){fe.l+=2;var me=fe.read_shift(2),_e=fe.read_shift(2),Be=a(fe);if(me&8257)throw new Error("Unsupported ZIP encryption");for(var De=fe.read_shift(4),je=fe.read_shift(4),Le=fe.read_shift(4),lt=fe.read_shift(2),vt=fe.read_shift(2),Bt="",Se=0;Se<lt;++Se)Bt+=String.fromCharCode(fe[fe.l++]);if(vt){var He=s(fe.slice(fe.l,fe.l+vt));(He[21589]||{}).mt&&(Be=He[21589].mt),((Ee||{})[21589]||{}).mt&&(Be=Ee[21589].mt)}fe.l+=vt;var ct=fe.slice(fe.l,fe.l+je);switch(_e){case 8:ct=Y(fe,Le);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+_e)}var xt=!1;me&8&&(De=fe.read_shift(4),De==134695760&&(De=fe.read_shift(4),xt=!0),je=fe.read_shift(4),Le=fe.read_shift(4)),je!=ke&&Qt(xt,"Bad compressed size: "+ke+" != "+je),Le!=be&&Qt(xt,"Bad uncompressed size: "+be+" != "+Le),Tt(Ce,Bt,ct,{unsafe:!0,mt:Be})}function Ye(fe,ke){var be=ke||{},Ce=[],Ee=[],me=Ui(1),_e=be.compression?8:0,Be=0,De=0,je=0,Le=0,lt=0,vt=fe.FullPaths[0],Bt=vt,Se=fe.FileIndex[0],He=[],ct=0;for(De=1;De<fe.FullPaths.length;++De)if(Bt=fe.FullPaths[De].slice(vt.length),Se=fe.FileIndex[De],!(!Se.size||!Se.content||Bt=="Sh33tJ5")){var xt=Le,Zt=Ui(Bt.length);for(je=0;je<Bt.length;++je)Zt.write_shift(1,Bt.charCodeAt(je)&127);Zt=Zt.slice(0,Zt.l),He[lt]=EYe.buf(Se.content,0);var Rt=Se.content;_e==8&&(Rt=K(Rt)),me=Ui(30),me.write_shift(4,67324752),me.write_shift(2,20),me.write_shift(2,Be),me.write_shift(2,_e),Se.mt?i(me,Se.mt):me.write_shift(4,0),me.write_shift(-4,He[lt]),me.write_shift(4,Rt.length),me.write_shift(4,Se.content.length),me.write_shift(2,Zt.length),me.write_shift(2,0),Le+=me.length,Ce.push(me),Le+=Zt.length,Ce.push(Zt),Le+=Rt.length,Ce.push(Rt),me=Ui(46),me.write_shift(4,33639248),me.write_shift(2,0),me.write_shift(2,20),me.write_shift(2,Be),me.write_shift(2,_e),me.write_shift(4,0),me.write_shift(-4,He[lt]),me.write_shift(4,Rt.length),me.write_shift(4,Se.content.length),me.write_shift(2,Zt.length),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(4,0),me.write_shift(4,xt),ct+=me.l,Ee.push(me),ct+=Zt.length,Ee.push(Zt),++lt}return me=Ui(22),me.write_shift(4,101010256),me.write_shift(2,0),me.write_shift(2,0),me.write_shift(2,lt),me.write_shift(2,lt),me.write_shift(4,ct),me.write_shift(4,Le),me.write_shift(2,0),sh([sh(Ce),sh(Ee),me])}var tt={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function st(fe,ke){if(fe.ctype)return fe.ctype;var be=fe.name||"",Ce=be.match(/\.([^\.]+)$/);return Ce&&tt[Ce[1]]||ke&&(Ce=(be=ke).match(/[\.\\]([^\.\\])+$/),Ce&&tt[Ce[1]])?tt[Ce[1]]:"application/octet-stream"}function mt(fe){for(var ke=sj(fe),be=[],Ce=0;Ce<ke.length;Ce+=76)be.push(ke.slice(Ce,Ce+76));return be.join(`\r
`)+`\r
`}function _t(fe){var ke=fe.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(je){var Le=je.charCodeAt(0).toString(16).toUpperCase();return"="+(Le.length==1?"0"+Le:Le)});ke=ke.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),ke.charAt(0)==`
`&&(ke="=0D"+ke.slice(1)),ke=ke.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var be=[],Ce=ke.split(`\r
`),Ee=0;Ee<Ce.length;++Ee){var me=Ce[Ee];if(me.length==0){be.push("");continue}for(var _e=0;_e<me.length;){var Be=76,De=me.slice(_e,_e+Be);De.charAt(Be-1)=="="?Be--:De.charAt(Be-2)=="="?Be-=2:De.charAt(Be-3)=="="&&(Be-=3),De=me.slice(_e,_e+Be),_e+=Be,_e<me.length&&(De+="="),be.push(De)}}return be.join(`\r
`)}function Pt(fe){for(var ke=[],be=0;be<fe.length;++be){for(var Ce=fe[be];be<=fe.length&&Ce.charAt(Ce.length-1)=="=";)Ce=Ce.slice(0,Ce.length-1)+fe[++be];ke.push(Ce)}for(var Ee=0;Ee<ke.length;++Ee)ke[Ee]=ke[Ee].replace(/[=][0-9A-Fa-f]{2}/g,function(me){return String.fromCharCode(parseInt(me.slice(1),16))});return Gc(ke.join(`\r
`))}function Ut(fe,ke,be){for(var Ce="",Ee="",me="",_e,Be=0;Be<10;++Be){var De=ke[Be];if(!De||De.match(/^\s*$/))break;var je=De.match(/^(.*?):\s*([^\s].*)$/);if(je)switch(je[1].toLowerCase()){case"content-location":Ce=je[2].trim();break;case"content-type":me=je[2].trim();break;case"content-transfer-encoding":Ee=je[2].trim();break}}switch(++Be,Ee.toLowerCase()){case"base64":_e=Gc(Cl(ke.slice(Be).join("")));break;case"quoted-printable":_e=Pt(ke.slice(Be));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+Ee)}var Le=Tt(fe,Ce.slice(be.length),_e,{unsafe:!0});me&&(Le.ctype=me)}function wt(fe,ke){if(k(fe.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var be=ke&&ke.root||"",Ce=(Sn&&Buffer.isBuffer(fe)?fe.toString("binary"):k(fe)).split(`\r
`),Ee=0,me="";for(Ee=0;Ee<Ce.length;++Ee)if(me=Ce[Ee],!!/^Content-Location:/i.test(me)&&(me=me.slice(me.indexOf("file")),be||(be=me.slice(0,me.lastIndexOf("/")+1)),me.slice(0,be.length)!=be))for(;be.length>0&&(be=be.slice(0,be.length-1),be=be.slice(0,be.lastIndexOf("/")+1),me.slice(0,be.length)!=be););var _e=(Ce[1]||"").match(/boundary="(.*?)"/);if(!_e)throw new Error("MAD cannot find boundary");var Be="--"+(_e[1]||""),De=[],je=[],Le={FileIndex:De,FullPaths:je};O(Le);var lt,vt=0;for(Ee=0;Ee<Ce.length;++Ee){var Bt=Ce[Ee];Bt!==Be&&Bt!==Be+"--"||(vt++&&Ut(Le,Ce.slice(lt,Ee),be),lt=Ee)}return Le}function Dt(fe,ke){var be=ke||{},Ce=be.boundary||"SheetJS";Ce="------="+Ce;for(var Ee=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+Ce.slice(2)+'"',"","",""],me=fe.FullPaths[0],_e=me,Be=fe.FileIndex[0],De=1;De<fe.FullPaths.length;++De)if(_e=fe.FullPaths[De].slice(me.length),Be=fe.FileIndex[De],!(!Be.size||!Be.content||_e=="Sh33tJ5")){_e=_e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(ct){return"_x"+ct.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(ct){return"_u"+ct.charCodeAt(0).toString(16)+"_"});for(var je=Be.content,Le=Sn&&Buffer.isBuffer(je)?je.toString("binary"):k(je),lt=0,vt=Math.min(1024,Le.length),Bt=0,Se=0;Se<=vt;++Se)(Bt=Le.charCodeAt(Se))>=32&&Bt<128&&++lt;var He=lt>=vt*4/5;Ee.push(Ce),Ee.push("Content-Location: "+(be.root||"file:///C:/SheetJS/")+_e),Ee.push("Content-Transfer-Encoding: "+(He?"quoted-printable":"base64")),Ee.push("Content-Type: "+st(Be,_e)),Ee.push(""),Ee.push(He?_t(Le):mt(Le))}return Ee.push(Ce+`--\r
`),Ee.join(`\r
`)}function qt(fe){var ke={};return O(ke,fe),ke}function Tt(fe,ke,be,Ce){var Ee=Ce&&Ce.unsafe;Ee||O(fe);var me=!Ee&&En.find(fe,ke);if(!me){var _e=fe.FullPaths[0];ke.slice(0,_e.length)==_e?_e=ke:(_e.slice(-1)!="/"&&(_e+="/"),_e=(_e+ke).replace("//","/")),me={name:o(ke),type:2},fe.FileIndex.push(me),fe.FullPaths.push(_e),Ee||En.utils.cfb_gc(fe)}return me.content=be,me.size=be?be.length:0,Ce&&(Ce.CLSID&&(me.clsid=Ce.CLSID),Ce.mt&&(me.mt=Ce.mt),Ce.ct&&(me.ct=Ce.ct)),me}function Me(fe,ke){O(fe);var be=En.find(fe,ke);if(be){for(var Ce=0;Ce<fe.FileIndex.length;++Ce)if(fe.FileIndex[Ce]==be)return fe.FileIndex.splice(Ce,1),fe.FullPaths.splice(Ce,1),!0}return!1}function Ge(fe,ke,be){O(fe);var Ce=En.find(fe,ke);if(Ce){for(var Ee=0;Ee<fe.FileIndex.length;++Ee)if(fe.FileIndex[Ee]==Ce)return fe.FileIndex[Ee].name=o(be),fe.FullPaths[Ee]=be,!0}return!1}function nt(fe){N(fe,!0)}return t.find=B,t.read=I,t.parse=u,t.write=L,t.writeFile=x,t.utils={cfb_new:qt,cfb_add:Tt,cfb_del:Me,cfb_mov:Ge,cfb_gc:nt,ReadShift:dw,CheckField:Kre,prep_blob:Sa,bconcat:sh,use_zlib:z,_deflateRaw:$e,_inflateRaw:At,consts:S},t}();function TYe(e){if(typeof Deno<"u")return Deno.readFileSync(e);if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var t=File(e);t.open("r"),t.encoding="binary";var r=t.read();return t.close(),r}catch(n){if(!n.message||!n.message.match(/onstruct/))throw n}throw new Error("Cannot access file "+e)}function id(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;++n)Object.prototype.hasOwnProperty.call(e,t[n])&&r.push(t[n]);return r}function cF(e){for(var t=[],r=id(e),n=0;n!==r.length;++n)t[e[r[n]]]=r[n];return t}var OE=new Date(1899,11,30,0,0,0);function Ss(e,t){var r=e.getTime();t&&(r-=1462*24*60*60*1e3);var n=OE.getTime()+(e.getTimezoneOffset()-OE.getTimezoneOffset())*6e4;return(r-n)/(24*60*60*1e3)}var Ere=new Date,IYe=OE.getTime()+(Ere.getTimezoneOffset()-OE.getTimezoneOffset())*6e4,gj=Ere.getTimezoneOffset();function d4(e){var t=new Date;return t.setTime(e*24*60*60*1e3+IYe),t.getTimezoneOffset()!==gj&&t.setTime(t.getTime()+(t.getTimezoneOffset()-gj)*6e4),t}function AYe(e){var t=0,r=0,n=!1,o=e.match(/P([0-9\.]+Y)?([0-9\.]+M)?([0-9\.]+D)?T([0-9\.]+H)?([0-9\.]+M)?([0-9\.]+S)?/);if(!o)throw new Error("|"+e+"| is not an ISO8601 Duration");for(var i=1;i!=o.length;++i)if(o[i]){switch(r=1,i>3&&(n=!0),o[i].slice(o[i].length-1)){case"Y":throw new Error("Unsupported ISO Duration Field: "+o[i].slice(o[i].length-1));case"D":r*=24;case"H":r*=60;case"M":if(n)r*=60;else throw new Error("Unsupported ISO Duration Field: M")}t+=r*parseInt(o[i],10)}return t}var vj=new Date("2017-02-19T19:06:09.000Z"),Tre=isNaN(vj.getFullYear())?new Date("2/19/17"):vj,PYe=Tre.getFullYear()==2017;function la(e,t){var r=new Date(e);if(PYe)return t>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):t<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(e instanceof Date)return e;if(Tre.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return e.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var o=e.match(/\d+/g)||["2017","2","19","0","0","0"],i=new Date(+o[0],+o[1]-1,+o[2],+o[3]||0,+o[4]||0,+o[5]||0);return e.indexOf("Z")>-1&&(i=new Date(i.getTime()-i.getTimezoneOffset()*60*1e3)),i}function Xm(e,t){if(Sn&&Buffer.isBuffer(e)){if(t){if(e[0]==255&&e[1]==254)return Nb(e.slice(2).toString("utf16le"));if(e[1]==254&&e[2]==255)return Nb(hre(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(t){if(e[0]==255&&e[1]==254)return Nb(new TextDecoder("utf-16le").decode(e.slice(2)));if(e[0]==254&&e[1]==255)return Nb(new TextDecoder("utf-16be").decode(e.slice(2)))}var r={"€":"","‚":"",ƒ:"","„":"","…":"","†":"","‡":"","ˆ":"","‰":"",Š:"","‹":"",Œ:"",Ž:"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"",š:"","›":"",œ:"",ž:"",Ÿ:""};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(i){return r[i]||i})}catch{}for(var n=[],o=0;o!=e.length;++o)n.push(String.fromCharCode(e[o]));return n.join("")}function Ta(e){if(typeof JSON<"u"&&!Array.isArray(e))return JSON.parse(JSON.stringify(e));if(typeof e!="object"||e==null)return e;if(e instanceof Date)return new Date(e.getTime());var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=Ta(e[r]));return t}function ei(e,t){for(var r="";r.length<t;)r+=e;return r}function ru(e){var t=Number(e);if(!isNaN(t))return isFinite(t)?t:NaN;if(!/\d/.test(e))return t;var r=1,n=e.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(t=Number(n))||(n=n.replace(/[(](.*)[)]/,function(o,i){return r=-r,i}),!isNaN(t=Number(n)))?t/r:t}var MYe=["january","february","march","april","may","june","july","august","september","october","november","december"];function g1(e){var t=new Date(e),r=new Date(NaN),n=t.getYear(),o=t.getMonth(),i=t.getDate();if(isNaN(i))return r;var a=e.toLowerCase();if(a.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(a=a.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),a.length>3&&MYe.indexOf(a)==-1)return r}else if(a.match(/[a-z]/))return r;return n<0||n>8099?r:(o>0||i>1)&&n!=101?t:e.match(/[^-0-9:,\/\\]/)?r:t}var RYe=function(){var e="abacaba".split(/(:?b)/i).length==5;return function(r,n,o){if(e||typeof n=="string")return r.split(n);for(var i=r.split(n),a=[i[0]],s=1;s<i.length;++s)a.push(o),a.push(i[s]);return a}}();function Ire(e){return e?e.content&&e.type?Xm(e.content,!0):e.data?Ob(e.data):e.asNodeBuffer&&Sn?Ob(e.asNodeBuffer().toString("binary")):e.asBinary?Ob(e.asBinary()):e._data&&e._data.getContent?Ob(Xm(Array.prototype.slice.call(e._data.getContent(),0))):null:null}function Are(e){if(!e)return null;if(e.data)return ij(e.data);if(e.asNodeBuffer&&Sn)return e.asNodeBuffer();if(e._data&&e._data.getContent){var t=e._data.getContent();return typeof t=="string"?ij(t):Array.prototype.slice.call(t)}return e.content&&e.type?e.content:null}function OYe(e){return e&&e.name.slice(-4)===".bin"?Are(e):Ire(e)}function zl(e,t){for(var r=e.FullPaths||id(e.files),n=t.toLowerCase().replace(/[\/]/g,"\\"),o=n.replace(/\\/g,"/"),i=0;i<r.length;++i){var a=r[i].replace(/^Root Entry[\/]/,"").toLowerCase();if(n==a||o==a)return e.files?e.files[r[i]]:e.FileIndex[i]}return null}function uF(e,t){var r=zl(e,t);if(r==null)throw new Error("Cannot find file "+t+" in zip");return r}function ki(e,t,r){if(!r)return OYe(uF(e,t));if(!t)return null;try{return ki(e,t)}catch{return null}}function pl(e,t,r){if(!r)return Ire(uF(e,t));if(!t)return null;try{return pl(e,t)}catch{return null}}function Pre(e,t,r){if(!r)return Are(uF(e,t));if(!t)return null;try{return Pre(e,t)}catch{return null}}function yj(e){for(var t=e.FullPaths||id(e.files),r=[],n=0;n<t.length;++n)t[n].slice(-1)!="/"&&r.push(t[n].replace(/^Root Entry[\/]/,""));return r.sort()}function DYe(e,t,r){if(e.FullPaths){if(typeof r=="string"){var n;return Sn?n=y0(r):n=eYe(r),En.utils.cfb_add(e,t,n)}En.utils.cfb_add(e,t,r)}else e.file(t,r)}function Mre(e,t){switch(t.type){case"base64":return En.read(e,{type:"base64"});case"binary":return En.read(e,{type:"binary"});case"buffer":case"array":return En.read(e,{type:"buffer"})}throw new Error("Unrecognized type "+t.type)}function Fb(e,t){if(e.charAt(0)=="/")return e.slice(1);var r=t.split("/");t.slice(-1)!="/"&&r.pop();for(var n=e.split("/");n.length!==0;){var o=n.shift();o===".."?r.pop():o!=="."&&r.push(o)}return r.join("/")}var Rre=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
`,FYe=/([^"\s?>\/]+)\s*=\s*((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g,bj=/<[\/\?]?[a-zA-Z0-9:_-]+(?:\s+[^"\s?>\/]+\s*=\s*(?:"[^"]*"|'[^']*'|[^'">\s=]+))*\s*[\/\?]?>/mg,NYe=/<[^>]*>/g,rs=Rre.match(bj)?bj:NYe,LYe=/<\w*:/,$Ye=/<(\/?)\w+:/;function $r(e,t,r){for(var n={},o=0,i=0;o!==e.length&&!((i=e.charCodeAt(o))===32||i===10||i===13);++o);if(t||(n[0]=e.slice(0,o)),o===e.length)return n;var a=e.match(FYe),s=0,c="",l=0,u="",f="",d=1;if(a)for(l=0;l!=a.length;++l){for(f=a[l],i=0;i!=f.length&&f.charCodeAt(i)!==61;++i);for(u=f.slice(0,i).trim();f.charCodeAt(i+1)==32;)++i;for(d=(o=f.charCodeAt(i+1))==34||o==39?1:0,c=f.slice(i+1+d,f.length-d),s=0;s!=u.length&&u.charCodeAt(s)!==58;++s);if(s===u.length)u.indexOf("_")>0&&(u=u.slice(0,u.indexOf("_"))),n[u]=c,r||(n[u.toLowerCase()]=c);else{var h=(s===5&&u.slice(0,5)==="xmlns"?"xmlns":"")+u.slice(s+1);if(n[h]&&u.slice(s-3,s)=="ext")continue;n[h]=c,r||(n[h.toLowerCase()]=c)}}return n}function dd(e){return e.replace($Ye,"<$1")}var Ore={"&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<","&amp;":"&"},BYe=cF(Ore),Rn=function(){var e=/&(?:quot|apos|gt|lt|amp|#x?([\da-fA-F]+));/ig,t=/_x([\da-fA-F]{4})_/ig;return function r(n){var o=n+"",i=o.indexOf("<![CDATA[");if(i==-1)return o.replace(e,function(s,c){return Ore[s]||String.fromCharCode(parseInt(c,s.indexOf("x")>-1?16:10))||s}).replace(t,function(s,c){return String.fromCharCode(parseInt(c,16))});var a=o.indexOf("]]>");return r(o.slice(0,i))+o.slice(i+9,a)+r(o.slice(a+3))}}(),UYe=/[&<>'"]/g,HYe=/[\u0000-\u001f]/g;function dF(e){var t=e+"";return t.replace(UYe,function(r){return BYe[r]}).replace(/\n/g,"<br/>").replace(HYe,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}var wj=function(){var e=/&#(\d+);/g;function t(r,n){return String.fromCharCode(parseInt(n,10))}return function(n){return n.replace(e,t)}}();function Do(e){switch(e){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}function gP(e){for(var t="",r=0,n=0,o=0,i=0,a=0,s=0;r<e.length;){if(n=e.charCodeAt(r++),n<128){t+=String.fromCharCode(n);continue}if(o=e.charCodeAt(r++),n>191&&n<224){a=(n&31)<<6,a|=o&63,t+=String.fromCharCode(a);continue}if(i=e.charCodeAt(r++),n<240){t+=String.fromCharCode((n&15)<<12|(o&63)<<6|i&63);continue}a=e.charCodeAt(r++),s=((n&7)<<18|(o&63)<<12|(i&63)<<6|a&63)-65536,t+=String.fromCharCode(55296+(s>>>10&1023)),t+=String.fromCharCode(56320+(s&1023))}return t}function xj(e){var t=Qh(2*e.length),r,n,o=1,i=0,a=0,s;for(n=0;n<e.length;n+=o)o=1,(s=e.charCodeAt(n))<128?r=s:s<224?(r=(s&31)*64+(e.charCodeAt(n+1)&63),o=2):s<240?(r=(s&15)*4096+(e.charCodeAt(n+1)&63)*64+(e.charCodeAt(n+2)&63),o=3):(o=4,r=(s&7)*262144+(e.charCodeAt(n+1)&63)*4096+(e.charCodeAt(n+2)&63)*64+(e.charCodeAt(n+3)&63),r-=65536,a=55296+(r>>>10&1023),r=56320+(r&1023)),a!==0&&(t[i++]=a&255,t[i++]=a>>>8,a=0),t[i++]=r%256,t[i++]=r>>>8;return t.slice(0,i).toString("ucs2")}function Cj(e){return y0(e,"binary").toString("utf8")}var s_="foo bar bazâð£",So=Sn&&(Cj(s_)==gP(s_)&&Cj||xj(s_)==gP(s_)&&xj)||gP,Nb=Sn?function(e){return y0(e,"utf8").toString("binary")}:function(e){for(var t=[],r=0,n=0,o=0;r<e.length;)switch(n=e.charCodeAt(r++),!0){case n<128:t.push(String.fromCharCode(n));break;case n<2048:t.push(String.fromCharCode(192+(n>>6))),t.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,o=e.charCodeAt(r++)-56320+(n<<10),t.push(String.fromCharCode(240+(o>>18&7))),t.push(String.fromCharCode(144+(o>>12&63))),t.push(String.fromCharCode(128+(o>>6&63))),t.push(String.fromCharCode(128+(o&63)));break;default:t.push(String.fromCharCode(224+(n>>12))),t.push(String.fromCharCode(128+(n>>6&63))),t.push(String.fromCharCode(128+(n&63)))}return t.join("")},xx=function(){var e={};return function(r,n){var o=r+"|"+(n||"");return e[o]?e[o]:e[o]=new RegExp("<(?:\\w+:)?"+r+'(?: xml:space="preserve")?(?:[^>]*)>([\\s\\S]*?)</(?:\\w+:)?'+r+">",n||"")}}(),Dre=function(){var e=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(t){return[new RegExp("&"+t[0]+";","ig"),t[1]]});return function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
`).replace(/<[^>]*>/g,""),o=0;o<e.length;++o)n=n.replace(e[o][0],e[o][1]);return n}}(),zYe=function(){var e={};return function(r){return e[r]!==void 0?e[r]:e[r]=new RegExp("<(?:vt:)?"+r+">([\\s\\S]*?)</(?:vt:)?"+r+">","g")}}(),jYe=/<\/?(?:vt:)?variant>/g,VYe=/<(?:vt:)([^>]*)>([\s\S]*)</;function Sj(e,t){var r=$r(e),n=e.match(zYe(r.baseType))||[],o=[];if(n.length!=r.size){if(t.WTF)throw new Error("unexpected vector length "+n.length+" != "+r.size);return o}return n.forEach(function(i){var a=i.replace(jYe,"").match(VYe);a&&o.push({v:So(a[2]),t:a[1]})}),o}var WYe=/(^\s|\s$|\n)/;function GYe(e){return id(e).map(function(t){return" "+t+'="'+e[t]+'"'}).join("")}function qYe(e,t,r){return"<"+e+(r!=null?GYe(r):"")+(t!=null?(t.match(WYe)?' xml:space="preserve"':"")+">"+t+"</"+e:"/")+">"}function fF(e){if(Sn&&Buffer.isBuffer(e))return e.toString("utf8");if(typeof e=="string")return e;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return So(b0(aF(e)));throw new Error("Bad input format: expected Buffer or string")}var Cx=/<(\/?)([^\s?><!\/:]*:|)([^\s?<>:\/]+)(?:[\s?:\/][^>]*)?>/mg,KYe={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},YYe=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"];function XYe(e,t){for(var r=1-2*(e[t+7]>>>7),n=((e[t+7]&127)<<4)+(e[t+6]>>>4&15),o=e[t+6]&15,i=5;i>=0;--i)o=o*256+e[t+i];return n==2047?o==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,o+=Math.pow(2,52)),r*Math.pow(2,n-52)*o)}function QYe(e,t,r){var n=(t<0||1/t==-1/0?1:0)<<7,o=0,i=0,a=n?-t:t;isFinite(a)?a==0?o=i=0:(o=Math.floor(Math.log(a)/Math.LN2),i=a*Math.pow(2,52-o),o<=-1023&&(!isFinite(i)||i<Math.pow(2,52))?o=-1022:(i-=Math.pow(2,52),o+=1023)):(o=2047,i=isNaN(t)?26985:0);for(var s=0;s<=5;++s,i/=256)e[r+s]=i&255;e[r+6]=(o&15)<<4|i&15,e[r+7]=o>>4|n}var _j=function(e){for(var t=[],r=10240,n=0;n<e[0].length;++n)if(e[0][n])for(var o=0,i=e[0][n].length;o<i;o+=r)t.push.apply(t,e[0][n].slice(o,o+r));return t},kj=Sn?function(e){return e[0].length>0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(t){return Buffer.isBuffer(t)?t:y0(t)})):_j(e)}:_j,Ej=function(e,t,r){for(var n=[],o=t;o<r;o+=2)n.push(String.fromCharCode(Vd(e,o)));return n.join("").replace(bs,"")},hF=Sn?function(e,t,r){return Buffer.isBuffer(e)?e.toString("utf16le",t,r).replace(bs,""):Ej(e,t,r)}:Ej,Tj=function(e,t,r){for(var n=[],o=t;o<t+r;++o)n.push(("0"+e[o].toString(16)).slice(-2));return n.join("")},Fre=Sn?function(e,t,r){return Buffer.isBuffer(e)?e.toString("hex",t,t+r):Tj(e,t,r)}:Tj,Ij=function(e,t,r){for(var n=[],o=t;o<r;o++)n.push(String.fromCharCode(Tg(e,o)));return n.join("")},iC=Sn?function(t,r,n){return Buffer.isBuffer(t)?t.toString("utf8",r,n):Ij(t,r,n)}:Ij,Nre=function(e,t){var r=fl(e,t);return r>0?iC(e,t+4,t+4+r-1):""},Lre=Nre,$re=function(e,t){var r=fl(e,t);return r>0?iC(e,t+4,t+4+r-1):""},Bre=$re,Ure=function(e,t){var r=2*fl(e,t);return r>0?iC(e,t+4,t+4+r-1):""},Hre=Ure,zre=function(t,r){var n=fl(t,r);return n>0?hF(t,r+4,r+4+n):""},jre=zre,Vre=function(e,t){var r=fl(e,t);return r>0?iC(e,t+4,t+4+r):""},Wre=Vre,Gre=function(e,t){return XYe(e,t)},DE=Gre,qre=function(t){return Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array};Sn&&(Lre=function(t,r){if(!Buffer.isBuffer(t))return Nre(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},Bre=function(t,r){if(!Buffer.isBuffer(t))return $re(t,r);var n=t.readUInt32LE(r);return n>0?t.toString("utf8",r+4,r+4+n-1):""},Hre=function(t,r){if(!Buffer.isBuffer(t))return Ure(t,r);var n=2*t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n-1)},jre=function(t,r){if(!Buffer.isBuffer(t))return zre(t,r);var n=t.readUInt32LE(r);return t.toString("utf16le",r+4,r+4+n)},Wre=function(t,r){if(!Buffer.isBuffer(t))return Vre(t,r);var n=t.readUInt32LE(r);return t.toString("utf8",r+4,r+4+n)},DE=function(t,r){return Buffer.isBuffer(t)?t.readDoubleLE(r):Gre(t,r)},qre=function(t){return Buffer.isBuffer(t)||Array.isArray(t)||typeof Uint8Array<"u"&&t instanceof Uint8Array});var Tg=function(e,t){return e[t]},Vd=function(e,t){return e[t+1]*256+e[t]},ZYe=function(e,t){var r=e[t+1]*256+e[t];return r<32768?r:(65535-r+1)*-1},fl=function(e,t){return e[t+3]*(1<<24)+(e[t+2]<<16)+(e[t+1]<<8)+e[t]},zp=function(e,t){return e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]},JYe=function(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};function dw(e,t){var r="",n,o,i=[],a,s,c,l;switch(t){case"dbcs":if(l=this.l,Sn&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*e).toString("utf16le");else for(c=0;c<e;++c)r+=String.fromCharCode(Vd(this,l)),l+=2;e*=2;break;case"utf8":r=iC(this,this.l,this.l+e);break;case"utf16le":e*=2,r=hF(this,this.l,this.l+e);break;case"wstr":return dw.call(this,e,"dbcs");case"lpstr-ansi":r=Lre(this,this.l),e=4+fl(this,this.l);break;case"lpstr-cp":r=Bre(this,this.l),e=4+fl(this,this.l);break;case"lpwstr":r=Hre(this,this.l),e=4+2*fl(this,this.l);break;case"lpp4":e=4+fl(this,this.l),r=jre(this,this.l),e&2&&(e+=2);break;case"8lpp4":e=4+fl(this,this.l),r=Wre(this,this.l),e&3&&(e+=4-(e&3));break;case"cstr":for(e=0,r="";(a=Tg(this,this.l+e++))!==0;)i.push(a_(a));r=i.join("");break;case"_wstr":for(e=0,r="";(a=Vd(this,this.l+e))!==0;)i.push(a_(a)),e+=2;e+=2,r=i.join("");break;case"dbcs-cont":for(r="",l=this.l,c=0;c<e;++c){if(this.lens&&this.lens.indexOf(l)!==-1)return a=Tg(this,l),this.l=l+1,s=dw.call(this,e-c,a?"dbcs-cont":"sbcs-cont"),i.join("")+s;i.push(a_(Vd(this,l))),l+=2}r=i.join(""),e*=2;break;case"cpstr":case"sbcs-cont":for(r="",l=this.l,c=0;c!=e;++c){if(this.lens&&this.lens.indexOf(l)!==-1)return a=Tg(this,l),this.l=l+1,s=dw.call(this,e-c,a?"dbcs-cont":"sbcs-cont"),i.join("")+s;i.push(a_(Tg(this,l))),l+=1}r=i.join("");break;default:switch(e){case 1:return n=Tg(this,this.l),this.l++,n;case 2:return n=(t==="i"?ZYe:Vd)(this,this.l),this.l+=2,n;case 4:case-4:return t==="i"||!(this[this.l+3]&128)?(n=(e>0?zp:JYe)(this,this.l),this.l+=4,n):(o=fl(this,this.l),this.l+=4,o);case 8:case-8:if(t==="f")return e==8?o=DE(this,this.l):o=DE([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,o;e=8;case 16:r=Fre(this,this.l,e);break}}return this.l+=e,r}var eXe=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24&255},tXe=function(e,t,r){e[r]=t&255,e[r+1]=t>>8&255,e[r+2]=t>>16&255,e[r+3]=t>>24&255},rXe=function(e,t,r){e[r]=t&255,e[r+1]=t>>>8&255};function nXe(e,t,r){var n=0,o=0;if(r==="dbcs"){for(o=0;o!=t.length;++o)rXe(this,t.charCodeAt(o),this.l+2*o);n=2*t.length}else if(r==="sbcs"){for(t=t.replace(/[^\x00-\x7F]/g,"_"),o=0;o!=t.length;++o)this[this.l+o]=t.charCodeAt(o)&255;n=t.length}else if(r==="hex"){for(;o<e;++o)this[this.l++]=parseInt(t.slice(2*o,2*o+2),16)||0;return this}else if(r==="utf16le"){var i=Math.min(this.l+e,this.length);for(o=0;o<Math.min(t.length,e);++o){var a=t.charCodeAt(o);this[this.l++]=a&255,this[this.l++]=a>>8}for(;this.l<i;)this[this.l++]=0;return this}else switch(e){case 1:n=1,this[this.l]=t&255;break;case 2:n=2,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255;break;case 3:n=3,this[this.l]=t&255,t>>>=8,this[this.l+1]=t&255,t>>>=8,this[this.l+2]=t&255;break;case 4:n=4,eXe(this,t,this.l);break;case 8:if(n=8,r==="f"){QYe(this,t,this.l);break}case 16:break;case-4:n=4,tXe(this,t,this.l);break}return this.l+=n,this}function Kre(e,t){var r=Fre(this,this.l,e.length>>1);if(r!==e)throw new Error(t+"Expected "+e+" saw "+r);this.l+=e.length>>1}function Sa(e,t){e.l=t,e.read_shift=dw,e.chk=Kre,e.write_shift=nXe}function Za(e,t){e.l+=t}function Ui(e){var t=Qh(e);return Sa(t,0),t}function Ef(e,t,r){if(e){var n,o,i;Sa(e,e.l||0);for(var a=e.length,s=0,c=0;e.l<a;){s=e.read_shift(1),s&128&&(s=(s&127)+((e.read_shift(1)&127)<<7));var l=UE[s]||UE[65535];for(n=e.read_shift(1),i=n&127,o=1;o<4&&n&128;++o)i+=((n=e.read_shift(1))&127)<<7*o;c=e.l+i;var u=l.f&&l.f(e,i,r);if(e.l=c,t(u,l,s))return}}}function w5(){var e=[],t=Sn?256:2048,r=function(l){var u=Ui(l);return Sa(u,0),u},n=r(t),o=function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&e.push(n),n=null)},i=function(l){return n&&l<n.length-n.l?n:(o(),n=r(Math.max(l+1,t)))},a=function(){return o(),sh(e)},s=function(l){o(),n=l,n.l==null&&(n.l=n.length),i(t)};return{next:i,push:s,end:a,_bufs:e}}function fw(e,t,r){var n=Ta(e);if(t.s?(n.cRel&&(n.c+=t.s.c),n.rRel&&(n.r+=t.s.r)):(n.cRel&&(n.c+=t.c),n.rRel&&(n.r+=t.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function Aj(e,t,r){var n=Ta(e);return n.s=fw(n.s,t.s,r),n.e=fw(n.e,t.s,r),n}function hw(e,t){if(e.cRel&&e.c<0)for(e=Ta(e);e.c<0;)e.c+=t>8?16384:256;if(e.rRel&&e.r<0)for(e=Ta(e);e.r<0;)e.r+=t>8?1048576:t>5?65536:16384;var r=Yr(e);return!e.cRel&&e.cRel!=null&&(r=aXe(r)),!e.rRel&&e.rRel!=null&&(r=oXe(r)),r}function vP(e,t){return e.s.r==0&&!e.s.rRel&&e.e.r==(t.biff>=12?1048575:t.biff>=8?65536:16384)&&!e.e.rRel?(e.s.cRel?"":"$")+ji(e.s.c)+":"+(e.e.cRel?"":"$")+ji(e.e.c):e.s.c==0&&!e.s.cRel&&e.e.c==(t.biff>=12?16383:255)&&!e.e.cRel?(e.s.rRel?"":"$")+Ia(e.s.r)+":"+(e.e.rRel?"":"$")+Ia(e.e.r):hw(e.s,t.biff)+":"+hw(e.e,t.biff)}function pF(e){return parseInt(iXe(e),10)-1}function Ia(e){return""+(e+1)}function oXe(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}function iXe(e){return e.replace(/\$(\d+)$/,"$1")}function mF(e){for(var t=sXe(e),r=0,n=0;n!==t.length;++n)r=26*r+t.charCodeAt(n)-64;return r-1}function ji(e){if(e<0)throw new Error("invalid column "+e);var t="";for(++e;e;e=Math.floor((e-1)/26))t=String.fromCharCode((e-1)%26+65)+t;return t}function aXe(e){return e.replace(/^([A-Z])/,"$$$1")}function sXe(e){return e.replace(/^\$([A-Z])/,"$1")}function lXe(e){return e.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}function ms(e){for(var t=0,r=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=48&&o<=57?t=10*t+(o-48):o>=65&&o<=90&&(r=26*r+(o-64))}return{c:r-1,r:t-1}}function Yr(e){for(var t=e.c+1,r="";t;t=(t-1)/26|0)r=String.fromCharCode((t-1)%26+65)+r;return r+(e.r+1)}function ay(e){var t=e.indexOf(":");return t==-1?{s:ms(e),e:ms(e)}:{s:ms(e.slice(0,t)),e:ms(e.slice(t+1))}}function Tn(e,t){return typeof t>"u"||typeof t=="number"?Tn(e.s,e.e):(typeof e!="string"&&(e=Yr(e)),typeof t!="string"&&(t=Yr(t)),e==t?e:e+":"+t)}function oi(e){var t={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,o=0,i=e.length;for(r=0;n<i&&!((o=e.charCodeAt(n)-64)<1||o>26);++n)r=26*r+o;for(t.s.c=--r,r=0;n<i&&!((o=e.charCodeAt(n)-48)<0||o>9);++n)r=10*r+o;if(t.s.r=--r,n===i||o!=10)return t.e.c=t.s.c,t.e.r=t.s.r,t;for(++n,r=0;n!=i&&!((o=e.charCodeAt(n)-64)<1||o>26);++n)r=26*r+o;for(t.e.c=--r,r=0;n!=i&&!((o=e.charCodeAt(n)-48)<0||o>9);++n)r=10*r+o;return t.e.r=--r,t}function Pj(e,t){var r=e.t=="d"&&t instanceof Date;if(e.z!=null)try{return e.w=mc(e.z,r?Ss(t):t)}catch{}try{return e.w=mc((e.XF||{}).numFmtId||(r?14:0),r?Ss(t):t)}catch{return""+t}}function ff(e,t,r){return e==null||e.t==null||e.t=="z"?"":e.w!==void 0?e.w:(e.t=="d"&&!e.z&&r&&r.dateNF&&(e.z=r.dateNF),e.t=="e"?C0[e.v]||e.v:t==null?Pj(e,e.v):Pj(e,t))}function pp(e,t){var r=t&&t.sheet?t.sheet:"Sheet1",n={};return n[r]=e,{SheetNames:[r],Sheets:n}}function Yre(e,t,r){var n=r||{},o=e?Array.isArray(e):n.dense,i=e||(o?[]:{}),a=0,s=0;if(i&&n.origin!=null){if(typeof n.origin=="number")a=n.origin;else{var c=typeof n.origin=="string"?ms(n.origin):n.origin;a=c.r,s=c.c}i["!ref"]||(i["!ref"]="A1:A1")}var l={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var u=oi(i["!ref"]);l.s.c=u.s.c,l.s.r=u.s.r,l.e.c=Math.max(l.e.c,u.e.c),l.e.r=Math.max(l.e.r,u.e.r),a==-1&&(l.e.r=a=u.e.r+1)}for(var f=0;f!=t.length;++f)if(t[f]){if(!Array.isArray(t[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var d=0;d!=t[f].length;++d)if(!(typeof t[f][d]>"u")){var h={v:t[f][d]},p=a+f,g=s+d;if(l.s.r>p&&(l.s.r=p),l.s.c>g&&(l.s.c=g),l.e.r<p&&(l.e.r=p),l.e.c<g&&(l.e.c=g),t[f][d]&&typeof t[f][d]=="object"&&!Array.isArray(t[f][d])&&!(t[f][d]instanceof Date))h=t[f][d];else if(Array.isArray(h.v)&&(h.f=t[f][d][1],h.v=h.v[0]),h.v===null)if(h.f)h.t="n";else if(n.nullError)h.t="e",h.v=0;else if(n.sheetStubs)h.t="z";else continue;else typeof h.v=="number"?h.t="n":typeof h.v=="boolean"?h.t="b":h.v instanceof Date?(h.z=n.dateNF||nn[14],n.cellDates?(h.t="d",h.w=mc(h.z,Ss(h.v))):(h.t="n",h.v=Ss(h.v),h.w=mc(h.z,h.v))):h.t="s";if(o)i[p]||(i[p]=[]),i[p][g]&&i[p][g].z&&(h.z=i[p][g].z),i[p][g]=h;else{var m=Yr({c:g,r:p});i[m]&&i[m].z&&(h.z=i[m].z),i[m]=h}}}return l.s.c<1e7&&(i["!ref"]=Tn(l)),i}function sy(e,t){return Yre(null,e,t)}function cXe(e){return e.read_shift(4,"i")}function Ka(e){var t=e.read_shift(4);return t===0?"":e.read_shift(t,"dbcs")}function uXe(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function gF(e,t){var r=e.l,n=e.read_shift(1),o=Ka(e),i=[],a={t:o,h:o};if(n&1){for(var s=e.read_shift(4),c=0;c!=s;++c)i.push(uXe(e));a.r=i}else a.r=[{ich:0,ifnt:0}];return e.l=r+t,a}var dXe=gF;function xc(e){var t=e.read_shift(4),r=e.read_shift(2);return r+=e.read_shift(1)<<16,e.l++,{c:t,iStyleRef:r}}function w0(e){var t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:t}}var fXe=Ka;function vF(e){var t=e.read_shift(4);return t===0||t===4294967295?"":e.read_shift(t,"dbcs")}var hXe=Ka,x5=vF;function yF(e){var t=e.slice(e.l,e.l+4),r=t[0]&1,n=t[0]&2;e.l+=4;var o=n===0?DE([0,0,0,0,t[0]&252,t[1],t[2],t[3]],0):zp(t,0)>>2;return r?o/100:o}function Xre(e){var t={s:{},e:{}};return t.s.r=e.read_shift(4),t.e.r=e.read_shift(4),t.s.c=e.read_shift(4),t.e.c=e.read_shift(4),t}var x0=Xre;function Wa(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function pXe(e){var t={},r=e.read_shift(1),n=r>>>1,o=e.read_shift(1),i=e.read_shift(2,"i"),a=e.read_shift(1),s=e.read_shift(1),c=e.read_shift(1);switch(e.l++,n){case 0:t.auto=1;break;case 1:t.index=o;var l=Im[o];l&&(t.rgb=_x(l));break;case 2:t.rgb=_x([a,s,c]);break;case 3:t.theme=o;break}return i!=0&&(t.tint=i>0?i/32767:i/32768),t}function mXe(e){var t=e.read_shift(1);e.l++;var r={fBold:t&1,fItalic:t&2,fUnderline:t&4,fStrikeout:t&8,fOutline:t&16,fShadow:t&32,fCondense:t&64,fExtend:t&128};return r}function Qre(e,t){var r={2:"BITMAP",3:"METAFILEPICT",8:"DIB",14:"ENHMETAFILE"},n=e.read_shift(4);switch(n){case 0:return"";case 4294967295:case 4294967294:return r[e.read_shift(4)]||""}if(n>400)throw new Error("Unsupported Clipboard: "+n.toString(16));return e.l-=4,e.read_shift(0,t==1?"lpstr":"lpwstr")}function gXe(e){return Qre(e,1)}function vXe(e){return Qre(e,2)}var bF=2,Ds=3,l_=11,Mj=12,FE=19,c_=64,yXe=65,bXe=71,wXe=4108,xXe=4126,ta=80,Zre=81,CXe=[ta,Zre],SXe={1:{n:"CodePage",t:bF},2:{n:"Category",t:ta},3:{n:"PresentationFormat",t:ta},4:{n:"ByteCount",t:Ds},5:{n:"LineCount",t:Ds},6:{n:"ParagraphCount",t:Ds},7:{n:"SlideCount",t:Ds},8:{n:"NoteCount",t:Ds},9:{n:"HiddenCount",t:Ds},10:{n:"MultimediaClipCount",t:Ds},11:{n:"ScaleCrop",t:l_},12:{n:"HeadingPairs",t:wXe},13:{n:"TitlesOfParts",t:xXe},14:{n:"Manager",t:ta},15:{n:"Company",t:ta},16:{n:"LinksUpToDate",t:l_},17:{n:"CharacterCount",t:Ds},19:{n:"SharedDoc",t:l_},22:{n:"HyperlinksChanged",t:l_},23:{n:"AppVersion",t:Ds,p:"version"},24:{n:"DigSig",t:yXe},26:{n:"ContentType",t:ta},27:{n:"ContentStatus",t:ta},28:{n:"Language",t:ta},29:{n:"Version",t:ta},255:{},2147483648:{n:"Locale",t:FE},2147483651:{n:"Behavior",t:FE},1919054434:{}},_Xe={1:{n:"CodePage",t:bF},2:{n:"Title",t:ta},3:{n:"Subject",t:ta},4:{n:"Author",t:ta},5:{n:"Keywords",t:ta},6:{n:"Comments",t:ta},7:{n:"Template",t:ta},8:{n:"LastAuthor",t:ta},9:{n:"RevNumber",t:ta},10:{n:"EditTime",t:c_},11:{n:"LastPrinted",t:c_},12:{n:"CreatedDate",t:c_},13:{n:"ModifiedDate",t:c_},14:{n:"PageCount",t:Ds},15:{n:"WordCount",t:Ds},16:{n:"CharCount",t:Ds},17:{n:"Thumbnail",t:bXe},18:{n:"Application",t:ta},19:{n:"DocSecurity",t:Ds},255:{},2147483648:{n:"Locale",t:FE},2147483651:{n:"Behavior",t:FE},1919054434:{}},Rj={1:"US",2:"CA",3:"",7:"RU",20:"EG",30:"GR",31:"NL",32:"BE",33:"FR",34:"ES",36:"HU",39:"IT",41:"CH",43:"AT",44:"GB",45:"DK",46:"SE",47:"NO",48:"PL",49:"DE",52:"MX",55:"BR",61:"AU",64:"NZ",66:"TH",81:"JP",82:"KR",84:"VN",86:"CN",90:"TR",105:"JS",213:"DZ",216:"MA",218:"LY",351:"PT",354:"IS",358:"FI",420:"CZ",886:"TW",961:"LB",962:"JO",963:"SY",964:"IQ",965:"KW",966:"SA",971:"AE",972:"IL",974:"QA",981:"IR",65535:"US"},kXe=[null,"solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"];function EXe(e){return e.map(function(t){return[t>>16&255,t>>8&255,t&255]})}var TXe=EXe([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Im=Ta(TXe),C0={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},Jre={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},Oj={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"};function IXe(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}function AXe(e){var t=IXe();if(!e||!e.match)return t;var r={};if((e.match(rs)||[]).forEach(function(n){var o=$r(n);switch(o[0].replace(LYe,"<")){case"<?xml":break;case"<Types":t.xmlns=o["xmlns"+(o[0].match(/<(\w+):/)||["",""])[1]];break;case"<Default":r[o.Extension]=o.ContentType;break;case"<Override":t[Oj[o.ContentType]]!==void 0&&t[Oj[o.ContentType]].push(o.PartName);break}}),t.xmlns!==KYe.CT)throw new Error("Unknown Namespace: "+t.xmlns);return t.calcchain=t.calcchains.length>0?t.calcchains[0]:"",t.sst=t.strs.length>0?t.strs[0]:"",t.style=t.styles.length>0?t.styles[0]:"",t.defaults=r,delete t.calcchains,t}var Xg={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function C5(e){var t=e.lastIndexOf("/");return e.slice(0,t+1)+"_rels/"+e.slice(t+1)+".rels"}function pw(e,t){var r={"!id":{}};if(!e)return r;t.charAt(0)!=="/"&&(t="/"+t);var n={};return(e.match(rs)||[]).forEach(function(o){var i=$r(o);if(i[0]==="<Relationship"){var a={};a.Type=i.Type,a.Target=i.Target,a.Id=i.Id,i.TargetMode&&(a.TargetMode=i.TargetMode);var s=i.TargetMode==="External"?i.Target:Fb(i.Target,t);r[s]=a,n[i.Id]=a}}),r["!id"]=n,r}var PXe="application/vnd.oasis.opendocument.spreadsheet";function MXe(e,t){for(var r=fF(e),n,o;n=Cx.exec(r);)switch(n[3]){case"manifest":break;case"file-entry":if(o=$r(n[0],!1),o.path=="/"&&o.type!==PXe)throw new Error("This OpenDocument is not a spreadsheet");break;case"encryption-data":case"algorithm":case"start-key-generation":case"key-derivation":throw new Error("Unsupported ODS Encryption");default:if(t&&t.WTF)throw n}}var mw=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]],RXe=function(){for(var e=new Array(mw.length),t=0;t<mw.length;++t){var r=mw[t],n="(?:"+r[0].slice(0,r[0].indexOf(":"))+":)"+r[0].slice(r[0].indexOf(":")+1);e[t]=new RegExp("<"+n+"[^>]*>([\\s\\S]*?)</"+n+">")}return e}();function ene(e){var t={};e=So(e);for(var r=0;r<mw.length;++r){var n=mw[r],o=e.match(RXe[r]);o!=null&&o.length>0&&(t[n[1]]=Rn(o[1])),n[2]==="date"&&t[n[1]]&&(t[n[1]]=la(t[n[1]]))}return t}var OXe=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]];function tne(e,t,r,n){var o=[];if(typeof e=="string")o=Sj(e,n);else for(var i=0;i<e.length;++i)o=o.concat(e[i].map(function(u){return{v:u}}));var a=typeof t=="string"?Sj(t,n).map(function(u){return u.v}):t,s=0,c=0;if(a.length>0)for(var l=0;l!==o.length;l+=2){switch(c=+o[l+1].v,o[l].v){case"Worksheets":case"工作表":case"Листы":case"أوراق العمل":case"ワークシート":case"גליונות עבודה":case"Arbeitsblätter":case"Çalışma Sayfaları":case"Feuilles de calcul":case"Fogli di lavoro":case"Folhas de cálculo":case"Planilhas":case"Regneark":case"Hojas de cálculo":case"Werkbladen":r.Worksheets=c,r.SheetNames=a.slice(s,s+c);break;case"Named Ranges":case"Rangos con nombre":case"名前付き一覧":case"Benannte Bereiche":case"Navngivne områder":r.NamedRanges=c,r.DefinedNames=a.slice(s,s+c);break;case"Charts":case"Diagramme":r.Chartsheets=c,r.ChartNames=a.slice(s,s+c);break}s+=c}}function DXe(e,t,r){var n={};return t||(t={}),e=So(e),OXe.forEach(function(o){var i=(e.match(xx(o[0]))||[])[1];switch(o[2]){case"string":i&&(t[o[1]]=Rn(i));break;case"bool":t[o[1]]=i==="true";break;case"raw":var a=e.match(new RegExp("<"+o[0]+"[^>]*>([\\s\\S]*?)</"+o[0]+">"));a&&a.length>0&&(n[o[1]]=a[1]);break}}),n.HeadingPairs&&n.TitlesOfParts&&tne(n.HeadingPairs,n.TitlesOfParts,t,r),t}var FXe=/<[^>]+>[^<]*/g;function NXe(e,t){var r={},n="",o=e.match(FXe);if(o)for(var i=0;i!=o.length;++i){var a=o[i],s=$r(a);switch(s[0]){case"<?xml":break;case"<Properties":break;case"<property":n=Rn(s.name);break;case"</property>":n=null;break;default:if(a.indexOf("<vt:")===0){var c=a.split(">"),l=c[0].slice(4),u=c[1];switch(l){case"lpstr":case"bstr":case"lpwstr":r[n]=Rn(u);break;case"bool":r[n]=Do(u);break;case"i1":case"i2":case"i4":case"i8":case"int":case"uint":r[n]=parseInt(u,10);break;case"r4":case"r8":case"decimal":r[n]=parseFloat(u);break;case"filetime":case"date":r[n]=la(u);break;case"cy":case"error":r[n]=Rn(u);break;default:if(l.slice(-1)=="/")break;t.WTF&&typeof console<"u"&&console.warn("Unexpected",a,l,c)}}else if(a.slice(0,2)!=="</"){if(t.WTF)throw new Error(a)}}}return r}var LXe={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"},yP;function $Xe(e,t,r){yP||(yP=cF(LXe)),t=yP[t]||t,e[t]=r}function wF(e){var t=e.read_shift(4),r=e.read_shift(4);return new Date((r/1e7*Math.pow(2,32)+t/1e7-11644473600)*1e3).toISOString().replace(/\.000/,"")}function rne(e,t,r){var n=e.l,o=e.read_shift(0,"lpstr-cp");if(r)for(;e.l-n&3;)++e.l;return o}function nne(e,t,r){var n=e.read_shift(0,"lpwstr");return r&&(e.l+=4-(n.length+1&3)&3),n}function one(e,t,r){return t===31?nne(e):rne(e,t,r)}function S5(e,t,r){return one(e,t,r===!1?0:4)}function BXe(e,t){if(!t)throw new Error("VtUnalignedString must have positive length");return one(e,t,0)}function UXe(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n){var o=e.l;r[n]=e.read_shift(0,"lpwstr").replace(bs,""),e.l-o&2&&(e.l+=2)}return r}function HXe(e){for(var t=e.read_shift(4),r=[],n=0;n!=t;++n)r[n]=e.read_shift(0,"lpstr-cp").replace(bs,"");return r}function zXe(e){var t=e.l,r=NE(e,Zre);e[e.l]==0&&e[e.l+1]==0&&e.l-t&2&&(e.l+=2);var n=NE(e,Ds);return[r,n]}function jXe(e){for(var t=e.read_shift(4),r=[],n=0;n<t/2;++n)r.push(zXe(e));return r}function Dj(e,t){for(var r=e.read_shift(4),n={},o=0;o!=r;++o){var i=e.read_shift(4),a=e.read_shift(4);n[i]=e.read_shift(a,t===1200?"utf16le":"utf8").replace(bs,"").replace(Db,"!"),t===1200&&a%2&&(e.l+=2)}return e.l&3&&(e.l=e.l>>2+1<<2),n}function ine(e){var t=e.read_shift(4),r=e.slice(e.l,e.l+t);return e.l+=t,(t&3)>0&&(e.l+=4-(t&3)&3),r}function VXe(e){var t={};return t.Size=e.read_shift(4),e.l+=t.Size+3-(t.Size-1)%4,t}function NE(e,t,r){var n=e.read_shift(2),o,i=r||{};if(e.l+=2,t!==Mj&&n!==t&&CXe.indexOf(t)===-1&&!((t&65534)==4126&&(n&65534)==4126))throw new Error("Expected type "+t+" saw "+n);switch(t===Mj?n:t){case 2:return o=e.read_shift(2,"i"),i.raw||(e.l+=2),o;case 3:return o=e.read_shift(4,"i"),o;case 11:return e.read_shift(4)!==0;case 19:return o=e.read_shift(4),o;case 30:return rne(e,n,4).replace(bs,"");case 31:return nne(e);case 64:return wF(e);case 65:return ine(e);case 71:return VXe(e);case 80:return S5(e,n,!i.raw).replace(bs,"");case 81:return BXe(e,n).replace(bs,"");case 4108:return jXe(e);case 4126:case 4127:return n==4127?UXe(e):HXe(e);default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+n)}}function Fj(e,t){var r=e.l,n=e.read_shift(4),o=e.read_shift(4),i=[],a=0,s=0,c=-1,l={};for(a=0;a!=o;++a){var u=e.read_shift(4),f=e.read_shift(4);i[a]=[u,f+r]}i.sort(function(y,b){return y[1]-b[1]});var d={};for(a=0;a!=o;++a){if(e.l!==i[a][1]){var h=!0;if(a>0&&t)switch(t[i[a-1][0]].t){case 2:e.l+2===i[a][1]&&(e.l+=2,h=!1);break;case 80:e.l<=i[a][1]&&(e.l=i[a][1],h=!1);break;case 4108:e.l<=i[a][1]&&(e.l=i[a][1],h=!1);break}if((!t||a==0)&&e.l<=i[a][1]&&(h=!1,e.l=i[a][1]),h)throw new Error("Read Error: Expected address "+i[a][1]+" at "+e.l+" :"+a)}if(t){var p=t[i[a][0]];if(d[p.n]=NE(e,p.t,{raw:!0}),p.p==="version"&&(d[p.n]=String(d[p.n]>>16)+"."+("0000"+String(d[p.n]&65535)).slice(-4)),p.n=="CodePage")switch(d[p.n]){case 0:d[p.n]=1252;case 874:case 932:case 936:case 949:case 950:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 1e4:case 1200:case 1201:case 1252:case 65e3:case-536:case 65001:case-535:Kc(s=d[p.n]>>>0&65535);break;default:throw new Error("Unsupported CodePage: "+d[p.n])}}else if(i[a][0]===1){if(s=d.CodePage=NE(e,bF),Kc(s),c!==-1){var g=e.l;e.l=i[c][1],l=Dj(e,s),e.l=g}}else if(i[a][0]===0){if(s===0){c=a,e.l=i[a+1][1];continue}l=Dj(e,s)}else{var m=l[i[a][0]],v;switch(e[e.l]){case 65:e.l+=4,v=ine(e);break;case 30:e.l+=4,v=S5(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 31:e.l+=4,v=S5(e,e[e.l-4]).replace(/\u0000+$/,"");break;case 3:e.l+=4,v=e.read_shift(4,"i");break;case 19:e.l+=4,v=e.read_shift(4);break;case 5:e.l+=4,v=e.read_shift(8,"f");break;case 11:e.l+=4,v=ci(e,4);break;case 64:e.l+=4,v=la(wF(e));break;default:throw new Error("unparsed value: "+e[e.l])}d[m]=v}}return e.l=r+n,d}function Nj(e,t,r){var n=e.content;if(!n)return{};Sa(n,0);var o,i,a,s,c=0;n.chk("feff","Byte Order: "),n.read_shift(2);var l=n.read_shift(4),u=n.read_shift(16);if(u!==En.utils.consts.HEADER_CLSID&&u!==r)throw new Error("Bad PropertySet CLSID "+u);if(o=n.read_shift(4),o!==1&&o!==2)throw new Error("Unrecognized #Sets: "+o);if(i=n.read_shift(16),s=n.read_shift(4),o===1&&s!==n.l)throw new Error("Length mismatch: "+s+" !== "+n.l);o===2&&(a=n.read_shift(16),c=n.read_shift(4));var f=Fj(n,t),d={SystemIdentifier:l};for(var h in f)d[h]=f[h];if(d.FMTID=i,o===1)return d;if(c-n.l==2&&(n.l+=2),n.l!==c)throw new Error("Length mismatch 2: "+n.l+" !== "+c);var p;try{p=Fj(n,null)}catch{}for(h in p)d[h]=p[h];return d.FMTID=[i,a],d}function Gf(e,t){return e.read_shift(t),null}function WXe(e,t,r){for(var n=[],o=e.l+t;e.l<o;)n.push(r(e,o-e.l));if(o!==e.l)throw new Error("Slurp error");return n}function ci(e,t){return e.read_shift(t)===1}function Ei(e){return e.read_shift(2,"u")}function ane(e,t){return WXe(e,t,Ei)}function GXe(e){var t=e.read_shift(1),r=e.read_shift(1);return r===1?t:t===1}function aC(e,t,r){var n=e.read_shift(r&&r.biff>=12?2:1),o="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var i=e.read_shift(1);i&&(o="dbcs-cont")}else r.biff==12&&(o="wstr");r.biff>=2&&r.biff<=5&&(o="cpstr");var a=n?e.read_shift(n,o):"";return a}function qXe(e){var t=e.read_shift(2),r=e.read_shift(1),n=r&4,o=r&8,i=1+(r&1),a=0,s,c={};o&&(a=e.read_shift(2)),n&&(s=e.read_shift(4));var l=i==2?"dbcs-cont":"sbcs-cont",u=t===0?"":e.read_shift(t,l);return o&&(e.l+=4*a),n&&(e.l+=s),c.t=u,o||(c.raw="<t>"+c.t+"</t>",c.r=c.t),c}function Qm(e,t,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return e.read_shift(t,"cpstr");if(r.biff>=12)return e.read_shift(t,"dbcs-cont")}var o=e.read_shift(1);return o===0?n=e.read_shift(t,"sbcs-cont"):n=e.read_shift(t,"dbcs-cont"),n}function sC(e,t,r){var n=e.read_shift(r&&r.biff==2?1:2);return n===0?(e.l++,""):Qm(e,n,r)}function S0(e,t,r){if(r.biff>5)return sC(e,t,r);var n=e.read_shift(1);return n===0?(e.l++,""):e.read_shift(n,r.biff<=4||!e.lens?"cpstr":"sbcs-cont")}function KXe(e){var t=e.read_shift(1);e.l++;var r=e.read_shift(2);return e.l+=2,[t,r]}function YXe(e){var t=e.read_shift(4),r=e.l,n=!1;t>24&&(e.l+=t-24,e.read_shift(16)==="795881f43b1d7f48af2c825dc4852763"&&(n=!0),e.l=r);var o=e.read_shift((n?t-24:t)>>1,"utf16le").replace(bs,"");return n&&(e.l+=24),o}function XXe(e){for(var t=e.read_shift(2),r="";t-- >0;)r+="../";var n=e.read_shift(0,"lpstr-ansi");if(e.l+=2,e.read_shift(2)!=57005)throw new Error("Bad FileMoniker");var o=e.read_shift(4);if(o===0)return r+n.replace(/\\/g,"/");var i=e.read_shift(4);if(e.read_shift(2)!=3)throw new Error("Bad FileMoniker");var a=e.read_shift(i>>1,"utf16le").replace(bs,"");return r+a}function QXe(e,t){var r=e.read_shift(16);switch(r){case"e0c9ea79f9bace118c8200aa004ba90b":return YXe(e);case"0303000000000000c000000000000046":return XXe(e);default:throw new Error("Unsupported Moniker "+r)}}function u_(e){var t=e.read_shift(4),r=t>0?e.read_shift(t,"utf16le").replace(bs,""):"";return r}function ZXe(e,t){var r=e.l+t,n=e.read_shift(4);if(n!==2)throw new Error("Unrecognized streamVersion: "+n);var o=e.read_shift(2);e.l+=2;var i,a,s,c,l="",u,f;o&16&&(i=u_(e,r-e.l)),o&128&&(a=u_(e,r-e.l)),(o&257)===257&&(s=u_(e,r-e.l)),(o&257)===1&&(c=QXe(e,r-e.l)),o&8&&(l=u_(e,r-e.l)),o&32&&(u=e.read_shift(16)),o&64&&(f=wF(e)),e.l=r;var d=a||s||c||"";d&&l&&(d+="#"+l),d||(d="#"+l),o&2&&d.charAt(0)=="/"&&d.charAt(1)!="/"&&(d="file://"+d);var h={Target:d};return u&&(h.guid=u),f&&(h.time=f),i&&(h.Tooltip=i),h}function sne(e){var t=e.read_shift(1),r=e.read_shift(1),n=e.read_shift(1),o=e.read_shift(1);return[t,r,n,o]}function lne(e,t){var r=sne(e);return r[3]=0,r}function fd(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return{r:t,c:r,ixfe:n}}function JXe(e){var t=e.read_shift(2),r=e.read_shift(2);return e.l+=8,{type:t,flags:r}}function eQe(e,t,r){return t===0?"":S0(e,t,r)}function tQe(e,t,r){var n=r.biff>8?4:2,o=e.read_shift(n),i=e.read_shift(n,"i"),a=e.read_shift(n,"i");return[o,i,a]}function cne(e){var t=e.read_shift(2),r=yF(e);return[t,r]}function rQe(e,t,r){e.l+=4,t-=4;var n=e.l+t,o=aC(e,t,r),i=e.read_shift(2);if(n-=e.l,i!==n)throw new Error("Malformed AddinUdf: padding = "+n+" != "+i);return e.l+=i,o}function f4(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),o=e.read_shift(2);return{s:{c:n,r:t},e:{c:o,r}}}function une(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(1),o=e.read_shift(1);return{s:{c:n,r:t},e:{c:o,r}}}var nQe=une;function dne(e){e.l+=4;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2);return e.l+=12,[r,t,n]}function oQe(e){var t={};return e.l+=4,e.l+=16,t.fSharedNote=e.read_shift(2),e.l+=4,t}function iQe(e){var t={};return e.l+=4,e.cf=e.read_shift(2),t}function La(e){e.l+=2,e.l+=e.read_shift(2)}var aQe={0:La,4:La,5:La,6:La,7:iQe,8:La,9:La,10:La,11:La,12:La,13:oQe,14:La,15:La,16:La,17:La,18:La,19:La,20:La,21:dne};function sQe(e,t){for(var r=e.l+t,n=[];e.l<r;){var o=e.read_shift(2);e.l-=2;try{n.push(aQe[o](e,r-e.l))}catch{return e.l=r,n}}return e.l!=r&&(e.l=r),n}function d_(e,t){var r={BIFFVer:0,dt:0};switch(r.BIFFVer=e.read_shift(2),t-=2,t>=2&&(r.dt=e.read_shift(2),e.l-=2),r.BIFFVer){case 1536:case 1280:case 1024:case 768:case 512:case 2:case 7:break;default:if(t>6)throw new Error("Unexpected BIFF Ver "+r.BIFFVer)}return e.read_shift(t),r}function lQe(e,t){return t===0||e.read_shift(2),1200}function cQe(e,t,r){if(r.enc)return e.l+=t,"";var n=e.l,o=S0(e,0,r);return e.read_shift(t+n-e.l),o}function uQe(e,t,r){var n=r&&r.biff==8||t==2?e.read_shift(2):(e.l+=t,0);return{fDialog:n&16,fBelow:n&64,fRight:n&128}}function dQe(e,t,r){var n=e.read_shift(4),o=e.read_shift(1)&3,i=e.read_shift(1);switch(i){case 0:i="Worksheet";break;case 1:i="Macrosheet";break;case 2:i="Chartsheet";break;case 6:i="VBAModule";break}var a=aC(e,0,r);return a.length===0&&(a="Sheet1"),{pos:n,hs:o,dt:i,name:a}}function fQe(e,t){for(var r=e.l+t,n=e.read_shift(4),o=e.read_shift(4),i=[],a=0;a!=o&&e.l<r;++a)i.push(qXe(e));return i.Count=n,i.Unique=o,i}function hQe(e,t){var r={};return r.dsst=e.read_shift(2),e.l+=t-2,r}function pQe(e){var t={};t.r=e.read_shift(2),t.c=e.read_shift(2),t.cnt=e.read_shift(2)-t.c;var r=e.read_shift(2);e.l+=4;var n=e.read_shift(1);return e.l+=3,n&7&&(t.level=n&7),n&32&&(t.hidden=!0),n&64&&(t.hpt=r/20),t}function mQe(e){var t=JXe(e);if(t.type!=2211)throw new Error("Invalid Future Record "+t.type);var r=e.read_shift(4);return r!==0}function gQe(e){return e.read_shift(2),e.read_shift(4)}function Lj(e,t,r){var n=0;r&&r.biff==2||(n=e.read_shift(2));var o=e.read_shift(2);r&&r.biff==2&&(n=1-(o>>15),o&=32767);var i={Unsynced:n&1,DyZero:(n&2)>>1,ExAsc:(n&4)>>2,ExDsc:(n&8)>>3};return[i,o]}function vQe(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(2),o=e.read_shift(2),i=e.read_shift(2),a=e.read_shift(2),s=e.read_shift(2),c=e.read_shift(2),l=e.read_shift(2);return{Pos:[t,r],Dim:[n,o],Flags:i,CurTab:a,FirstTab:s,Selected:c,TabRatio:l}}function yQe(e,t,r){if(r&&r.biff>=2&&r.biff<5)return{};var n=e.read_shift(2);return{RTL:n&64}}function bQe(){}function wQe(e,t,r){var n={dyHeight:e.read_shift(2),fl:e.read_shift(2)};switch(r&&r.biff||8){case 2:break;case 3:case 4:e.l+=2;break;default:e.l+=10;break}return n.name=aC(e,0,r),n}function xQe(e){var t=fd(e);return t.isst=e.read_shift(4),t}function CQe(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=e.l+t,o=fd(e);r.biff==2&&e.l++;var i=sC(e,n-e.l,r);return o.val=i,o}function SQe(e,t,r){var n=e.read_shift(2),o=S0(e,0,r);return[n,o]}var _Qe=S0;function $j(e,t,r){var n=e.l+t,o=r.biff==8||!r.biff?4:2,i=e.read_shift(o),a=e.read_shift(o),s=e.read_shift(2),c=e.read_shift(2);return e.l=n,{s:{r:i,c:s},e:{r:a,c}}}function kQe(e){var t=e.read_shift(2),r=e.read_shift(2),n=cne(e);return{r:t,c:r,ixfe:n[0],rknum:n[1]}}function EQe(e,t){for(var r=e.l+t-2,n=e.read_shift(2),o=e.read_shift(2),i=[];e.l<r;)i.push(cne(e));if(e.l!==r)throw new Error("MulRK read error");var a=e.read_shift(2);if(i.length!=a-o+1)throw new Error("MulRK length mismatch");return{r:n,c:o,C:a,rkrec:i}}function TQe(e,t){for(var r=e.l+t-2,n=e.read_shift(2),o=e.read_shift(2),i=[];e.l<r;)i.push(e.read_shift(2));if(e.l!==r)throw new Error("MulBlank read error");var a=e.read_shift(2);if(i.length!=a-o+1)throw new Error("MulBlank length mismatch");return{r:n,c:o,C:a,ixfe:i}}function IQe(e,t,r,n){var o={},i=e.read_shift(4),a=e.read_shift(4),s=e.read_shift(4),c=e.read_shift(2);return o.patternType=kXe[s>>26],n.cellStyles&&(o.alc=i&7,o.fWrap=i>>3&1,o.alcV=i>>4&7,o.fJustLast=i>>7&1,o.trot=i>>8&255,o.cIndent=i>>16&15,o.fShrinkToFit=i>>20&1,o.iReadOrder=i>>22&2,o.fAtrNum=i>>26&1,o.fAtrFnt=i>>27&1,o.fAtrAlc=i>>28&1,o.fAtrBdr=i>>29&1,o.fAtrPat=i>>30&1,o.fAtrProt=i>>31&1,o.dgLeft=a&15,o.dgRight=a>>4&15,o.dgTop=a>>8&15,o.dgBottom=a>>12&15,o.icvLeft=a>>16&127,o.icvRight=a>>23&127,o.grbitDiag=a>>30&3,o.icvTop=s&127,o.icvBottom=s>>7&127,o.icvDiag=s>>14&127,o.dgDiag=s>>21&15,o.icvFore=c&127,o.icvBack=c>>7&127,o.fsxButton=c>>14&1),o}function AQe(e,t,r){var n={};return n.ifnt=e.read_shift(2),n.numFmtId=e.read_shift(2),n.flags=e.read_shift(2),n.fStyle=n.flags>>2&1,t-=6,n.data=IQe(e,t,n.fStyle,r),n}function PQe(e){e.l+=4;var t=[e.read_shift(2),e.read_shift(2)];if(t[0]!==0&&t[0]--,t[1]!==0&&t[1]--,t[0]>7||t[1]>7)throw new Error("Bad Gutters: "+t.join("|"));return t}function Bj(e,t,r){var n=fd(e);(r.biff==2||t==9)&&++e.l;var o=GXe(e);return n.val=o,n.t=o===!0||o===!1?"b":"e",n}function MQe(e,t,r){r.biffguess&&r.biff==2&&(r.biff=5);var n=fd(e),o=Wa(e);return n.val=o,n}var Uj=eQe;function RQe(e,t,r){var n=e.l+t,o=e.read_shift(2),i=e.read_shift(2);if(r.sbcch=i,i==1025||i==14849)return[i,o];if(i<1||i>255)throw new Error("Unexpected SupBook type: "+i);for(var a=Qm(e,i),s=[];n>e.l;)s.push(sC(e));return[i,o,a,s]}function Hj(e,t,r){var n=e.read_shift(2),o,i={fBuiltIn:n&1,fWantAdvise:n>>>1&1,fWantPict:n>>>2&1,fOle:n>>>3&1,fOleLink:n>>>4&1,cf:n>>>5&1023,fIcon:n>>>15&1};return r.sbcch===14849&&(o=rQe(e,t-2,r)),i.body=o||e.read_shift(t-2),typeof o=="string"&&(i.Name=o),i}var OQe=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"];function zj(e,t,r){var n=e.l+t,o=e.read_shift(2),i=e.read_shift(1),a=e.read_shift(1),s=e.read_shift(r&&r.biff==2?1:2),c=0;(!r||r.biff>=5)&&(r.biff!=5&&(e.l+=2),c=e.read_shift(2),r.biff==5&&(e.l+=2),e.l+=4);var l=Qm(e,a,r);o&32&&(l=OQe[l.charCodeAt(0)]);var u=n-e.l;r&&r.biff==2&&--u;var f=n==e.l||s===0||!(u>0)?[]:gtt(e,u,r,s);return{chKey:i,Name:l,itab:c,rgce:f}}function fne(e,t,r){if(r.biff<8)return DQe(e,t,r);for(var n=[],o=e.l+t,i=e.read_shift(r.biff>8?4:2);i--!==0;)n.push(tQe(e,r.biff>8?12:6,r));if(e.l!=o)throw new Error("Bad ExternSheet: "+e.l+" != "+o);return n}function DQe(e,t,r){e[e.l+1]==3&&e[e.l]++;var n=aC(e,t,r);return n.charCodeAt(0)==3?n.slice(1):n}function FQe(e,t,r){if(r.biff<8){e.l+=t;return}var n=e.read_shift(2),o=e.read_shift(2),i=Qm(e,n,r),a=Qm(e,o,r);return[i,a]}function NQe(e,t,r){var n=une(e);e.l++;var o=e.read_shift(1);return t-=8,[vtt(e,t,r),o,n]}function jj(e,t,r){var n=nQe(e);switch(r.biff){case 2:e.l++,t-=7;break;case 3:case 4:e.l+=2,t-=8;break;default:e.l+=6,t-=12}return[n,ptt(e,t,r)]}function LQe(e){var t=e.read_shift(4)!==0,r=e.read_shift(4)!==0,n=e.read_shift(4);return[t,r,n]}function $Qe(e,t,r){if(!(r.biff<8)){var n=e.read_shift(2),o=e.read_shift(2),i=e.read_shift(2),a=e.read_shift(2),s=S0(e,0,r);return r.biff<8&&e.read_shift(1),[{r:n,c:o},s,a,i]}}function BQe(e,t,r){return $Qe(e,t,r)}function UQe(e,t){for(var r=[],n=e.read_shift(2);n--;)r.push(f4(e));return r}function HQe(e,t,r){if(r&&r.biff<8)return jQe(e,t,r);var n=dne(e),o=sQe(e,t-22,n[1]);return{cmo:n,ft:o}}var zQe={8:function(e,t){var r=e.l+t;e.l+=10;var n=e.read_shift(2);e.l+=4,e.l+=2,e.l+=2,e.l+=2,e.l+=4;var o=e.read_shift(1);return e.l+=o,e.l=r,{fmt:n}}};function jQe(e,t,r){e.l+=4;var n=e.read_shift(2),o=e.read_shift(2),i=e.read_shift(2);e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=2,e.l+=6,t-=36;var a=[];return a.push((zQe[n]||Za)(e,t,r)),{cmo:[o,n,i],ft:a}}function VQe(e,t,r){var n=e.l,o="";try{e.l+=4;var i=(r.lastobj||{cmo:[0,0]}).cmo[1],a;[0,5,7,11,12,14].indexOf(i)==-1?e.l+=6:a=KXe(e,6,r);var s=e.read_shift(2);e.read_shift(2),Ei(e,2);var c=e.read_shift(2);e.l+=c;for(var l=1;l<e.lens.length-1;++l){if(e.l-n!=e.lens[l])throw new Error("TxO: bad continue record");var u=e[e.l],f=Qm(e,e.lens[l+1]-e.lens[l]-1);if(o+=f,o.length>=(u?s:2*s))break}if(o.length!==s&&o.length!==s*2)throw new Error("cchText: "+s+" != "+o.length);return e.l=n+t,{t:o}}catch{return e.l=n+t,{t:o}}}function WQe(e,t){var r=f4(e);e.l+=16;var n=ZXe(e,t-24);return[r,n]}function GQe(e,t){e.read_shift(2);var r=f4(e),n=e.read_shift((t-10)/2,"dbcs-cont");return n=n.replace(bs,""),[r,n]}function qQe(e){var t=[0,0],r;return r=e.read_shift(2),t[0]=Rj[r]||r,r=e.read_shift(2),t[1]=Rj[r]||r,t}function KQe(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(lne(e));return r}function YQe(e){for(var t=e.read_shift(2),r=[];t-- >0;)r.push(lne(e));return r}function XQe(e){e.l+=2;var t={cxfs:0,crc:0};return t.cxfs=e.read_shift(2),t.crc=e.read_shift(4),t}function hne(e,t,r){if(!r.cellStyles)return Za(e,t);var n=r&&r.biff>=12?4:2,o=e.read_shift(n),i=e.read_shift(n),a=e.read_shift(n),s=e.read_shift(n),c=e.read_shift(2);n==2&&(e.l+=2);var l={s:o,e:i,w:a,ixfe:s,flags:c};return(r.biff>=5||!r.biff)&&(l.level=c>>8&7),l}function QQe(e,t){var r={};return t<32||(e.l+=16,r.header=Wa(e),r.footer=Wa(e),e.l+=2),r}function ZQe(e,t,r){var n={area:!1};if(r.biff!=5)return e.l+=t,n;var o=e.read_shift(1);return e.l+=3,o&16&&(n.area=!0),n}var JQe=fd,eZe=ane,tZe=sC;function rZe(e){var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),o={fmt:t,env:r,len:n,data:e.slice(e.l,e.l+n)};return e.l+=n,o}function nZe(e,t,r){r.biffguess&&r.biff==5&&(r.biff=2);var n=fd(e);++e.l;var o=S0(e,t-7,r);return n.t="str",n.val=o,n}function oZe(e){var t=fd(e);++e.l;var r=Wa(e);return t.t="n",t.val=r,t}function iZe(e){var t=fd(e);++e.l;var r=e.read_shift(2);return t.t="n",t.val=r,t}function aZe(e){var t=e.read_shift(1);return t===0?(e.l++,""):e.read_shift(t,"sbcs-cont")}function sZe(e,t){e.l+=6,e.l+=2,e.l+=1,e.l+=3,e.l+=1,e.l+=t-13}function lZe(e,t,r){var n=e.l+t,o=fd(e),i=e.read_shift(2),a=Qm(e,i,r);return e.l=n,o.t="str",o.val=a,o}var cZe=[2,3,48,49,131,139,140,245],Vj=function(){var e={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},t=cF({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(s,c){var l=[],u=Qh(1);switch(c.type){case"base64":u=Gc(Cl(s));break;case"binary":u=Gc(s);break;case"buffer":case"array":u=s;break}Sa(u,0);var f=u.read_shift(1),d=!!(f&136),h=!1,p=!1;switch(f){case 2:break;case 3:break;case 48:h=!0,d=!0;break;case 49:h=!0,d=!0;break;case 131:break;case 139:break;case 140:p=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+f.toString(16))}var g=0,m=521;f==2&&(g=u.read_shift(2)),u.l+=3,f!=2&&(g=u.read_shift(4)),g>1048576&&(g=1e6),f!=2&&(m=u.read_shift(2));var v=u.read_shift(2),y=c.codepage||1252;f!=2&&(u.l+=16,u.read_shift(1),u[u.l]!==0&&(y=e[u[u.l]]),u.l+=1,u.l+=2),p&&(u.l+=36);for(var b=[],w={},E=Math.min(u.length,f==2?521:m-10-(h?264:0)),I=p?32:11;u.l<E&&u[u.l]!=13;)switch(w={},w.name=ah.utils.decode(y,u.slice(u.l,u.l+I)).replace(/[\u0000\r\n].*$/g,""),u.l+=I,w.type=String.fromCharCode(u.read_shift(1)),f!=2&&!p&&(w.offset=u.read_shift(4)),w.len=u.read_shift(1),f==2&&(w.offset=u.read_shift(2)),w.dec=u.read_shift(1),w.name.length&&b.push(w),f!=2&&(u.l+=p?13:14),w.type){case"B":(!h||w.len!=8)&&c.WTF&&console.log("Skipping "+w.name+":"+w.type);break;case"G":case"P":c.WTF&&console.log("Skipping "+w.name+":"+w.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+w.type)}if(u[u.l]!==13&&(u.l=m-1),u.read_shift(1)!==13)throw new Error("DBF Terminator not found "+u.l+" "+u[u.l]);u.l=m;var O=0,D=0;for(l[0]=[],D=0;D!=b.length;++D)l[0][D]=b[D].name;for(;g-- >0;){if(u[u.l]===42){u.l+=v;continue}for(++u.l,l[++O]=[],D=0,D=0;D!=b.length;++D){var N=u.slice(u.l,u.l+b[D].len);u.l+=b[D].len,Sa(N,0);var U=ah.utils.decode(y,N);switch(b[D].type){case"C":U.trim().length&&(l[O][D]=U.replace(/\s+$/,""));break;case"D":U.length===8?l[O][D]=new Date(+U.slice(0,4),+U.slice(4,6)-1,+U.slice(6,8)):l[O][D]=U;break;case"F":l[O][D]=parseFloat(U.trim());break;case"+":case"I":l[O][D]=p?N.read_shift(-4,"i")^2147483648:N.read_shift(4,"i");break;case"L":switch(U.trim().toUpperCase()){case"Y":case"T":l[O][D]=!0;break;case"N":case"F":l[O][D]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+U+"|")}break;case"M":if(!d)throw new Error("DBF Unexpected MEMO for type "+f.toString(16));l[O][D]="##MEMO##"+(p?parseInt(U.trim(),10):N.read_shift(4));break;case"N":U=U.replace(/\u0000/g,"").trim(),U&&U!="."&&(l[O][D]=+U||0);break;case"@":l[O][D]=new Date(N.read_shift(-8,"f")-621356832e5);break;case"T":l[O][D]=new Date((N.read_shift(4)-2440588)*864e5+N.read_shift(4));break;case"Y":l[O][D]=N.read_shift(4,"i")/1e4+N.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":l[O][D]=-N.read_shift(-8,"f");break;case"B":if(h&&b[D].len==8){l[O][D]=N.read_shift(8,"f");break}case"G":case"P":N.l+=b[D].len;break;case"0":if(b[D].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+b[D].type)}}}if(f!=2&&u.l<u.length&&u[u.l++]!=26)throw new Error("DBF EOF Marker missing "+(u.l-1)+" of "+u.length+" "+u[u.l-1].toString(16));return c&&c.sheetRows&&(l=l.slice(0,c.sheetRows)),c.DBF=b,l}function n(s,c){var l=c||{};l.dateNF||(l.dateNF="yyyymmdd");var u=sy(r(s,l),l);return u["!cols"]=l.DBF.map(function(f){return{wch:f.len,DBF:f}}),delete l.DBF,u}function o(s,c){try{return pp(n(s,c),c)}catch(l){if(c&&c.WTF)throw l}return{SheetNames:[],Sheets:{}}}var i={B:8,C:250,L:1,D:8,"?":0,"":0};function a(s,c){var l=c||{};if(+l.codepage>=0&&Kc(+l.codepage),l.type=="string")throw new Error("Cannot write DBF to JS string");var u=w5(),f=P5(s,{header:1,raw:!0,cellDates:!0}),d=f[0],h=f.slice(1),p=s["!cols"]||[],g=0,m=0,v=0,y=1;for(g=0;g<d.length;++g){if(((p[g]||{}).DBF||{}).name){d[g]=p[g].DBF.name,++v;continue}if(d[g]!=null){if(++v,typeof d[g]=="number"&&(d[g]=d[g].toString(10)),typeof d[g]!="string")throw new Error("DBF Invalid column name "+d[g]+" |"+typeof d[g]+"|");if(d.indexOf(d[g])!==g){for(m=0;m<1024;++m)if(d.indexOf(d[g]+"_"+m)==-1){d[g]+="_"+m;break}}}}var b=oi(s["!ref"]),w=[],E=[],I=[];for(g=0;g<=b.e.c-b.s.c;++g){var O="",D="",N=0,U=[];for(m=0;m<h.length;++m)h[m][g]!=null&&U.push(h[m][g]);if(U.length==0||d[g]==null){w[g]="?";continue}for(m=0;m<U.length;++m){switch(typeof U[m]){case"number":D="B";break;case"string":D="C";break;case"boolean":D="L";break;case"object":D=U[m]instanceof Date?"D":"C";break;default:D="C"}N=Math.max(N,String(U[m]).length),O=O&&O!=D?"C":D}N>250&&(N=250),D=((p[g]||{}).DBF||{}).type,D=="C"&&p[g].DBF.len>N&&(N=p[g].DBF.len),O=="B"&&D=="N"&&(O="N",I[g]=p[g].DBF.dec,N=p[g].DBF.len),E[g]=O=="C"||D=="N"?N:i[O]||0,y+=E[g],w[g]=O}var B=u.next(32);for(B.write_shift(4,318902576),B.write_shift(4,h.length),B.write_shift(2,296+32*v),B.write_shift(2,y),g=0;g<4;++g)B.write_shift(4,0);for(B.write_shift(4,0|(+t[dre]||3)<<8),g=0,m=0;g<d.length;++g)if(d[g]!=null){var F=u.next(32),T=(d[g].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);F.write_shift(1,T,"sbcs"),F.write_shift(1,w[g]=="?"?"C":w[g],"sbcs"),F.write_shift(4,m),F.write_shift(1,E[g]||i[w[g]]||0),F.write_shift(1,I[g]||0),F.write_shift(1,2),F.write_shift(4,0),F.write_shift(1,0),F.write_shift(4,0),F.write_shift(4,0),m+=E[g]||i[w[g]]||0}var P=u.next(264);for(P.write_shift(4,13),g=0;g<65;++g)P.write_shift(4,0);for(g=0;g<h.length;++g){var _=u.next(y);for(_.write_shift(1,0),m=0;m<d.length;++m)if(d[m]!=null)switch(w[m]){case"L":_.write_shift(1,h[g][m]==null?63:h[g][m]?84:70);break;case"B":_.write_shift(8,h[g][m]||0,"f");break;case"N":var C="0";for(typeof h[g][m]=="number"&&(C=h[g][m].toFixed(I[m]||0)),v=0;v<E[m]-C.length;++v)_.write_shift(1,32);_.write_shift(1,C,"sbcs");break;case"D":h[g][m]?(_.write_shift(4,("0000"+h[g][m].getFullYear()).slice(-4),"sbcs"),_.write_shift(2,("00"+(h[g][m].getMonth()+1)).slice(-2),"sbcs"),_.write_shift(2,("00"+h[g][m].getDate()).slice(-2),"sbcs")):_.write_shift(8,"00000000","sbcs");break;case"C":var S=String(h[g][m]!=null?h[g][m]:"").slice(0,E[m]);for(_.write_shift(1,S,"sbcs"),v=0;v<E[m]-S.length;++v)_.write_shift(1,32);break}}return u.next(1).write_shift(1,26),u.end()}return{to_workbook:o,to_sheet:n,from_sheet:a}}(),uZe=function(){var e={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},t=new RegExp("\x1BN("+id(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=function(d,h){var p=e[h];return typeof p=="number"?aj(p):p},n=function(d,h,p){var g=h.charCodeAt(0)-32<<4|p.charCodeAt(0)-48;return g==59?d:aj(g)};e["|"]=254;function o(d,h){switch(h.type){case"base64":return i(Cl(d),h);case"binary":return i(d,h);case"buffer":return i(Sn&&Buffer.isBuffer(d)?d.toString("binary"):b0(d),h);case"array":return i(Xm(d),h)}throw new Error("Unrecognized type "+h.type)}function i(d,h){var p=d.split(/[\n\r]+/),g=-1,m=-1,v=0,y=0,b=[],w=[],E=null,I={},O=[],D=[],N=[],U=0,B;for(+h.codepage>=0&&Kc(+h.codepage);v!==p.length;++v){U=0;var F=p[v].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(t,r),T=F.replace(/;;/g,"\0").split(";").map(function(Q){return Q.replace(/\u0000/g,";")}),P=T[0],_;if(F.length>0)switch(P){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":T[1].charAt(0)=="P"&&w.push(F.slice(3).replace(/;;/g,";"));break;case"C":var C=!1,S=!1,x=!1,k=!1,L=-1,j=-1;for(y=1;y<T.length;++y)switch(T[y].charAt(0)){case"A":break;case"X":m=parseInt(T[y].slice(1))-1,S=!0;break;case"Y":for(g=parseInt(T[y].slice(1))-1,S||(m=0),B=b.length;B<=g;++B)b[B]=[];break;case"K":_=T[y].slice(1),_.charAt(0)==='"'?_=_.slice(1,_.length-1):_==="TRUE"?_=!0:_==="FALSE"?_=!1:isNaN(ru(_))?isNaN(g1(_).getDate())||(_=la(_)):(_=ru(_),E!==null&&iy(E)&&(_=d4(_))),C=!0;break;case"E":k=!0;var z=vv(T[y].slice(1),{r:g,c:m});b[g][m]=[b[g][m],z];break;case"S":x=!0,b[g][m]=[b[g][m],"S5S"];break;case"G":break;case"R":L=parseInt(T[y].slice(1))-1;break;case"C":j=parseInt(T[y].slice(1))-1;break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+F)}if(C&&(b[g][m]&&b[g][m].length==2?b[g][m][0]=_:b[g][m]=_,E=null),x){if(k)throw new Error("SYLK shared formula cannot have own formula");var Y=L>-1&&b[L][j];if(!Y||!Y[1])throw new Error("SYLK shared formula cannot find base");b[g][m][1]=Sne(Y[1],{r:g-L,c:m-j})}break;case"F":var K=0;for(y=1;y<T.length;++y)switch(T[y].charAt(0)){case"X":m=parseInt(T[y].slice(1))-1,++K;break;case"Y":for(g=parseInt(T[y].slice(1))-1,B=b.length;B<=g;++B)b[B]=[];break;case"M":U=parseInt(T[y].slice(1))/20;break;case"F":break;case"G":break;case"P":E=w[parseInt(T[y].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(N=T[y].slice(1).split(" "),B=parseInt(N[0],10);B<=parseInt(N[1],10);++B)U=parseInt(N[2],10),D[B-1]=U===0?{hidden:!0}:{wch:U},v1(D[B-1]);break;case"C":m=parseInt(T[y].slice(1))-1,D[m]||(D[m]={});break;case"R":g=parseInt(T[y].slice(1))-1,O[g]||(O[g]={}),U>0?(O[g].hpt=U,O[g].hpx=kx(U)):U===0&&(O[g].hidden=!0);break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+F)}K<1&&(E=null);break;default:if(h&&h.WTF)throw new Error("SYLK bad record "+F)}}return O.length>0&&(I["!rows"]=O),D.length>0&&(I["!cols"]=D),h&&h.sheetRows&&(b=b.slice(0,h.sheetRows)),[b,I]}function a(d,h){var p=o(d,h),g=p[0],m=p[1],v=sy(g,h);return id(m).forEach(function(y){v[y]=m[y]}),v}function s(d,h){return pp(a(d,h),h)}function c(d,h,p,g){var m="C;Y"+(p+1)+";X"+(g+1)+";K";switch(d.t){case"n":m+=d.v||0,d.f&&!d.F&&(m+=";E"+XJe(d.f,{r:p,c:g}));break;case"b":m+=d.v?"TRUE":"FALSE";break;case"e":m+=d.w||d.v;break;case"d":m+='"'+(d.w||d.v)+'"';break;case"s":m+='"'+d.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return m}function l(d,h){h.forEach(function(p,g){var m="F;W"+(g+1)+" "+(g+1)+" ";p.hidden?m+="0":(typeof p.width=="number"&&!p.wpx&&(p.wpx=$E(p.width)),typeof p.wpx=="number"&&!p.wch&&(p.wch=BE(p.wpx)),typeof p.wch=="number"&&(m+=Math.round(p.wch))),m.charAt(m.length-1)!=" "&&d.push(m)})}function u(d,h){h.forEach(function(p,g){var m="F;";p.hidden?m+="M0;":p.hpt?m+="M"+20*p.hpt+";":p.hpx&&(m+="M"+20*wne(p.hpx)+";"),m.length>2&&d.push(m+"R"+(g+1))})}function f(d,h){var p=["ID;PWXL;N;E"],g=[],m=oi(d["!ref"]),v,y=Array.isArray(d),b=`\r
`;p.push("P;PGeneral"),p.push("F;P0;DG0G8;M255"),d["!cols"]&&l(p,d["!cols"]),d["!rows"]&&u(p,d["!rows"]),p.push("B;Y"+(m.e.r-m.s.r+1)+";X"+(m.e.c-m.s.c+1)+";D"+[m.s.c,m.s.r,m.e.c,m.e.r].join(" "));for(var w=m.s.r;w<=m.e.r;++w)for(var E=m.s.c;E<=m.e.c;++E){var I=Yr({r:w,c:E});v=y?(d[w]||[])[E]:d[I],!(!v||v.v==null&&(!v.f||v.F))&&g.push(c(v,d,w,E))}return p.join(b)+b+g.join(b)+b+"E"+b}return{to_workbook:s,to_sheet:a,from_sheet:f}}(),dZe=function(){function e(i,a){switch(a.type){case"base64":return t(Cl(i),a);case"binary":return t(i,a);case"buffer":return t(Sn&&Buffer.isBuffer(i)?i.toString("binary"):b0(i),a);case"array":return t(Xm(i),a)}throw new Error("Unrecognized type "+a.type)}function t(i,a){for(var s=i.split(`
`),c=-1,l=-1,u=0,f=[];u!==s.length;++u){if(s[u].trim()==="BOT"){f[++c]=[],l=0;continue}if(!(c<0)){var d=s[u].trim().split(","),h=d[0],p=d[1];++u;for(var g=s[u]||"";(g.match(/["]/g)||[]).length&1&&u<s.length-1;)g+=`
`+s[++u];switch(g=g.trim(),+h){case-1:if(g==="BOT"){f[++c]=[],l=0;continue}else if(g!=="EOD")throw new Error("Unrecognized DIF special command "+g);break;case 0:g==="TRUE"?f[c][l]=!0:g==="FALSE"?f[c][l]=!1:isNaN(ru(p))?isNaN(g1(p).getDate())?f[c][l]=p:f[c][l]=la(p):f[c][l]=ru(p),++l;break;case 1:g=g.slice(1,g.length-1),g=g.replace(/""/g,'"'),g&&g.match(/^=".*"$/)&&(g=g.slice(2,-1)),f[c][l++]=g!==""?g:null;break}if(g==="EOD")break}}return a&&a.sheetRows&&(f=f.slice(0,a.sheetRows)),f}function r(i,a){return sy(e(i,a),a)}function n(i,a){return pp(r(i,a),a)}var o=function(){var i=function(c,l,u,f,d){c.push(l),c.push(u+","+f),c.push('"'+d.replace(/"/g,'""')+'"')},a=function(c,l,u,f){c.push(l+","+u),c.push(l==1?'"'+f.replace(/"/g,'""')+'"':f)};return function(c){var l=[],u=oi(c["!ref"]),f,d=Array.isArray(c);i(l,"TABLE",0,1,"sheetjs"),i(l,"VECTORS",0,u.e.r-u.s.r+1,""),i(l,"TUPLES",0,u.e.c-u.s.c+1,""),i(l,"DATA",0,0,"");for(var h=u.s.r;h<=u.e.r;++h){a(l,-1,0,"BOT");for(var p=u.s.c;p<=u.e.c;++p){var g=Yr({r:h,c:p});if(f=d?(c[h]||[])[p]:c[g],!f){a(l,1,0,"");continue}switch(f.t){case"n":var m=f.w;!m&&f.v!=null&&(m=f.v),m==null?f.f&&!f.F?a(l,1,0,"="+f.f):a(l,1,0,""):a(l,0,m,"V");break;case"b":a(l,0,f.v?1:0,f.v?"TRUE":"FALSE");break;case"s":a(l,1,0,isNaN(f.v)?f.v:'="'+f.v+'"');break;case"d":f.w||(f.w=mc(f.z||nn[14],Ss(la(f.v)))),a(l,0,f.w,"V");break;default:a(l,1,0,"")}}}a(l,-1,0,"EOD");var v=`\r
`,y=l.join(v);return y}}();return{to_workbook:n,to_sheet:r,from_sheet:o}}(),fZe=function(){function e(f){return f.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
`)}function t(f){return f.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}function r(f,d){for(var h=f.split(`
`),p=-1,g=-1,m=0,v=[];m!==h.length;++m){var y=h[m].trim().split(":");if(y[0]==="cell"){var b=ms(y[1]);if(v.length<=b.r)for(p=v.length;p<=b.r;++p)v[p]||(v[p]=[]);switch(p=b.r,g=b.c,y[2]){case"t":v[p][g]=e(y[3]);break;case"v":v[p][g]=+y[3];break;case"vtf":var w=y[y.length-1];case"vtc":switch(y[3]){case"nl":v[p][g]=!!+y[4];break;default:v[p][g]=+y[4];break}y[2]=="vtf"&&(v[p][g]=[v[p][g],w])}}}return d&&d.sheetRows&&(v=v.slice(0,d.sheetRows)),v}function n(f,d){return sy(r(f,d),d)}function o(f,d){return pp(n(f,d),d)}var i=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
`),a=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
`)+`
`,s=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
`),c="--SocialCalcSpreadsheetControlSave--";function l(f){if(!f||!f["!ref"])return"";for(var d=[],h=[],p,g="",m=ay(f["!ref"]),v=Array.isArray(f),y=m.s.r;y<=m.e.r;++y)for(var b=m.s.c;b<=m.e.c;++b)if(g=Yr({r:y,c:b}),p=v?(f[y]||[])[b]:f[g],!(!p||p.v==null||p.t==="z")){switch(h=["cell",g,"t"],p.t){case"s":case"str":h.push(t(p.v));break;case"n":p.f?(h[2]="vtf",h[3]="n",h[4]=p.v,h[5]=t(p.f)):(h[2]="v",h[3]=p.v);break;case"b":h[2]="vt"+(p.f?"f":"c"),h[3]="nl",h[4]=p.v?"1":"0",h[5]=t(p.f||(p.v?"TRUE":"FALSE"));break;case"d":var w=Ss(la(p.v));h[2]="vtc",h[3]="nd",h[4]=""+w,h[5]=p.w||mc(p.z||nn[14],w);break;case"e":continue}d.push(h.join(":"))}return d.push("sheet:c:"+(m.e.c-m.s.c+1)+":r:"+(m.e.r-m.s.r+1)+":tvf:1"),d.push("valueformat:1:text-wiki"),d.join(`
`)}function u(f){return[i,a,s,a,l(f),c].join(`
`)}return{to_workbook:o,to_sheet:n,from_sheet:u}}(),Sx=function(){function e(u,f,d,h,p){p.raw?f[d][h]=u:u===""||(u==="TRUE"?f[d][h]=!0:u==="FALSE"?f[d][h]=!1:isNaN(ru(u))?isNaN(g1(u).getDate())?f[d][h]=u:f[d][h]=la(u):f[d][h]=ru(u))}function t(u,f){var d=f||{},h=[];if(!u||u.length===0)return h;for(var p=u.split(/[\r\n]/),g=p.length-1;g>=0&&p[g].length===0;)--g;for(var m=10,v=0,y=0;y<=g;++y)v=p[y].indexOf(" "),v==-1?v=p[y].length:v++,m=Math.max(m,v);for(y=0;y<=g;++y){h[y]=[];var b=0;for(e(p[y].slice(0,m).trim(),h,y,b,d),b=1;b<=(p[y].length-m)/10+1;++b)e(p[y].slice(m+(b-1)*10,m+b*10).trim(),h,y,b,d)}return d.sheetRows&&(h=h.slice(0,d.sheetRows)),h}var r={44:",",9:"	",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function o(u){for(var f={},d=!1,h=0,p=0;h<u.length;++h)(p=u.charCodeAt(h))==34?d=!d:!d&&p in r&&(f[p]=(f[p]||0)+1);p=[];for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&p.push([f[h],h]);if(!p.length){f=n;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&p.push([f[h],h])}return p.sort(function(g,m){return g[0]-m[0]||n[g[1]]-n[m[1]]}),r[p.pop()[1]]||44}function i(u,f){var d=f||{},h="",p=d.dense?[]:{},g={s:{c:0,r:0},e:{c:0,r:0}};u.slice(0,4)=="sep="?u.charCodeAt(5)==13&&u.charCodeAt(6)==10?(h=u.charAt(4),u=u.slice(7)):u.charCodeAt(5)==13||u.charCodeAt(5)==10?(h=u.charAt(4),u=u.slice(6)):h=o(u.slice(0,1024)):d&&d.FS?h=d.FS:h=o(u.slice(0,1024));var m=0,v=0,y=0,b=0,w=0,E=h.charCodeAt(0),I=!1,O=0,D=u.charCodeAt(0);u=u.replace(/\r\n/mg,`
`);var N=d.dateNF!=null?_Ye(d.dateNF):null;function U(){var B=u.slice(b,w),F={};if(B.charAt(0)=='"'&&B.charAt(B.length-1)=='"'&&(B=B.slice(1,-1).replace(/""/g,'"')),B.length===0)F.t="z";else if(d.raw)F.t="s",F.v=B;else if(B.trim().length===0)F.t="s",F.v=B;else if(B.charCodeAt(0)==61)B.charCodeAt(1)==34&&B.charCodeAt(B.length-1)==34?(F.t="s",F.v=B.slice(2,-1).replace(/""/g,'"')):ZJe(B)?(F.t="n",F.f=B.slice(1)):(F.t="s",F.v=B);else if(B=="TRUE")F.t="b",F.v=!0;else if(B=="FALSE")F.t="b",F.v=!1;else if(!isNaN(y=ru(B)))F.t="n",d.cellText!==!1&&(F.w=B),F.v=y;else if(!isNaN(g1(B).getDate())||N&&B.match(N)){F.z=d.dateNF||nn[14];var T=0;N&&B.match(N)&&(B=kYe(B,d.dateNF,B.match(N)||[]),T=1),d.cellDates?(F.t="d",F.v=la(B,T)):(F.t="n",F.v=Ss(la(B,T))),d.cellText!==!1&&(F.w=mc(F.z,F.v instanceof Date?Ss(F.v):F.v)),d.cellNF||delete F.z}else F.t="s",F.v=B;if(F.t=="z"||(d.dense?(p[m]||(p[m]=[]),p[m][v]=F):p[Yr({c:v,r:m})]=F),b=w+1,D=u.charCodeAt(b),g.e.c<v&&(g.e.c=v),g.e.r<m&&(g.e.r=m),O==E)++v;else if(v=0,++m,d.sheetRows&&d.sheetRows<=m)return!0}e:for(;w<u.length;++w)switch(O=u.charCodeAt(w)){case 34:D===34&&(I=!I);break;case E:case 10:case 13:if(!I&&U())break e;break}return w-b>0&&U(),p["!ref"]=Tn(g),p}function a(u,f){return!(f&&f.PRN)||f.FS||u.slice(0,4)=="sep="||u.indexOf("	")>=0||u.indexOf(",")>=0||u.indexOf(";")>=0?i(u,f):sy(t(u,f),f)}function s(u,f){var d="",h=f.type=="string"?[0,0,0,0]:IF(u,f);switch(f.type){case"base64":d=Cl(u);break;case"binary":d=u;break;case"buffer":f.codepage==65001?d=u.toString("utf8"):f.codepage&&typeof ah<"u"?d=ah.utils.decode(f.codepage,u):d=Sn&&Buffer.isBuffer(u)?u.toString("binary"):b0(u);break;case"array":d=Xm(u);break;case"string":d=u;break;default:throw new Error("Unrecognized type "+f.type)}return h[0]==239&&h[1]==187&&h[2]==191?d=So(d.slice(3)):f.type!="string"&&f.type!="buffer"&&f.codepage==65001?d=So(d):f.type=="binary"&&typeof ah<"u"&&f.codepage&&(d=ah.utils.decode(f.codepage,ah.utils.encode(28591,d))),d.slice(0,19)=="socialcalc:version:"?fZe.to_sheet(f.type=="string"?d:So(d),f):a(d,f)}function c(u,f){return pp(s(u,f),f)}function l(u){for(var f=[],d=oi(u["!ref"]),h,p=Array.isArray(u),g=d.s.r;g<=d.e.r;++g){for(var m=[],v=d.s.c;v<=d.e.c;++v){var y=Yr({r:g,c:v});if(h=p?(u[g]||[])[v]:u[y],!h||h.v==null){m.push("          ");continue}for(var b=(h.w||(ff(h),h.w)||"").slice(0,10);b.length<10;)b+=" ";m.push(b+(v===0?" ":""))}f.push(m.join(""))}return f.join(`
`)}return{to_workbook:c,to_sheet:s,from_sheet:l}}();function hZe(e,t){var r=t||{},n=!!r.WTF;r.WTF=!0;try{var o=uZe.to_workbook(e,r);return r.WTF=n,o}catch(i){if(r.WTF=n,!i.message.match(/SYLK bad record ID/)&&n)throw i;return Sx.to_workbook(e,t)}}var gw=function(){function e(z,Y,K){if(z){Sa(z,z.l||0);for(var Q=K.Enum||L;z.l<z.length;){var q=z.read_shift(2),J=Q[q]||Q[65535],G=z.read_shift(2),V=z.l+G,X=J.f&&J.f(z,G,K);if(z.l=V,Y(X,J,q))return}}}function t(z,Y){switch(Y.type){case"base64":return r(Gc(Cl(z)),Y);case"binary":return r(Gc(z),Y);case"buffer":case"array":return r(z,Y)}throw"Unsupported type "+Y.type}function r(z,Y){if(!z)return z;var K=Y||{},Q=K.dense?[]:{},q="Sheet1",J="",G=0,V={},X=[],te=[],ee={s:{r:0,c:0},e:{r:0,c:0}},re=K.sheetRows||0;if(z[2]==0&&(z[3]==8||z[3]==9)&&z.length>=16&&z[14]==5&&z[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(z[2]==2)K.Enum=L,e(z,function(ne,he,oe){switch(oe){case 0:K.vers=ne,ne>=4096&&(K.qpro=!0);break;case 6:ee=ne;break;case 204:ne&&(J=ne);break;case 222:J=ne;break;case 15:case 51:K.qpro||(ne[1].v=ne[1].v.slice(1));case 13:case 14:case 16:oe==14&&(ne[2]&112)==112&&(ne[2]&15)>1&&(ne[2]&15)<15&&(ne[1].z=K.dateNF||nn[14],K.cellDates&&(ne[1].t="d",ne[1].v=d4(ne[1].v))),K.qpro&&ne[3]>G&&(Q["!ref"]=Tn(ee),V[q]=Q,X.push(q),Q=K.dense?[]:{},ee={s:{r:0,c:0},e:{r:0,c:0}},G=ne[3],q=J||"Sheet"+(G+1),J="");var le=K.dense?(Q[ne[0].r]||[])[ne[0].c]:Q[Yr(ne[0])];if(le){le.t=ne[1].t,le.v=ne[1].v,ne[1].z!=null&&(le.z=ne[1].z),ne[1].f!=null&&(le.f=ne[1].f);break}K.dense?(Q[ne[0].r]||(Q[ne[0].r]=[]),Q[ne[0].r][ne[0].c]=ne[1]):Q[Yr(ne[0])]=ne[1];break}},K);else if(z[2]==26||z[2]==14)K.Enum=j,z[2]==14&&(K.qpro=!0,z.l=0),e(z,function(ne,he,oe){switch(oe){case 204:q=ne;break;case 22:ne[1].v=ne[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(ne[3]>G&&(Q["!ref"]=Tn(ee),V[q]=Q,X.push(q),Q=K.dense?[]:{},ee={s:{r:0,c:0},e:{r:0,c:0}},G=ne[3],q="Sheet"+(G+1)),re>0&&ne[0].r>=re)break;K.dense?(Q[ne[0].r]||(Q[ne[0].r]=[]),Q[ne[0].r][ne[0].c]=ne[1]):Q[Yr(ne[0])]=ne[1],ee.e.c<ne[0].c&&(ee.e.c=ne[0].c),ee.e.r<ne[0].r&&(ee.e.r=ne[0].r);break;case 27:ne[14e3]&&(te[ne[14e3][0]]=ne[14e3][1]);break;case 1537:te[ne[0]]=ne[1],ne[0]==G&&(q=ne[1]);break}},K);else throw new Error("Unrecognized LOTUS BOF "+z[2]);if(Q["!ref"]=Tn(ee),V[J||q]=Q,X.push(J||q),!te.length)return{SheetNames:X,Sheets:V};for(var se={},pe=[],ce=0;ce<te.length;++ce)V[X[ce]]?(pe.push(te[ce]||X[ce]),se[te[ce]]=V[te[ce]]||V[X[ce]]):(pe.push(te[ce]),se[te[ce]]={"!ref":"A1"});return{SheetNames:pe,Sheets:se}}function n(z,Y){var K=Y||{};if(+K.codepage>=0&&Kc(+K.codepage),K.type=="string")throw new Error("Cannot write WK1 to JS string");var Q=w5(),q=oi(z["!ref"]),J=Array.isArray(z),G=[];Mc(Q,0,i(1030)),Mc(Q,6,c(q));for(var V=Math.min(q.e.r,8191),X=q.s.r;X<=V;++X)for(var te=Ia(X),ee=q.s.c;ee<=q.e.c;++ee){X===q.s.r&&(G[ee]=ji(ee));var re=G[ee]+te,se=J?(z[X]||[])[ee]:z[re];if(!(!se||se.t=="z"))if(se.t=="n")(se.v|0)==se.v&&se.v>=-32768&&se.v<=32767?Mc(Q,13,h(X,ee,se.v)):Mc(Q,14,g(X,ee,se.v));else{var pe=ff(se);Mc(Q,15,f(X,ee,pe.slice(0,239)))}}return Mc(Q,1),Q.end()}function o(z,Y){var K=Y||{};if(+K.codepage>=0&&Kc(+K.codepage),K.type=="string")throw new Error("Cannot write WK3 to JS string");var Q=w5();Mc(Q,0,a(z));for(var q=0,J=0;q<z.SheetNames.length;++q)(z.Sheets[z.SheetNames[q]]||{})["!ref"]&&Mc(Q,27,k(z.SheetNames[q],J++));var G=0;for(q=0;q<z.SheetNames.length;++q){var V=z.Sheets[z.SheetNames[q]];if(!(!V||!V["!ref"])){for(var X=oi(V["!ref"]),te=Array.isArray(V),ee=[],re=Math.min(X.e.r,8191),se=X.s.r;se<=re;++se)for(var pe=Ia(se),ce=X.s.c;ce<=X.e.c;++ce){se===X.s.r&&(ee[ce]=ji(ce));var ne=ee[ce]+pe,he=te?(V[se]||[])[ce]:V[ne];if(!(!he||he.t=="z"))if(he.t=="n")Mc(Q,23,U(se,ce,G,he.v));else{var oe=ff(he);Mc(Q,22,O(se,ce,G,oe.slice(0,239)))}}++G}}return Mc(Q,1),Q.end()}function i(z){var Y=Ui(2);return Y.write_shift(2,z),Y}function a(z){var Y=Ui(26);Y.write_shift(2,4096),Y.write_shift(2,4),Y.write_shift(4,0);for(var K=0,Q=0,q=0,J=0;J<z.SheetNames.length;++J){var G=z.SheetNames[J],V=z.Sheets[G];if(!(!V||!V["!ref"])){++q;var X=ay(V["!ref"]);K<X.e.r&&(K=X.e.r),Q<X.e.c&&(Q=X.e.c)}}return K>8191&&(K=8191),Y.write_shift(2,K),Y.write_shift(1,q),Y.write_shift(1,Q),Y.write_shift(2,0),Y.write_shift(2,0),Y.write_shift(1,1),Y.write_shift(1,2),Y.write_shift(4,0),Y.write_shift(4,0),Y}function s(z,Y,K){var Q={s:{c:0,r:0},e:{c:0,r:0}};return Y==8&&K.qpro?(Q.s.c=z.read_shift(1),z.l++,Q.s.r=z.read_shift(2),Q.e.c=z.read_shift(1),z.l++,Q.e.r=z.read_shift(2),Q):(Q.s.c=z.read_shift(2),Q.s.r=z.read_shift(2),Y==12&&K.qpro&&(z.l+=2),Q.e.c=z.read_shift(2),Q.e.r=z.read_shift(2),Y==12&&K.qpro&&(z.l+=2),Q.s.c==65535&&(Q.s.c=Q.e.c=Q.s.r=Q.e.r=0),Q)}function c(z){var Y=Ui(8);return Y.write_shift(2,z.s.c),Y.write_shift(2,z.s.r),Y.write_shift(2,z.e.c),Y.write_shift(2,z.e.r),Y}function l(z,Y,K){var Q=[{c:0,r:0},{t:"n",v:0},0,0];return K.qpro&&K.vers!=20768?(Q[0].c=z.read_shift(1),Q[3]=z.read_shift(1),Q[0].r=z.read_shift(2),z.l+=2):(Q[2]=z.read_shift(1),Q[0].c=z.read_shift(2),Q[0].r=z.read_shift(2)),Q}function u(z,Y,K){var Q=z.l+Y,q=l(z,Y,K);if(q[1].t="s",K.vers==20768){z.l++;var J=z.read_shift(1);return q[1].v=z.read_shift(J,"utf8"),q}return K.qpro&&z.l++,q[1].v=z.read_shift(Q-z.l,"cstr"),q}function f(z,Y,K){var Q=Ui(7+K.length);Q.write_shift(1,255),Q.write_shift(2,Y),Q.write_shift(2,z),Q.write_shift(1,39);for(var q=0;q<Q.length;++q){var J=K.charCodeAt(q);Q.write_shift(1,J>=128?95:J)}return Q.write_shift(1,0),Q}function d(z,Y,K){var Q=l(z,Y,K);return Q[1].v=z.read_shift(2,"i"),Q}function h(z,Y,K){var Q=Ui(7);return Q.write_shift(1,255),Q.write_shift(2,Y),Q.write_shift(2,z),Q.write_shift(2,K,"i"),Q}function p(z,Y,K){var Q=l(z,Y,K);return Q[1].v=z.read_shift(8,"f"),Q}function g(z,Y,K){var Q=Ui(13);return Q.write_shift(1,255),Q.write_shift(2,Y),Q.write_shift(2,z),Q.write_shift(8,K,"f"),Q}function m(z,Y,K){var Q=z.l+Y,q=l(z,Y,K);if(q[1].v=z.read_shift(8,"f"),K.qpro)z.l=Q;else{var J=z.read_shift(2);w(z.slice(z.l,z.l+J),q),z.l+=J}return q}function v(z,Y,K){var Q=Y&32768;return Y&=-32769,Y=(Q?z:0)+(Y>=8192?Y-16384:Y),(Q?"":"$")+(K?ji(Y):Ia(Y))}var y={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},b=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function w(z,Y){Sa(z,0);for(var K=[],Q=0,q="",J="",G="",V="";z.l<z.length;){var X=z[z.l++];switch(X){case 0:K.push(z.read_shift(8,"f"));break;case 1:J=v(Y[0].c,z.read_shift(2),!0),q=v(Y[0].r,z.read_shift(2),!1),K.push(J+q);break;case 2:{var te=v(Y[0].c,z.read_shift(2),!0),ee=v(Y[0].r,z.read_shift(2),!1);J=v(Y[0].c,z.read_shift(2),!0),q=v(Y[0].r,z.read_shift(2),!1),K.push(te+ee+":"+J+q)}break;case 3:if(z.l<z.length){console.error("WK1 premature formula end");return}break;case 4:K.push("("+K.pop()+")");break;case 5:K.push(z.read_shift(2));break;case 6:{for(var re="";X=z[z.l++];)re+=String.fromCharCode(X);K.push('"'+re.replace(/"/g,'""')+'"')}break;case 8:K.push("-"+K.pop());break;case 23:K.push("+"+K.pop());break;case 22:K.push("NOT("+K.pop()+")");break;case 20:case 21:V=K.pop(),G=K.pop(),K.push(["AND","OR"][X-20]+"("+G+","+V+")");break;default:if(X<32&&b[X])V=K.pop(),G=K.pop(),K.push(G+b[X]+V);else if(y[X]){if(Q=y[X][1],Q==69&&(Q=z[z.l++]),Q>K.length){console.error("WK1 bad formula parse 0x"+X.toString(16)+":|"+K.join("|")+"|");return}var se=K.slice(-Q);K.length-=Q,K.push(y[X][0]+"("+se.join(",")+")")}else return X<=7?console.error("WK1 invalid opcode "+X.toString(16)):X<=24?console.error("WK1 unsupported op "+X.toString(16)):X<=30?console.error("WK1 invalid opcode "+X.toString(16)):X<=115?console.error("WK1 unsupported function opcode "+X.toString(16)):console.error("WK1 unrecognized opcode "+X.toString(16))}}K.length==1?Y[1].f=""+K[0]:console.error("WK1 bad formula parse |"+K.join("|")+"|")}function E(z){var Y=[{c:0,r:0},{t:"n",v:0},0];return Y[0].r=z.read_shift(2),Y[3]=z[z.l++],Y[0].c=z[z.l++],Y}function I(z,Y){var K=E(z);return K[1].t="s",K[1].v=z.read_shift(Y-4,"cstr"),K}function O(z,Y,K,Q){var q=Ui(6+Q.length);q.write_shift(2,z),q.write_shift(1,K),q.write_shift(1,Y),q.write_shift(1,39);for(var J=0;J<Q.length;++J){var G=Q.charCodeAt(J);q.write_shift(1,G>=128?95:G)}return q.write_shift(1,0),q}function D(z,Y){var K=E(z);K[1].v=z.read_shift(2);var Q=K[1].v>>1;if(K[1].v&1)switch(Q&7){case 0:Q=(Q>>3)*5e3;break;case 1:Q=(Q>>3)*500;break;case 2:Q=(Q>>3)/20;break;case 3:Q=(Q>>3)/200;break;case 4:Q=(Q>>3)/2e3;break;case 5:Q=(Q>>3)/2e4;break;case 6:Q=(Q>>3)/16;break;case 7:Q=(Q>>3)/64;break}return K[1].v=Q,K}function N(z,Y){var K=E(z),Q=z.read_shift(4),q=z.read_shift(4),J=z.read_shift(2);if(J==65535)return Q===0&&q===3221225472?(K[1].t="e",K[1].v=15):Q===0&&q===3489660928?(K[1].t="e",K[1].v=42):K[1].v=0,K;var G=J&32768;return J=(J&32767)-16446,K[1].v=(1-G*2)*(q*Math.pow(2,J+32)+Q*Math.pow(2,J)),K}function U(z,Y,K,Q){var q=Ui(14);if(q.write_shift(2,z),q.write_shift(1,K),q.write_shift(1,Y),Q==0)return q.write_shift(4,0),q.write_shift(4,0),q.write_shift(2,65535),q;var J=0,G=0,V=0,X=0;return Q<0&&(J=1,Q=-Q),G=Math.log2(Q)|0,Q/=Math.pow(2,G-31),X=Q>>>0,X&2147483648||(Q/=2,++G,X=Q>>>0),Q-=X,X|=2147483648,X>>>=0,Q*=Math.pow(2,32),V=Q>>>0,q.write_shift(4,V),q.write_shift(4,X),G+=16383+(J?32768:0),q.write_shift(2,G),q}function B(z,Y){var K=N(z);return z.l+=Y-14,K}function F(z,Y){var K=E(z),Q=z.read_shift(4);return K[1].v=Q>>6,K}function T(z,Y){var K=E(z),Q=z.read_shift(8,"f");return K[1].v=Q,K}function P(z,Y){var K=T(z);return z.l+=Y-10,K}function _(z,Y){return z[z.l+Y-1]==0?z.read_shift(Y,"cstr"):""}function C(z,Y){var K=z[z.l++];K>Y-1&&(K=Y-1);for(var Q="";Q.length<K;)Q+=String.fromCharCode(z[z.l++]);return Q}function S(z,Y,K){if(!(!K.qpro||Y<21)){var Q=z.read_shift(1);z.l+=17,z.l+=1,z.l+=2;var q=z.read_shift(Y-21,"cstr");return[Q,q]}}function x(z,Y){for(var K={},Q=z.l+Y;z.l<Q;){var q=z.read_shift(2);if(q==14e3){for(K[q]=[0,""],K[q][0]=z.read_shift(2);z[z.l];)K[q][1]+=String.fromCharCode(z[z.l]),z.l++;z.l++}}return K}function k(z,Y){var K=Ui(5+z.length);K.write_shift(2,14e3),K.write_shift(2,Y);for(var Q=0;Q<z.length;++Q){var q=z.charCodeAt(Q);K[K.l++]=q>127?95:q}return K[K.l++]=0,K}var L={0:{n:"BOF",f:Ei},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:s},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:d},14:{n:"NUMBER",f:p},15:{n:"LABEL",f:u},16:{n:"FORMULA",f:m},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:u},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:_},222:{n:"SHEETNAMELP",f:C},65535:{n:""}},j={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:I},23:{n:"NUMBER17",f:N},24:{n:"NUMBER18",f:D},25:{n:"FORMULA19",f:B},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:x},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:F},38:{n:"??"},39:{n:"NUMBER27",f:T},40:{n:"FORMULA28",f:P},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:_},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:S},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:o,to_workbook:t}}();function pZe(e){var t={},r=e.match(rs),n=0,o=!1;if(r)for(;n!=r.length;++n){var i=$r(r[n]);switch(i[0].replace(/\w*:/g,"")){case"<condense":break;case"<extend":break;case"<shadow":if(!i.val)break;case"<shadow>":case"<shadow/>":t.shadow=1;break;case"</shadow>":break;case"<charset":if(i.val=="1")break;t.cp=oF[parseInt(i.val,10)];break;case"<outline":if(!i.val)break;case"<outline>":case"<outline/>":t.outline=1;break;case"</outline>":break;case"<rFont":t.name=i.val;break;case"<sz":t.sz=i.val;break;case"<strike":if(!i.val)break;case"<strike>":case"<strike/>":t.strike=1;break;case"</strike>":break;case"<u":if(!i.val)break;switch(i.val){case"double":t.uval="double";break;case"singleAccounting":t.uval="single-accounting";break;case"doubleAccounting":t.uval="double-accounting";break}case"<u>":case"<u/>":t.u=1;break;case"</u>":break;case"<b":if(i.val=="0")break;case"<b>":case"<b/>":t.b=1;break;case"</b>":break;case"<i":if(i.val=="0")break;case"<i>":case"<i/>":t.i=1;break;case"</i>":break;case"<color":i.rgb&&(t.color=i.rgb.slice(2,8));break;case"<color>":case"<color/>":case"</color>":break;case"<family":t.family=i.val;break;case"<family>":case"<family/>":case"</family>":break;case"<vertAlign":t.valign=i.val;break;case"<vertAlign>":case"<vertAlign/>":case"</vertAlign>":break;case"<scheme":break;case"<scheme>":case"<scheme/>":case"</scheme>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":o=!0;break;case"</ext>":o=!1;break;default:if(i[0].charCodeAt(1)!==47&&!o)throw new Error("Unrecognized rich format "+i[0])}}return t}var mZe=function(){var e=xx("t"),t=xx("rPr");function r(i){var a=i.match(e);if(!a)return{t:"s",v:""};var s={t:"s",v:Rn(a[1])},c=i.match(t);return c&&(s.s=pZe(c[1])),s}var n=/<(?:\w+:)?r>/g,o=/<\/(?:\w+:)?r>/;return function(a){return a.replace(n,"").split(o).map(r).filter(function(s){return s.v})}}(),gZe=function(){var t=/(\r\n|\n)/g;function r(o,i,a){var s=[];o.u&&s.push("text-decoration: underline;"),o.uval&&s.push("text-underline-style:"+o.uval+";"),o.sz&&s.push("font-size:"+o.sz+"pt;"),o.outline&&s.push("text-effect: outline;"),o.shadow&&s.push("text-shadow: auto;"),i.push('<span style="'+s.join("")+'">'),o.b&&(i.push("<b>"),a.push("</b>")),o.i&&(i.push("<i>"),a.push("</i>")),o.strike&&(i.push("<s>"),a.push("</s>"));var c=o.valign||"";return c=="superscript"||c=="super"?c="sup":c=="subscript"&&(c="sub"),c!=""&&(i.push("<"+c+">"),a.push("</"+c+">")),a.push("</span>"),o}function n(o){var i=[[],o.v,[]];return o.v?(o.s&&r(o.s,i[0],i[2]),i[0].join("")+i[1].replace(t,"<br/>")+i[2].join("")):""}return function(i){return i.map(n).join("")}}(),vZe=/<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g,yZe=/<(?:\w+:)?r>/,bZe=/<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g;function xF(e,t){var r=t?t.cellHTML:!0,n={};return e?(e.match(/^\s*<(?:\w+:)?t[^>]*>/)?(n.t=Rn(So(e.slice(e.indexOf(">")+1).split(/<\/(?:\w+:)?t>/)[0]||"")),n.r=So(e),r&&(n.h=dF(n.t))):e.match(yZe)&&(n.r=So(e),n.t=Rn(So((e.replace(bZe,"").match(vZe)||[]).join("").replace(rs,""))),r&&(n.h=gZe(mZe(n.r)))),n):{t:""}}var wZe=/<(?:\w+:)?sst([^>]*)>([\s\S]*)<\/(?:\w+:)?sst>/,xZe=/<(?:\w+:)?(?:si|sstItem)>/g,CZe=/<\/(?:\w+:)?(?:si|sstItem)>/;function SZe(e,t){var r=[],n="";if(!e)return r;var o=e.match(wZe);if(o){n=o[2].replace(xZe,"").split(CZe);for(var i=0;i!=n.length;++i){var a=xF(n[i].trim(),t);a!=null&&(r[r.length]=a)}o=$r(o[1]),r.Count=o.count,r.Unique=o.uniqueCount}return r}function _Ze(e){return[e.read_shift(4),e.read_shift(4)]}function kZe(e,t){var r=[],n=!1;return Ef(e,function(i,a,s){switch(s){case 159:r.Count=i[0],r.Unique=i[1];break;case 19:r.push(i);break;case 160:return!0;case 35:n=!0;break;case 36:n=!1;break;default:if(a.T,!n||t.WTF)throw new Error("Unexpected record 0x"+s.toString(16))}}),r}function pne(e){for(var t=[],r=e.split(""),n=0;n<r.length;++n)t[n]=r[n].charCodeAt(0);return t}function Qd(e,t){var r={};return r.Major=e.read_shift(2),r.Minor=e.read_shift(2),t>=4&&(e.l+=t-4),r}function EZe(e){var t={};return t.id=e.read_shift(0,"lpp4"),t.R=Qd(e,4),t.U=Qd(e,4),t.W=Qd(e,4),t}function TZe(e){for(var t=e.read_shift(4),r=e.l+t-4,n={},o=e.read_shift(4),i=[];o-- >0;)i.push({t:e.read_shift(4),v:e.read_shift(0,"lpp4")});if(n.name=e.read_shift(0,"lpp4"),n.comps=i,e.l!=r)throw new Error("Bad DataSpaceMapEntry: "+e.l+" != "+r);return n}function IZe(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(TZe(e));return t}function AZe(e){var t=[];e.l+=4;for(var r=e.read_shift(4);r-- >0;)t.push(e.read_shift(0,"lpp4"));return t}function PZe(e){var t={};return e.read_shift(4),e.l+=4,t.id=e.read_shift(0,"lpp4"),t.name=e.read_shift(0,"lpp4"),t.R=Qd(e,4),t.U=Qd(e,4),t.W=Qd(e,4),t}function MZe(e){var t=PZe(e);if(t.ename=e.read_shift(0,"8lpp4"),t.blksz=e.read_shift(4),t.cmode=e.read_shift(4),e.read_shift(4)!=4)throw new Error("Bad !Primary record");return t}function mne(e,t){var r=e.l+t,n={};n.Flags=e.read_shift(4)&63,e.l+=4,n.AlgID=e.read_shift(4);var o=!1;switch(n.AlgID){case 26126:case 26127:case 26128:o=n.Flags==36;break;case 26625:o=n.Flags==4;break;case 0:o=n.Flags==16||n.Flags==4||n.Flags==36;break;default:throw"Unrecognized encryption algorithm: "+n.AlgID}if(!o)throw new Error("Encryption Flags/AlgID mismatch");return n.AlgIDHash=e.read_shift(4),n.KeySize=e.read_shift(4),n.ProviderType=e.read_shift(4),e.l+=8,n.CSPName=e.read_shift(r-e.l>>1,"utf16le"),e.l=r,n}function gne(e,t){var r={},n=e.l+t;return e.l+=4,r.Salt=e.slice(e.l,e.l+16),e.l+=16,r.Verifier=e.slice(e.l,e.l+16),e.l+=16,e.read_shift(4),r.VerifierHash=e.slice(e.l,n),e.l=n,r}function RZe(e){var t=Qd(e);switch(t.Minor){case 2:return[t.Minor,OZe(e)];case 3:return[t.Minor,DZe()];case 4:return[t.Minor,FZe(e)]}throw new Error("ECMA-376 Encrypted file unrecognized Version: "+t.Minor)}function OZe(e){var t=e.read_shift(4);if((t&63)!=36)throw new Error("EncryptionInfo mismatch");var r=e.read_shift(4),n=mne(e,r),o=gne(e,e.length-e.l);return{t:"Std",h:n,v:o}}function DZe(){throw new Error("File is password-protected: ECMA-376 Extensible")}function FZe(e){var t=["saltSize","blockSize","keyBits","hashSize","cipherAlgorithm","cipherChaining","hashAlgorithm","saltValue"];e.l+=4;var r=e.read_shift(e.length-e.l,"utf8"),n={};return r.replace(rs,function(i){var a=$r(i);switch(dd(a[0])){case"<?xml":break;case"<encryption":case"</encryption>":break;case"<keyData":t.forEach(function(s){n[s]=a[s]});break;case"<dataIntegrity":n.encryptedHmacKey=a.encryptedHmacKey,n.encryptedHmacValue=a.encryptedHmacValue;break;case"<keyEncryptors>":case"<keyEncryptors":n.encs=[];break;case"</keyEncryptors>":break;case"<keyEncryptor":n.uri=a.uri;break;case"</keyEncryptor>":break;case"<encryptedKey":n.encs.push(a);break;default:throw a[0]}}),n}function NZe(e,t){var r={},n=r.EncryptionVersionInfo=Qd(e,4);if(t-=4,n.Minor!=2)throw new Error("unrecognized minor version code: "+n.Minor);if(n.Major>4||n.Major<2)throw new Error("unrecognized major version code: "+n.Major);r.Flags=e.read_shift(4),t-=4;var o=e.read_shift(4);return t-=4,r.EncryptionHeader=mne(e,o),t-=o,r.EncryptionVerifier=gne(e,t),r}function LZe(e){var t={},r=t.EncryptionVersionInfo=Qd(e,4);if(r.Major!=1||r.Minor!=1)throw"unrecognized version code "+r.Major+" : "+r.Minor;return t.Salt=e.read_shift(16),t.EncryptedVerifier=e.read_shift(16),t.EncryptedVerifierHash=e.read_shift(16),t}function $Ze(e){var t=0,r,n=pne(e),o=n.length+1,i,a,s,c,l;for(r=Qh(o),r[0]=n.length,i=1;i!=o;++i)r[i]=n[i-1];for(i=o-1;i>=0;--i)a=r[i],s=t&16384?1:0,c=t<<1&32767,l=s|c,t=l^a;return t^52811}var vne=function(){var e=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0],t=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],r=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628],n=function(a){return(a/2|a*128)&255},o=function(a,s){return n(a^s)},i=function(a){for(var s=t[a.length-1],c=104,l=a.length-1;l>=0;--l)for(var u=a[l],f=0;f!=7;++f)u&64&&(s^=r[c]),u*=2,--c;return s};return function(a){for(var s=pne(a),c=i(s),l=s.length,u=Qh(16),f=0;f!=16;++f)u[f]=0;var d,h,p;for((l&1)===1&&(d=c>>8,u[l]=o(e[0],d),--l,d=c&255,h=s[s.length-1],u[l]=o(h,d));l>0;)--l,d=c>>8,u[l]=o(s[l],d),--l,d=c&255,u[l]=o(s[l],d);for(l=15,p=15-s.length;p>0;)d=c>>8,u[l]=o(e[p],d),--l,--p,d=c&255,u[l]=o(s[l],d),--l,--p;return u}}(),BZe=function(e,t,r,n,o){o||(o=t),n||(n=vne(e));var i,a;for(i=0;i!=t.length;++i)a=t[i],a^=n[r],a=(a>>5|a<<3)&255,o[i]=a,++r;return[o,r,n]},UZe=function(e){var t=0,r=vne(e);return function(n){var o=BZe("",n,t,r);return t=o[1],o[0]}};function HZe(e,t,r,n){var o={key:Ei(e),verificationBytes:Ei(e)};return r.password&&(o.verifier=$Ze(r.password)),n.valid=o.verificationBytes===o.verifier,n.valid&&(n.insitu=UZe(r.password)),o}function zZe(e,t,r){var n=r||{};return n.Info=e.read_shift(2),e.l-=2,n.Info===1?n.Data=LZe(e):n.Data=NZe(e,t),n}function jZe(e,t,r){var n={Type:r.biff>=8?e.read_shift(2):0};return n.Type?zZe(e,t-2,n):HZe(e,r.biff>=8?t:t-2,r,n),n}var VZe=function(){function e(o,i){switch(i.type){case"base64":return t(Cl(o),i);case"binary":return t(o,i);case"buffer":return t(Sn&&Buffer.isBuffer(o)?o.toString("binary"):b0(o),i);case"array":return t(Xm(o),i)}throw new Error("Unrecognized type "+i.type)}function t(o,i){var a=i||{},s=a.dense?[]:{},c=o.match(/\\trowd.*?\\row\b/g);if(!c.length)throw new Error("RTF missing table");var l={s:{c:0,r:0},e:{c:0,r:c.length-1}};return c.forEach(function(u,f){Array.isArray(s)&&(s[f]=[]);for(var d=/\\\w+\b/g,h=0,p,g=-1;p=d.exec(u);){switch(p[0]){case"\\cell":var m=u.slice(h,d.lastIndex-p[0].length);if(m[0]==" "&&(m=m.slice(1)),++g,m.length){var v={v:m,t:"s"};Array.isArray(s)?s[f][g]=v:s[Yr({r:f,c:g})]=v}break}h=d.lastIndex}g>l.e.c&&(l.e.c=g)}),s["!ref"]=Tn(l),s}function r(o,i){return pp(e(o,i),i)}function n(o){for(var i=["{\\rtf1\\ansi"],a=oi(o["!ref"]),s,c=Array.isArray(o),l=a.s.r;l<=a.e.r;++l){i.push("\\trowd\\trautofit1");for(var u=a.s.c;u<=a.e.c;++u)i.push("\\cellx"+(u+1));for(i.push("\\pard\\intbl"),u=a.s.c;u<=a.e.c;++u){var f=Yr({r:l,c:u});s=c?(o[l]||[])[u]:o[f],!(!s||s.v==null&&(!s.f||s.F))&&(i.push(" "+(s.w||(ff(s),s.w))),i.push("\\cell"))}i.push("\\pard\\intbl\\row")}return i.join("")+"}"}return{to_workbook:r,to_sheet:e,from_sheet:n}}();function WZe(e){var t=e.slice(e[0]==="#"?1:0).slice(0,6);return[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}function _x(e){for(var t=0,r=1;t!=3;++t)r=r*256+(e[t]>255?255:e[t]<0?0:e[t]);return r.toString(16).toUpperCase().slice(1)}function GZe(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(t,r,n),i=Math.min(t,r,n),a=o-i;if(a===0)return[0,0,t];var s=0,c=0,l=o+i;switch(c=a/(l>1?2-l:l),o){case t:s=((r-n)/a+6)%6;break;case r:s=(n-t)/a+2;break;case n:s=(t-r)/a+4;break}return[s/6,c,l/2]}function qZe(e){var t=e[0],r=e[1],n=e[2],o=r*2*(n<.5?n:1-n),i=n-o/2,a=[i,i,i],s=6*t,c;if(r!==0)switch(s|0){case 0:case 6:c=o*s,a[0]+=o,a[1]+=c;break;case 1:c=o*(2-s),a[0]+=c,a[1]+=o;break;case 2:c=o*(s-2),a[1]+=o,a[2]+=c;break;case 3:c=o*(4-s),a[1]+=c,a[2]+=o;break;case 4:c=o*(s-4),a[2]+=o,a[0]+=c;break;case 5:c=o*(6-s),a[2]+=c,a[0]+=o;break}for(var l=0;l!=3;++l)a[l]=Math.round(a[l]*255);return a}function LE(e,t){if(t===0)return e;var r=GZe(WZe(e));return t<0?r[2]=r[2]*(1+t):r[2]=1-(1-r[2])*(1-t),_x(qZe(r))}var yne=6,KZe=15,YZe=1,hs=yne;function $E(e){return Math.floor((e+Math.round(128/hs)/256)*hs)}function BE(e){return Math.floor((e-5)/hs*100+.5)/100}function _5(e){return Math.round((e*hs+5)/hs*256)/256}function bP(e){return _5(BE($E(e)))}function CF(e){var t=Math.abs(e-bP(e)),r=hs;if(t>.005)for(hs=YZe;hs<KZe;++hs)Math.abs(e-bP(e))<=t&&(t=Math.abs(e-bP(e)),r=hs);hs=r}function v1(e){e.width?(e.wpx=$E(e.width),e.wch=BE(e.wpx),e.MDW=hs):e.wpx?(e.wch=BE(e.wpx),e.width=_5(e.wch),e.MDW=hs):typeof e.wch=="number"&&(e.width=_5(e.wch),e.wpx=$E(e.width),e.MDW=hs),e.customWidth&&delete e.customWidth}var XZe=96,bne=XZe;function wne(e){return e*96/bne}function kx(e){return e*bne/96}var QZe={None:"none",Solid:"solid",Gray50:"mediumGray",Gray75:"darkGray",Gray25:"lightGray",HorzStripe:"darkHorizontal",VertStripe:"darkVertical",ReverseDiagStripe:"darkDown",DiagStripe:"darkUp",DiagCross:"darkGrid",ThickDiagCross:"darkTrellis",ThinHorzStripe:"lightHorizontal",ThinVertStripe:"lightVertical",ThinReverseDiagStripe:"lightDown",ThinHorzCross:"lightGrid"};function ZZe(e,t,r,n){t.Borders=[];var o={},i=!1;(e[0].match(rs)||[]).forEach(function(a){var s=$r(a);switch(dd(s[0])){case"<borders":case"<borders>":case"</borders>":break;case"<border":case"<border>":case"<border/>":o={},s.diagonalUp&&(o.diagonalUp=Do(s.diagonalUp)),s.diagonalDown&&(o.diagonalDown=Do(s.diagonalDown)),t.Borders.push(o);break;case"</border>":break;case"<left/>":break;case"<left":case"<left>":break;case"</left>":break;case"<right/>":break;case"<right":case"<right>":break;case"</right>":break;case"<top/>":break;case"<top":case"<top>":break;case"</top>":break;case"<bottom/>":break;case"<bottom":case"<bottom>":break;case"</bottom>":break;case"<diagonal":case"<diagonal>":case"<diagonal/>":break;case"</diagonal>":break;case"<horizontal":case"<horizontal>":case"<horizontal/>":break;case"</horizontal>":break;case"<vertical":case"<vertical>":case"<vertical/>":break;case"</vertical>":break;case"<start":case"<start>":case"<start/>":break;case"</start>":break;case"<end":case"<end>":case"<end/>":break;case"</end>":break;case"<color":case"<color>":break;case"<color/>":case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+s[0]+" in borders")}})}function JZe(e,t,r,n){t.Fills=[];var o={},i=!1;(e[0].match(rs)||[]).forEach(function(a){var s=$r(a);switch(dd(s[0])){case"<fills":case"<fills>":case"</fills>":break;case"<fill>":case"<fill":case"<fill/>":o={},t.Fills.push(o);break;case"</fill>":break;case"<gradientFill>":break;case"<gradientFill":case"</gradientFill>":t.Fills.push(o),o={};break;case"<patternFill":case"<patternFill>":s.patternType&&(o.patternType=s.patternType);break;case"<patternFill/>":case"</patternFill>":break;case"<bgColor":o.bgColor||(o.bgColor={}),s.indexed&&(o.bgColor.indexed=parseInt(s.indexed,10)),s.theme&&(o.bgColor.theme=parseInt(s.theme,10)),s.tint&&(o.bgColor.tint=parseFloat(s.tint)),s.rgb&&(o.bgColor.rgb=s.rgb.slice(-6));break;case"<bgColor/>":case"</bgColor>":break;case"<fgColor":o.fgColor||(o.fgColor={}),s.theme&&(o.fgColor.theme=parseInt(s.theme,10)),s.tint&&(o.fgColor.tint=parseFloat(s.tint)),s.rgb!=null&&(o.fgColor.rgb=s.rgb.slice(-6));break;case"<fgColor/>":case"</fgColor>":break;case"<stop":case"<stop/>":break;case"</stop>":break;case"<color":case"<color/>":break;case"</color>":break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+s[0]+" in fills")}})}function eJe(e,t,r,n){t.Fonts=[];var o={},i=!1;(e[0].match(rs)||[]).forEach(function(a){var s=$r(a);switch(dd(s[0])){case"<fonts":case"<fonts>":case"</fonts>":break;case"<font":case"<font>":break;case"</font>":case"<font/>":t.Fonts.push(o),o={};break;case"<name":s.val&&(o.name=So(s.val));break;case"<name/>":case"</name>":break;case"<b":o.bold=s.val?Do(s.val):1;break;case"<b/>":o.bold=1;break;case"<i":o.italic=s.val?Do(s.val):1;break;case"<i/>":o.italic=1;break;case"<u":switch(s.val){case"none":o.underline=0;break;case"single":o.underline=1;break;case"double":o.underline=2;break;case"singleAccounting":o.underline=33;break;case"doubleAccounting":o.underline=34;break}break;case"<u/>":o.underline=1;break;case"<strike":o.strike=s.val?Do(s.val):1;break;case"<strike/>":o.strike=1;break;case"<outline":o.outline=s.val?Do(s.val):1;break;case"<outline/>":o.outline=1;break;case"<shadow":o.shadow=s.val?Do(s.val):1;break;case"<shadow/>":o.shadow=1;break;case"<condense":o.condense=s.val?Do(s.val):1;break;case"<condense/>":o.condense=1;break;case"<extend":o.extend=s.val?Do(s.val):1;break;case"<extend/>":o.extend=1;break;case"<sz":s.val&&(o.sz=+s.val);break;case"<sz/>":case"</sz>":break;case"<vertAlign":s.val&&(o.vertAlign=s.val);break;case"<vertAlign/>":case"</vertAlign>":break;case"<family":s.val&&(o.family=parseInt(s.val,10));break;case"<family/>":case"</family>":break;case"<scheme":s.val&&(o.scheme=s.val);break;case"<scheme/>":case"</scheme>":break;case"<charset":if(s.val=="1")break;s.codepage=oF[parseInt(s.val,10)];break;case"<color":if(o.color||(o.color={}),s.auto&&(o.color.auto=Do(s.auto)),s.rgb)o.color.rgb=s.rgb.slice(-6);else if(s.indexed){o.color.index=parseInt(s.indexed,10);var c=Im[o.color.index];o.color.index==81&&(c=Im[1]),c||(c=Im[1]),o.color.rgb=c[0].toString(16)+c[1].toString(16)+c[2].toString(16)}else s.theme&&(o.color.theme=parseInt(s.theme,10),s.tint&&(o.color.tint=parseFloat(s.tint)),s.theme&&r.themeElements&&r.themeElements.clrScheme&&(o.color.rgb=LE(r.themeElements.clrScheme[o.color.theme].rgb,o.color.tint||0)));break;case"<color/>":case"</color>":break;case"<AlternateContent":i=!0;break;case"</AlternateContent>":i=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":i=!0;break;case"</ext>":i=!1;break;default:if(n&&n.WTF&&!i)throw new Error("unrecognized "+s[0]+" in fonts")}})}function tJe(e,t,r){t.NumberFmt=[];for(var n=id(nn),o=0;o<n.length;++o)t.NumberFmt[n[o]]=nn[n[o]];var i=e[0].match(rs);if(i)for(o=0;o<i.length;++o){var a=$r(i[o]);switch(dd(a[0])){case"<numFmts":case"</numFmts>":case"<numFmts/>":case"<numFmts>":break;case"<numFmt":{var s=Rn(So(a.formatCode)),c=parseInt(a.numFmtId,10);if(t.NumberFmt[c]=s,c>0){if(c>392){for(c=392;c>60&&t.NumberFmt[c]!=null;--c);t.NumberFmt[c]=s}Tm(s,c)}}break;case"</numFmt>":break;default:if(r.WTF)throw new Error("unrecognized "+a[0]+" in numFmts")}}}var f_=["numFmtId","fillId","fontId","borderId","xfId"],h_=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","pivotButton","quotePrefix"];function rJe(e,t,r){t.CellXf=[];var n,o=!1;(e[0].match(rs)||[]).forEach(function(i){var a=$r(i),s=0;switch(dd(a[0])){case"<cellXfs":case"<cellXfs>":case"<cellXfs/>":case"</cellXfs>":break;case"<xf":case"<xf/>":for(n=a,delete n[0],s=0;s<f_.length;++s)n[f_[s]]&&(n[f_[s]]=parseInt(n[f_[s]],10));for(s=0;s<h_.length;++s)n[h_[s]]&&(n[h_[s]]=Do(n[h_[s]]));if(t.NumberFmt&&n.numFmtId>392){for(s=392;s>60;--s)if(t.NumberFmt[n.numFmtId]==t.NumberFmt[s]){n.numFmtId=s;break}}t.CellXf.push(n);break;case"</xf>":break;case"<alignment":case"<alignment/>":var c={};a.vertical&&(c.vertical=a.vertical),a.horizontal&&(c.horizontal=a.horizontal),a.textRotation!=null&&(c.textRotation=a.textRotation),a.indent&&(c.indent=a.indent),a.wrapText&&(c.wrapText=Do(a.wrapText)),n.alignment=c;break;case"</alignment>":break;case"<protection":break;case"</protection>":case"<protection/>":break;case"<AlternateContent":o=!0;break;case"</AlternateContent>":o=!1;break;case"<extLst":case"<extLst>":case"</extLst>":break;case"<ext":o=!0;break;case"</ext>":o=!1;break;default:if(r&&r.WTF&&!o)throw new Error("unrecognized "+a[0]+" in cellXfs")}})}var nJe=function(){var t=/<(?:\w+:)?numFmts([^>]*)>[\S\s]*?<\/(?:\w+:)?numFmts>/,r=/<(?:\w+:)?cellXfs([^>]*)>[\S\s]*?<\/(?:\w+:)?cellXfs>/,n=/<(?:\w+:)?fills([^>]*)>[\S\s]*?<\/(?:\w+:)?fills>/,o=/<(?:\w+:)?fonts([^>]*)>[\S\s]*?<\/(?:\w+:)?fonts>/,i=/<(?:\w+:)?borders([^>]*)>[\S\s]*?<\/(?:\w+:)?borders>/;return function(s,c,l){var u={};if(!s)return u;s=s.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");var f;return(f=s.match(t))&&tJe(f,u,l),(f=s.match(o))&&eJe(f,u,c,l),(f=s.match(n))&&JZe(f,u,c,l),(f=s.match(i))&&ZZe(f,u,c,l),(f=s.match(r))&&rJe(f,u,l),u}}();function oJe(e,t){var r=e.read_shift(2),n=Ka(e);return[r,n]}function iJe(e,t,r){var n={};n.sz=e.read_shift(2)/20;var o=mXe(e);o.fItalic&&(n.italic=1),o.fCondense&&(n.condense=1),o.fExtend&&(n.extend=1),o.fShadow&&(n.shadow=1),o.fOutline&&(n.outline=1),o.fStrikeout&&(n.strike=1);var i=e.read_shift(2);switch(i===700&&(n.bold=1),e.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var a=e.read_shift(1);a!=0&&(n.underline=a);var s=e.read_shift(1);s>0&&(n.family=s);var c=e.read_shift(1);switch(c>0&&(n.charset=c),e.l++,n.color=pXe(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=Ka(e),n}var aJe=Za;function sJe(e,t){var r=e.l+t,n=e.read_shift(2),o=e.read_shift(2);return e.l=r,{ixfe:n,numFmtId:o}}var lJe=Za;function cJe(e,t,r){var n={};n.NumberFmt=[];for(var o in nn)n.NumberFmt[o]=nn[o];n.CellXf=[],n.Fonts=[];var i=[],a=!1;return Ef(e,function(c,l,u){switch(u){case 44:n.NumberFmt[c[0]]=c[1],Tm(c[1],c[0]);break;case 43:n.Fonts.push(c),c.color.theme!=null&&t&&t.themeElements&&t.themeElements.clrScheme&&(c.color.rgb=LE(t.themeElements.clrScheme[c.color.theme].rgb,c.color.tint||0));break;case 1025:break;case 45:break;case 46:break;case 47:i[i.length-1]==617&&n.CellXf.push(c);break;case 48:case 507:case 572:case 475:break;case 1171:case 2102:case 1130:case 512:case 2095:case 3072:break;case 35:a=!0;break;case 36:a=!1;break;case 37:i.push(u),a=!0;break;case 38:i.pop(),a=!1;break;default:if(l.T>0)i.push(u);else if(l.T<0)i.pop();else if(!a||r.WTF&&i[i.length-1]!=37)throw new Error("Unexpected record 0x"+u.toString(16))}}),n}var uJe=["</a:lt1>","</a:dk1>","</a:lt2>","</a:dk2>","</a:accent1>","</a:accent2>","</a:accent3>","</a:accent4>","</a:accent5>","</a:accent6>","</a:hlink>","</a:folHlink>"];function dJe(e,t,r){t.themeElements.clrScheme=[];var n={};(e[0].match(rs)||[]).forEach(function(o){var i=$r(o);switch(i[0]){case"<a:clrScheme":case"</a:clrScheme>":break;case"<a:srgbClr":n.rgb=i.val;break;case"<a:sysClr":n.rgb=i.lastClr;break;case"<a:dk1>":case"</a:dk1>":case"<a:lt1>":case"</a:lt1>":case"<a:dk2>":case"</a:dk2>":case"<a:lt2>":case"</a:lt2>":case"<a:accent1>":case"</a:accent1>":case"<a:accent2>":case"</a:accent2>":case"<a:accent3>":case"</a:accent3>":case"<a:accent4>":case"</a:accent4>":case"<a:accent5>":case"</a:accent5>":case"<a:accent6>":case"</a:accent6>":case"<a:hlink>":case"</a:hlink>":case"<a:folHlink>":case"</a:folHlink>":i[0].charAt(1)==="/"?(t.themeElements.clrScheme[uJe.indexOf(i[0])]=n,n={}):n.name=i[0].slice(3,i[0].length-1);break;default:if(r&&r.WTF)throw new Error("Unrecognized "+i[0]+" in clrScheme")}})}function fJe(){}function hJe(){}var pJe=/<a:clrScheme([^>]*)>[\s\S]*<\/a:clrScheme>/,mJe=/<a:fontScheme([^>]*)>[\s\S]*<\/a:fontScheme>/,gJe=/<a:fmtScheme([^>]*)>[\s\S]*<\/a:fmtScheme>/;function vJe(e,t,r){t.themeElements={};var n;[["clrScheme",pJe,dJe],["fontScheme",mJe,fJe],["fmtScheme",gJe,hJe]].forEach(function(o){if(!(n=e.match(o[1])))throw new Error(o[0]+" not found in themeElements");o[2](n,t,r)})}var yJe=/<a:themeElements([^>]*)>[\s\S]*<\/a:themeElements>/;function xne(e,t){(!e||e.length===0)&&(e=bJe());var r,n={};if(!(r=e.match(yJe)))throw new Error("themeElements not found in theme");return vJe(r[0],n,t),n.raw=e,n}function bJe(e,t){if(t&&t.themeXLSX)return t.themeXLSX;if(e&&typeof e.raw=="string")return e.raw;var r=[Rre];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<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>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<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>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<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>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<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>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}function wJe(e,t,r){var n=e.l+t,o=e.read_shift(4);if(o!==124226){if(!r.cellStyles){e.l=n;return}var i=e.slice(e.l);e.l=n;var a;try{a=Mre(i,{type:"array"})}catch{return}var s=pl(a,"theme/theme/theme1.xml",!0);if(s)return xne(s,r)}}function xJe(e){return e.read_shift(4)}function CJe(e){var t={};switch(t.xclrType=e.read_shift(2),t.nTintShade=e.read_shift(2),t.xclrType){case 0:e.l+=4;break;case 1:t.xclrValue=SJe(e,4);break;case 2:t.xclrValue=sne(e);break;case 3:t.xclrValue=xJe(e);break;case 4:e.l+=4;break}return e.l+=8,t}function SJe(e,t){return Za(e,t)}function _Je(e,t){return Za(e,t)}function kJe(e){var t=e.read_shift(2),r=e.read_shift(2)-4,n=[t];switch(t){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:n[1]=CJe(e);break;case 6:n[1]=_Je(e,r);break;case 14:case 15:n[1]=e.read_shift(r===1?1:2);break;default:throw new Error("Unrecognized ExtProp type: "+t+" "+r)}return n}function EJe(e,t){var r=e.l+t;e.l+=2;var n=e.read_shift(2);e.l+=2;for(var o=e.read_shift(2),i=[];o-- >0;)i.push(kJe(e,r-e.l));return{ixfe:n,ext:i}}function TJe(e,t){t.forEach(function(r){switch(r[0]){}})}function IJe(e,t){return{flags:e.read_shift(4),version:e.read_shift(4),name:Ka(e)}}function AJe(e){for(var t=[],r=e.read_shift(4);r-- >0;)t.push([e.read_shift(4),e.read_shift(4)]);return t}function PJe(e){return e.l+=4,e.read_shift(4)!=0}function MJe(e,t,r){var n={Types:[],Cell:[],Value:[]},o=r||{},i=[],a=!1,s=2;return Ef(e,function(c,l,u){switch(u){case 335:n.Types.push({name:c.name});break;case 51:c.forEach(function(f){s==1?n.Cell.push({type:n.Types[f[0]-1].name,index:f[1]}):s==0&&n.Value.push({type:n.Types[f[0]-1].name,index:f[1]})});break;case 337:s=c?1:0;break;case 338:s=2;break;case 35:i.push(u),a=!0;break;case 36:i.pop(),a=!1;break;default:if(!l.T){if(!a||o.WTF&&i[i.length-1]!=35)throw new Error("Unexpected record 0x"+u.toString(16))}}}),n}function RJe(e,t,r){var n={Types:[],Cell:[],Value:[]};if(!e)return n;var o=!1,i=2,a;return e.replace(rs,function(s){var c=$r(s);switch(dd(c[0])){case"<?xml":break;case"<metadata":case"</metadata>":break;case"<metadataTypes":case"</metadataTypes>":break;case"<metadataType":n.Types.push({name:c.name});break;case"</metadataType>":break;case"<futureMetadata":for(var l=0;l<n.Types.length;++l)n.Types[l].name==c.name&&(a=n.Types[l]);break;case"</futureMetadata>":break;case"<bk>":break;case"</bk>":break;case"<rc":i==1?n.Cell.push({type:n.Types[c.t-1].name,index:+c.v}):i==0&&n.Value.push({type:n.Types[c.t-1].name,index:+c.v});break;case"</rc>":break;case"<cellMetadata":i=1;break;case"</cellMetadata>":i=2;break;case"<valueMetadata":i=0;break;case"</valueMetadata>":i=2;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":o=!0;break;case"</ext>":o=!1;break;case"<rvb":if(!a)break;a.offsets||(a.offsets=[]),a.offsets.push(+c.i);break;default:if(!o&&r.WTF)throw new Error("unrecognized "+c[0]+" in metadata")}return s}),n}function OJe(e){var t=[];if(!e)return t;var r=1;return(e.match(rs)||[]).forEach(function(n){var o=$r(n);switch(o[0]){case"<?xml":break;case"<calcChain":case"<calcChain>":case"</calcChain>":break;case"<c":delete o[0],o.i?r=o.i:o.i=r,t.push(o);break}}),t}function DJe(e){var t={};t.i=e.read_shift(4);var r={};r.r=e.read_shift(4),r.c=e.read_shift(4),t.r=Yr(r);var n=e.read_shift(1);return n&2&&(t.l="1"),n&8&&(t.a="1"),t}function FJe(e,t,r){var n=[];return Ef(e,function(i,a,s){switch(s){case 63:n.push(i);break;default:if(!a.T)throw new Error("Unexpected record 0x"+s.toString(16))}}),n}function NJe(e,t,r,n){if(!e)return e;var o=n||{},i=!1;Ef(e,function(s,c,l){switch(l){case 359:case 363:case 364:case 366:case 367:case 368:case 369:case 370:case 371:case 472:case 577:case 578:case 579:case 580:case 581:case 582:case 583:case 584:case 585:case 586:case 587:break;case 35:i=!0;break;case 36:i=!1;break;default:if(!c.T){if(!i||o.WTF)throw new Error("Unexpected record 0x"+l.toString(16))}}},o)}function LJe(e,t){if(!e)return"??";var r=(e.match(/<c:chart [^>]*r:id="([^"]*)"/)||["",""])[1];return t["!id"][r].Target}function Wj(e,t,r,n){var o=Array.isArray(e),i;t.forEach(function(a){var s=ms(a.ref);if(o?(e[s.r]||(e[s.r]=[]),i=e[s.r][s.c]):i=e[a.ref],!i){i={t:"z"},o?e[s.r][s.c]=i:e[a.ref]=i;var c=oi(e["!ref"]||"BDWGO1000001:A1");c.s.r>s.r&&(c.s.r=s.r),c.e.r<s.r&&(c.e.r=s.r),c.s.c>s.c&&(c.s.c=s.c),c.e.c<s.c&&(c.e.c=s.c);var l=Tn(c);l!==e["!ref"]&&(e["!ref"]=l)}i.c||(i.c=[]);var u={a:a.author,t:a.t,r:a.r,T:r};a.h&&(u.h=a.h);for(var f=i.c.length-1;f>=0;--f){if(!r&&i.c[f].T)return;r&&!i.c[f].T&&i.c.splice(f,1)}if(r&&n){for(f=0;f<n.length;++f)if(u.a==n[f].id){u.a=n[f].name||u.a;break}}i.c.push(u)})}function $Je(e,t){if(e.match(/<(?:\w+:)?comments *\/>/))return[];var r=[],n=[],o=e.match(/<(?:\w+:)?authors>([\s\S]*)<\/(?:\w+:)?authors>/);o&&o[1]&&o[1].split(/<\/\w*:?author>/).forEach(function(a){if(!(a===""||a.trim()==="")){var s=a.match(/<(?:\w+:)?author[^>]*>(.*)/);s&&r.push(s[1])}});var i=e.match(/<(?:\w+:)?commentList>([\s\S]*)<\/(?:\w+:)?commentList>/);return i&&i[1]&&i[1].split(/<\/\w*:?comment>/).forEach(function(a){if(!(a===""||a.trim()==="")){var s=a.match(/<(?:\w+:)?comment[^>]*>/);if(s){var c=$r(s[0]),l={author:c.authorId&&r[c.authorId]||"sheetjsghost",ref:c.ref,guid:c.guid},u=ms(c.ref);if(!(t.sheetRows&&t.sheetRows<=u.r)){var f=a.match(/<(?:\w+:)?text>([\s\S]*)<\/(?:\w+:)?text>/),d=!!f&&!!f[1]&&xF(f[1])||{r:"",t:"",h:""};l.r=d.r,d.r=="<t></t>"&&(d.t=d.h=""),l.t=(d.t||"").replace(/\r\n/g,`
`).replace(/\r/g,`
`),t.cellHTML&&(l.h=d.h),n.push(l)}}}}),n}function BJe(e,t){var r=[],n=!1,o={},i=0;return e.replace(rs,function(s,c){var l=$r(s);switch(dd(l[0])){case"<?xml":break;case"<ThreadedComments":break;case"</ThreadedComments>":break;case"<threadedComment":o={author:l.personId,guid:l.id,ref:l.ref,T:1};break;case"</threadedComment>":o.t!=null&&r.push(o);break;case"<text>":case"<text":i=c+s.length;break;case"</text>":o.t=e.slice(i,c).replace(/\r\n/g,`
`).replace(/\r/g,`
`);break;case"<mentions":case"<mentions>":n=!0;break;case"</mentions>":n=!1;break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+l[0]+" in threaded comments")}return s}),r}function UJe(e,t){var r=[],n=!1;return e.replace(rs,function(i){var a=$r(i);switch(dd(a[0])){case"<?xml":break;case"<personList":break;case"</personList>":break;case"<person":r.push({name:a.displayname,id:a.id});break;case"</person>":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;default:if(!n&&t.WTF)throw new Error("unrecognized "+a[0]+" in threaded comments")}return i}),r}function HJe(e){var t={};t.iauthor=e.read_shift(4);var r=x0(e);return t.rfx=r.s,t.ref=Yr(r.s),e.l+=16,t}var zJe=Ka;function jJe(e,t){var r=[],n=[],o={},i=!1;return Ef(e,function(s,c,l){switch(l){case 632:n.push(s);break;case 635:o=s;break;case 637:o.t=s.t,o.h=s.h,o.r=s.r;break;case 636:if(o.author=n[o.iauthor],delete o.iauthor,t.sheetRows&&o.rfx&&t.sheetRows<=o.rfx.r)break;o.t||(o.t=""),delete o.rfx,r.push(o);break;case 3072:break;case 35:i=!0;break;case 36:i=!1;break;case 37:break;case 38:break;default:if(!c.T){if(!i||t.WTF)throw new Error("Unexpected record 0x"+l.toString(16))}}}),r}var VJe="application/vnd.ms-office.vbaProject";function WJe(e){var t=En.utils.cfb_new({root:"R"});return e.FullPaths.forEach(function(r,n){if(!(r.slice(-1)==="/"||!r.match(/_VBA_PROJECT_CUR/))){var o=r.replace(/^[^\/]*/,"R").replace(/\/_VBA_PROJECT_CUR\u0000*/,"");En.utils.cfb_add(t,o,e.FileIndex[n].content)}}),En.write(t)}function GJe(){return{"!type":"dialog"}}function qJe(){return{"!type":"dialog"}}function KJe(){return{"!type":"macro"}}function YJe(){return{"!type":"macro"}}var vv=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,t={r:0,c:0};function r(n,o,i,a){var s=!1,c=!1;i.length==0?c=!0:i.charAt(0)=="["&&(c=!0,i=i.slice(1,-1)),a.length==0?s=!0:a.charAt(0)=="["&&(s=!0,a=a.slice(1,-1));var l=i.length>0?parseInt(i,10)|0:0,u=a.length>0?parseInt(a,10)|0:0;return s?u+=t.c:--u,c?l+=t.r:--l,o+(s?"":"$")+ji(u)+(c?"":"$")+Ia(l)}return function(o,i){return t=i,o.replace(e,r)}}(),Cne=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,XJe=function(){return function(t,r){return t.replace(Cne,function(n,o,i,a,s,c){var l=mF(a)-(i?0:r.c),u=pF(c)-(s?0:r.r),f=u==0?"":s?u+1:"["+u+"]",d=l==0?"":i?l+1:"["+l+"]";return o+"R"+f+"C"+d})}}();function Sne(e,t){return e.replace(Cne,function(r,n,o,i,a,s){return n+(o=="$"?o+i:ji(mF(i)+t.c))+(a=="$"?a+s:Ia(pF(s)+t.r))})}function QJe(e,t,r){var n=ay(t),o=n.s,i=ms(r),a={r:i.r-o.r,c:i.c-o.c};return Sne(e,a)}function ZJe(e){return e.length!=1}function Gj(e){return e.replace(/_xlfn\./g,"")}function Si(e){e.l+=1}function Zh(e,t){var r=e.read_shift(t==1?1:2);return[r&16383,r>>14&1,r>>15&1]}function _ne(e,t,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return kne(e);r.biff==12&&(n=4)}var o=e.read_shift(n),i=e.read_shift(n),a=Zh(e,2),s=Zh(e,2);return{s:{r:o,c:a[0],cRel:a[1],rRel:a[2]},e:{r:i,c:s[0],cRel:s[1],rRel:s[2]}}}function kne(e){var t=Zh(e,2),r=Zh(e,2),n=e.read_shift(1),o=e.read_shift(1);return{s:{r:t[0],c:n,cRel:t[1],rRel:t[2]},e:{r:r[0],c:o,cRel:r[1],rRel:r[2]}}}function JJe(e,t,r){if(r.biff<8)return kne(e);var n=e.read_shift(r.biff==12?4:2),o=e.read_shift(r.biff==12?4:2),i=Zh(e,2),a=Zh(e,2);return{s:{r:n,c:i[0],cRel:i[1],rRel:i[2]},e:{r:o,c:a[0],cRel:a[1],rRel:a[2]}}}function Ene(e,t,r){if(r&&r.biff>=2&&r.biff<=5)return eet(e);var n=e.read_shift(r&&r.biff==12?4:2),o=Zh(e,2);return{r:n,c:o[0],cRel:o[1],rRel:o[2]}}function eet(e){var t=Zh(e,2),r=e.read_shift(1);return{r:t[0],c:r,cRel:t[1],rRel:t[2]}}function tet(e){var t=e.read_shift(2),r=e.read_shift(2);return{r:t,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}function ret(e,t,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return net(e);var o=e.read_shift(n>=12?4:2),i=e.read_shift(2),a=(i&16384)>>14,s=(i&32768)>>15;if(i&=16383,s==1)for(;o>524287;)o-=1048576;if(a==1)for(;i>8191;)i=i-16384;return{r:o,c:i,cRel:a,rRel:s}}function net(e){var t=e.read_shift(2),r=e.read_shift(1),n=(t&32768)>>15,o=(t&16384)>>14;return t&=16383,n==1&&t>=8192&&(t=t-16384),o==1&&r>=128&&(r=r-256),{r:t,c:r,cRel:o,rRel:n}}function oet(e,t,r){var n=(e[e.l++]&96)>>5,o=_ne(e,r.biff>=2&&r.biff<=5?6:8,r);return[n,o]}function iet(e,t,r){var n=(e[e.l++]&96)>>5,o=e.read_shift(2,"i"),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}var a=_ne(e,i,r);return[n,o,a]}function aet(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}function set(e,t,r){var n=(e[e.l++]&96)>>5,o=e.read_shift(2),i=8;if(r)switch(r.biff){case 5:e.l+=12,i=6;break;case 12:i=12;break}return e.l+=i,[n,o]}function cet(e,t,r){var n=(e[e.l++]&96)>>5,o=JJe(e,t-1,r);return[n,o]}function uet(e,t,r){var n=(e[e.l++]&96)>>5;return e.l+=r.biff==2?6:r.biff==12?14:7,[n]}function qj(e){var t=e[e.l+1]&1,r=1;return e.l+=4,[t,r]}function det(e,t,r){e.l+=2;for(var n=e.read_shift(r&&r.biff==2?1:2),o=[],i=0;i<=n;++i)o.push(e.read_shift(r&&r.biff==2?1:2));return o}function fet(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function het(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=2,[n,e.read_shift(r&&r.biff==2?1:2)]}function pet(e){var t=e[e.l+1]&255?1:0;return e.l+=2,[t,e.read_shift(2)]}function met(e,t,r){var n=e[e.l+1]&255?1:0;return e.l+=r&&r.biff==2?3:4,[n]}function Tne(e){var t=e.read_shift(1),r=e.read_shift(1);return[t,r]}function get(e){return e.read_shift(2),Tne(e)}function vet(e){return e.read_shift(2),Tne(e)}function yet(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var o=Ene(e,0,r);return[n,o]}function bet(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var o=ret(e,0,r);return[n,o]}function wet(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var o=e.read_shift(2);r&&r.biff==5&&(e.l+=12);var i=Ene(e,0,r);return[n,o,i]}function xet(e,t,r){var n=(e[e.l]&96)>>5;e.l+=1;var o=e.read_shift(r&&r.biff<=3?1:2);return[Stt[o],Pne[o],n]}function Cet(e,t,r){var n=e[e.l++],o=e.read_shift(1),i=r&&r.biff<=3?[n==88?-1:0,e.read_shift(1)]:_et(e);return[o,(i[0]===0?Pne:Ctt)[i[1]]]}function _et(e){return[e[e.l+1]>>7,e.read_shift(2)&32767]}function ket(e,t,r){e.l+=r&&r.biff==2?3:4}function Eet(e,t,r){if(e.l++,r&&r.biff==12)return[e.read_shift(4,"i"),0];var n=e.read_shift(2),o=e.read_shift(r&&r.biff==2?1:2);return[n,o]}function Tet(e){return e.l++,C0[e.read_shift(1)]}function Iet(e){return e.l++,e.read_shift(2)}function Aet(e){return e.l++,e.read_shift(1)!==0}function Pet(e){return e.l++,Wa(e)}function Met(e,t,r){return e.l++,aC(e,t-1,r)}function Ret(e,t){var r=[e.read_shift(1)];if(t==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=ci(e,1)?"TRUE":"FALSE",t!=12&&(e.l+=7);break;case 37:case 16:r[1]=C0[e[e.l]],e.l+=t==12?4:8;break;case 0:e.l+=8;break;case 1:r[1]=Wa(e);break;case 2:r[1]=S0(e,0,{biff:t>0&&t<8?2:t});break;default:throw new Error("Bad SerAr: "+r[0])}return r}function Oet(e,t,r){for(var n=e.read_shift(r.biff==12?4:2),o=[],i=0;i!=n;++i)o.push((r.biff==12?x0:f4)(e));return o}function Det(e,t,r){var n=0,o=0;r.biff==12?(n=e.read_shift(4),o=e.read_shift(4)):(o=1+e.read_shift(1),n=1+e.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--o==0&&(o=256));for(var i=0,a=[];i!=n&&(a[i]=[]);++i)for(var s=0;s!=o;++s)a[i][s]=Ret(e,r.biff);return a}function Fet(e,t,r){var n=e.read_shift(1)>>>5&3,o=!r||r.biff>=8?4:2,i=e.read_shift(o);switch(r.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12;break}return[n,0,i]}function Net(e,t,r){if(r.biff==5)return Let(e);var n=e.read_shift(1)>>>5&3,o=e.read_shift(2),i=e.read_shift(4);return[n,o,i]}function Let(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[t,r,n]}function $et(e,t,r){var n=e.read_shift(1)>>>5&3;e.l+=r&&r.biff==2?3:4;var o=e.read_shift(r&&r.biff==2?1:2);return[n,o]}function Bet(e,t,r){var n=e.read_shift(1)>>>5&3,o=e.read_shift(r&&r.biff==2?1:2);return[n,o]}function Uet(e,t,r){var n=e.read_shift(1)>>>5&3;return e.l+=4,r.biff<8&&e.l--,r.biff==12&&(e.l+=2),[n]}function Het(e,t,r){var n=(e[e.l++]&96)>>5,o=e.read_shift(2),i=4;if(r)switch(r.biff){case 5:i=15;break;case 12:i=6;break}return e.l+=i,[n,o]}var zet=Za,jet=Za,Vet=Za;function lC(e,t,r){return e.l+=2,[tet(e)]}function SF(e){return e.l+=6,[]}var Wet=lC,Get=SF,qet=SF,Ket=lC;function Ine(e){return e.l+=2,[Ei(e),e.read_shift(2)&1]}var Yet=lC,Xet=Ine,Qet=SF,Zet=lC,Jet=lC,ett=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function ttt(e){e.l+=2;var t=e.read_shift(2),r=e.read_shift(2),n=e.read_shift(4),o=e.read_shift(2),i=e.read_shift(2),a=ett[r>>2&31];return{ixti:t,coltype:r&3,rt:a,idx:n,c:o,C:i}}function rtt(e){return e.l+=2,[e.read_shift(4)]}function ntt(e,t,r){return e.l+=5,e.l+=2,e.l+=r.biff==2?1:4,["PTGSHEET"]}function ott(e,t,r){return e.l+=r.biff==2?4:5,["PTGENDSHEET"]}function itt(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function att(e){var t=e.read_shift(1)>>>5&3,r=e.read_shift(2);return[t,r]}function stt(e){return e.l+=4,[0,0]}var Kj={1:{n:"PtgExp",f:Eet},2:{n:"PtgTbl",f:Vet},3:{n:"PtgAdd",f:Si},4:{n:"PtgSub",f:Si},5:{n:"PtgMul",f:Si},6:{n:"PtgDiv",f:Si},7:{n:"PtgPower",f:Si},8:{n:"PtgConcat",f:Si},9:{n:"PtgLt",f:Si},10:{n:"PtgLe",f:Si},11:{n:"PtgEq",f:Si},12:{n:"PtgGe",f:Si},13:{n:"PtgGt",f:Si},14:{n:"PtgNe",f:Si},15:{n:"PtgIsect",f:Si},16:{n:"PtgUnion",f:Si},17:{n:"PtgRange",f:Si},18:{n:"PtgUplus",f:Si},19:{n:"PtgUminus",f:Si},20:{n:"PtgPercent",f:Si},21:{n:"PtgParen",f:Si},22:{n:"PtgMissArg",f:Si},23:{n:"PtgStr",f:Met},26:{n:"PtgSheet",f:ntt},27:{n:"PtgEndSheet",f:ott},28:{n:"PtgErr",f:Tet},29:{n:"PtgBool",f:Aet},30:{n:"PtgInt",f:Iet},31:{n:"PtgNum",f:Pet},32:{n:"PtgArray",f:uet},33:{n:"PtgFunc",f:xet},34:{n:"PtgFuncVar",f:Cet},35:{n:"PtgName",f:Fet},36:{n:"PtgRef",f:yet},37:{n:"PtgArea",f:oet},38:{n:"PtgMemArea",f:$et},39:{n:"PtgMemErr",f:zet},40:{n:"PtgMemNoMem",f:jet},41:{n:"PtgMemFunc",f:Bet},42:{n:"PtgRefErr",f:Uet},43:{n:"PtgAreaErr",f:aet},44:{n:"PtgRefN",f:bet},45:{n:"PtgAreaN",f:cet},46:{n:"PtgMemAreaN",f:itt},47:{n:"PtgMemNoMemN",f:att},57:{n:"PtgNameX",f:Net},58:{n:"PtgRef3d",f:wet},59:{n:"PtgArea3d",f:iet},60:{n:"PtgRefErr3d",f:Het},61:{n:"PtgAreaErr3d",f:set},255:{}},ltt={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},ctt={1:{n:"PtgElfLel",f:Ine},2:{n:"PtgElfRw",f:Zet},3:{n:"PtgElfCol",f:Wet},6:{n:"PtgElfRwV",f:Jet},7:{n:"PtgElfColV",f:Ket},10:{n:"PtgElfRadical",f:Yet},11:{n:"PtgElfRadicalS",f:Qet},13:{n:"PtgElfColS",f:Get},15:{n:"PtgElfColSV",f:qet},16:{n:"PtgElfRadicalLel",f:Xet},25:{n:"PtgList",f:ttt},29:{n:"PtgSxName",f:rtt},255:{}},utt={0:{n:"PtgAttrNoop",f:stt},1:{n:"PtgAttrSemi",f:met},2:{n:"PtgAttrIf",f:het},4:{n:"PtgAttrChoose",f:det},8:{n:"PtgAttrGoto",f:fet},16:{n:"PtgAttrSum",f:ket},32:{n:"PtgAttrBaxcel",f:qj},33:{n:"PtgAttrBaxcel",f:qj},64:{n:"PtgAttrSpace",f:get},65:{n:"PtgAttrSpaceSemi",f:vet},128:{n:"PtgAttrIfError",f:pet},255:{}};function cC(e,t,r,n){if(n.biff<8)return Za(e,t);for(var o=e.l+t,i=[],a=0;a!==r.length;++a)switch(r[a][0]){case"PtgArray":r[a][1]=Det(e,0,n),i.push(r[a][1]);break;case"PtgMemArea":r[a][2]=Oet(e,r[a][1],n),i.push(r[a][2]);break;case"PtgExp":n&&n.biff==12&&(r[a][1][1]=e.read_shift(4),i.push(r[a][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[a][0]}return t=o-e.l,t!==0&&i.push(Za(e,t)),i}function uC(e,t,r){for(var n=e.l+t,o,i,a=[];n!=e.l;)t=n-e.l,i=e[e.l],o=Kj[i]||Kj[ltt[i]],(i===24||i===25)&&(o=(i===24?ctt:utt)[e[e.l+1]]),!o||!o.f?Za(e,t):a.push([o.n,o.f(e,t,r)]);return a}function dtt(e){for(var t=[],r=0;r<e.length;++r){for(var n=e[r],o=[],i=0;i<n.length;++i){var a=n[i];if(a)switch(a[0]){case 2:o.push('"'+a[1].replace(/"/g,'""')+'"');break;default:o.push(a[1])}else o.push("")}t.push(o.join(","))}return t.join(";")}var ftt={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function htt(e,t){if(!e&&!(t&&t.biff<=5&&t.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e+"'":e}function Ane(e,t,r){if(!e)return"SH33TJSERR0";if(r.biff>8&&(!e.XTI||!e.XTI[t]))return e.SheetNames[t];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[t];if(r.biff<8)return t>1e4&&(t-=65536),t<0&&(t=-t),t==0?"":e.XTI[t-1];if(!n)return"SH33TJSERR1";var o="";if(r.biff>8)switch(e[n[0]][0]){case 357:return o=n[1]==-1?"#REF":e.SheetNames[n[1]],n[1]==n[2]?o:o+":"+e.SheetNames[n[2]];case 358:return r.SID!=null?e.SheetNames[r.SID]:"SH33TJSSAME"+e[n[0]][0];case 355:default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return o=n[1]==-1?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?o:o+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(i){return i.Name}).join(";;");default:return e[n[0]][0][3]?(o=n[1]==-1?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?o:o+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function Yj(e,t,r){var n=Ane(e,t,r);return n=="#REF"?n:htt(n,r)}function Ha(e,t,r,n,o){var i=o&&o.biff||8,a={s:{c:0,r:0},e:{c:0,r:0}},s=[],c,l,u,f=0,d=0,h,p="";if(!e[0]||!e[0][0])return"";for(var g=-1,m="",v=0,y=e[0].length;v<y;++v){var b=e[0][v];switch(b[0]){case"PtgUminus":s.push("-"+s.pop());break;case"PtgUplus":s.push("+"+s.pop());break;case"PtgPercent":s.push(s.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(c=s.pop(),l=s.pop(),g>=0){switch(e[0][g][1][0]){case 0:m=ei(" ",e[0][g][1][1]);break;case 1:m=ei("\r",e[0][g][1][1]);break;default:if(m="",o.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}l=l+m,g=-1}s.push(l+ftt[b[0]]+c);break;case"PtgIsect":c=s.pop(),l=s.pop(),s.push(l+" "+c);break;case"PtgUnion":c=s.pop(),l=s.pop(),s.push(l+","+c);break;case"PtgRange":c=s.pop(),l=s.pop(),s.push(l+":"+c);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":u=fw(b[1][1],a,o),s.push(hw(u,i));break;case"PtgRefN":u=r?fw(b[1][1],r,o):b[1][1],s.push(hw(u,i));break;case"PtgRef3d":f=b[1][1],u=fw(b[1][2],a,o),p=Yj(n,f,o),s.push(p+"!"+hw(u,i));break;case"PtgFunc":case"PtgFuncVar":var w=b[1][0],E=b[1][1];w||(w=0),w&=127;var I=w==0?[]:s.slice(-w);s.length-=w,E==="User"&&(E=I.shift()),s.push(E+"("+I.join(",")+")");break;case"PtgBool":s.push(b[1]?"TRUE":"FALSE");break;case"PtgInt":s.push(b[1]);break;case"PtgNum":s.push(String(b[1]));break;case"PtgStr":s.push('"'+b[1].replace(/"/g,'""')+'"');break;case"PtgErr":s.push(b[1]);break;case"PtgAreaN":h=Aj(b[1][1],r?{s:r}:a,o),s.push(vP(h,o));break;case"PtgArea":h=Aj(b[1][1],a,o),s.push(vP(h,o));break;case"PtgArea3d":f=b[1][1],h=b[1][2],p=Yj(n,f,o),s.push(p+"!"+vP(h,o));break;case"PtgAttrSum":s.push("SUM("+s.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":d=b[1][2];var O=(n.names||[])[d-1]||(n[0]||[])[d],D=O?O.Name:"SH33TJSNAME"+String(d);D&&D.slice(0,6)=="_xlfn."&&!o.xlfn&&(D=D.slice(6)),s.push(D);break;case"PtgNameX":var N=b[1][1];d=b[1][2];var U;if(o.biff<=5)N<0&&(N=-N),n[N]&&(U=n[N][d]);else{var B="";if(((n[N]||[])[0]||[])[0]==14849||(((n[N]||[])[0]||[])[0]==1025?n[N][d]&&n[N][d].itab>0&&(B=n.SheetNames[n[N][d].itab-1]+"!"):B=n.SheetNames[d-1]+"!"),n[N]&&n[N][d])B+=n[N][d].Name;else if(n[0]&&n[0][d])B+=n[0][d].Name;else{var F=(Ane(n,N,o)||"").split(";;");F[d-1]?B=F[d-1]:B+="SH33TJSERRX"}s.push(B);break}U||(U={Name:"SH33TJSERRY"}),s.push(U.Name);break;case"PtgParen":var T="(",P=")";if(g>=0){switch(m="",e[0][g][1][0]){case 2:T=ei(" ",e[0][g][1][1])+T;break;case 3:T=ei("\r",e[0][g][1][1])+T;break;case 4:P=ei(" ",e[0][g][1][1])+P;break;case 5:P=ei("\r",e[0][g][1][1])+P;break;default:if(o.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][g][1][0])}g=-1}s.push(T+s.pop()+P);break;case"PtgRefErr":s.push("#REF!");break;case"PtgRefErr3d":s.push("#REF!");break;case"PtgExp":u={c:b[1][1],r:b[1][0]};var _={c:r.c,r:r.r};if(n.sharedf[Yr(u)]){var C=n.sharedf[Yr(u)];s.push(Ha(C,a,_,n,o))}else{var S=!1;for(c=0;c!=n.arrayf.length;++c)if(l=n.arrayf[c],!(u.c<l[0].s.c||u.c>l[0].e.c)&&!(u.r<l[0].s.r||u.r>l[0].e.r)){s.push(Ha(l[1],a,_,n,o)),S=!0;break}S||s.push(b[1])}break;case"PtgArray":s.push("{"+dtt(b[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":g=v;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":s.push("");break;case"PtgAreaErr":s.push("#REF!");break;case"PtgAreaErr3d":s.push("#REF!");break;case"PtgList":s.push("Table"+b[1].idx+"[#"+b[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(b));default:throw new Error("Unrecognized Formula Token: "+String(b))}var x=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(o.biff!=3&&g>=0&&x.indexOf(e[0][v][0])==-1){b=e[0][g];var k=!0;switch(b[1][0]){case 4:k=!1;case 0:m=ei(" ",b[1][1]);break;case 5:k=!1;case 1:m=ei("\r",b[1][1]);break;default:if(m="",o.WTF)throw new Error("Unexpected PtgAttrSpaceType "+b[1][0])}s.push((k?m:"")+s.pop()+(k?"":m)),g=-1}}if(s.length>1&&o.WTF)throw new Error("bad formula stack");return s[0]}function ptt(e,t,r){var n=e.l+t,o=r.biff==2?1:2,i,a=e.read_shift(o);if(a==65535)return[[],Za(e,t-2)];var s=uC(e,a,r);return t!==a+o&&(i=cC(e,t-a-o,s,r)),e.l=n,[s,i]}function mtt(e,t,r){var n=e.l+t,o=r.biff==2?1:2,i,a=e.read_shift(o);if(a==65535)return[[],Za(e,t-2)];var s=uC(e,a,r);return t!==a+o&&(i=cC(e,t-a-o,s,r)),e.l=n,[s,i]}function gtt(e,t,r,n){var o=e.l+t,i=uC(e,n,r),a;return o!==e.l&&(a=cC(e,o-e.l,i,r)),[i,a]}function vtt(e,t,r){var n=e.l+t,o,i=e.read_shift(2),a=uC(e,i,r);return i==65535?[[],Za(e,t-2)]:(t!==i+2&&(o=cC(e,n-i-2,a,r)),[a,o])}function ytt(e){var t;if(Vd(e,e.l+6)!==65535)return[Wa(e),"n"];switch(e[e.l]){case 0:return e.l+=8,["String","s"];case 1:return t=e[e.l+2]===1,e.l+=8,[t,"b"];case 2:return t=e[e.l+2],e.l+=8,[t,"e"];case 3:return e.l+=8,["","s"]}return[]}function wP(e,t,r){var n=e.l+t,o=fd(e);r.biff==2&&++e.l;var i=ytt(e),a=e.read_shift(1);r.biff!=2&&(e.read_shift(1),r.biff>=5&&e.read_shift(4));var s=mtt(e,n-e.l,r);return{cell:o,val:i[0],formula:s,shared:a>>3&1,tt:i[1]}}function h4(e,t,r){var n=e.read_shift(4),o=uC(e,n,r),i=e.read_shift(4),a=i>0?cC(e,i,o,r):null;return[o,a]}var btt=h4,p4=h4,wtt=h4,xtt=h4,Ctt={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},Pne={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},Stt={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function Xj(e){return e.slice(0,3)=="of:"&&(e=e.slice(3)),e.charCodeAt(0)==61&&(e=e.slice(1),e.charCodeAt(0)==61&&(e=e.slice(1))),e=e.replace(/COM\.MICROSOFT\./g,""),e=e.replace(/\[((?:\.[A-Z]+[0-9]+)(?::\.[A-Z]+[0-9]+)?)\]/g,function(t,r){return r.replace(/\./g,"")}),e=e.replace(/\[.(#[A-Z]*[?!])\]/g,"$1"),e.replace(/[;~]/g,",").replace(/\|/g,";")}function xP(e){var t=e.split(":"),r=t[0].split(".")[0];return[r,t[0].split(".")[1]+(t.length>1?":"+(t[1].split(".")[1]||t[1].split(".")[0]):"")]}var vw={},yv={};function yw(e,t){if(e){var r=[.7,.7,.75,.75,.3,.3];t=="xlml"&&(r=[1,1,1,1,.5,.5]),e.left==null&&(e.left=r[0]),e.right==null&&(e.right=r[1]),e.top==null&&(e.top=r[2]),e.bottom==null&&(e.bottom=r[3]),e.header==null&&(e.header=r[4]),e.footer==null&&(e.footer=r[5])}}function Mne(e,t,r,n,o,i){try{n.cellNF&&(e.z=nn[t])}catch(s){if(n.WTF)throw s}if(!(e.t==="z"&&!n.cellStyles)){if(e.t==="d"&&typeof e.v=="string"&&(e.v=la(e.v)),(!n||n.cellText!==!1)&&e.t!=="z")try{if(nn[t]==null&&Tm(SYe[t]||"General",t),e.t==="e")e.w=e.w||C0[e.v];else if(t===0)if(e.t==="n")(e.v|0)===e.v?e.w=e.v.toString(10):e.w=wx(e.v);else if(e.t==="d"){var a=Ss(e.v);(a|0)===a?e.w=a.toString(10):e.w=wx(a)}else{if(e.v===void 0)return"";e.w=Ym(e.v,yv)}else e.t==="d"?e.w=mc(t,Ss(e.v),yv):e.w=mc(t,e.v,yv)}catch(s){if(n.WTF)throw s}if(n.cellStyles&&r!=null)try{e.s=i.Fills[r],e.s.fgColor&&e.s.fgColor.theme&&!e.s.fgColor.rgb&&(e.s.fgColor.rgb=LE(o.themeElements.clrScheme[e.s.fgColor.theme].rgb,e.s.fgColor.tint||0),n.WTF&&(e.s.fgColor.raw_rgb=o.themeElements.clrScheme[e.s.fgColor.theme].rgb)),e.s.bgColor&&e.s.bgColor.theme&&(e.s.bgColor.rgb=LE(o.themeElements.clrScheme[e.s.bgColor.theme].rgb,e.s.bgColor.tint||0),n.WTF&&(e.s.bgColor.raw_rgb=o.themeElements.clrScheme[e.s.bgColor.theme].rgb))}catch(s){if(n.WTF&&i.Fills)throw s}}}function _tt(e,t){var r=oi(t);r.s.r<=r.e.r&&r.s.c<=r.e.c&&r.s.r>=0&&r.s.c>=0&&(e["!ref"]=Tn(r))}var ktt=/<(?:\w:)?mergeCell ref="[A-Z0-9:]+"\s*[\/]?>/g,Ett=/<(?:\w+:)?sheetData[^>]*>([\s\S]*)<\/(?:\w+:)?sheetData>/,Ttt=/<(?:\w:)?hyperlink [^>]*>/mg,Itt=/"(\w*:\w*)"/,Att=/<(?:\w:)?col\b[^>]*[\/]?>/g,Ptt=/<(?:\w:)?autoFilter[^>]*([\/]|>([\s\S]*)<\/(?:\w:)?autoFilter)>/g,Mtt=/<(?:\w:)?pageMargins[^>]*\/>/g,Rne=/<(?:\w:)?sheetPr\b(?:[^>a-z][^>]*)?\/>/,Rtt=/<(?:\w:)?sheetPr[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetPr)>/,Ott=/<(?:\w:)?sheetViews[^>]*(?:[\/]|>([\s\S]*)<\/(?:\w:)?sheetViews)>/;function Dtt(e,t,r,n,o,i,a){if(!e)return e;n||(n={"!id":{}});var s=t.dense?[]:{},c={s:{r:2e6,c:2e6},e:{r:0,c:0}},l="",u="",f=e.match(Ett);f?(l=e.slice(0,f.index),u=e.slice(f.index+f[0].length)):l=u=e;var d=l.match(Rne);d?_F(d[0],s,o,r):(d=l.match(Rtt))&&Ftt(d[0],d[1]||"",s,o,r);var h=(l.match(/<(?:\w*:)?dimension/)||{index:-1}).index;if(h>0){var p=l.slice(h,h+50).match(Itt);p&&_tt(s,p[1])}var g=l.match(Ott);g&&g[1]&&Htt(g[1],o);var m=[];if(t.cellStyles){var v=l.match(Att);v&&$tt(m,v)}f&&ztt(f[1],s,t,c,i,a);var y=u.match(Ptt);y&&(s["!autofilter"]=Btt(y[0]));var b=[],w=u.match(ktt);if(w)for(h=0;h!=w.length;++h)b[h]=oi(w[h].slice(w[h].indexOf('"')+1));var E=u.match(Ttt);E&&Ntt(s,E,n);var I=u.match(Mtt);if(I&&(s["!margins"]=Ltt($r(I[0]))),!s["!ref"]&&c.e.c>=c.s.c&&c.e.r>=c.s.r&&(s["!ref"]=Tn(c)),t.sheetRows>0&&s["!ref"]){var O=oi(s["!ref"]);t.sheetRows<=+O.e.r&&(O.e.r=t.sheetRows-1,O.e.r>c.e.r&&(O.e.r=c.e.r),O.e.r<O.s.r&&(O.s.r=O.e.r),O.e.c>c.e.c&&(O.e.c=c.e.c),O.e.c<O.s.c&&(O.s.c=O.e.c),s["!fullref"]=s["!ref"],s["!ref"]=Tn(O))}return m.length>0&&(s["!cols"]=m),b.length>0&&(s["!merges"]=b),s}function _F(e,t,r,n){var o=$r(e);r.Sheets[n]||(r.Sheets[n]={}),o.codeName&&(r.Sheets[n].CodeName=Rn(So(o.codeName)))}function Ftt(e,t,r,n,o){_F(e.slice(0,e.indexOf(">")),r,n,o)}function Ntt(e,t,r){for(var n=Array.isArray(e),o=0;o!=t.length;++o){var i=$r(So(t[o]),!0);if(!i.ref)return;var a=((r||{})["!id"]||[])[i.id];a?(i.Target=a.Target,i.location&&(i.Target+="#"+Rn(i.location))):(i.Target="#"+Rn(i.location),a={Target:i.Target,TargetMode:"Internal"}),i.Rel=a,i.tooltip&&(i.Tooltip=i.tooltip,delete i.tooltip);for(var s=oi(i.ref),c=s.s.r;c<=s.e.r;++c)for(var l=s.s.c;l<=s.e.c;++l){var u=Yr({c:l,r:c});n?(e[c]||(e[c]=[]),e[c][l]||(e[c][l]={t:"z",v:void 0}),e[c][l].l=i):(e[u]||(e[u]={t:"z",v:void 0}),e[u].l=i)}}}function Ltt(e){var t={};return["left","right","top","bottom","header","footer"].forEach(function(r){e[r]&&(t[r]=parseFloat(e[r]))}),t}function $tt(e,t){for(var r=!1,n=0;n!=t.length;++n){var o=$r(t[n],!0);o.hidden&&(o.hidden=Do(o.hidden));var i=parseInt(o.min,10)-1,a=parseInt(o.max,10)-1;for(o.outlineLevel&&(o.level=+o.outlineLevel||0),delete o.min,delete o.max,o.width=+o.width,!r&&o.width&&(r=!0,CF(o.width)),v1(o);i<=a;)e[i++]=Ta(o)}}function Btt(e){var t={ref:(e.match(/ref="([^"]*)"/)||[])[1]};return t}var Utt=/<(?:\w:)?sheetView(?:[^>a-z][^>]*)?\/?>/;function Htt(e,t){t.Views||(t.Views=[{}]),(e.match(Utt)||[]).forEach(function(r,n){var o=$r(r);t.Views[n]||(t.Views[n]={}),+o.zoomScale&&(t.Views[n].zoom=+o.zoomScale),Do(o.rightToLeft)&&(t.Views[n].RTL=!0)})}var ztt=function(){var e=/<(?:\w+:)?c[ \/>]/,t=/<\/(?:\w+:)?row>/,r=/r=["']([^"']*)["']/,n=/<(?:\w+:)?is>([\S\s]*?)<\/(?:\w+:)?is>/,o=/ref=["']([^"']*)["']/,i=xx("v"),a=xx("f");return function(c,l,u,f,d,h){for(var p=0,g="",m=[],v=[],y=0,b=0,w=0,E="",I,O,D=0,N=0,U,B,F=0,T=0,P=Array.isArray(h.CellXf),_,C=[],S=[],x=Array.isArray(l),k=[],L={},j=!1,z=!!u.sheetStubs,Y=c.split(t),K=0,Q=Y.length;K!=Q;++K){g=Y[K].trim();var q=g.length;if(q!==0){var J=0;e:for(p=0;p<q;++p)switch(g[p]){case">":if(g[p-1]!="/"){++p;break e}if(u&&u.cellStyles){if(O=$r(g.slice(J,p),!0),D=O.r!=null?parseInt(O.r,10):D+1,N=-1,u.sheetRows&&u.sheetRows<D)continue;L={},j=!1,O.ht&&(j=!0,L.hpt=parseFloat(O.ht),L.hpx=kx(L.hpt)),O.hidden=="1"&&(j=!0,L.hidden=!0),O.outlineLevel!=null&&(j=!0,L.level=+O.outlineLevel),j&&(k[D-1]=L)}break;case"<":J=p;break}if(J>=p)break;if(O=$r(g.slice(J,p),!0),D=O.r!=null?parseInt(O.r,10):D+1,N=-1,!(u.sheetRows&&u.sheetRows<D)){f.s.r>D-1&&(f.s.r=D-1),f.e.r<D-1&&(f.e.r=D-1),u&&u.cellStyles&&(L={},j=!1,O.ht&&(j=!0,L.hpt=parseFloat(O.ht),L.hpx=kx(L.hpt)),O.hidden=="1"&&(j=!0,L.hidden=!0),O.outlineLevel!=null&&(j=!0,L.level=+O.outlineLevel),j&&(k[D-1]=L)),m=g.slice(p).split(e);for(var G=0;G!=m.length&&m[G].trim().charAt(0)=="<";++G);for(m=m.slice(G),p=0;p!=m.length;++p)if(g=m[p].trim(),g.length!==0){if(v=g.match(r),y=p,b=0,w=0,g="<c "+(g.slice(0,1)=="<"?">":"")+g,v!=null&&v.length===2){for(y=0,E=v[1],b=0;b!=E.length&&!((w=E.charCodeAt(b)-64)<1||w>26);++b)y=26*y+w;--y,N=y}else++N;for(b=0;b!=g.length&&g.charCodeAt(b)!==62;++b);if(++b,O=$r(g.slice(0,b),!0),O.r||(O.r=Yr({r:D-1,c:N})),E=g.slice(b),I={t:""},(v=E.match(i))!=null&&v[1]!==""&&(I.v=Rn(v[1])),u.cellFormula){if((v=E.match(a))!=null&&v[1]!==""){if(I.f=Rn(So(v[1])).replace(/\r\n/g,`
`),u.xlfn||(I.f=Gj(I.f)),v[0].indexOf('t="array"')>-1)I.F=(E.match(o)||[])[1],I.F.indexOf(":")>-1&&C.push([oi(I.F),I.F]);else if(v[0].indexOf('t="shared"')>-1){B=$r(v[0]);var V=Rn(So(v[1]));u.xlfn||(V=Gj(V)),S[parseInt(B.si,10)]=[B,V,O.r]}}else(v=E.match(/<f[^>]*\/>/))&&(B=$r(v[0]),S[B.si]&&(I.f=QJe(S[B.si][1],S[B.si][2],O.r)));var X=ms(O.r);for(b=0;b<C.length;++b)X.r>=C[b][0].s.r&&X.r<=C[b][0].e.r&&X.c>=C[b][0].s.c&&X.c<=C[b][0].e.c&&(I.F=C[b][1])}if(O.t==null&&I.v===void 0)if(I.f||I.F)I.v=0,I.t="n";else if(z)I.t="z";else continue;else I.t=O.t||"n";switch(f.s.c>N&&(f.s.c=N),f.e.c<N&&(f.e.c=N),I.t){case"n":if(I.v==""||I.v==null){if(!z)continue;I.t="z"}else I.v=parseFloat(I.v);break;case"s":if(typeof I.v>"u"){if(!z)continue;I.t="z"}else U=vw[parseInt(I.v,10)],I.v=U.t,I.r=U.r,u.cellHTML&&(I.h=U.h);break;case"str":I.t="s",I.v=I.v!=null?So(I.v):"",u.cellHTML&&(I.h=dF(I.v));break;case"inlineStr":v=E.match(n),I.t="s",v!=null&&(U=xF(v[1]))?(I.v=U.t,u.cellHTML&&(I.h=U.h)):I.v="";break;case"b":I.v=Do(I.v);break;case"d":u.cellDates?I.v=la(I.v,1):(I.v=Ss(la(I.v,1)),I.t="n");break;case"e":(!u||u.cellText!==!1)&&(I.w=I.v),I.v=Jre[I.v];break}if(F=T=0,_=null,P&&O.s!==void 0&&(_=h.CellXf[O.s],_!=null&&(_.numFmtId!=null&&(F=_.numFmtId),u.cellStyles&&_.fillId!=null&&(T=_.fillId))),Mne(I,F,T,u,d,h),u.cellDates&&P&&I.t=="n"&&iy(nn[F])&&(I.t="d",I.v=d4(I.v)),O.cm&&u.xlmeta){var te=(u.xlmeta.Cell||[])[+O.cm-1];te&&te.type=="XLDAPR"&&(I.D=!0)}if(x){var ee=ms(O.r);l[ee.r]||(l[ee.r]=[]),l[ee.r][ee.c]=I}else l[O.r]=I}}}}k.length>0&&(l["!rows"]=k)}}();function jtt(e,t){var r={},n=e.l+t;r.r=e.read_shift(4),e.l+=4;var o=e.read_shift(2);e.l+=1;var i=e.read_shift(1);return e.l=n,i&7&&(r.level=i&7),i&16&&(r.hidden=!0),i&32&&(r.hpt=o/20),r}var Vtt=x0;function Wtt(){}function Gtt(e,t){var r={},n=e[e.l];return++e.l,r.above=!(n&64),r.left=!(n&128),e.l+=18,r.name=fXe(e),r}function qtt(e){var t=xc(e);return[t]}function Ktt(e){var t=w0(e);return[t]}function Ytt(e){var t=xc(e),r=e.read_shift(1);return[t,r,"b"]}function Xtt(e){var t=w0(e),r=e.read_shift(1);return[t,r,"b"]}function Qtt(e){var t=xc(e),r=e.read_shift(1);return[t,r,"e"]}function Ztt(e){var t=w0(e),r=e.read_shift(1);return[t,r,"e"]}function Jtt(e){var t=xc(e),r=e.read_shift(4);return[t,r,"s"]}function ert(e){var t=w0(e),r=e.read_shift(4);return[t,r,"s"]}function trt(e){var t=xc(e),r=Wa(e);return[t,r,"n"]}function One(e){var t=w0(e),r=Wa(e);return[t,r,"n"]}function rrt(e){var t=xc(e),r=yF(e);return[t,r,"n"]}function nrt(e){var t=w0(e),r=yF(e);return[t,r,"n"]}function ort(e){var t=xc(e),r=gF(e);return[t,r,"is"]}function irt(e){var t=xc(e),r=Ka(e);return[t,r,"str"]}function art(e){var t=w0(e),r=Ka(e);return[t,r,"str"]}function srt(e,t,r){var n=e.l+t,o=xc(e);o.r=r["!row"];var i=e.read_shift(1),a=[o,i,"b"];if(r.cellFormula){e.l+=2;var s=p4(e,n-e.l,r);a[3]=Ha(s,null,o,r.supbooks,r)}else e.l=n;return a}function lrt(e,t,r){var n=e.l+t,o=xc(e);o.r=r["!row"];var i=e.read_shift(1),a=[o,i,"e"];if(r.cellFormula){e.l+=2;var s=p4(e,n-e.l,r);a[3]=Ha(s,null,o,r.supbooks,r)}else e.l=n;return a}function crt(e,t,r){var n=e.l+t,o=xc(e);o.r=r["!row"];var i=Wa(e),a=[o,i,"n"];if(r.cellFormula){e.l+=2;var s=p4(e,n-e.l,r);a[3]=Ha(s,null,o,r.supbooks,r)}else e.l=n;return a}function urt(e,t,r){var n=e.l+t,o=xc(e);o.r=r["!row"];var i=Ka(e),a=[o,i,"str"];if(r.cellFormula){e.l+=2;var s=p4(e,n-e.l,r);a[3]=Ha(s,null,o,r.supbooks,r)}else e.l=n;return a}var drt=x0;function frt(e,t){var r=e.l+t,n=x0(e),o=vF(e),i=Ka(e),a=Ka(e),s=Ka(e);e.l=r;var c={rfx:n,relId:o,loc:i,display:s};return a&&(c.Tooltip=a),c}function hrt(){}function prt(e,t,r){var n=e.l+t,o=Xre(e),i=e.read_shift(1),a=[o];if(a[2]=i,r.cellFormula){var s=btt(e,n-e.l,r);a[1]=s}else e.l=n;return a}function mrt(e,t,r){var n=e.l+t,o=x0(e),i=[o];if(r.cellFormula){var a=xtt(e,n-e.l,r);i[1]=a,e.l=n}else e.l=n;return i}var grt=["left","right","top","bottom","header","footer"];function vrt(e){var t={};return grt.forEach(function(r){t[r]=Wa(e)}),t}function yrt(e){var t=e.read_shift(2);return e.l+=28,{RTL:t&32}}function brt(){}function wrt(){}function xrt(e,t,r,n,o,i,a){if(!e)return e;var s=t||{};n||(n={"!id":{}});var c=s.dense?[]:{},l,u={s:{r:2e6,c:2e6},e:{r:0,c:0}},f=!1,d=!1,h,p,g,m,v,y,b,w,E,I=[];s.biff=12,s["!row"]=0;var O=0,D=!1,N=[],U={},B=s.supbooks||o.supbooks||[[]];if(B.sharedf=U,B.arrayf=N,B.SheetNames=o.SheetNames||o.Sheets.map(function(x){return x.name}),!s.supbooks&&(s.supbooks=B,o.Names))for(var F=0;F<o.Names.length;++F)B[0][F+1]=o.Names[F];var T=[],P=[],_=!1;UE[16]={n:"BrtShortReal",f:One};var C;if(Ef(e,function(k,L,j){if(!d)switch(j){case 148:l=k;break;case 0:h=k,s.sheetRows&&s.sheetRows<=h.r&&(d=!0),w=Ia(m=h.r),s["!row"]=h.r,(k.hidden||k.hpt||k.level!=null)&&(k.hpt&&(k.hpx=kx(k.hpt)),P[k.r]=k);break;case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 13:case 14:case 15:case 16:case 17:case 18:case 62:switch(p={t:k[2]},k[2]){case"n":p.v=k[1];break;case"s":b=vw[k[1]],p.v=b.t,p.r=b.r;break;case"b":p.v=!!k[1];break;case"e":p.v=k[1],s.cellText!==!1&&(p.w=C0[p.v]);break;case"str":p.t="s",p.v=k[1];break;case"is":p.t="s",p.v=k[1].t;break}if((g=a.CellXf[k[0].iStyleRef])&&Mne(p,g.numFmtId,null,s,i,a),v=k[0].c==-1?v+1:k[0].c,s.dense?(c[m]||(c[m]=[]),c[m][v]=p):c[ji(v)+w]=p,s.cellFormula){for(D=!1,O=0;O<N.length;++O){var z=N[O];h.r>=z[0].s.r&&h.r<=z[0].e.r&&v>=z[0].s.c&&v<=z[0].e.c&&(p.F=Tn(z[0]),D=!0)}!D&&k.length>3&&(p.f=k[3])}if(u.s.r>h.r&&(u.s.r=h.r),u.s.c>v&&(u.s.c=v),u.e.r<h.r&&(u.e.r=h.r),u.e.c<v&&(u.e.c=v),s.cellDates&&g&&p.t=="n"&&iy(nn[g.numFmtId])){var Y=Jp(p.v);Y&&(p.t="d",p.v=new Date(Y.y,Y.m-1,Y.d,Y.H,Y.M,Y.S,Y.u))}C&&(C.type=="XLDAPR"&&(p.D=!0),C=void 0);break;case 1:case 12:if(!s.sheetStubs||f)break;p={t:"z",v:void 0},v=k[0].c==-1?v+1:k[0].c,s.dense?(c[m]||(c[m]=[]),c[m][v]=p):c[ji(v)+w]=p,u.s.r>h.r&&(u.s.r=h.r),u.s.c>v&&(u.s.c=v),u.e.r<h.r&&(u.e.r=h.r),u.e.c<v&&(u.e.c=v),C&&(C.type=="XLDAPR"&&(p.D=!0),C=void 0);break;case 176:I.push(k);break;case 49:C=((s.xlmeta||{}).Cell||[])[k-1];break;case 494:var K=n["!id"][k.relId];for(K?(k.Target=K.Target,k.loc&&(k.Target+="#"+k.loc),k.Rel=K):k.relId==""&&(k.Target="#"+k.loc),m=k.rfx.s.r;m<=k.rfx.e.r;++m)for(v=k.rfx.s.c;v<=k.rfx.e.c;++v)s.dense?(c[m]||(c[m]=[]),c[m][v]||(c[m][v]={t:"z",v:void 0}),c[m][v].l=k):(y=Yr({c:v,r:m}),c[y]||(c[y]={t:"z",v:void 0}),c[y].l=k);break;case 426:if(!s.cellFormula)break;N.push(k),E=s.dense?c[m][v]:c[ji(v)+w],E.f=Ha(k[1],u,{r:h.r,c:v},B,s),E.F=Tn(k[0]);break;case 427:if(!s.cellFormula)break;U[Yr(k[0].s)]=k[1],E=s.dense?c[m][v]:c[ji(v)+w],E.f=Ha(k[1],u,{r:h.r,c:v},B,s);break;case 60:if(!s.cellStyles)break;for(;k.e>=k.s;)T[k.e--]={width:k.w/256,hidden:!!(k.flags&1),level:k.level},_||(_=!0,CF(k.w/256)),v1(T[k.e+1]);break;case 161:c["!autofilter"]={ref:Tn(k)};break;case 476:c["!margins"]=k;break;case 147:o.Sheets[r]||(o.Sheets[r]={}),k.name&&(o.Sheets[r].CodeName=k.name),(k.above||k.left)&&(c["!outline"]={above:k.above,left:k.left});break;case 137:o.Views||(o.Views=[{}]),o.Views[0]||(o.Views[0]={}),k.RTL&&(o.Views[0].RTL=!0);break;case 485:break;case 64:case 1053:break;case 151:break;case 152:case 175:case 644:case 625:case 562:case 396:case 1112:case 1146:case 471:case 1050:case 649:case 1105:case 589:case 607:case 564:case 1055:case 168:case 174:case 1180:case 499:case 507:case 550:case 171:case 167:case 1177:case 169:case 1181:case 551:case 552:case 661:case 639:case 478:case 537:case 477:case 536:case 1103:case 680:case 1104:case 1024:case 663:case 535:case 678:case 504:case 1043:case 428:case 170:case 3072:case 50:case 2070:case 1045:break;case 35:f=!0;break;case 36:f=!1;break;case 37:f=!0;break;case 38:f=!1;break;default:if(!L.T){if(!f||s.WTF)throw new Error("Unexpected record 0x"+j.toString(16))}}},s),delete s.supbooks,delete s["!row"],!c["!ref"]&&(u.s.r<2e6||l&&(l.e.r>0||l.e.c>0||l.s.r>0||l.s.c>0))&&(c["!ref"]=Tn(l||u)),s.sheetRows&&c["!ref"]){var S=oi(c["!ref"]);s.sheetRows<=+S.e.r&&(S.e.r=s.sheetRows-1,S.e.r>u.e.r&&(S.e.r=u.e.r),S.e.r<S.s.r&&(S.s.r=S.e.r),S.e.c>u.e.c&&(S.e.c=u.e.c),S.e.c<S.s.c&&(S.s.c=S.e.c),c["!fullref"]=c["!ref"],c["!ref"]=Tn(S))}return I.length>0&&(c["!merges"]=I),T.length>0&&(c["!cols"]=T),P.length>0&&(c["!rows"]=P),c}function Crt(e){var t=[],r=e.match(/^<c:numCache>/),n;(e.match(/<c:pt idx="(\d*)">(.*?)<\/c:pt>/mg)||[]).forEach(function(i){var a=i.match(/<c:pt idx="(\d*?)"><c:v>(.*)<\/c:v><\/c:pt>/);a&&(t[+a[1]]=r?+a[2]:a[2])});var o=Rn((e.match(/<c:formatCode>([\s\S]*?)<\/c:formatCode>/)||["","General"])[1]);return(e.match(/<c:f>(.*?)<\/c:f>/mg)||[]).forEach(function(i){n=i.replace(/<.*?>/g,"")}),[t,o,n]}function Srt(e,t,r,n,o,i){var a=i||{"!type":"chart"};if(!e)return i;var s=0,c=0,l="A",u={s:{r:2e6,c:2e6},e:{r:0,c:0}};return(e.match(/<c:numCache>[\s\S]*?<\/c:numCache>/gm)||[]).forEach(function(f){var d=Crt(f);u.s.r=u.s.c=0,u.e.c=s,l=ji(s),d[0].forEach(function(h,p){a[l+Ia(p)]={t:"n",v:h,z:d[1]},c=p}),u.e.r<c&&(u.e.r=c),++s}),s>0&&(a["!ref"]=Tn(u)),a}function _rt(e,t,r,n,o){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},a,s=e.match(Rne);return s&&_F(s[0],i,o,r),(a=e.match(/drawing r:id="(.*?)"/))&&(i["!rel"]=a[1]),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}function krt(e,t){e.l+=10;var r=Ka(e);return{name:r}}function Ert(e,t,r,n,o){if(!e)return e;n||(n={"!id":{}});var i={"!type":"chart","!drawel":null,"!rel":""},a=!1;return Ef(e,function(c,l,u){switch(u){case 550:i["!rel"]=c;break;case 651:o.Sheets[r]||(o.Sheets[r]={}),c.name&&(o.Sheets[r].CodeName=c.name);break;case 562:case 652:case 669:case 679:case 551:case 552:case 476:case 3072:break;case 35:a=!0;break;case 36:a=!1;break;case 37:break;case 38:break;default:if(!(l.T>0)){if(!(l.T<0)){if(!a||t.WTF)throw new Error("Unexpected record 0x"+u.toString(16))}}}},t),n["!id"][i["!rel"]]&&(i["!drawel"]=n["!id"][i["!rel"]]),i}var Dne=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],Trt=[["activeTab",0,"int"],["autoFilterDateGrouping",!0,"bool"],["firstSheet",0,"int"],["minimized",!1,"bool"],["showHorizontalScroll",!0,"bool"],["showSheetTabs",!0,"bool"],["showVerticalScroll",!0,"bool"],["tabRatio",600,"int"],["visibility","visible"]],Irt=[],Art=[["calcCompleted","true"],["calcMode","auto"],["calcOnSave","true"],["concurrentCalc","true"],["fullCalcOnLoad","false"],["fullPrecision","true"],["iterate","false"],["iterateCount","100"],["iterateDelta","0.001"],["refMode","A1"]];function Qj(e,t){for(var r=0;r!=e.length;++r)for(var n=e[r],o=0;o!=t.length;++o){var i=t[o];if(n[i[0]]==null)n[i[0]]=i[1];else switch(i[2]){case"bool":typeof n[i[0]]=="string"&&(n[i[0]]=Do(n[i[0]]));break;case"int":typeof n[i[0]]=="string"&&(n[i[0]]=parseInt(n[i[0]],10));break}}}function Zj(e,t){for(var r=0;r!=t.length;++r){var n=t[r];if(e[n[0]]==null)e[n[0]]=n[1];else switch(n[2]){case"bool":typeof e[n[0]]=="string"&&(e[n[0]]=Do(e[n[0]]));break;case"int":typeof e[n[0]]=="string"&&(e[n[0]]=parseInt(e[n[0]],10));break}}}function Fne(e){Zj(e.WBProps,Dne),Zj(e.CalcPr,Art),Qj(e.WBView,Trt),Qj(e.Sheets,Irt),yv.date1904=Do(e.WBProps.date1904)}var Prt="][*?/\\".split("");function Mrt(e,t){if(e.length>31){if(t)return!1;throw new Error("Sheet names cannot exceed 31 chars")}var r=!0;return Prt.forEach(function(n){if(e.indexOf(n)!=-1){if(!t)throw new Error("Sheet name cannot contain : \\ / ? * [ ]");r=!1}}),r}var Rrt=/<\w+:workbook/;function Ort(e,t){if(!e)throw new Error("Could not find file");var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},Names:[],xmlns:""},n=!1,o="xmlns",i={},a=0;if(e.replace(rs,function(c,l){var u=$r(c);switch(dd(u[0])){case"<?xml":break;case"<workbook":c.match(Rrt)&&(o="xmlns"+c.match(/<(\w+):/)[1]),r.xmlns=u[o];break;case"</workbook>":break;case"<fileVersion":delete u[0],r.AppVersion=u;break;case"<fileVersion/>":case"</fileVersion>":break;case"<fileSharing":break;case"<fileSharing/>":break;case"<workbookPr":case"<workbookPr/>":Dne.forEach(function(f){if(u[f[0]]!=null)switch(f[2]){case"bool":r.WBProps[f[0]]=Do(u[f[0]]);break;case"int":r.WBProps[f[0]]=parseInt(u[f[0]],10);break;default:r.WBProps[f[0]]=u[f[0]]}}),u.codeName&&(r.WBProps.CodeName=So(u.codeName));break;case"</workbookPr>":break;case"<workbookProtection":break;case"<workbookProtection/>":break;case"<bookViews":case"<bookViews>":case"</bookViews>":break;case"<workbookView":case"<workbookView/>":delete u[0],r.WBView.push(u);break;case"</workbookView>":break;case"<sheets":case"<sheets>":case"</sheets>":break;case"<sheet":switch(u.state){case"hidden":u.Hidden=1;break;case"veryHidden":u.Hidden=2;break;default:u.Hidden=0}delete u.state,u.name=Rn(So(u.name)),delete u[0],r.Sheets.push(u);break;case"</sheet>":break;case"<functionGroups":case"<functionGroups/>":break;case"<functionGroup":break;case"<externalReferences":case"</externalReferences>":case"<externalReferences>":break;case"<externalReference":break;case"<definedNames/>":break;case"<definedNames>":case"<definedNames":n=!0;break;case"</definedNames>":n=!1;break;case"<definedName":i={},i.Name=So(u.name),u.comment&&(i.Comment=u.comment),u.localSheetId&&(i.Sheet=+u.localSheetId),Do(u.hidden||"0")&&(i.Hidden=!0),a=l+c.length;break;case"</definedName>":i.Ref=Rn(So(e.slice(a,l))),r.Names.push(i);break;case"<definedName/>":break;case"<calcPr":delete u[0],r.CalcPr=u;break;case"<calcPr/>":delete u[0],r.CalcPr=u;break;case"</calcPr>":break;case"<oleSize":break;case"<customWorkbookViews>":case"</customWorkbookViews>":case"<customWorkbookViews":break;case"<customWorkbookView":case"</customWorkbookView>":break;case"<pivotCaches>":case"</pivotCaches>":case"<pivotCaches":break;case"<pivotCache":break;case"<smartTagPr":case"<smartTagPr/>":break;case"<smartTagTypes":case"<smartTagTypes>":case"</smartTagTypes>":break;case"<smartTagType":break;case"<webPublishing":case"<webPublishing/>":break;case"<fileRecoveryPr":case"<fileRecoveryPr/>":break;case"<webPublishObjects>":case"<webPublishObjects":case"</webPublishObjects>":break;case"<webPublishObject":break;case"<extLst":case"<extLst>":case"</extLst>":case"<extLst/>":break;case"<ext":n=!0;break;case"</ext>":n=!1;break;case"<ArchID":break;case"<AlternateContent":case"<AlternateContent>":n=!0;break;case"</AlternateContent>":n=!1;break;case"<revisionPtr":break;default:if(!n&&t.WTF)throw new Error("unrecognized "+u[0]+" in workbook")}return c}),YYe.indexOf(r.xmlns)===-1)throw new Error("Unknown Namespace: "+r.xmlns);return Fne(r),r}function Drt(e,t){var r={};return r.Hidden=e.read_shift(4),r.iTabID=e.read_shift(4),r.strRelID=x5(e),r.name=Ka(e),r}function Frt(e,t){var r={},n=e.read_shift(4);r.defaultThemeVersion=e.read_shift(4);var o=t>8?Ka(e):"";return o.length>0&&(r.CodeName=o),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}function Nrt(e,t){var r={};return e.read_shift(4),r.ArchID=e.read_shift(4),e.l+=t-8,r}function Lrt(e,t,r){var n=e.l+t;e.l+=4,e.l+=1;var o=e.read_shift(4),i=hXe(e),a=wtt(e,0,r),s=vF(e);e.l=n;var c={Name:i,Ptg:a};return o<268435455&&(c.Sheet=o),s&&(c.Comment=s),c}function $rt(e,t){var r={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:""},n=[],o=!1;t||(t={}),t.biff=12;var i=[],a=[[]];return a.SheetNames=[],a.XTI=[],UE[16]={n:"BrtFRTArchID$",f:Nrt},Ef(e,function(c,l,u){switch(u){case 156:a.SheetNames.push(c.name),r.Sheets.push(c);break;case 153:r.WBProps=c;break;case 39:c.Sheet!=null&&(t.SID=c.Sheet),c.Ref=Ha(c.Ptg,null,null,a,t),delete t.SID,delete c.Ptg,i.push(c);break;case 1036:break;case 357:case 358:case 355:case 667:a[0].length?a.push([u,c]):a[0]=[u,c],a[a.length-1].XTI=[];break;case 362:a.length===0&&(a[0]=[],a[0].XTI=[]),a[a.length-1].XTI=a[a.length-1].XTI.concat(c),a.XTI=a.XTI.concat(c);break;case 361:break;case 2071:case 158:case 143:case 664:case 353:break;case 3072:case 3073:case 534:case 677:case 157:case 610:case 2050:case 155:case 548:case 676:case 128:case 665:case 2128:case 2125:case 549:case 2053:case 596:case 2076:case 2075:case 2082:case 397:case 154:case 1117:case 553:case 2091:break;case 35:n.push(u),o=!0;break;case 36:n.pop(),o=!1;break;case 37:n.push(u),o=!0;break;case 38:n.pop(),o=!1;break;case 16:break;default:if(!l.T){if(!o||t.WTF&&n[n.length-1]!=37&&n[n.length-1]!=35)throw new Error("Unexpected record 0x"+u.toString(16))}}},t),Fne(r),r.Names=i,r.supbooks=a,r}function Brt(e,t,r){return t.slice(-4)===".bin"?$rt(e,r):Ort(e,r)}function Urt(e,t,r,n,o,i,a,s){return t.slice(-4)===".bin"?xrt(e,n,r,o,i,a,s):Dtt(e,n,r,o,i,a,s)}function Hrt(e,t,r,n,o,i,a,s){return t.slice(-4)===".bin"?Ert(e,n,r,o,i):_rt(e,n,r,o,i)}function zrt(e,t,r,n,o,i,a,s){return t.slice(-4)===".bin"?KJe():YJe()}function jrt(e,t,r,n,o,i,a,s){return t.slice(-4)===".bin"?GJe():qJe()}function Vrt(e,t,r,n){return t.slice(-4)===".bin"?cJe(e,r,n):nJe(e,r,n)}function Wrt(e,t,r){return xne(e,r)}function Grt(e,t,r){return t.slice(-4)===".bin"?kZe(e,r):SZe(e,r)}function qrt(e,t,r){return t.slice(-4)===".bin"?jJe(e,r):$Je(e,r)}function Krt(e,t,r){return t.slice(-4)===".bin"?FJe(e):OJe(e)}function Yrt(e,t,r,n){return r.slice(-4)===".bin"?NJe(e,t,r,n):void 0}function Xrt(e,t,r){return t.slice(-4)===".bin"?MJe(e,t,r):RJe(e,t,r)}var Nne=/([\w:]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:'))/g,Lne=/([\w:]+)=((?:")(?:[^"]*)(?:")|(?:')(?:[^']*)(?:'))/;function Pc(e,t){var r=e.split(/\s+/),n=[];if(t||(n[0]=r[0]),r.length===1)return n;var o=e.match(Nne),i,a,s,c;if(o)for(c=0;c!=o.length;++c)i=o[c].match(Lne),(a=i[1].indexOf(":"))===-1?n[i[1]]=i[2].slice(1,i[2].length-1):(i[1].slice(0,6)==="xmlns:"?s="xmlns"+i[1].slice(6):s=i[1].slice(a+1),n[s]=i[2].slice(1,i[2].length-1));return n}function Qrt(e){var t=e.split(/\s+/),r={};if(t.length===1)return r;var n=e.match(Nne),o,i,a,s;if(n)for(s=0;s!=n.length;++s)o=n[s].match(Lne),(i=o[1].indexOf(":"))===-1?r[o[1]]=o[2].slice(1,o[2].length-1):(o[1].slice(0,6)==="xmlns:"?a="xmlns"+o[1].slice(6):a=o[1].slice(i+1),r[a]=o[2].slice(1,o[2].length-1));return r}var bw;function Zrt(e,t){var r=bw[e]||Rn(e);return r==="General"?Ym(t):mc(r,t)}function Jrt(e,t,r,n){var o=n;switch((r[0].match(/dt:dt="([\w.]+)"/)||["",""])[1]){case"boolean":o=Do(n);break;case"i2":case"int":o=parseInt(n,10);break;case"r4":case"float":o=parseFloat(n);break;case"date":case"dateTime.tz":o=la(n);break;case"i8":case"string":case"fixed":case"uuid":case"bin.base64":break;default:throw new Error("bad custprop:"+r[0])}e[Rn(t)]=o}function ent(e,t,r){if(e.t!=="z"){if(!r||r.cellText!==!1)try{e.t==="e"?e.w=e.w||C0[e.v]:t==="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=wx(e.v):e.w=Ym(e.v):e.w=Zrt(t||"General",e.v)}catch(i){if(r.WTF)throw i}try{var n=bw[t]||t||"General";if(r.cellNF&&(e.z=n),r.cellDates&&e.t=="n"&&iy(n)){var o=Jp(e.v);o&&(e.t="d",e.v=new Date(o.y,o.m-1,o.d,o.H,o.M,o.S,o.u))}}catch(i){if(r.WTF)throw i}}}function tnt(e,t,r){if(r.cellStyles&&t.Interior){var n=t.Interior;n.Pattern&&(n.patternType=QZe[n.Pattern]||n.Pattern)}e[t.ID]=t}function rnt(e,t,r,n,o,i,a,s,c,l){var u="General",f=n.StyleID,d={};l=l||{};var h=[],p=0;for(f===void 0&&s&&(f=s.StyleID),f===void 0&&a&&(f=a.StyleID);i[f]!==void 0&&(i[f].nf&&(u=i[f].nf),i[f].Interior&&h.push(i[f].Interior),!!i[f].Parent);)f=i[f].Parent;switch(r.Type){case"Boolean":n.t="b",n.v=Do(e);break;case"String":n.t="s",n.r=wj(Rn(e)),n.v=e.indexOf("<")>-1?Rn(t||e).replace(/<.*?>/g,""):n.r;break;case"DateTime":e.slice(-1)!="Z"&&(e+="Z"),n.v=(la(e)-new Date(Date.UTC(1899,11,30)))/(24*60*60*1e3),n.v!==n.v?n.v=Rn(e):n.v<60&&(n.v=n.v-1),(!u||u=="General")&&(u="yyyy-mm-dd");case"Number":n.v===void 0&&(n.v=+e),n.t||(n.t="n");break;case"Error":n.t="e",n.v=Jre[e],l.cellText!==!1&&(n.w=e);break;default:e==""&&t==""?n.t="z":(n.t="s",n.v=wj(t||e));break}if(ent(n,u,l),l.cellFormula!==!1)if(n.Formula){var g=Rn(n.Formula);g.charCodeAt(0)==61&&(g=g.slice(1)),n.f=vv(g,o),delete n.Formula,n.ArrayRange=="RC"?n.F=vv("RC:RC",o):n.ArrayRange&&(n.F=vv(n.ArrayRange,o),c.push([oi(n.F),n.F]))}else for(p=0;p<c.length;++p)o.r>=c[p][0].s.r&&o.r<=c[p][0].e.r&&o.c>=c[p][0].s.c&&o.c<=c[p][0].e.c&&(n.F=c[p][1]);l.cellStyles&&(h.forEach(function(m){!d.patternType&&m.patternType&&(d.patternType=m.patternType)}),n.s=d),n.StyleID!==void 0&&(n.ixfe=n.StyleID)}function nnt(e){e.t=e.v||"",e.t=e.t.replace(/\r\n/g,`
`).replace(/\r/g,`
`),e.v=e.w=e.ixfe=void 0}function CP(e,t){var r=t||{};_re();var n=Ob(fF(e));(r.type=="binary"||r.type=="array"||r.type=="base64")&&(n=So(n));var o=n.slice(0,1024).toLowerCase(),i=!1;if(o=o.replace(/".*?"/g,""),(o.indexOf(">")&1023)>Math.min(o.indexOf(",")&1023,o.indexOf(";")&1023)){var a=Ta(r);return a.type="string",Sx.to_workbook(n,a)}if(o.indexOf("<?xml")==-1&&["html","table","head","meta","script","style","div"].forEach(function(he){o.indexOf("<"+he)>=0&&(i=!0)}),i)return fnt(n,r);bw={"General Number":"General","General Date":nn[22],"Long Date":"dddd, mmmm dd, yyyy","Medium Date":nn[15],"Short Date":nn[14],"Long Time":nn[19],"Medium Time":nn[18],"Short Time":nn[20],Currency:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',Fixed:nn[2],Standard:nn[4],Percent:nn[10],Scientific:nn[11],"Yes/No":'"Yes";"Yes";"No";@',"True/False":'"True";"True";"False";@',"On/Off":'"Yes";"Yes";"No";@'};var s,c=[],l,u={},f=[],d=r.dense?[]:{},h="",p={},g={},m=Pc('<Data ss:Type="String">'),v=0,y=0,b=0,w={s:{r:2e6,c:2e6},e:{r:0,c:0}},E={},I={},O="",D=0,N=[],U={},B={},F=0,T=[],P=[],_={},C=[],S,x=!1,k=[],L=[],j={},z=0,Y=0,K={Sheets:[],WBProps:{date1904:!1}},Q={};Cx.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"");for(var q="";s=Cx.exec(n);)switch(s[3]=(q=s[3]).toLowerCase()){case"data":if(q=="data"){if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"))}else s[0].charAt(s[0].length-2)!=="/"&&c.push([s[3],!0]);break}if(c[c.length-1][1])break;s[1]==="/"?rnt(n.slice(v,s.index),O,m,c[c.length-1][0]=="comment"?_:p,{c:y,r:b},E,C[y],g,k,r):(O="",m=Pc(s[0]),v=s.index+s[0].length);break;case"cell":if(s[1]==="/")if(P.length>0&&(p.c=P),(!r.sheetRows||r.sheetRows>b)&&p.v!==void 0&&(r.dense?(d[b]||(d[b]=[]),d[b][y]=p):d[ji(y)+Ia(b)]=p),p.HRef&&(p.l={Target:Rn(p.HRef)},p.HRefScreenTip&&(p.l.Tooltip=p.HRefScreenTip),delete p.HRef,delete p.HRefScreenTip),(p.MergeAcross||p.MergeDown)&&(z=y+(parseInt(p.MergeAcross,10)|0),Y=b+(parseInt(p.MergeDown,10)|0),N.push({s:{c:y,r:b},e:{c:z,r:Y}})),!r.sheetStubs)p.MergeAcross?y=z+1:++y;else if(p.MergeAcross||p.MergeDown){for(var J=y;J<=z;++J)for(var G=b;G<=Y;++G)(J>y||G>b)&&(r.dense?(d[G]||(d[G]=[]),d[G][J]={t:"z"}):d[ji(J)+Ia(G)]={t:"z"});y=z+1}else++y;else p=Qrt(s[0]),p.Index&&(y=+p.Index-1),y<w.s.c&&(w.s.c=y),y>w.e.c&&(w.e.c=y),s[0].slice(-2)==="/>"&&++y,P=[];break;case"row":s[1]==="/"||s[0].slice(-2)==="/>"?(b<w.s.r&&(w.s.r=b),b>w.e.r&&(w.e.r=b),s[0].slice(-2)==="/>"&&(g=Pc(s[0]),g.Index&&(b=+g.Index-1)),y=0,++b):(g=Pc(s[0]),g.Index&&(b=+g.Index-1),j={},(g.AutoFitHeight=="0"||g.Height)&&(j.hpx=parseInt(g.Height,10),j.hpt=wne(j.hpx),L[b]=j),g.Hidden=="1"&&(j.hidden=!0,L[b]=j));break;case"worksheet":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"));f.push(h),w.s.r<=w.e.r&&w.s.c<=w.e.c&&(d["!ref"]=Tn(w),r.sheetRows&&r.sheetRows<=w.e.r&&(d["!fullref"]=d["!ref"],w.e.r=r.sheetRows-1,d["!ref"]=Tn(w))),N.length&&(d["!merges"]=N),C.length>0&&(d["!cols"]=C),L.length>0&&(d["!rows"]=L),u[h]=d}else w={s:{r:2e6,c:2e6},e:{r:0,c:0}},b=y=0,c.push([s[3],!1]),l=Pc(s[0]),h=Rn(l.Name),d=r.dense?[]:{},N=[],k=[],L=[],Q={name:h,Hidden:0},K.Sheets.push(Q);break;case"table":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"))}else{if(s[0].slice(-2)=="/>")break;c.push([s[3],!1]),C=[],x=!1}break;case"style":s[1]==="/"?tnt(E,I,r):I=Pc(s[0]);break;case"numberformat":I.nf=Rn(Pc(s[0]).Format||"General"),bw[I.nf]&&(I.nf=bw[I.nf]);for(var V=0;V!=392&&nn[V]!=I.nf;++V);if(V==392){for(V=57;V!=392;++V)if(nn[V]==null){Tm(I.nf,V);break}}break;case"column":if(c[c.length-1][0]!=="table")break;if(S=Pc(s[0]),S.Hidden&&(S.hidden=!0,delete S.Hidden),S.Width&&(S.wpx=parseInt(S.Width,10)),!x&&S.wpx>10){x=!0,hs=yne;for(var X=0;X<C.length;++X)C[X]&&v1(C[X])}x&&v1(S),C[S.Index-1||C.length]=S;for(var te=0;te<+S.Span;++te)C[C.length]=Ta(S);break;case"namedrange":if(s[1]==="/")break;K.Names||(K.Names=[]);var ee=$r(s[0]),re={Name:ee.Name,Ref:vv(ee.RefersTo.slice(1),{r:0,c:0})};K.Sheets.length>0&&(re.Sheet=K.Sheets.length-1),K.Names.push(re);break;case"namedcell":break;case"b":break;case"i":break;case"u":break;case"s":break;case"em":break;case"h2":break;case"h3":break;case"sub":break;case"sup":break;case"span":break;case"alignment":break;case"borders":break;case"border":break;case"font":if(s[0].slice(-2)==="/>")break;s[1]==="/"?O+=n.slice(D,s.index):D=s.index+s[0].length;break;case"interior":if(!r.cellStyles)break;I.Interior=Pc(s[0]);break;case"protection":break;case"author":case"title":case"description":case"created":case"keywords":case"subject":case"category":case"company":case"lastauthor":case"lastsaved":case"lastprinted":case"version":case"revision":case"totaltime":case"hyperlinkbase":case"manager":case"contentstatus":case"identifier":case"language":case"appname":if(s[0].slice(-2)==="/>")break;s[1]==="/"?$Xe(U,q,n.slice(F,s.index)):F=s.index+s[0].length;break;case"paragraphs":break;case"styles":case"workbook":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"))}else c.push([s[3],!1]);break;case"comment":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"));nnt(_),P.push(_)}else c.push([s[3],!1]),l=Pc(s[0]),_={a:l.Author};break;case"autofilter":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"))}else if(s[0].charAt(s[0].length-2)!=="/"){var se=Pc(s[0]);d["!autofilter"]={ref:vv(se.Range).replace(/\$/g,"")},c.push([s[3],!0])}break;case"name":break;case"datavalidation":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"))}else s[0].charAt(s[0].length-2)!=="/"&&c.push([s[3],!0]);break;case"pixelsperinch":break;case"componentoptions":case"documentproperties":case"customdocumentproperties":case"officedocumentsettings":case"pivottable":case"pivotcache":case"names":case"mapinfo":case"pagebreaks":case"querytable":case"sorting":case"schema":case"conditionalformatting":case"smarttagtype":case"smarttags":case"excelworkbook":case"workbookoptions":case"worksheetoptions":if(s[1]==="/"){if((l=c.pop())[0]!==s[3])throw new Error("Bad state: "+l.join("|"))}else s[0].charAt(s[0].length-2)!=="/"&&c.push([s[3],!0]);break;case"null":break;default:if(c.length==0&&s[3]=="document"||c.length==0&&s[3]=="uof")return oV(n,r);var pe=!0;switch(c[c.length-1][0]){case"officedocumentsettings":switch(s[3]){case"allowpng":break;case"removepersonalinformation":break;case"downloadcomponents":break;case"locationofcomponents":break;case"colors":break;case"color":break;case"index":break;case"rgb":break;case"targetscreensize":break;case"readonlyrecommended":break;default:pe=!1}break;case"componentoptions":switch(s[3]){case"toolbar":break;case"hideofficelogo":break;case"spreadsheetautofit":break;case"label":break;case"caption":break;case"maxheight":break;case"maxwidth":break;case"nextsheetnumber":break;default:pe=!1}break;case"excelworkbook":switch(s[3]){case"date1904":K.WBProps.date1904=!0;break;case"windowheight":break;case"windowwidth":break;case"windowtopx":break;case"windowtopy":break;case"tabratio":break;case"protectstructure":break;case"protectwindow":break;case"protectwindows":break;case"activesheet":break;case"displayinknotes":break;case"firstvisiblesheet":break;case"supbook":break;case"sheetname":break;case"sheetindex":break;case"sheetindexfirst":break;case"sheetindexlast":break;case"dll":break;case"acceptlabelsinformulas":break;case"donotsavelinkvalues":break;case"iteration":break;case"maxiterations":break;case"maxchange":break;case"path":break;case"xct":break;case"count":break;case"selectedsheets":break;case"calculation":break;case"uncalced":break;case"startupprompt":break;case"crn":break;case"externname":break;case"formula":break;case"colfirst":break;case"collast":break;case"wantadvise":break;case"boolean":break;case"error":break;case"text":break;case"ole":break;case"noautorecover":break;case"publishobjects":break;case"donotcalculatebeforesave":break;case"number":break;case"refmoder1c1":break;case"embedsavesmarttags":break;default:pe=!1}break;case"workbookoptions":switch(s[3]){case"owcversion":break;case"height":break;case"width":break;default:pe=!1}break;case"worksheetoptions":switch(s[3]){case"visible":if(s[0].slice(-2)!=="/>")if(s[1]==="/")switch(n.slice(F,s.index)){case"SheetHidden":Q.Hidden=1;break;case"SheetVeryHidden":Q.Hidden=2;break}else F=s.index+s[0].length;break;case"header":d["!margins"]||yw(d["!margins"]={},"xlml"),isNaN(+$r(s[0]).Margin)||(d["!margins"].header=+$r(s[0]).Margin);break;case"footer":d["!margins"]||yw(d["!margins"]={},"xlml"),isNaN(+$r(s[0]).Margin)||(d["!margins"].footer=+$r(s[0]).Margin);break;case"pagemargins":var ce=$r(s[0]);d["!margins"]||yw(d["!margins"]={},"xlml"),isNaN(+ce.Top)||(d["!margins"].top=+ce.Top),isNaN(+ce.Left)||(d["!margins"].left=+ce.Left),isNaN(+ce.Right)||(d["!margins"].right=+ce.Right),isNaN(+ce.Bottom)||(d["!margins"].bottom=+ce.Bottom);break;case"displayrighttoleft":K.Views||(K.Views=[]),K.Views[0]||(K.Views[0]={}),K.Views[0].RTL=!0;break;case"freezepanes":break;case"frozennosplit":break;case"splithorizontal":case"splitvertical":break;case"donotdisplaygridlines":break;case"activerow":break;case"activecol":break;case"toprowbottompane":break;case"leftcolumnrightpane":break;case"unsynced":break;case"print":break;case"printerrors":break;case"panes":break;case"scale":break;case"pane":break;case"number":break;case"layout":break;case"pagesetup":break;case"selected":break;case"protectobjects":break;case"enableselection":break;case"protectscenarios":break;case"validprinterinfo":break;case"horizontalresolution":break;case"verticalresolution":break;case"numberofcopies":break;case"activepane":break;case"toprowvisible":break;case"leftcolumnvisible":break;case"fittopage":break;case"rangeselection":break;case"papersizeindex":break;case"pagelayoutzoom":break;case"pagebreakzoom":break;case"filteron":break;case"fitwidth":break;case"fitheight":break;case"commentslayout":break;case"zoom":break;case"lefttoright":break;case"gridlines":break;case"allowsort":break;case"allowfilter":break;case"allowinsertrows":break;case"allowdeleterows":break;case"allowinsertcols":break;case"allowdeletecols":break;case"allowinserthyperlinks":break;case"allowformatcells":break;case"allowsizecols":break;case"allowsizerows":break;case"nosummaryrowsbelowdetail":d["!outline"]||(d["!outline"]={}),d["!outline"].above=!0;break;case"tabcolorindex":break;case"donotdisplayheadings":break;case"showpagelayoutzoom":break;case"nosummarycolumnsrightdetail":d["!outline"]||(d["!outline"]={}),d["!outline"].left=!0;break;case"blackandwhite":break;case"donotdisplayzeros":break;case"displaypagebreak":break;case"rowcolheadings":break;case"donotdisplayoutline":break;case"noorientation":break;case"allowusepivottables":break;case"zeroheight":break;case"viewablerange":break;case"selection":break;case"protectcontents":break;default:pe=!1}break;case"pivottable":case"pivotcache":switch(s[3]){case"immediateitemsondrop":break;case"showpagemultipleitemlabel":break;case"compactrowindent":break;case"location":break;case"pivotfield":break;case"orientation":break;case"layoutform":break;case"layoutsubtotallocation":break;case"layoutcompactrow":break;case"position":break;case"pivotitem":break;case"datatype":break;case"datafield":break;case"sourcename":break;case"parentfield":break;case"ptlineitems":break;case"ptlineitem":break;case"countofsameitems":break;case"item":break;case"itemtype":break;case"ptsource":break;case"cacheindex":break;case"consolidationreference":break;case"filename":break;case"reference":break;case"nocolumngrand":break;case"norowgrand":break;case"blanklineafteritems":break;case"hidden":break;case"subtotal":break;case"basefield":break;case"mapchilditems":break;case"function":break;case"refreshonfileopen":break;case"printsettitles":break;case"mergelabels":break;case"defaultversion":break;case"refreshname":break;case"refreshdate":break;case"refreshdatecopy":break;case"versionlastrefresh":break;case"versionlastupdate":break;case"versionupdateablemin":break;case"versionrefreshablemin":break;case"calculation":break;default:pe=!1}break;case"pagebreaks":switch(s[3]){case"colbreaks":break;case"colbreak":break;case"rowbreaks":break;case"rowbreak":break;case"colstart":break;case"colend":break;case"rowend":break;default:pe=!1}break;case"autofilter":switch(s[3]){case"autofiltercolumn":break;case"autofiltercondition":break;case"autofilterand":break;case"autofilteror":break;default:pe=!1}break;case"querytable":switch(s[3]){case"id":break;case"autoformatfont":break;case"autoformatpattern":break;case"querysource":break;case"querytype":break;case"enableredirections":break;case"refreshedinxl9":break;case"urlstring":break;case"htmltables":break;case"connection":break;case"commandtext":break;case"refreshinfo":break;case"notitles":break;case"nextid":break;case"columninfo":break;case"overwritecells":break;case"donotpromptforfile":break;case"textwizardsettings":break;case"source":break;case"number":break;case"decimal":break;case"thousandseparator":break;case"trailingminusnumbers":break;case"formatsettings":break;case"fieldtype":break;case"delimiters":break;case"tab":break;case"comma":break;case"autoformatname":break;case"versionlastedit":break;case"versionlastrefresh":break;default:pe=!1}break;case"datavalidation":switch(s[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;case"cellrangelist":break;default:pe=!1}break;case"sorting":case"conditionalformatting":switch(s[3]){case"range":break;case"type":break;case"min":break;case"max":break;case"sort":break;case"descending":break;case"order":break;case"casesensitive":break;case"value":break;case"errorstyle":break;case"errormessage":break;case"errortitle":break;case"cellrangelist":break;case"inputmessage":break;case"inputtitle":break;case"combohide":break;case"inputhide":break;case"condition":break;case"qualifier":break;case"useblank":break;case"value1":break;case"value2":break;case"format":break;default:pe=!1}break;case"mapinfo":case"schema":case"data":switch(s[3]){case"map":break;case"entry":break;case"range":break;case"xpath":break;case"field":break;case"xsdtype":break;case"filteron":break;case"aggregate":break;case"elementtype":break;case"attributetype":break;case"schema":case"element":case"complextype":case"datatype":case"all":case"attribute":case"extends":break;case"row":break;default:pe=!1}break;case"smarttags":break;default:pe=!1;break}if(pe||s[3].match(/!\[CDATA/))break;if(!c[c.length-1][1])throw"Unrecognized tag: "+s[3]+"|"+c.join("|");if(c[c.length-1][0]==="customdocumentproperties"){if(s[0].slice(-2)==="/>")break;s[1]==="/"?Jrt(B,q,T,n.slice(F,s.index)):(T=s,F=s.index+s[0].length);break}if(r.WTF)throw"Unrecognized tag: "+s[3]+"|"+c.join("|")}var ne={};return!r.bookSheets&&!r.bookProps&&(ne.Sheets=u),ne.SheetNames=f,ne.Workbook=K,ne.SSF=Ta(nn),ne.Props=U,ne.Custprops=B,ne}function k5(e,t){switch(TF(t=t||{}),t.type||"base64"){case"base64":return CP(Cl(e),t);case"binary":case"buffer":case"file":return CP(e,t);case"array":return CP(b0(e),t)}}function ont(e){var t={},r=e.content;if(r.l=28,t.AnsiUserType=r.read_shift(0,"lpstr-ansi"),t.AnsiClipboardFormat=gXe(r),r.length-r.l<=4)return t;var n=r.read_shift(4);if(n==0||n>40||(r.l-=4,t.Reserved1=r.read_shift(0,"lpstr-ansi"),r.length-r.l<=4)||(n=r.read_shift(4),n!==1907505652)||(t.UnicodeClipboardFormat=vXe(r),n=r.read_shift(4),n==0||n>40))return t;r.l-=4,t.Reserved2=r.read_shift(0,"lpwstr")}var int=[60,1084,2066,2165,2175];function ant(e,t,r,n,o){var i=n,a=[],s=r.slice(r.l,r.l+i);if(o&&o.enc&&o.enc.insitu&&s.length>0)switch(e){case 9:case 521:case 1033:case 2057:case 47:case 405:case 225:case 406:case 312:case 404:case 10:break;case 133:break;default:o.enc.insitu(s)}a.push(s),r.l+=i;for(var c=Vd(r,r.l),l=E5[c],u=0;l!=null&&int.indexOf(c)>-1;)i=Vd(r,r.l+2),u=r.l+4,c==2066?u+=4:(c==2165||c==2175)&&(u+=12),s=r.slice(u,r.l+4+i),a.push(s),r.l+=4+i,l=E5[c=Vd(r,r.l)];var f=sh(a);Sa(f,0);var d=0;f.lens=[];for(var h=0;h<a.length;++h)f.lens.push(d),d+=a[h].length;if(f.length<n)throw"XLS Record 0x"+e.toString(16)+" Truncated: "+f.length+" < "+n;return t.f(f,f.length,o)}function bu(e,t,r){if(e.t!=="z"&&e.XF){var n=0;try{n=e.z||e.XF.numFmtId||0,t.cellNF&&(e.z=nn[n])}catch(i){if(t.WTF)throw i}if(!t||t.cellText!==!1)try{e.t==="e"?e.w=e.w||C0[e.v]:n===0||n=="General"?e.t==="n"?(e.v|0)===e.v?e.w=e.v.toString(10):e.w=wx(e.v):e.w=Ym(e.v):e.w=mc(n,e.v,{date1904:!!r,dateNF:t&&t.dateNF})}catch(i){if(t.WTF)throw i}if(t.cellDates&&n&&e.t=="n"&&iy(nn[n]||String(n))){var o=Jp(e.v);o&&(e.t="d",e.v=new Date(o.y,o.m-1,o.d,o.H,o.M,o.S,o.u))}}}function p_(e,t,r){return{v:e,ixfe:t,t:r}}function snt(e,t){var r={opts:{}},n={},o=t.dense?[]:{},i={},a={},s=null,c=[],l="",u={},f,d="",h,p,g,m,v={},y=[],b,w,E=[],I=[],O={Sheets:[],WBProps:{date1904:!1},Views:[{}]},D={},N=function($e){return $e<8?Im[$e]:$e<64&&I[$e-8]||Im[$e]},U=function($e,et,Ze){var Ne=et.XF.data;if(!(!Ne||!Ne.patternType||!Ze||!Ze.cellStyles)){et.s={},et.s.patternType=Ne.patternType;var Qe;(Qe=_x(N(Ne.icvFore)))&&(et.s.fgColor={rgb:Qe}),(Qe=_x(N(Ne.icvBack)))&&(et.s.bgColor={rgb:Qe})}},B=function($e,et,Ze){if(!(j>1)&&!(Ze.sheetRows&&$e.r>=Ze.sheetRows)){if(Ze.cellStyles&&et.XF&&et.XF.data&&U($e,et,Ze),delete et.ixfe,delete et.XF,f=$e,d=Yr($e),(!a||!a.s||!a.e)&&(a={s:{r:0,c:0},e:{r:0,c:0}}),$e.r<a.s.r&&(a.s.r=$e.r),$e.c<a.s.c&&(a.s.c=$e.c),$e.r+1>a.e.r&&(a.e.r=$e.r+1),$e.c+1>a.e.c&&(a.e.c=$e.c+1),Ze.cellFormula&&et.f){for(var Ne=0;Ne<y.length;++Ne)if(!(y[Ne][0].s.c>$e.c||y[Ne][0].s.r>$e.r)&&!(y[Ne][0].e.c<$e.c||y[Ne][0].e.r<$e.r)){et.F=Tn(y[Ne][0]),(y[Ne][0].s.c!=$e.c||y[Ne][0].s.r!=$e.r)&&delete et.f,et.f&&(et.f=""+Ha(y[Ne][1],a,$e,k,F));break}}Ze.dense?(o[$e.r]||(o[$e.r]=[]),o[$e.r][$e.c]=et):o[d]=et}},F={enc:!1,sbcch:0,snames:[],sharedf:v,arrayf:y,rrtabid:[],lastuser:"",biff:8,codepage:0,winlocked:0,cellStyles:!!t&&!!t.cellStyles,WTF:!!t&&!!t.wtf};t.password&&(F.password=t.password);var T,P=[],_=[],C=[],S=[],x=!1,k=[];k.SheetNames=F.snames,k.sharedf=F.sharedf,k.arrayf=F.arrayf,k.names=[],k.XTI=[];var L=0,j=0,z=0,Y=[],K=[],Q;F.codepage=1200,Kc(1200);for(var q=!1;e.l<e.length-1;){var J=e.l,G=e.read_shift(2);if(G===0&&L===10)break;var V=e.l===e.length?0:e.read_shift(2),X=E5[G];if(X&&X.f){if(t.bookSheets&&L===133&&G!==133)break;if(L=G,X.r===2||X.r==12){var te=e.read_shift(2);if(V-=2,!F.enc&&te!==G&&((te&255)<<8|te>>8)!==G)throw new Error("rt mismatch: "+te+"!="+G);X.r==12&&(e.l+=10,V-=10)}var ee={};if(G===10?ee=X.f(e,V,F):ee=ant(G,X,e,V,F),j==0&&[9,521,1033,2057].indexOf(L)===-1)continue;switch(G){case 34:r.opts.Date1904=O.WBProps.date1904=ee;break;case 134:r.opts.WriteProtect=!0;break;case 47:if(F.enc||(e.l=0),F.enc=ee,!t.password)throw new Error("File is password-protected");if(ee.valid==null)throw new Error("Encryption scheme unsupported");if(!ee.valid)throw new Error("Password is incorrect");break;case 92:F.lastuser=ee;break;case 66:var re=Number(ee);switch(re){case 21010:re=1200;break;case 32768:re=1e4;break;case 32769:re=1252;break}Kc(F.codepage=re),q=!0;break;case 317:F.rrtabid=ee;break;case 25:F.winlocked=ee;break;case 439:r.opts.RefreshAll=ee;break;case 12:r.opts.CalcCount=ee;break;case 16:r.opts.CalcDelta=ee;break;case 17:r.opts.CalcIter=ee;break;case 13:r.opts.CalcMode=ee;break;case 14:r.opts.CalcPrecision=ee;break;case 95:r.opts.CalcSaveRecalc=ee;break;case 15:F.CalcRefMode=ee;break;case 2211:r.opts.FullCalc=ee;break;case 129:ee.fDialog&&(o["!type"]="dialog"),ee.fBelow||((o["!outline"]||(o["!outline"]={})).above=!0),ee.fRight||((o["!outline"]||(o["!outline"]={})).left=!0);break;case 224:E.push(ee);break;case 430:k.push([ee]),k[k.length-1].XTI=[];break;case 35:case 547:k[k.length-1].push(ee);break;case 24:case 536:Q={Name:ee.Name,Ref:Ha(ee.rgce,a,null,k,F)},ee.itab>0&&(Q.Sheet=ee.itab-1),k.names.push(Q),k[0]||(k[0]=[],k[0].XTI=[]),k[k.length-1].push(ee),ee.Name=="_xlnm._FilterDatabase"&&ee.itab>0&&ee.rgce&&ee.rgce[0]&&ee.rgce[0][0]&&ee.rgce[0][0][0]=="PtgArea3d"&&(K[ee.itab-1]={ref:Tn(ee.rgce[0][0][1][2])});break;case 22:F.ExternCount=ee;break;case 23:k.length==0&&(k[0]=[],k[0].XTI=[]),k[k.length-1].XTI=k[k.length-1].XTI.concat(ee),k.XTI=k.XTI.concat(ee);break;case 2196:if(F.biff<8)break;Q!=null&&(Q.Comment=ee[1]);break;case 18:o["!protect"]=ee;break;case 19:ee!==0&&F.WTF&&console.error("Password verifier: "+ee);break;case 133:i[ee.pos]=ee,F.snames.push(ee.name);break;case 10:{if(--j)break;if(a.e){if(a.e.r>0&&a.e.c>0){if(a.e.r--,a.e.c--,o["!ref"]=Tn(a),t.sheetRows&&t.sheetRows<=a.e.r){var se=a.e.r;a.e.r=t.sheetRows-1,o["!fullref"]=o["!ref"],o["!ref"]=Tn(a),a.e.r=se}a.e.r++,a.e.c++}P.length>0&&(o["!merges"]=P),_.length>0&&(o["!objects"]=_),C.length>0&&(o["!cols"]=C),S.length>0&&(o["!rows"]=S),O.Sheets.push(D)}l===""?u=o:n[l]=o,o=t.dense?[]:{}}break;case 9:case 521:case 1033:case 2057:{if(F.biff===8&&(F.biff={9:2,521:3,1033:4}[G]||{512:2,768:3,1024:4,1280:5,1536:8,2:2,7:2}[ee.BIFFVer]||8),F.biffguess=ee.BIFFVer==0,ee.BIFFVer==0&&ee.dt==4096&&(F.biff=5,q=!0,Kc(F.codepage=28591)),F.biff==8&&ee.BIFFVer==0&&ee.dt==16&&(F.biff=2),j++)break;if(o=t.dense?[]:{},F.biff<8&&!q&&(q=!0,Kc(F.codepage=t.codepage||1252)),F.biff<5||ee.BIFFVer==0&&ee.dt==4096){l===""&&(l="Sheet1"),a={s:{r:0,c:0},e:{r:0,c:0}};var pe={pos:e.l-V,name:l};i[pe.pos]=pe,F.snames.push(l)}else l=(i[J]||{name:""}).name;ee.dt==32&&(o["!type"]="chart"),ee.dt==64&&(o["!type"]="macro"),P=[],_=[],F.arrayf=y=[],C=[],S=[],x=!1,D={Hidden:(i[J]||{hs:0}).hs,name:l}}break;case 515:case 3:case 2:o["!type"]=="chart"&&(t.dense?(o[ee.r]||[])[ee.c]:o[Yr({c:ee.c,r:ee.r})])&&++ee.c,b={ixfe:ee.ixfe,XF:E[ee.ixfe]||{},v:ee.val,t:"n"},z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ee.c,r:ee.r},b,t);break;case 5:case 517:b={ixfe:ee.ixfe,XF:E[ee.ixfe],v:ee.val,t:ee.t},z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ee.c,r:ee.r},b,t);break;case 638:b={ixfe:ee.ixfe,XF:E[ee.ixfe],v:ee.rknum,t:"n"},z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ee.c,r:ee.r},b,t);break;case 189:for(var ce=ee.c;ce<=ee.C;++ce){var ne=ee.rkrec[ce-ee.c][0];b={ixfe:ne,XF:E[ne],v:ee.rkrec[ce-ee.c][1],t:"n"},z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ce,r:ee.r},b,t)}break;case 6:case 518:case 1030:{if(ee.val=="String"){s=ee;break}if(b=p_(ee.val,ee.cell.ixfe,ee.tt),b.XF=E[b.ixfe],t.cellFormula){var he=ee.formula;if(he&&he[0]&&he[0][0]&&he[0][0][0]=="PtgExp"){var oe=he[0][0][1][0],le=he[0][0][1][1],de=Yr({r:oe,c:le});v[de]?b.f=""+Ha(ee.formula,a,ee.cell,k,F):b.F=((t.dense?(o[oe]||[])[le]:o[de])||{}).F}else b.f=""+Ha(ee.formula,a,ee.cell,k,F)}z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B(ee.cell,b,t),s=ee}break;case 7:case 519:if(s)s.val=ee,b=p_(ee,s.cell.ixfe,"s"),b.XF=E[b.ixfe],t.cellFormula&&(b.f=""+Ha(s.formula,a,s.cell,k,F)),z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B(s.cell,b,t),s=null;else throw new Error("String record expects Formula");break;case 33:case 545:{y.push(ee);var ve=Yr(ee[0].s);if(h=t.dense?(o[ee[0].s.r]||[])[ee[0].s.c]:o[ve],t.cellFormula&&h){if(!s||!ve||!h)break;h.f=""+Ha(ee[1],a,ee[0],k,F),h.F=Tn(ee[0])}}break;case 1212:{if(!t.cellFormula)break;if(d){if(!s)break;v[Yr(s.cell)]=ee[0],h=t.dense?(o[s.cell.r]||[])[s.cell.c]:o[Yr(s.cell)],(h||{}).f=""+Ha(ee[0],a,f,k,F)}}break;case 253:b=p_(c[ee.isst].t,ee.ixfe,"s"),c[ee.isst].h&&(b.h=c[ee.isst].h),b.XF=E[b.ixfe],z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ee.c,r:ee.r},b,t);break;case 513:t.sheetStubs&&(b={ixfe:ee.ixfe,XF:E[ee.ixfe],t:"z"},z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ee.c,r:ee.r},b,t));break;case 190:if(t.sheetStubs)for(var we=ee.c;we<=ee.C;++we){var ie=ee.ixfe[we-ee.c];b={ixfe:ie,XF:E[ie],t:"z"},z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:we,r:ee.r},b,t)}break;case 214:case 516:case 4:b=p_(ee.val,ee.ixfe,"s"),b.XF=E[b.ixfe],z>0&&(b.z=Y[b.ixfe>>8&63]),bu(b,t,r.opts.Date1904),B({c:ee.c,r:ee.r},b,t);break;case 0:case 512:j===1&&(a=ee);break;case 252:c=ee;break;case 1054:if(F.biff==4){Y[z++]=ee[1];for(var ge=0;ge<z+163&&nn[ge]!=ee[1];++ge);ge>=163&&Tm(ee[1],z+163)}else Tm(ee[1],ee[0]);break;case 30:{Y[z++]=ee;for(var Pe=0;Pe<z+163&&nn[Pe]!=ee;++Pe);Pe>=163&&Tm(ee,z+163)}break;case 229:P=P.concat(ee);break;case 93:_[ee.cmo[0]]=F.lastobj=ee;break;case 438:F.lastobj.TxO=ee;break;case 127:F.lastobj.ImData=ee;break;case 440:for(m=ee[0].s.r;m<=ee[0].e.r;++m)for(g=ee[0].s.c;g<=ee[0].e.c;++g)h=t.dense?(o[m]||[])[g]:o[Yr({c:g,r:m})],h&&(h.l=ee[1]);break;case 2048:for(m=ee[0].s.r;m<=ee[0].e.r;++m)for(g=ee[0].s.c;g<=ee[0].e.c;++g)h=t.dense?(o[m]||[])[g]:o[Yr({c:g,r:m})],h&&h.l&&(h.l.Tooltip=ee[1]);break;case 28:{if(F.biff<=5&&F.biff>=2)break;h=t.dense?(o[ee[0].r]||[])[ee[0].c]:o[Yr(ee[0])];var Fe=_[ee[2]];h||(t.dense?(o[ee[0].r]||(o[ee[0].r]=[]),h=o[ee[0].r][ee[0].c]={t:"z"}):h=o[Yr(ee[0])]={t:"z"},a.e.r=Math.max(a.e.r,ee[0].r),a.s.r=Math.min(a.s.r,ee[0].r),a.e.c=Math.max(a.e.c,ee[0].c),a.s.c=Math.min(a.s.c,ee[0].c)),h.c||(h.c=[]),p={a:ee[1],t:Fe.TxO.t},h.c.push(p)}break;case 2173:TJe(E[ee.ixfe],ee.ext);break;case 125:{if(!F.cellStyles)break;for(;ee.e>=ee.s;)C[ee.e--]={width:ee.w/256,level:ee.level||0,hidden:!!(ee.flags&1)},x||(x=!0,CF(ee.w/256)),v1(C[ee.e+1])}break;case 520:{var Ie={};ee.level!=null&&(S[ee.r]=Ie,Ie.level=ee.level),ee.hidden&&(S[ee.r]=Ie,Ie.hidden=!0),ee.hpt&&(S[ee.r]=Ie,Ie.hpt=ee.hpt,Ie.hpx=kx(ee.hpt))}break;case 38:case 39:case 40:case 41:o["!margins"]||yw(o["!margins"]={}),o["!margins"][{38:"left",39:"right",40:"top",41:"bottom"}[G]]=ee;break;case 161:o["!margins"]||yw(o["!margins"]={}),o["!margins"].header=ee.header,o["!margins"].footer=ee.footer;break;case 574:ee.RTL&&(O.Views[0].RTL=!0);break;case 146:I=ee;break;case 2198:T=ee;break;case 140:w=ee;break;case 442:l?D.CodeName=ee||D.name:O.WBProps.CodeName=ee||"ThisWorkbook";break}}else X||console.error("Missing Info for XLS Record 0x"+G.toString(16)),e.l+=V}return r.SheetNames=id(i).sort(function(Oe,$e){return Number(Oe)-Number($e)}).map(function(Oe){return i[Oe].name}),t.bookSheets||(r.Sheets=n),!r.SheetNames.length&&u["!ref"]?(r.SheetNames.push("Sheet1"),r.Sheets&&(r.Sheets.Sheet1=u)):r.Preamble=u,r.Sheets&&K.forEach(function(Oe,$e){r.Sheets[r.SheetNames[$e]]["!autofilter"]=Oe}),r.Strings=c,r.SSF=Ta(nn),F.enc&&(r.Encryption=F.enc),T&&(r.Themes=T),r.Metadata={},w!==void 0&&(r.Metadata.Country=w),k.names.length>0&&(O.Names=k.names),r.Workbook=O,r}var Jj={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function lnt(e,t,r){var n=En.find(e,"/!DocumentSummaryInformation");if(n&&n.size>0)try{var o=Nj(n,SXe,Jj.DSI);for(var i in o)t[i]=o[i]}catch(l){if(r.WTF)throw l}var a=En.find(e,"/!SummaryInformation");if(a&&a.size>0)try{var s=Nj(a,_Xe,Jj.SI);for(var c in s)t[c]==null&&(t[c]=s[c])}catch(l){if(r.WTF)throw l}t.HeadingPairs&&t.TitlesOfParts&&(tne(t.HeadingPairs,t.TitlesOfParts,t,r),delete t.HeadingPairs,delete t.TitlesOfParts)}function $ne(e,t){t||(t={}),TF(t),fre(),t.codepage&&iF(t.codepage);var r,n;if(e.FullPaths){if(En.find(e,"/encryption"))throw new Error("File is password-protected");r=En.find(e,"!CompObj"),n=En.find(e,"/Workbook")||En.find(e,"/Book")}else{switch(t.type){case"base64":e=Gc(Cl(e));break;case"binary":e=Gc(e);break;case"buffer":break;case"array":Array.isArray(e)||(e=Array.prototype.slice.call(e));break}Sa(e,0),n={content:e}}var o,i;if(r&&ont(r),t.bookProps&&!t.bookSheets)o={};else{var a=Sn?"buffer":"array";if(n&&n.content)o=snt(n.content,t);else if((i=En.find(e,"PerfectOffice_MAIN"))&&i.content)o=gw.to_workbook(i.content,(t.type=a,t));else if((i=En.find(e,"NativeContent_MAIN"))&&i.content)o=gw.to_workbook(i.content,(t.type=a,t));else throw(i=En.find(e,"MN0"))&&i.content?new Error("Unsupported Works 4 for Mac file"):new Error("Cannot find Workbook stream");t.bookVBA&&e.FullPaths&&En.find(e,"/_VBA_PROJECT_CUR/VBA/dir")&&(o.vbaraw=WJe(e))}var s={};return e.FullPaths&&lnt(e,s,t),o.Props=o.Custprops=s,t.bookFiles&&(o.cfb=e),o}var UE={0:{f:jtt},1:{f:qtt},2:{f:rrt},3:{f:Qtt},4:{f:Ytt},5:{f:trt},6:{f:irt},7:{f:Jtt},8:{f:urt},9:{f:crt},10:{f:srt},11:{f:lrt},12:{f:Ktt},13:{f:nrt},14:{f:Ztt},15:{f:Xtt},16:{f:One},17:{f:art},18:{f:ert},19:{f:gF},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:Lrt},40:{},42:{},43:{f:iJe},44:{f:oJe},45:{f:aJe},46:{f:lJe},47:{f:sJe},48:{},49:{f:cXe},50:{},51:{f:AJe},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:hne},62:{f:ort},63:{f:DJe},64:{f:brt},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:Za,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:yrt},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:Gtt},148:{f:Vtt,p:16},151:{f:hrt},152:{},153:{f:Frt},154:{},155:{},156:{f:Drt},157:{},158:{},159:{T:1,f:_Ze},160:{T:-1},161:{T:1,f:x0},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:drt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:IJe},336:{T:-1},337:{f:PJe,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:x5},357:{},358:{},359:{},360:{T:1},361:{},362:{f:fne},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:prt},427:{f:mrt},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:vrt},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Wtt},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:frt},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:x5},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:zJe},633:{T:1},634:{T:-1},635:{T:1,f:HJe},636:{T:-1},637:{f:dXe},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:krt},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:wrt},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}},E5={6:{f:wP},10:{f:Gf},12:{f:Ei},13:{f:Ei},14:{f:ci},15:{f:ci},16:{f:Wa},17:{f:ci},18:{f:ci},19:{f:Ei},20:{f:Uj},21:{f:Uj},23:{f:fne},24:{f:zj},25:{f:ci},26:{},27:{},28:{f:BQe},29:{},34:{f:ci},35:{f:Hj},38:{f:Wa},39:{f:Wa},40:{f:Wa},41:{f:Wa},42:{f:ci},43:{f:ci},47:{f:jZe},49:{f:wQe},51:{f:Ei},60:{},61:{f:vQe},64:{f:ci},65:{f:bQe},66:{f:Ei},77:{},80:{},81:{},82:{},85:{f:Ei},89:{},90:{},91:{},92:{f:cQe},93:{f:HQe},94:{},95:{f:ci},96:{},97:{},99:{f:ci},125:{f:hne},128:{f:PQe},129:{f:uQe},130:{f:Ei},131:{f:ci},132:{f:ci},133:{f:dQe},134:{},140:{f:qQe},141:{f:Ei},144:{},146:{f:YQe},151:{},152:{},153:{},154:{},155:{},156:{f:Ei},157:{},158:{},160:{f:eZe},161:{f:QQe},174:{},175:{},176:{},177:{},178:{},180:{},181:{},182:{},184:{},185:{},189:{f:EQe},190:{f:TQe},193:{f:Gf},197:{},198:{},199:{},200:{},201:{},202:{f:ci},203:{},204:{},205:{},206:{},207:{},208:{},209:{},210:{},211:{},213:{},215:{},216:{},217:{},218:{f:Ei},220:{},221:{f:ci},222:{},224:{f:AQe},225:{f:lQe},226:{f:Gf},227:{},229:{f:UQe},233:{},235:{},236:{},237:{},239:{},240:{},241:{},242:{},244:{},245:{},246:{},247:{},248:{},249:{},251:{},252:{f:fQe},253:{f:xQe},255:{f:hQe},256:{},259:{},290:{},311:{},312:{},315:{},317:{f:ane},318:{},319:{},320:{},330:{},331:{},333:{},334:{},335:{},336:{},337:{},338:{},339:{},340:{},351:{},352:{f:ci},353:{f:Gf},401:{},402:{},403:{},404:{},405:{},406:{},407:{},408:{},425:{},426:{},427:{},428:{},429:{},430:{f:RQe},431:{f:ci},432:{},433:{},434:{},437:{},438:{f:VQe},439:{f:ci},440:{f:WQe},441:{},442:{f:sC},443:{},444:{f:Ei},445:{},446:{},448:{f:Gf},449:{f:gQe,r:2},450:{f:Gf},512:{f:$j},513:{f:JQe},515:{f:MQe},516:{f:CQe},517:{f:Bj},519:{f:tZe},520:{f:pQe},523:{},545:{f:jj},549:{f:Lj},566:{},574:{f:yQe},638:{f:kQe},659:{},1048:{},1054:{f:SQe},1084:{},1212:{f:NQe},2048:{f:GQe},2049:{},2050:{},2051:{},2052:{},2053:{},2054:{},2055:{},2056:{},2057:{f:d_},2058:{},2059:{},2060:{},2061:{},2062:{},2063:{},2064:{},2066:{},2067:{},2128:{},2129:{},2130:{},2131:{},2132:{},2133:{},2134:{},2135:{},2136:{},2137:{},2138:{},2146:{},2147:{r:12},2148:{},2149:{},2150:{},2151:{f:Gf},2152:{},2154:{},2155:{},2156:{},2161:{},2162:{},2164:{},2165:{},2166:{},2167:{},2168:{},2169:{},2170:{},2171:{},2172:{f:XQe,r:12},2173:{f:EJe,r:12},2174:{},2175:{},2180:{},2181:{},2182:{},2183:{},2184:{},2185:{},2186:{},2187:{},2188:{f:ci,r:12},2189:{},2190:{r:12},2191:{},2192:{},2194:{},2195:{},2196:{f:FQe,r:12},2197:{},2198:{f:wJe,r:12},2199:{},2200:{},2201:{},2202:{f:LQe,r:12},2203:{f:Gf},2204:{},2205:{},2206:{},2207:{},2211:{f:mQe},2212:{},2213:{},2214:{},2215:{},4097:{},4098:{},4099:{},4102:{},4103:{},4105:{},4106:{},4107:{},4108:{},4109:{},4116:{},4117:{},4118:{},4119:{},4120:{},4121:{},4122:{},4123:{},4124:{},4125:{},4126:{},4127:{},4128:{},4129:{},4130:{},4132:{},4133:{},4134:{f:Ei},4135:{},4146:{},4147:{},4148:{},4149:{},4154:{},4156:{},4157:{},4158:{},4159:{},4160:{},4161:{},4163:{},4164:{f:ZQe},4165:{},4166:{},4168:{},4170:{},4171:{},4174:{},4175:{},4176:{},4177:{},4187:{},4188:{f:KQe},4189:{},4191:{},4192:{},4193:{},4194:{},4195:{},4196:{},4197:{},4198:{},4199:{},4200:{},0:{f:$j},1:{},2:{f:iZe},3:{f:oZe},4:{f:nZe},5:{f:Bj},7:{f:aZe},8:{},9:{f:d_},11:{},22:{f:Ei},30:{f:_Qe},31:{},32:{},33:{f:jj},36:{},37:{f:Lj},50:{f:sZe},62:{},52:{},67:{},68:{f:Ei},69:{},86:{},126:{},127:{f:rZe},135:{},136:{},137:{},145:{},148:{},149:{},150:{},169:{},171:{},188:{},191:{},192:{},194:{},195:{},214:{f:lZe},223:{},234:{},354:{},421:{},518:{f:wP},521:{f:d_},536:{f:zj},547:{f:Hj},561:{},579:{},1030:{f:wP},1033:{f:d_},1091:{},2157:{},2163:{},2177:{},2240:{},2241:{},2242:{},2243:{},2244:{},2245:{},2246:{},2247:{},2248:{},2249:{},2250:{},2251:{},2262:{r:12},29282:{}};function Mc(e,t,r,n){var o=t;if(!isNaN(o)){var i=n||(r||[]).length||0,a=e.next(4);a.write_shift(2,o),a.write_shift(2,i),i>0&&qre(r)&&e.push(r)}}function eV(e,t){var r=t||{},n=r.dense?[]:{};e=e.replace(/<!--.*?-->/g,"");var o=e.match(/<table/i);if(!o)throw new Error("Invalid HTML: could not find <table>");var i=e.match(/<\/table/i),a=o.index,s=i&&i.index||e.length,c=RYe(e.slice(a,s),/(:?<tr[^>]*>)/i,"<tr>"),l=-1,u=0,f=0,d=0,h={s:{r:1e7,c:1e7},e:{r:0,c:0}},p=[];for(a=0;a<c.length;++a){var g=c[a].trim(),m=g.slice(0,3).toLowerCase();if(m=="<tr"){if(++l,r.sheetRows&&r.sheetRows<=l){--l;break}u=0;continue}if(!(m!="<td"&&m!="<th")){var v=g.split(/<\/t[dh]>/i);for(s=0;s<v.length;++s){var y=v[s].trim();if(y.match(/<t[dh]/i)){for(var b=y,w=0;b.charAt(0)=="<"&&(w=b.indexOf(">"))>-1;)b=b.slice(w+1);for(var E=0;E<p.length;++E){var I=p[E];I.s.c==u&&I.s.r<l&&l<=I.e.r&&(u=I.e.c+1,E=-1)}var O=$r(y.slice(0,y.indexOf(">")));d=O.colspan?+O.colspan:1,((f=+O.rowspan)>1||d>1)&&p.push({s:{r:l,c:u},e:{r:l+(f||1)-1,c:u+d-1}});var D=O.t||O["data-t"]||"";if(!b.length){u+=d;continue}if(b=Dre(b),h.s.r>l&&(h.s.r=l),h.e.r<l&&(h.e.r=l),h.s.c>u&&(h.s.c=u),h.e.c<u&&(h.e.c=u),!b.length){u+=d;continue}var N={t:"s",v:b};r.raw||!b.trim().length||D=="s"||(b==="TRUE"?N={t:"b",v:!0}:b==="FALSE"?N={t:"b",v:!1}:isNaN(ru(b))?isNaN(g1(b).getDate())||(N={t:"d",v:la(b)},r.cellDates||(N={t:"n",v:Ss(N.v)}),N.z=r.dateNF||nn[14]):N={t:"n",v:ru(b)}),r.dense?(n[l]||(n[l]=[]),n[l][u]=N):n[Yr({r:l,c:u})]=N,u+=d}}}}return n["!ref"]=Tn(h),p.length&&(n["!merges"]=p),n}function cnt(e,t,r,n){for(var o=e["!merges"]||[],i=[],a=t.s.c;a<=t.e.c;++a){for(var s=0,c=0,l=0;l<o.length;++l)if(!(o[l].s.r>r||o[l].s.c>a)&&!(o[l].e.r<r||o[l].e.c<a)){if(o[l].s.r<r||o[l].s.c<a){s=-1;break}s=o[l].e.r-o[l].s.r+1,c=o[l].e.c-o[l].s.c+1;break}if(!(s<0)){var u=Yr({r,c:a}),f=n.dense?(e[r]||[])[a]:e[u],d=f&&f.v!=null&&(f.h||dF(f.w||(ff(f),f.w)||""))||"",h={};s>1&&(h.rowspan=s),c>1&&(h.colspan=c),n.editable?d='<span contenteditable="true">'+d+"</span>":f&&(h["data-t"]=f&&f.t||"z",f.v!=null&&(h["data-v"]=f.v),f.z!=null&&(h["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(d='<a href="'+f.l.Target+'">'+d+"</a>")),h.id=(n.id||"sjs")+"-"+u,i.push(qYe("td",d,h))}}var p="<tr>";return p+i.join("")+"</tr>"}var unt='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',dnt="</body></html>";function fnt(e,t){var r=e.match(/<table[\s\S]*?>[\s\S]*?<\/table>/gi);if(!r||r.length==0)throw new Error("Invalid HTML: could not find <table>");if(r.length==1)return pp(eV(r[0],t),t);var n=AF();return r.forEach(function(o,i){PF(n,eV(o,t),"Sheet"+(i+1))}),n}function hnt(e,t,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}function pnt(e,t){var r=t||{},n=r.header!=null?r.header:unt,o=r.footer!=null?r.footer:dnt,i=[n],a=ay(e["!ref"]);r.dense=Array.isArray(e),i.push(hnt(e,a,r));for(var s=a.s.r;s<=a.e.r;++s)i.push(cnt(e,a,s,r));return i.push("</table>"+o),i.join("")}function Bne(e,t,r){var n=r||{},o=0,i=0;if(n.origin!=null)if(typeof n.origin=="number")o=n.origin;else{var a=typeof n.origin=="string"?ms(n.origin):n.origin;o=a.r,i=a.c}var s=t.getElementsByTagName("tr"),c=Math.min(n.sheetRows||1e7,s.length),l={s:{r:0,c:0},e:{r:o,c:i}};if(e["!ref"]){var u=ay(e["!ref"]);l.s.r=Math.min(l.s.r,u.s.r),l.s.c=Math.min(l.s.c,u.s.c),l.e.r=Math.max(l.e.r,u.e.r),l.e.c=Math.max(l.e.c,u.e.c),o==-1&&(l.e.r=o=u.e.r+1)}var f=[],d=0,h=e["!rows"]||(e["!rows"]=[]),p=0,g=0,m=0,v=0,y=0,b=0;for(e["!cols"]||(e["!cols"]=[]);p<s.length&&g<c;++p){var w=s[p];if(tV(w)){if(n.display)continue;h[g]={hidden:!0}}var E=w.children;for(m=v=0;m<E.length;++m){var I=E[m];if(!(n.display&&tV(I))){var O=I.hasAttribute("data-v")?I.getAttribute("data-v"):I.hasAttribute("v")?I.getAttribute("v"):Dre(I.innerHTML),D=I.getAttribute("data-z")||I.getAttribute("z");for(d=0;d<f.length;++d){var N=f[d];N.s.c==v+i&&N.s.r<g+o&&g+o<=N.e.r&&(v=N.e.c+1-i,d=-1)}b=+I.getAttribute("colspan")||1,((y=+I.getAttribute("rowspan")||1)>1||b>1)&&f.push({s:{r:g+o,c:v+i},e:{r:g+o+(y||1)-1,c:v+i+(b||1)-1}});var U={t:"s",v:O},B=I.getAttribute("data-t")||I.getAttribute("t")||"";O!=null&&(O.length==0?U.t=B||"z":n.raw||O.trim().length==0||B=="s"||(O==="TRUE"?U={t:"b",v:!0}:O==="FALSE"?U={t:"b",v:!1}:isNaN(ru(O))?isNaN(g1(O).getDate())||(U={t:"d",v:la(O)},n.cellDates||(U={t:"n",v:Ss(U.v)}),U.z=n.dateNF||nn[14]):U={t:"n",v:ru(O)})),U.z===void 0&&D!=null&&(U.z=D);var F="",T=I.getElementsByTagName("A");if(T&&T.length)for(var P=0;P<T.length&&!(T[P].hasAttribute("href")&&(F=T[P].getAttribute("href"),F.charAt(0)!="#"));++P);F&&F.charAt(0)!="#"&&(U.l={Target:F}),n.dense?(e[g+o]||(e[g+o]=[]),e[g+o][v+i]=U):e[Yr({c:v+i,r:g+o})]=U,l.e.c<v+i&&(l.e.c=v+i),v+=b}}++g}return f.length&&(e["!merges"]=(e["!merges"]||[]).concat(f)),l.e.r=Math.max(l.e.r,g-1+o),e["!ref"]=Tn(l),g>=c&&(e["!fullref"]=Tn((l.e.r=s.length-p+g-1+o,l))),e}function Une(e,t){var r=t||{},n=r.dense?[]:{};return Bne(n,e,t)}function mnt(e,t){return pp(Une(e,t),t)}function tV(e){var t="",r=gnt(e);return r&&(t=r(e).getPropertyValue("display")),t||(t=e.style&&e.style.display),t==="none"}function gnt(e){return e.ownerDocument.defaultView&&typeof e.ownerDocument.defaultView.getComputedStyle=="function"?e.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}function vnt(e){var t=e.replace(/[\t\r\n]/g," ").trim().replace(/ +/g," ").replace(/<text:s\/>/g," ").replace(/<text:s text:c="(\d+)"\/>/g,function(n,o){return Array(parseInt(o,10)+1).join(" ")}).replace(/<text:tab[^>]*\/>/g,"	").replace(/<text:line-break\/>/g,`
`),r=Rn(t.replace(/<[^>]*>/g,""));return[r]}var rV={day:["d","dd"],month:["m","mm"],year:["y","yy"],hours:["h","hh"],minutes:["m","mm"],seconds:["s","ss"],"am-pm":["A/P","AM/PM"],"day-of-week":["ddd","dddd"],era:["e","ee"],quarter:["\\Qm",'m\\"th quarter"']};function Hne(e,t){var r=t||{},n=fF(e),o=[],i,a,s={name:""},c="",l=0,u,f,d={},h=[],p=r.dense?[]:{},g,m,v={value:""},y="",b=0,w=[],E=-1,I=-1,O={s:{r:1e6,c:1e7},e:{r:0,c:0}},D=0,N={},U=[],B={},F=0,T=0,P=[],_=1,C=1,S=[],x={Names:[]},k={},L=["",""],j=[],z={},Y="",K=0,Q=!1,q=!1,J=0;for(Cx.lastIndex=0,n=n.replace(/<!--([\s\S]*?)-->/mg,"").replace(/<!DOCTYPE[^\[]*\[[^\]]*\]>/gm,"");g=Cx.exec(n);)switch(g[3]=g[3].replace(/_.*$/,"")){case"table":case"工作表":g[1]==="/"?(O.e.c>=O.s.c&&O.e.r>=O.s.r?p["!ref"]=Tn(O):p["!ref"]="A1:A1",r.sheetRows>0&&r.sheetRows<=O.e.r&&(p["!fullref"]=p["!ref"],O.e.r=r.sheetRows-1,p["!ref"]=Tn(O)),U.length&&(p["!merges"]=U),P.length&&(p["!rows"]=P),u.name=u.名称||u.name,typeof JSON<"u"&&JSON.stringify(u),h.push(u.name),d[u.name]=p,q=!1):g[0].charAt(g[0].length-2)!=="/"&&(u=$r(g[0],!1),E=I=-1,O.s.r=O.s.c=1e7,O.e.r=O.e.c=0,p=r.dense?[]:{},U=[],P=[],q=!0);break;case"table-row-group":g[1]==="/"?--D:++D;break;case"table-row":case"行":if(g[1]==="/"){E+=_,_=1;break}if(f=$r(g[0],!1),f.行号?E=f.行号-1:E==-1&&(E=0),_=+f["number-rows-repeated"]||1,_<10)for(J=0;J<_;++J)D>0&&(P[E+J]={level:D});I=-1;break;case"covered-table-cell":g[1]!=="/"&&++I,r.sheetStubs&&(r.dense?(p[E]||(p[E]=[]),p[E][I]={t:"z"}):p[Yr({r:E,c:I})]={t:"z"}),y="",w=[];break;case"table-cell":case"数据":if(g[0].charAt(g[0].length-2)==="/")++I,v=$r(g[0],!1),C=parseInt(v["number-columns-repeated"]||"1",10),m={t:"z",v:null},v.formula&&r.cellFormula!=!1&&(m.f=Xj(Rn(v.formula))),(v.数据类型||v["value-type"])=="string"&&(m.t="s",m.v=Rn(v["string-value"]||""),r.dense?(p[E]||(p[E]=[]),p[E][I]=m):p[Yr({r:E,c:I})]=m),I+=C-1;else if(g[1]!=="/"){++I,y="",b=0,w=[],C=1;var G=_?E+_-1:E;if(I>O.e.c&&(O.e.c=I),I<O.s.c&&(O.s.c=I),E<O.s.r&&(O.s.r=E),G>O.e.r&&(O.e.r=G),v=$r(g[0],!1),j=[],z={},m={t:v.数据类型||v["value-type"],v:null},r.cellFormula)if(v.formula&&(v.formula=Rn(v.formula)),v["number-matrix-columns-spanned"]&&v["number-matrix-rows-spanned"]&&(F=parseInt(v["number-matrix-rows-spanned"],10)||0,T=parseInt(v["number-matrix-columns-spanned"],10)||0,B={s:{r:E,c:I},e:{r:E+F-1,c:I+T-1}},m.F=Tn(B),S.push([B,m.F])),v.formula)m.f=Xj(v.formula);else for(J=0;J<S.length;++J)E>=S[J][0].s.r&&E<=S[J][0].e.r&&I>=S[J][0].s.c&&I<=S[J][0].e.c&&(m.F=S[J][1]);switch((v["number-columns-spanned"]||v["number-rows-spanned"])&&(F=parseInt(v["number-rows-spanned"],10)||0,T=parseInt(v["number-columns-spanned"],10)||0,B={s:{r:E,c:I},e:{r:E+F-1,c:I+T-1}},U.push(B)),v["number-columns-repeated"]&&(C=parseInt(v["number-columns-repeated"],10)),m.t){case"boolean":m.t="b",m.v=Do(v["boolean-value"]);break;case"float":m.t="n",m.v=parseFloat(v.value);break;case"percentage":m.t="n",m.v=parseFloat(v.value);break;case"currency":m.t="n",m.v=parseFloat(v.value);break;case"date":m.t="d",m.v=la(v["date-value"]),r.cellDates||(m.t="n",m.v=Ss(m.v)),m.z="m/d/yy";break;case"time":m.t="n",m.v=AYe(v["time-value"])/86400,r.cellDates&&(m.t="d",m.v=d4(m.v)),m.z="HH:MM:SS";break;case"number":m.t="n",m.v=parseFloat(v.数据数值);break;default:if(m.t==="string"||m.t==="text"||!m.t)m.t="s",v["string-value"]!=null&&(y=Rn(v["string-value"]),w=[]);else throw new Error("Unsupported value type "+m.t)}}else{if(Q=!1,m.t==="s"&&(m.v=y||"",w.length&&(m.R=w),Q=b==0),k.Target&&(m.l=k),j.length>0&&(m.c=j,j=[]),y&&r.cellText!==!1&&(m.w=y),Q&&(m.t="z",delete m.v),(!Q||r.sheetStubs)&&!(r.sheetRows&&r.sheetRows<=E))for(var V=0;V<_;++V){if(C=parseInt(v["number-columns-repeated"]||"1",10),r.dense)for(p[E+V]||(p[E+V]=[]),p[E+V][I]=V==0?m:Ta(m);--C>0;)p[E+V][I+C]=Ta(m);else for(p[Yr({r:E+V,c:I})]=m;--C>0;)p[Yr({r:E+V,c:I+C})]=Ta(m);O.e.c<=I&&(O.e.c=I)}C=parseInt(v["number-columns-repeated"]||"1",10),I+=C-1,C=0,m={},y="",w=[]}k={};break;case"document":case"document-content":case"电子表格文档":case"spreadsheet":case"主体":case"scripts":case"styles":case"font-face-decls":case"master-styles":if(g[1]==="/"){if((i=o.pop())[0]!==g[3])throw"Bad state: "+i}else g[0].charAt(g[0].length-2)!=="/"&&o.push([g[3],!0]);break;case"annotation":if(g[1]==="/"){if((i=o.pop())[0]!==g[3])throw"Bad state: "+i;z.t=y,w.length&&(z.R=w),z.a=Y,j.push(z)}else g[0].charAt(g[0].length-2)!=="/"&&o.push([g[3],!1]);Y="",K=0,y="",b=0,w=[];break;case"creator":g[1]==="/"?Y=n.slice(K,g.index):K=g.index+g[0].length;break;case"meta":case"元数据":case"settings":case"config-item-set":case"config-item-map-indexed":case"config-item-map-entry":case"config-item-map-named":case"shapes":case"frame":case"text-box":case"image":case"data-pilot-tables":case"list-style":case"form":case"dde-links":case"event-listeners":case"chart":if(g[1]==="/"){if((i=o.pop())[0]!==g[3])throw"Bad state: "+i}else g[0].charAt(g[0].length-2)!=="/"&&o.push([g[3],!1]);y="",b=0,w=[];break;case"scientific-number":break;case"currency-symbol":break;case"currency-style":break;case"number-style":case"percentage-style":case"date-style":case"time-style":if(g[1]==="/"){if(N[s.name]=c,(i=o.pop())[0]!==g[3])throw"Bad state: "+i}else g[0].charAt(g[0].length-2)!=="/"&&(c="",s=$r(g[0],!1),o.push([g[3],!0]));break;case"script":break;case"libraries":break;case"automatic-styles":break;case"default-style":case"page-layout":break;case"style":break;case"map":break;case"font-face":break;case"paragraph-properties":break;case"table-properties":break;case"table-column-properties":break;case"table-row-properties":break;case"table-cell-properties":break;case"number":switch(o[o.length-1][0]){case"time-style":case"date-style":a=$r(g[0],!1),c+=rV[g[3]][a.style==="long"?1:0];break}break;case"fraction":break;case"day":case"month":case"year":case"era":case"day-of-week":case"week-of-year":case"quarter":case"hours":case"minutes":case"seconds":case"am-pm":switch(o[o.length-1][0]){case"time-style":case"date-style":a=$r(g[0],!1),c+=rV[g[3]][a.style==="long"?1:0];break}break;case"boolean-style":break;case"boolean":break;case"text-style":break;case"text":if(g[0].slice(-2)==="/>")break;if(g[1]==="/")switch(o[o.length-1][0]){case"number-style":case"date-style":case"time-style":c+=n.slice(l,g.index);break}else l=g.index+g[0].length;break;case"named-range":a=$r(g[0],!1),L=xP(a["cell-range-address"]);var X={Name:a.name,Ref:L[0]+"!"+L[1]};q&&(X.Sheet=h.length),x.Names.push(X);break;case"text-content":break;case"text-properties":break;case"embedded-text":break;case"body":case"电子表格":break;case"forms":break;case"table-column":break;case"table-header-rows":break;case"table-rows":break;case"table-column-group":break;case"table-header-columns":break;case"table-columns":break;case"null-date":break;case"graphic-properties":break;case"calculation-settings":break;case"named-expressions":break;case"label-range":break;case"label-ranges":break;case"named-expression":break;case"sort":break;case"sort-by":break;case"sort-groups":break;case"tab":break;case"line-break":break;case"span":break;case"p":case"文本串":if(["master-styles"].indexOf(o[o.length-1][0])>-1)break;if(g[1]==="/"&&(!v||!v["string-value"])){var te=vnt(n.slice(b,g.index));y=(y.length>0?y+`
`:"")+te[0]}else $r(g[0],!1),b=g.index+g[0].length;break;case"s":break;case"database-range":if(g[1]==="/")break;try{L=xP($r(g[0])["target-range-address"]),d[L[0]]["!autofilter"]={ref:L[1]}}catch{}break;case"date":break;case"object":break;case"title":case"标题":break;case"desc":break;case"binary-data":break;case"table-source":break;case"scenario":break;case"iteration":break;case"content-validations":break;case"content-validation":break;case"help-message":break;case"error-message":break;case"database-ranges":break;case"filter":break;case"filter-and":break;case"filter-or":break;case"filter-condition":break;case"list-level-style-bullet":break;case"list-level-style-number":break;case"list-level-properties":break;case"sender-firstname":case"sender-lastname":case"sender-initials":case"sender-title":case"sender-position":case"sender-email":case"sender-phone-private":case"sender-fax":case"sender-company":case"sender-phone-work":case"sender-street":case"sender-city":case"sender-postal-code":case"sender-country":case"sender-state-or-province":case"author-name":case"author-initials":case"chapter":case"file-name":case"template-name":case"sheet-name":break;case"event-listener":break;case"initial-creator":case"creation-date":case"print-date":case"generator":case"document-statistic":case"user-defined":case"editing-duration":case"editing-cycles":break;case"config-item":break;case"page-number":break;case"page-count":break;case"time":break;case"cell-range-source":break;case"detective":break;case"operation":break;case"highlighted-range":break;case"data-pilot-table":case"source-cell-range":case"source-service":case"data-pilot-field":case"data-pilot-level":case"data-pilot-subtotals":case"data-pilot-subtotal":case"data-pilot-members":case"data-pilot-member":case"data-pilot-display-info":case"data-pilot-sort-info":case"data-pilot-layout-info":case"data-pilot-field-reference":case"data-pilot-groups":case"data-pilot-group":case"data-pilot-group-member":break;case"rect":break;case"dde-connection-decls":case"dde-connection-decl":case"dde-link":case"dde-source":break;case"properties":break;case"property":break;case"a":if(g[1]!=="/"){if(k=$r(g[0],!1),!k.href)break;k.Target=Rn(k.href),delete k.href,k.Target.charAt(0)=="#"&&k.Target.indexOf(".")>-1?(L=xP(k.Target.slice(1)),k.Target="#"+L[0]+"!"+L[1]):k.Target.match(/^\.\.[\\\/]/)&&(k.Target=k.Target.slice(3))}break;case"table-protection":break;case"data-pilot-grand-total":break;case"office-document-common-attrs":break;default:switch(g[2]){case"dc:":case"calcext:":case"loext:":case"ooo:":case"chartooo:":case"draw:":case"style:":case"chart:":case"form:":case"uof:":case"表:":case"字:":break;default:if(r.WTF)throw new Error(g)}}var ee={Sheets:d,SheetNames:h,Workbook:x};return r.bookSheets&&delete ee.Sheets,ee}function nV(e,t){t=t||{},zl(e,"META-INF/manifest.xml")&&MXe(ki(e,"META-INF/manifest.xml"),t);var r=pl(e,"content.xml");if(!r)throw new Error("Missing content.xml in ODS / UOF file");var n=Hne(So(r),t);return zl(e,"meta.xml")&&(n.Props=ene(ki(e,"meta.xml"))),n}function oV(e,t){return Hne(e,t)}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function kF(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function T5(e){return typeof TextDecoder<"u"?new TextDecoder().decode(e):So(b0(e))}function I5(e){var t=e.reduce(function(o,i){return o+i.length},0),r=new Uint8Array(t),n=0;return e.forEach(function(o){r.set(o,n),n+=o.length}),r}function iV(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),(e+(e>>4)&252645135)*16843009>>>24}function ynt(e,t){for(var r=(e[t+15]&127)<<7|e[t+14]>>1,n=e[t+14]&1,o=t+13;o>=t;--o)n=n*256+e[o];return(e[t+15]&128?-n:n)*Math.pow(10,r-6176)}function Ex(e,t){var r=t?t[0]:0,n=e[r]&127;e:if(e[r++]>=128&&(n|=(e[r]&127)<<7,e[r++]<128||(n|=(e[r]&127)<<14,e[r++]<128)||(n|=(e[r]&127)<<21,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,28),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,35),++r,e[r++]<128)||(n+=(e[r]&127)*Math.pow(2,42),++r,e[r++]<128)))break e;return t&&(t[0]=r),n}function Vi(e){var t=0,r=e[t]&127;e:if(e[t++]>=128){if(r|=(e[t]&127)<<7,e[t++]<128||(r|=(e[t]&127)<<14,e[t++]<128)||(r|=(e[t]&127)<<21,e[t++]<128))break e;r|=(e[t]&127)<<28}return r}function Ga(e){for(var t=[],r=[0];r[0]<e.length;){var n=r[0],o=Ex(e,r),i=o&7;o=Math.floor(o/8);var a=0,s;if(o==0)break;switch(i){case 0:{for(var c=r[0];e[r[0]++]>=128;);s=e.slice(c,r[0])}break;case 5:a=4,s=e.slice(r[0],r[0]+a),r[0]+=a;break;case 1:a=8,s=e.slice(r[0],r[0]+a),r[0]+=a;break;case 2:a=Ex(e,r),s=e.slice(r[0],r[0]+a),r[0]+=a;break;case 3:case 4:default:throw new Error("PB Type ".concat(i," for Field ").concat(o," at offset ").concat(n))}var l={data:s,type:i};t[o]==null?t[o]=[l]:t[o].push(l)}return t}function EF(e,t){return(e==null?void 0:e.map(function(r){return t(r.data)}))||[]}function bnt(e){for(var t,r=[],n=[0];n[0]<e.length;){var o=Ex(e,n),i=Ga(e.slice(n[0],n[0]+o));n[0]+=o;var a={id:Vi(i[1][0].data),messages:[]};i[2].forEach(function(s){var c=Ga(s.data),l=Vi(c[3][0].data);a.messages.push({meta:c,data:e.slice(n[0],n[0]+l)}),n[0]+=l}),(t=i[3])!=null&&t[0]&&(a.merge=Vi(i[3][0].data)>>>0>0),r.push(a)}return r}function wnt(e,t){if(e!=0)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var r=[0],n=Ex(t,r),o=[];r[0]<t.length;){var i=t[r[0]]&3;if(i==0){var a=t[r[0]++]>>2;if(a<60)++a;else{var s=a-59;a=t[r[0]],s>1&&(a|=t[r[0]+1]<<8),s>2&&(a|=t[r[0]+2]<<16),s>3&&(a|=t[r[0]+3]<<24),a>>>=0,a++,r[0]+=s}o.push(t.slice(r[0],r[0]+a)),r[0]+=a;continue}else{var c=0,l=0;if(i==1?(l=(t[r[0]]>>2&7)+4,c=(t[r[0]++]&224)<<3,c|=t[r[0]++]):(l=(t[r[0]++]>>2)+1,i==2?(c=t[r[0]]|t[r[0]+1]<<8,r[0]+=2):(c=(t[r[0]]|t[r[0]+1]<<8|t[r[0]+2]<<16|t[r[0]+3]<<24)>>>0,r[0]+=4)),o=[I5(o)],c==0)throw new Error("Invalid offset 0");if(c>o[0].length)throw new Error("Invalid offset beyond length");if(l>=c)for(o.push(o[0].slice(-c)),l-=c;l>=o[o.length-1].length;)o.push(o[o.length-1]),l-=o[o.length-1].length;o.push(o[0].slice(-c,-c+l))}}var u=I5(o);if(u.length!=n)throw new Error("Unexpected length: ".concat(u.length," != ").concat(n));return u}function xnt(e){for(var t=[],r=0;r<e.length;){var n=e[r++],o=e[r]|e[r+1]<<8|e[r+2]<<16;r+=3,t.push(wnt(n,e.slice(r,r+o))),r+=o}if(r!==e.length)throw new Error("data is not a valid framed stream!");return I5(t)}function Cnt(e,t,r,n){var o=kF(e),i=o.getUint32(4,!0),a=(n>1?12:8)+iV(i&(n>1?3470:398))*4,s=-1,c=-1,l=NaN,u=new Date(2001,0,1);i&512&&(s=o.getUint32(a,!0),a+=4),a+=iV(i&(n>1?12288:4096))*4,i&16&&(c=o.getUint32(a,!0),a+=4),i&32&&(l=o.getFloat64(a,!0),a+=8),i&64&&(u.setTime(u.getTime()+o.getFloat64(a,!0)*1e3),a+=8);var f;switch(e[2]){case 0:break;case 2:f={t:"n",v:l};break;case 3:f={t:"s",v:t[c]};break;case 5:f={t:"d",v:u};break;case 6:f={t:"b",v:l>0};break;case 7:f={t:"n",v:l/86400};break;case 8:f={t:"e",v:0};break;case 9:if(s>-1)f={t:"s",v:r[s]};else if(c>-1)f={t:"s",v:t[c]};else if(!isNaN(l))f={t:"n",v:l};else throw new Error("Unsupported cell type ".concat(e.slice(0,4)));break;default:throw new Error("Unsupported cell type ".concat(e.slice(0,4)))}return f}function Snt(e,t,r){var n=kF(e),o=n.getUint32(8,!0),i=12,a=-1,s=-1,c=NaN,l=NaN,u=new Date(2001,0,1);o&1&&(c=ynt(e,i),i+=16),o&2&&(l=n.getFloat64(i,!0),i+=8),o&4&&(u.setTime(u.getTime()+n.getFloat64(i,!0)*1e3),i+=8),o&8&&(s=n.getUint32(i,!0),i+=4),o&16&&(a=n.getUint32(i,!0),i+=4);var f;switch(e[1]){case 0:break;case 2:f={t:"n",v:c};break;case 3:f={t:"s",v:t[s]};break;case 5:f={t:"d",v:u};break;case 6:f={t:"b",v:l>0};break;case 7:f={t:"n",v:l/86400};break;case 8:f={t:"e",v:0};break;case 9:if(a>-1)f={t:"s",v:r[a]};else throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(o&31," : ").concat(e.slice(0,4)));break;case 10:f={t:"n",v:c};break;default:throw new Error("Unsupported cell type ".concat(e[1]," : ").concat(o&31," : ").concat(e.slice(0,4)))}return f}function _nt(e,t,r){switch(e[0]){case 0:case 1:case 2:case 3:return Cnt(e,t,r,e[0]);case 5:return Snt(e,t,r);default:throw new Error("Unsupported payload version ".concat(e[0]))}}function jh(e){var t=Ga(e);return Ex(t[1][0].data)}function aV(e,t){var r=Ga(t.data),n=Vi(r[1][0].data),o=r[3],i=[];return(o||[]).forEach(function(a){var s=Ga(a.data),c=Vi(s[1][0].data)>>>0;switch(n){case 1:i[c]=T5(s[3][0].data);break;case 8:{var l=e[jh(s[9][0].data)][0],u=Ga(l.data),f=e[jh(u[1][0].data)][0],d=Vi(f.meta[1][0].data);if(d!=2001)throw new Error("2000 unexpected reference to ".concat(d));var h=Ga(f.data);i[c]=h[3].map(function(p){return T5(p.data)}).join("")}break}}),i}function knt(e,t){var r,n,o,i,a,s,c,l,u,f,d,h,p,g,m=Ga(e),v=Vi(m[1][0].data)>>>0,y=Vi(m[2][0].data)>>>0,b=((n=(r=m[8])==null?void 0:r[0])==null?void 0:n.data)&&Vi(m[8][0].data)>0||!1,w,E;if((i=(o=m[7])==null?void 0:o[0])!=null&&i.data&&t!=0)w=(s=(a=m[7])==null?void 0:a[0])==null?void 0:s.data,E=(l=(c=m[6])==null?void 0:c[0])==null?void 0:l.data;else if((f=(u=m[4])==null?void 0:u[0])!=null&&f.data&&t!=1)w=(h=(d=m[4])==null?void 0:d[0])==null?void 0:h.data,E=(g=(p=m[3])==null?void 0:p[0])==null?void 0:g.data;else throw"NUMBERS Tile missing ".concat(t," cell storage");for(var I=b?4:1,O=kF(w),D=[],N=0;N<w.length/2;++N){var U=O.getUint16(N*2,!0);U<65535&&D.push([N,U])}if(D.length!=y)throw"Expected ".concat(y," cells, found ").concat(D.length);var B=[];for(N=0;N<D.length-1;++N)B[D[N][0]]=E.subarray(D[N][1]*I,D[N+1][1]*I);return D.length>=1&&(B[D[D.length-1][0]]=E.subarray(D[D.length-1][1]*I)),{R:v,cells:B}}function Ent(e,t){var r,n=Ga(t.data),o=(r=n==null?void 0:n[7])!=null&&r[0]?Vi(n[7][0].data)>>>0>0?1:0:-1,i=EF(n[5],function(a){return knt(a,o)});return{nrows:Vi(n[4][0].data)>>>0,data:i.reduce(function(a,s){return a[s.R]||(a[s.R]=[]),s.cells.forEach(function(c,l){if(a[s.R][l])throw new Error("Duplicate cell r=".concat(s.R," c=").concat(l));a[s.R][l]=c}),a},[])}}function Tnt(e,t,r){var n,o=Ga(t.data),i={s:{r:0,c:0},e:{r:0,c:0}};if(i.e.r=(Vi(o[6][0].data)>>>0)-1,i.e.r<0)throw new Error("Invalid row varint ".concat(o[6][0].data));if(i.e.c=(Vi(o[7][0].data)>>>0)-1,i.e.c<0)throw new Error("Invalid col varint ".concat(o[7][0].data));r["!ref"]=Tn(i);var a=Ga(o[4][0].data),s=aV(e,e[jh(a[4][0].data)][0]),c=(n=a[17])!=null&&n[0]?aV(e,e[jh(a[17][0].data)][0]):[],l=Ga(a[3][0].data),u=0;l[1].forEach(function(f){var d=Ga(f.data),h=e[jh(d[2][0].data)][0],p=Vi(h.meta[1][0].data);if(p!=6002)throw new Error("6001 unexpected reference to ".concat(p));var g=Ent(e,h);g.data.forEach(function(m,v){m.forEach(function(y,b){var w=Yr({r:u+v,c:b}),E=_nt(y,s,c);E&&(r[w]=E)})}),u+=g.nrows})}function Int(e,t){var r=Ga(t.data),n={"!ref":"A1"},o=e[jh(r[2][0].data)],i=Vi(o[0].meta[1][0].data);if(i!=6001)throw new Error("6000 unexpected reference to ".concat(i));return Tnt(e,o[0],n),n}function Ant(e,t){var r,n=Ga(t.data),o={name:(r=n[1])!=null&&r[0]?T5(n[1][0].data):"",sheets:[]},i=EF(n[2],jh);return i.forEach(function(a){e[a].forEach(function(s){var c=Vi(s.meta[1][0].data);c==6e3&&o.sheets.push(Int(e,s))})}),o}function Pnt(e,t){var r=AF(),n=Ga(t.data),o=EF(n[1],jh);if(o.forEach(function(i){e[i].forEach(function(a){var s=Vi(a.meta[1][0].data);if(s==2){var c=Ant(e,a);c.sheets.forEach(function(l,u){PF(r,l,u==0?c.name:c.name+"_"+u,!0)})}})}),r.SheetNames.length==0)throw new Error("Empty NUMBERS file");return r}function SP(e){var t,r,n,o,i={},a=[];if(e.FullPaths.forEach(function(c){if(c.match(/\.iwpv2/))throw new Error("Unsupported password protection")}),e.FileIndex.forEach(function(c){if(c.name.match(/\.iwa$/)){var l;try{l=xnt(c.content)}catch(f){return console.log("?? "+c.content.length+" "+(f.message||f))}var u;try{u=bnt(l)}catch(f){return console.log("## "+(f.message||f))}u.forEach(function(f){i[f.id]=f.messages,a.push(f.id)})}}),!a.length)throw new Error("File has no messages");var s=((o=(n=(r=(t=i==null?void 0:i[1])==null?void 0:t[0])==null?void 0:r.meta)==null?void 0:n[1])==null?void 0:o[0].data)&&Vi(i[1][0].meta[1][0].data)==1&&i[1][0];if(s||a.forEach(function(c){i[c].forEach(function(l){var u=Vi(l.meta[1][0].data)>>>0;if(u==1)if(!s)s=l;else throw new Error("Document has multiple roots")})}),!s)throw new Error("Cannot find Document root");return Pnt(i,s)}function Mnt(e){return function(r){for(var n=0;n!=e.length;++n){var o=e[n];r[o[0]]===void 0&&(r[o[0]]=o[1]),o[2]==="n"&&(r[o[0]]=Number(r[o[0]]))}}}function TF(e){Mnt([["cellNF",!1],["cellHTML",!0],["cellFormula",!0],["cellStyles",!1],["cellText",!0],["cellDates",!1],["sheetStubs",!1],["sheetRows",0,"n"],["bookDeps",!1],["bookSheets",!1],["bookProps",!1],["bookFiles",!1],["bookVBA",!1],["password",""],["WTF",!1]])(e)}function Rnt(e){return Xg.WS.indexOf(e)>-1?"sheet":e==Xg.CS?"chart":e==Xg.DS?"dialog":e==Xg.MS?"macro":e&&e.length?e:"sheet"}function Ont(e,t){if(!e)return 0;try{e=t.map(function(n){return n.id||(n.id=n.strRelID),[n.name,e["!id"][n.id].Target,Rnt(e["!id"][n.id].Type)]})}catch{return null}return!e||e.length===0?null:e}function Dnt(e,t,r,n,o,i,a,s,c,l,u,f){try{i[n]=pw(pl(e,r,!0),t);var d=ki(e,t),h;switch(s){case"sheet":h=Urt(d,t,o,c,i[n],l,u,f);break;case"chart":if(h=Hrt(d,t,o,c,i[n],l,u,f),!h||!h["!drawel"])break;var p=Fb(h["!drawel"].Target,t),g=C5(p),m=LJe(pl(e,p,!0),pw(pl(e,g,!0),p)),v=Fb(m,p),y=C5(v);h=Srt(pl(e,v,!0),v,c,pw(pl(e,y,!0),v),l,h);break;case"macro":h=zrt(d,t,o,c,i[n],l,u,f);break;case"dialog":h=jrt(d,t,o,c,i[n],l,u,f);break;default:throw new Error("Unrecognized sheet type "+s)}a[n]=h;var b=[];i&&i[n]&&id(i[n]).forEach(function(w){var E="";if(i[n][w].Type==Xg.CMNT){E=Fb(i[n][w].Target,t);var I=qrt(ki(e,E,!0),E,c);if(!I||!I.length)return;Wj(h,I,!1)}i[n][w].Type==Xg.TCMNT&&(E=Fb(i[n][w].Target,t),b=b.concat(BJe(ki(e,E,!0),c)))}),b&&b.length&&Wj(h,b,!0,c.people||[])}catch(w){if(c.WTF)throw w}}function Bl(e){return e.charAt(0)=="/"?e.slice(1):e}function Fnt(e,t){if(_re(),t=t||{},TF(t),zl(e,"META-INF/manifest.xml")||zl(e,"objectdata.xml"))return nV(e,t);if(zl(e,"Index/Document.iwa")){if(typeof Uint8Array>"u")throw new Error("NUMBERS file parsing requires Uint8Array support");if(typeof SP<"u"){if(e.FileIndex)return SP(e);var r=En.utils.cfb_new();return yj(e).forEach(function(P){DYe(r,P,Pre(e,P))}),SP(r)}throw new Error("Unsupported NUMBERS file")}if(!zl(e,"[Content_Types].xml"))throw zl(e,"index.xml.gz")?new Error("Unsupported NUMBERS 08 file"):zl(e,"index.xml")?new Error("Unsupported NUMBERS 09 file"):new Error("Unsupported ZIP file");var n=yj(e),o=AXe(pl(e,"[Content_Types].xml")),i=!1,a,s;if(o.workbooks.length===0&&(s="xl/workbook.xml",ki(e,s,!0)&&o.workbooks.push(s)),o.workbooks.length===0){if(s="xl/workbook.bin",!ki(e,s,!0))throw new Error("Could not find workbook");o.workbooks.push(s),i=!0}o.workbooks[0].slice(-3)=="bin"&&(i=!0);var c={},l={};if(!t.bookSheets&&!t.bookProps){if(vw=[],o.sst)try{vw=Grt(ki(e,Bl(o.sst)),o.sst,t)}catch(P){if(t.WTF)throw P}t.cellStyles&&o.themes.length&&(c=Wrt(pl(e,o.themes[0].replace(/^\//,""),!0)||"",o.themes[0],t)),o.style&&(l=Vrt(ki(e,Bl(o.style)),o.style,c,t))}o.links.map(function(P){try{var _=pw(pl(e,C5(Bl(P))),P);return Yrt(ki(e,Bl(P)),_,P,t)}catch{}});var u=Brt(ki(e,Bl(o.workbooks[0])),o.workbooks[0],t),f={},d="";o.coreprops.length&&(d=ki(e,Bl(o.coreprops[0]),!0),d&&(f=ene(d)),o.extprops.length!==0&&(d=ki(e,Bl(o.extprops[0]),!0),d&&DXe(d,f,t)));var h={};(!t.bookSheets||t.bookProps)&&o.custprops.length!==0&&(d=pl(e,Bl(o.custprops[0]),!0),d&&(h=NXe(d,t)));var p={};if((t.bookSheets||t.bookProps)&&(u.Sheets?a=u.Sheets.map(function(_){return _.name}):f.Worksheets&&f.SheetNames.length>0&&(a=f.SheetNames),t.bookProps&&(p.Props=f,p.Custprops=h),t.bookSheets&&typeof a<"u"&&(p.SheetNames=a),t.bookSheets?p.SheetNames:t.bookProps))return p;a={};var g={};t.bookDeps&&o.calcchain&&(g=Krt(ki(e,Bl(o.calcchain)),o.calcchain));var m=0,v={},y,b;{var w=u.Sheets;f.Worksheets=w.length,f.SheetNames=[];for(var E=0;E!=w.length;++E)f.SheetNames[E]=w[E].name}var I=i?"bin":"xml",O=o.workbooks[0].lastIndexOf("/"),D=(o.workbooks[0].slice(0,O+1)+"_rels/"+o.workbooks[0].slice(O+1)+".rels").replace(/^\//,"");zl(e,D)||(D="xl/_rels/workbook."+I+".rels");var N=pw(pl(e,D,!0),D.replace(/_rels.*/,"s5s"));(o.metadata||[]).length>=1&&(t.xlmeta=Xrt(ki(e,Bl(o.metadata[0])),o.metadata[0],t)),(o.people||[]).length>=1&&(t.people=UJe(ki(e,Bl(o.people[0])),t)),N&&(N=Ont(N,u.Sheets));var U=ki(e,"xl/worksheets/sheet.xml",!0)?1:0;e:for(m=0;m!=f.Worksheets;++m){var B="sheet";if(N&&N[m]?(y="xl/"+N[m][1].replace(/[\/]?xl\//,""),zl(e,y)||(y=N[m][1]),zl(e,y)||(y=D.replace(/_rels\/.*$/,"")+N[m][1]),B=N[m][2]):(y="xl/worksheets/sheet"+(m+1-U)+"."+I,y=y.replace(/sheet0\./,"sheet.")),b=y.replace(/^(.*)(\/)([^\/]*)$/,"$1/_rels/$3.rels"),t&&t.sheets!=null)switch(typeof t.sheets){case"number":if(m!=t.sheets)continue e;break;case"string":if(f.SheetNames[m].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var F=!1,T=0;T!=t.sheets.length;++T)typeof t.sheets[T]=="number"&&t.sheets[T]==m&&(F=1),typeof t.sheets[T]=="string"&&t.sheets[T].toLowerCase()==f.SheetNames[m].toLowerCase()&&(F=1);if(!F)continue e}}Dnt(e,y,b,f.SheetNames[m],m,v,a,B,t,u,c,l)}return p={Directory:o,Workbook:u,Props:f,Custprops:h,Deps:g,Sheets:a,SheetNames:f.SheetNames,Strings:vw,Styles:l,Themes:c,SSF:Ta(nn)},t&&t.bookFiles&&(e.files?(p.keys=n,p.files=e.files):(p.keys=[],p.files={},e.FullPaths.forEach(function(P,_){P=P.replace(/^Root Entry[\/]/,""),p.keys.push(P),p.files[P]=e.FileIndex[_]}))),t&&t.bookVBA&&(o.vba.length>0?p.vbaraw=ki(e,Bl(o.vba[0]),!0):o.defaults&&o.defaults.bin===VJe&&(p.vbaraw=ki(e,"xl/vbaProject.bin",!0))),p}function Nnt(e,t){var r=t||{},n="Workbook",o=En.find(e,n);try{if(n="/!DataSpaces/Version",o=En.find(e,n),!o||!o.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(EZe(o.content),n="/!DataSpaces/DataSpaceMap",o=En.find(e,n),!o||!o.content)throw new Error("ECMA-376 Encrypted file missing "+n);var i=IZe(o.content);if(i.length!==1||i[0].comps.length!==1||i[0].comps[0].t!==0||i[0].name!=="StrongEncryptionDataSpace"||i[0].comps[0].v!=="EncryptedPackage")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace",o=En.find(e,n),!o||!o.content)throw new Error("ECMA-376 Encrypted file missing "+n);var a=AZe(o.content);if(a.length!=1||a[0]!="StrongEncryptionTransform")throw new Error("ECMA-376 Encrypted file bad "+n);if(n="/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary",o=En.find(e,n),!o||!o.content)throw new Error("ECMA-376 Encrypted file missing "+n);MZe(o.content)}catch{}if(n="/EncryptionInfo",o=En.find(e,n),!o||!o.content)throw new Error("ECMA-376 Encrypted file missing "+n);var s=RZe(o.content);if(n="/EncryptedPackage",o=En.find(e,n),!o||!o.content)throw new Error("ECMA-376 Encrypted file missing "+n);if(s[0]==4&&typeof decrypt_agile<"u")return decrypt_agile(s[1],o.content,r.password||"",r);if(s[0]==2&&typeof decrypt_std76<"u")return decrypt_std76(s[1],o.content,r.password||"",r);throw new Error("File is password-protected")}function IF(e,t){var r="";switch((t||{}).type||"base64"){case"buffer":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":r=Cl(e.slice(0,12));break;case"binary":r=e;break;case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw new Error("Unrecognized type "+(t&&t.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function Lnt(e,t){return En.find(e,"EncryptedPackage")?Nnt(e,t):$ne(e,t)}function $nt(e,t){var r,n=e,o=t||{};return o.type||(o.type=Sn&&Buffer.isBuffer(e)?"buffer":"base64"),r=Mre(n,o),Fnt(r,o)}function zne(e,t){var r=0;e:for(;r<e.length;)switch(e.charCodeAt(r)){case 10:case 13:case 32:++r;break;case 60:return k5(e.slice(r),t);default:break e}return Sx.to_workbook(e,t)}function Bnt(e,t){var r="",n=IF(e,t);switch(t.type){case"base64":r=Cl(e);break;case"binary":r=e;break;case"buffer":r=e.toString("binary");break;case"array":r=Xm(e);break;default:throw new Error("Unrecognized type "+t.type)}return n[0]==239&&n[1]==187&&n[2]==191&&(r=So(r)),t.type="binary",zne(r,t)}function Unt(e,t){var r=e;return t.type=="base64"&&(r=Cl(r)),r=ah.utils.decode(1200,r.slice(2),"str"),t.type="binary",zne(r,t)}function Hnt(e){return e.match(/[^\x00-\x7F]/)?Nb(e):e}function _P(e,t,r,n){return n?(r.type="string",Sx.to_workbook(e,r)):Sx.to_workbook(t,r)}function A5(e,t){fre();var r=t||{};if(typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer)return A5(new Uint8Array(e),(r=Ta(r),r.type="array",r));typeof Uint8Array<"u"&&e instanceof Uint8Array&&!r.type&&(r.type=typeof Deno<"u"?"buffer":"array");var n=e,o=[0,0,0,0],i=!1;if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),yv={},r.dateNF&&(yv.dateNF=r.dateNF),r.type||(r.type=Sn&&Buffer.isBuffer(e)?"buffer":"base64"),r.type=="file"&&(r.type=Sn?"buffer":"binary",n=TYe(e),typeof Uint8Array<"u"&&!Sn&&(r.type="array")),r.type=="string"&&(i=!0,r.type="binary",r.codepage=65001,n=Hnt(e)),r.type=="array"&&typeof Uint8Array<"u"&&e instanceof Uint8Array&&typeof ArrayBuffer<"u"){var a=new ArrayBuffer(3),s=new Uint8Array(a);if(s.foo="bar",!s.foo)return r=Ta(r),r.type="array",A5(aF(n),r)}switch((o=IF(n,r))[0]){case 208:if(o[1]===207&&o[2]===17&&o[3]===224&&o[4]===161&&o[5]===177&&o[6]===26&&o[7]===225)return Lnt(En.read(n,r),r);break;case 9:if(o[1]<=8)return $ne(n,r);break;case 60:return k5(n,r);case 73:if(o[1]===73&&o[2]===42&&o[3]===0)throw new Error("TIFF Image File is not a spreadsheet");if(o[1]===68)return hZe(n,r);break;case 84:if(o[1]===65&&o[2]===66&&o[3]===76)return dZe.to_workbook(n,r);break;case 80:return o[1]===75&&o[2]<9&&o[3]<9?$nt(n,r):_P(e,n,r,i);case 239:return o[3]===60?k5(n,r):_P(e,n,r,i);case 255:if(o[1]===254)return Unt(n,r);if(o[1]===0&&o[2]===2&&o[3]===0)return gw.to_workbook(n,r);break;case 0:if(o[1]===0&&(o[2]>=2&&o[3]===0||o[2]===0&&(o[3]===8||o[3]===9)))return gw.to_workbook(n,r);break;case 3:case 131:case 139:case 140:return Vj.to_workbook(n,r);case 123:if(o[1]===92&&o[2]===114&&o[3]===116)return VZe.to_workbook(n,r);break;case 10:case 13:case 32:return Bnt(n,r);case 137:if(o[1]===80&&o[2]===78&&o[3]===71)throw new Error("PNG Image File is not a spreadsheet");break}return cZe.indexOf(o[0])>-1&&o[2]<=12&&o[3]<=31?Vj.to_workbook(n,r):_P(e,n,r,i)}function znt(e,t,r,n,o,i,a,s){var c=Ia(r),l=s.defval,u=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),f=!0,d=o===1?[]:{};if(o!==1)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:r,enumerable:!1})}catch{d.__rowNum__=r}else d.__rowNum__=r;if(!a||e[r])for(var h=t.s.c;h<=t.e.c;++h){var p=a?e[r][h]:e[n[h]+c];if(p===void 0||p.t===void 0){if(l===void 0)continue;i[h]!=null&&(d[i[h]]=l);continue}var g=p.v;switch(p.t){case"z":if(g==null)break;continue;case"e":g=g==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+p.t)}if(i[h]!=null){if(g==null)if(p.t=="e"&&g===null)d[i[h]]=null;else if(l!==void 0)d[i[h]]=l;else if(u&&g===null)d[i[h]]=null;else continue;else d[i[h]]=u&&(p.t!=="n"||p.t==="n"&&s.rawNumbers!==!1)?g:ff(p,g,s);g!=null&&(f=!1)}}return{row:d,isempty:f}}function P5(e,t){if(e==null||e["!ref"]==null)return[];var r={t:"n",v:0},n=0,o=1,i=[],a=0,s="",c={s:{r:0,c:0},e:{r:0,c:0}},l=t||{},u=l.range!=null?l.range:e["!ref"];switch(l.header===1?n=1:l.header==="A"?n=2:Array.isArray(l.header)?n=3:l.header==null&&(n=0),typeof u){case"string":c=oi(u);break;case"number":c=oi(e["!ref"]),c.s.r=u;break;default:c=u}n>0&&(o=0);var f=Ia(c.s.r),d=[],h=[],p=0,g=0,m=Array.isArray(e),v=c.s.r,y=0,b={};m&&!e[v]&&(e[v]=[]);var w=l.skipHidden&&e["!cols"]||[],E=l.skipHidden&&e["!rows"]||[];for(y=c.s.c;y<=c.e.c;++y)if(!(w[y]||{}).hidden)switch(d[y]=ji(y),r=m?e[v][y]:e[d[y]+f],n){case 1:i[y]=y-c.s.c;break;case 2:i[y]=d[y];break;case 3:i[y]=l.header[y-c.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),s=a=ff(r,null,l),g=b[a]||0,!g)b[a]=1;else{do s=a+"_"+g++;while(b[s]);b[a]=g,b[s]=1}i[y]=s}for(v=c.s.r+o;v<=c.e.r;++v)if(!(E[v]||{}).hidden){var I=znt(e,c,v,d,n,i,m,l);(I.isempty===!1||(n===1?l.blankrows!==!1:l.blankrows))&&(h[p++]=I.row)}return h.length=p,h}var sV=/"/g;function jnt(e,t,r,n,o,i,a,s){for(var c=!0,l=[],u="",f=Ia(r),d=t.s.c;d<=t.e.c;++d)if(n[d]){var h=s.dense?(e[r]||[])[d]:e[n[d]+f];if(h==null)u="";else if(h.v!=null){c=!1,u=""+(s.rawNumbers&&h.t=="n"?h.v:ff(h,null,s));for(var p=0,g=0;p!==u.length;++p)if((g=u.charCodeAt(p))===o||g===i||g===34||s.forceQuotes){u='"'+u.replace(sV,'""')+'"';break}u=="ID"&&(u='"ID"')}else h.f!=null&&!h.F?(c=!1,u="="+h.f,u.indexOf(",")>=0&&(u='"'+u.replace(sV,'""')+'"')):u="";l.push(u)}return s.blankrows===!1&&c?null:l.join(a)}function jne(e,t){var r=[],n=t??{};if(e==null||e["!ref"]==null)return"";var o=oi(e["!ref"]),i=n.FS!==void 0?n.FS:",",a=i.charCodeAt(0),s=n.RS!==void 0?n.RS:`
`,c=s.charCodeAt(0),l=new RegExp((i=="|"?"\\|":i)+"+$"),u="",f=[];n.dense=Array.isArray(e);for(var d=n.skipHidden&&e["!cols"]||[],h=n.skipHidden&&e["!rows"]||[],p=o.s.c;p<=o.e.c;++p)(d[p]||{}).hidden||(f[p]=ji(p));for(var g=0,m=o.s.r;m<=o.e.r;++m)(h[m]||{}).hidden||(u=jnt(e,o,m,f,a,c,i,n),u!=null&&(n.strip&&(u=u.replace(l,"")),(u||n.blankrows!==!1)&&r.push((g++?s:"")+u)));return delete n.dense,r.join("")}function Vnt(e,t){t||(t={}),t.FS="	",t.RS=`
`;var r=jne(e,t);return r}function Wnt(e){var t="",r,n="";if(e==null||e["!ref"]==null)return[];var o=oi(e["!ref"]),i="",a=[],s,c=[],l=Array.isArray(e);for(s=o.s.c;s<=o.e.c;++s)a[s]=ji(s);for(var u=o.s.r;u<=o.e.r;++u)for(i=Ia(u),s=o.s.c;s<=o.e.c;++s)if(t=a[s]+i,r=l?(e[u]||[])[s]:e[t],n="",r!==void 0){if(r.F!=null){if(t=r.F,!r.f)continue;n=r.f,t.indexOf(":")==-1&&(t=t+":"+t)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}c[c.length]=t+"="+n}return c}function Vne(e,t,r){var n=r||{},o=+!n.skipHeader,i=e||{},a=0,s=0;if(i&&n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var c=typeof n.origin=="string"?ms(n.origin):n.origin;a=c.r,s=c.c}var l,u={s:{c:0,r:0},e:{c:s,r:a+t.length-1+o}};if(i["!ref"]){var f=oi(i["!ref"]);u.e.c=Math.max(u.e.c,f.e.c),u.e.r=Math.max(u.e.r,f.e.r),a==-1&&(a=f.e.r+1,u.e.r=a+t.length-1+o)}else a==-1&&(a=0,u.e.r=t.length-1+o);var d=n.header||[],h=0;t.forEach(function(g,m){id(g).forEach(function(v){(h=d.indexOf(v))==-1&&(d[h=d.length]=v);var y=g[v],b="z",w="",E=Yr({c:s+h,r:a+m+o});l=Tx(i,E),y&&typeof y=="object"&&!(y instanceof Date)?i[E]=y:(typeof y=="number"?b="n":typeof y=="boolean"?b="b":typeof y=="string"?b="s":y instanceof Date?(b="d",n.cellDates||(b="n",y=Ss(y)),w=n.dateNF||nn[14]):y===null&&n.nullError&&(b="e",y=0),l?(l.t=b,l.v=y,delete l.w,delete l.R,w&&(l.z=w)):i[E]=l={t:b,v:y},w&&(l.z=w))})}),u.e.c=Math.max(u.e.c,s+d.length-1);var p=Ia(a);if(o)for(h=0;h<d.length;++h)i[ji(h+s)+p]={t:"s",v:d[h]};return i["!ref"]=Tn(u),i}function Gnt(e,t){return Vne(null,e,t)}function Tx(e,t,r){if(typeof t=="string"){if(Array.isArray(e)){var n=ms(t);return e[n.r]||(e[n.r]=[]),e[n.r][n.c]||(e[n.r][n.c]={t:"z"})}return e[t]||(e[t]={t:"z"})}return typeof t!="number"?Tx(e,Yr(t)):Tx(e,Yr({r:t,c:r||0}))}function qnt(e,t){if(typeof t=="number"){if(t>=0&&e.SheetNames.length>t)return t;throw new Error("Cannot find sheet # "+t)}else if(typeof t=="string"){var r=e.SheetNames.indexOf(t);if(r>-1)return r;throw new Error("Cannot find sheet name |"+t+"|")}else throw new Error("Cannot find sheet |"+t+"|")}function AF(){return{SheetNames:[],Sheets:{}}}function PF(e,t,r,n){var o=1;if(!r)for(;o<=65535&&e.SheetNames.indexOf(r="Sheet"+o)!=-1;++o,r=void 0);if(!r||e.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);o=i&&+i[2]||0;var a=i&&i[1]||r;for(++o;o<=65535&&e.SheetNames.indexOf(r=a+o)!=-1;++o);}if(Mrt(r),e.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return e.SheetNames.push(r),e.Sheets[r]=t,r}function Knt(e,t,r){e.Workbook||(e.Workbook={}),e.Workbook.Sheets||(e.Workbook.Sheets=[]);var n=qnt(e,t);switch(e.Workbook.Sheets[n]||(e.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}e.Workbook.Sheets[n].Hidden=r}function Ynt(e,t){return e.z=t,e}function Wne(e,t,r){return t?(e.l={Target:t},r&&(e.l.Tooltip=r)):delete e.l,e}function Xnt(e,t,r){return Wne(e,"#"+t,r)}function Qnt(e,t,r){e.c||(e.c=[]),e.c.push({t,a:r||"SheetJS"})}function Znt(e,t,r,n){for(var o=typeof t!="string"?t:oi(t),i=typeof t=="string"?t:Tn(t),a=o.s.r;a<=o.e.r;++a)for(var s=o.s.c;s<=o.e.c;++s){var c=Tx(e,a,s);c.t="n",c.F=i,delete c.v,a==o.s.r&&s==o.s.c&&(c.f=r,n&&(c.D=!0))}return e}var Jnt={encode_col:ji,encode_row:Ia,encode_cell:Yr,encode_range:Tn,decode_col:mF,decode_row:pF,split_cell:lXe,decode_cell:ms,decode_range:ay,format_cell:ff,sheet_add_aoa:Yre,sheet_add_json:Vne,sheet_add_dom:Bne,aoa_to_sheet:sy,json_to_sheet:Gnt,table_to_sheet:Une,table_to_book:mnt,sheet_to_csv:jne,sheet_to_txt:Vnt,sheet_to_json:P5,sheet_to_html:pnt,sheet_to_formulae:Wnt,sheet_to_row_object_array:P5,sheet_get_cell:Tx,book_new:AF,book_append_sheet:PF,book_set_sheet_visibility:Knt,cell_set_number_format:Ynt,cell_set_hyperlink:Wne,cell_set_internal_link:Xnt,cell_add_comment:Qnt,sheet_set_array_formula:Znt,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}},MF={},eot=Wr;Object.defineProperty(MF,"__esModule",{value:!0});var Gne=MF.default=void 0,tot=eot(tn()),rot=rn,not=(0,tot.default)((0,rot.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"FileDownload");Gne=MF.default=not;var RF={},oot=Wr;Object.defineProperty(RF,"__esModule",{value:!0});var qne=RF.default=void 0,iot=oot(tn()),aot=rn,sot=(0,iot.default)((0,aot.jsx)("path",{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"}),"FileUpload");qne=RF.default=sot;const kP=[["bill_date","line_item_start_date","line_item_end_date","line_item_type","line_item_unit","line_item_usage","line_item_cost","meter_name","account_number"]];function mg(e,t,r){for(let o=2;o<=250;o++){const i=e.getCell(`${t}${o}`);i&&(i.dataValidation=r(`${t}${o}`))}}const lot=({onDataLoad:e})=>{const[t,r]=A.useState([]),[n,o]=A.useState([]),[i,a]=A.useState(""),[s,c]=A.useState([]),[l,u]=A.useState([]),[f,d]=A.useState([]),[h,p]=A.useState(!1),[g,m]=A.useState(!1),[v,y]=A.useState(!1),b=Object.values(ka),w=Object.values(Fr),I=`bill_import_template-${new Date().toISOString().split("T")[0]}.xlsx`;A.useEffect(()=>{T()},[]),A.useEffect(()=>{if(i&&s.length>0){const _=B();if(m(!_),_){const C=F();y(!C)}}},[s]);const O=()=>()=>{a(""),e([]),m(!1),y(!1)},D=()=>()=>{y(!1),U()},N=()=>()=>{m(!1),y(!1),e(l)};function U(){c([]),a(""),u([]),d([])}function B(){return s.length<=0?!1:s.slice(0,1).toString()===kP[0].toString()}function F(){const _=s.slice(1),C=[],S=[];return _.forEach(([x,k,L,j,z,Y,K,Q,q],J)=>{x&&k&&L&&j&&z&&Q&&q&&(Y!=null&&Y.toString())&&(K!=null&&K.toString())?S.push([x,k,L,j,z,Y,K,Q,q]):C.push(J+2)}),d(C),u(S),C.length===0&&S.length>0}async function T(){try{const _=[{field:"isActive",operator:_a.EQUALS,value:!0}],{data:C}=await kf({filter:_}),{data:S}=await hp({filter:_});o(C.map(({name:x})=>x)),r(S.map(({number:x})=>x)),p(!0)}catch{St.error("Some fields cannot be loaded.")}}async function P(){const _=[["meters","accounts"]],C=new YKe.Workbook,S=C.addWorksheet("Line Items"),x=C.addWorksheet("Metadata");S.addRows(kP),x.addRows(_),n.forEach((z,Y)=>{const K=x.getCell(`A${Y+2}`);K.value=z,K.protection={locked:!0}}),t.forEach((z,Y)=>{const K=x.getCell(`B${Y+2}`);K.value=z,K.protection={locked:!0}});const k={selectLockedCells:!1,selectUnlockedCells:!1,formatCells:!1,formatColumns:!1,formatRows:!1,insertRows:!1,insertColumns:!1,insertHyperlinks:!1,deleteRows:!1,deleteColumns:!1,sort:!1,autoFilter:!1};await x.protect("nimble-energy",k),kP[0].forEach((z,Y)=>S.getColumn(Y+1).width=20),["A","B","C"].forEach(z=>{mg(S,z,()=>({allowBlank:!1,type:"date",operator:"greaterThan",formulae:[new Date(1900,0,1)],showErrorMessage:!0,errorTitle:"Invalid date",error:"Enter a valid formatted date.",showInputMessage:!0,promptTitle:"Format date",prompt:"mm/dd/yyyy"}))}),["F","G"].forEach(z=>{mg(S,z,Y=>({allowBlank:!1,type:"custom",formulae:[`ISNUMBER(${Y})`],showErrorMessage:!0,errorTitle:"Invalid number value",error:"Enter a valid number value."}))}),mg(S,"D",()=>({allowBlank:!1,type:"list",formulae:[`"${b.toString()}"`],showErrorMessage:!0,errorTitle:"Invalid Type",error:"Please select a valid type from the list."})),mg(S,"E",()=>({allowBlank:!1,type:"list",formulae:[`"${w.toString()}"`],showErrorMessage:!0,errorTitle:"Invalid Unit",error:"Please select a valid unit from the list."})),mg(S,"H",()=>({allowBlank:!1,type:"list",formulae:[`Metadata!$A$2:A$${n.length+1}`],showErrorMessage:!0,errorTitle:"Invalid Meter Name",error:"Please select a valid meter name from the list."})),mg(S,"I",()=>({allowBlank:!1,type:"list",formulae:[`Metadata!$B$2:A$${t.length+1}`],showErrorMessage:!0,errorTitle:"Invalid Account Number",error:"Please select a valid account number from the list."}));const L=await C.xlsx.writeBuffer(),j=new Blob([L],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});XKe.saveAs(j,I)}return xe(nr,{children:[xe(Ot,{container:!0,spacing:2,children:[R(Ot,{item:!0,children:xe(Jt,{spacing:1,children:[R(Ft,{color:"secondary",variant:"outlined",onClick:()=>{P()},startIcon:R(Gne,{}),disabled:!h,children:"Download template"}),h&&R("label",{children:I})]})}),R(Ot,{item:!0,children:xe(Jt,{spacing:1,children:[R(Zte,{accept:".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",label:"Import template",name:"lineItems",icon:R(qne,{}),onChange:_=>{const C=new FileReader;a(_.name),C.onload=function(S){const x=S.target.result,k=A5(x,{type:"binary"}),L=k.SheetNames[0],j=k.Sheets[L],z=Jnt.sheet_to_json(j,{header:1});c(z.filter(Y=>Y.length))},C.readAsBinaryString(_)}}),R("label",{children:i})]})})]}),R(Br,{open:g,onClose:O(),message:`Error: you have imported an invalid file "${i}", try to download the template.`,primaryButtonLabel:"close",onPrimaryButtonClicked:O(),renderElement:R(qo,{sx:{color:"red"}})}),l.length===0?R(Br,{open:v,onClose:D(),message:"Warning: you have imported an empty template file.",primaryButtonLabel:"close",onPrimaryButtonClicked:O(),renderElement:R(od,{sx:{color:"yellow"}})}):R(Br,{open:v,onClose:D(),message:`Warning: you have imported a file with missing data in lines: ${f.toString()}, This will be omitted.`,primaryButtonLabel:"continue",onPrimaryButtonClicked:N(),secondaryButtonLabel:"cancel",onSecondaryButtonClicked:D(),renderElement:R(od,{sx:{color:"yellow"}})})]})},cot=({onCancel:e})=>{const[t,r]=A.useState(!1),[n,o]=A.useState(0),[i,a]=A.useState([]),s={nextBtnLabel:"Next",backBtnLabel:"Back",cancelBtnLabel:"Cancel",cancelBtnFn:()=>r(!0),steps:[{id:"001",label:"Download/Import bill template",render:R(lot,{onDataLoad:a}),showNextBtn:i.length>0,showBackBtn:!1,nextBtnFn:()=>e()}]};return xe(nr,{children:[R(nF,{active:n,setActive:o,...s}),R(Br,{open:t,onClose:e,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:e,secondaryButtonLabel:"Save",onSecondaryButtonClicked:()=>r(!1),renderElement:R(qo,{sx:{color:"red"}})})]})},lV={data:[],count:0,totalCount:0,page:0,pageSize:50},cV="bills",m_=[_a.GREATER_THAN,_a.GREATER_THAN_OR_EQUAL_TO,_a.LESS_THAN,_a.LESS_THAN_OR_EQUAL_TO],uot=()=>{const[{data:e},{data:t},{data:r},{data:n}]=qi({queries:[{queryKey:["accounts"],queryFn:async()=>await hp(),initialData:{data:[]}},{queryKey:["facilities"],queryFn:v0,initialData:{data:[]}},{queryKey:["meters"],queryFn:async()=>await kf(),initialData:{data:[]}},{queryKey:["utilities"],queryFn:async()=>await ry(),initialData:{data:[]}}]}),{featureChecker:o,getUser:i}=on(),{userType:a}=i(),{filter:s,sort:c}=vte()[cV],[l,u]=A.useState(!1),[f,d]=A.useState(!0),[h,p]=A.useState(s),[g,m]=A.useState(c),[v,y]=A.useState(!1),[b,w]=A.useState({...lV}),[E,I]=A.useState(!1),[O,D]=A.useState({open:!1,data:{}}),N=ii(),U=a===Pi.SystemAdministrator;let B;async function F(Q,q){d(!0),u(!1);try{const J=await I8({limit:q.pageSize,page:q.page,sort:g[0].field,sortDirection:g[0].sort,filter:k(Q)});w(G=>({...G,data:J.data,totalCount:J.meta.totalCount}))}catch{St.error(bt.ERROR),u(!0)}finally{d(!1)}}async function T(){try{const{id:Q}=O.data,q=b.data.filter(J=>J.id!==Q);if(q.length)w(J=>({...J,data:q,count:J.count-1,totalCount:J.totalCount-1,filterModel:h}));else{const J={...b,page:b.page===0?0:b.page-1};w(J),F(h,J)}await Ate(Q),q.length||w(J=>({...J,totalCount:J.totalCount-1})),P(),St.success(bt.DELETE_SUCCESS)}catch{St.error(bt.ERROR)}}function P(){D({open:!1,data:{}})}A.useEffect(()=>{clearTimeout(B),B=setTimeout(()=>{F(h,b)},500)},[]);const _=Q=>()=>N(`/administration/bills/${Q}`),C=()=>y(!0),S=()=>y(!1);function x(Q){let q=!1,J;const{items:G=[]}=Q;if(!G.filter(X=>X.value===void 0||X.value===null||X.value.length===0).length){q=!0;for(const X of G)if(!["==","in","array-contains-any"].includes(X.operator)&&(J||(J=X),J.field!==X.field)){St.error("Filter error: Interval and inequality operators should be applied in same column."),q=!1;break}}return q}function k(Q){let q;if(Q){const{items:J=[]}=Q,G={utility:"utilityId",account:"accountId"},V=J.filter(X=>X.value!==void 0&&X.value!==null).map(({field:X,value:te,...ee})=>{let re;return X==="amount"?re=parseFloat(te):re=te,{...ee,field:G[X]??X,value:re}});V&&V.length&&(q=V)}return q}const L={id:!1,image:!1},j=s8().filter(({value:Q})=>["equals","isAnyOf"].includes(Q)),z=[{...j.find(({value:Q})=>Q==="equals"),...u4[0]},{...j.find(({value:Q})=>Q==="isAnyOf"),...Tte[0],InputComponent:IGe}],Y=[{field:"id",headerName:"ID",filterOperators:z},{field:"startDate",headerName:"Bill Start Date",width:150,filterOperators:uw(),valueFormatter:({value:Q})=>Vo(Q,"PPP"),sortingOrder:["asc","desc"],type:"date",valueGetter:({row:Q})=>Q.startDate?Hr(Q.startDate):""},{field:"endDate",headerName:"Bill End Date",width:150,filterOperators:uw(),valueFormatter:({value:Q})=>Vo(Q,"PPP"),sortingOrder:["asc","desc"],type:"date",valueGetter:({row:Q})=>Q.endDate?Hr(Q.endDate):""},{field:"amount",headerName:"Bill Amount",width:112,filterOperators:Ite(),renderCell:({value:Q})=>vo(Q),sortingOrder:["asc","desc"]},{field:"budgetPeriod",headerName:"Budget Period",width:128,filterOperators:uw(),valueFormatter:({value:Q})=>Vo(Q,"MMMM yyyy"),sortingOrder:["asc","desc"],type:"date",valueGetter:({row:Q})=>Q.budgetPeriod?Hr(Q.budgetPeriod):""},{field:"utilityId",headerName:"Utility",minWidth:160,flex:1,sortingOrder:["asc","desc"],filterOperators:o_({singleOperators:ub({service:{data:n.data,fieldset:{label:"name",value:"id",key:"id"}}},m_),multipleOperators:n_({service:{data:n.data,fieldset:{label:"name",value:"id",key:"id"}}})}),valueGetter:({row:Q})=>{var q;return((q=Q.account)==null?void 0:q.utility.name)??""}},{field:"accountId",headerName:"Account Number",minWidth:160,flex:1,sortingOrder:["asc","desc"],filterOperators:o_({singleOperators:ub({service:{data:e.data,fieldset:{label:"number",value:"id",key:"id"}}},m_),multipleOperators:n_({service:{data:e.data,fieldset:{label:"number",value:"id",key:"id"}}})}),valueGetter:({row:Q})=>{var q;return((q=Q.account)==null?void 0:q.number)??""}},{field:"facilityId",headerName:"Facilities",filterOperators:o_({singleOperators:ub({service:{data:t.data,fieldset:{label:"name",value:"id",key:"id"}}},m_),multipleOperators:n_({service:{data:t.data,fieldset:{label:"name",value:"id",key:"id"}}})}),sortable:!1,width:160,valueGetter:({row:Q})=>{var J;const q=[...new Set((J=Q.lineItems)==null?void 0:J.map(G=>G.meter.parentFacility.name))];return(q==null?void 0:q.join(", "))??""}},{field:"meterId",headerName:"Meters",filterOperators:o_({singleOperators:ub({service:{data:r.data,fieldset:{label:"name",value:"id",key:"id"}}},m_),multipleOperators:n_({service:{data:r.data,fieldset:{label:"name",value:"id",key:"id"}}})}),sortable:!1,width:160,valueGetter:({row:Q})=>{var J;const q=[...new Set((J=Q.lineItems)==null?void 0:J.map(G=>G.meter.name))];return(q==null?void 0:q.join(", "))??""}},...U?[{field:"needsReview",headerName:"Needs Review",width:112,filterOperators:ub({service:{data:[{id:1,label:"Yes",value:!0},{id:2,label:"No",value:!1}],fieldset:{label:"label",value:"value",key:"id"}}}),renderCell:({row:Q})=>R(bo,{label:Q.needsReview?"Yes":"No",variant:"outlined",color:Q.needsReview?"error":"success"})}]:[],{field:"image",headerName:"Image",filterOperators:z},{field:"actions",headerName:"Options",type:"actions",getActions:({row:Q})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:_(Q.id)},"updateBtn"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>D({open:!0,data:Q})},"deleteBtn")]}],K=[{name:"New",icon:R(Qa,{}),handleAction:_("new"),primary:!0},{name:"Configure Line Item Subtypes",handleAction:C,icon:R(sre,{})},...o.devFeatureEnabled(xf.Experimental)?[{name:"Import Bills",handleAction:()=>I(!0),icon:R(are,{})}]:[]];return E?R(cot,{onCancel:()=>I(!1)}):xe(Jt,{direction:"column",justifyContent:"space-between",spacing:2,marginInline:2,children:[R(ts,{actions:K}),R(Yn,{columns:Y,columnVisibilityModel:L,contextName:cV,csvFilename:"Bills",dataFetchError:l,filterMode:"server",loading:f,sortingMode:"server",rows:b.data,rowCount:b.totalCount,onFilterModelChange:Q=>{if(clearTimeout(B),x(Q)){const J=JSON.stringify(Q),G=JSON.stringify(h);if(J!==G){const V={...b,page:0};w(V),p(Q),B=setTimeout(()=>{F(Q,V)},1e3)}}},paginationMode:"server",paginationModel:{page:b.page,pageSize:b.pageSize},onPaginationModelChange:(Q,{reason:q})=>{let J;if(q==="setPaginationModel"){const G=Q.pageSize!==b.pageSize?0:Q.page;Q.pageSize!==b.pageSize?J={...lV,pageSize:Q.pageSize}:J={...b,page:G,pageSize:Q.pageSize},w(J),F(h,J)}},onSortModelChange:Q=>{const q={...b,page:0};w(q),m(Q),F(h,q)},slots:{...f&&{pagination:()=>R(nr,{sx:{marginRight:"15px",fontSize:"1.2em"},children:"loading..."})}},slotProps:{filterPanel:{logicOperators:[Va.And]}}}),R(Br,{open:O.open,onClose:P,message:"Are you sure you want to remove this bill?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:T,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:P,renderElement:R(oo,{sx:{color:"error.main"}})}),R(KKe,{open:v,onClose:S})]})};var OF={},dot=Wr;Object.defineProperty(OF,"__esModule",{value:!0});var Kne=OF.default=void 0,fot=dot(tn()),hot=rn,pot=(0,fot.default)((0,hot.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}),"ContentCopyOutlined");Kne=OF.default=pot;var DF={},mot=Wr;Object.defineProperty(DF,"__esModule",{value:!0});var Yne=DF.default=void 0,got=mot(tn()),vot=rn,yot=(0,got.default)((0,vot.jsx)("path",{d:"M18 23H4c-1.1 0-2-.9-2-2V7h2v14h14v2zM14.5 7V5h-2v2h-2v2h2v2h2V9h2V7h-2zm2 6h-6v2h6v-2zM15 1H8c-1.1 0-1.99.9-1.99 2L6 17c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V7l-6-6zm4 16H8V3h6.17L19 7.83V17z"}),"DifferenceOutlined");Yne=DF.default=yot;const bot=async e=>await ty(`${mr.BUDGETS}/${e}`,{}),Xne=async()=>await Ao(mr.BUDGETS),wot=async()=>await Ao(`${mr.BUDGETS}/fiscalyears`),xot=async e=>await Ao(`${mr.BUDGETS}/budgetForActualFiscalYear`,e),Cot=async e=>await fa(mr.BUDGETS,{},e),Sot=async(e,t)=>await Ys(`${mr.BUDGETS}/${e}`,{},t),_ot={START_MONTH:"Start Month of Fiscal Year"},kot="budgets",Eot=()=>{const{getUser:e}=on(),{organization:{fiscalYearStartMonth:t}}=e(),r=new Date;r.setMonth(t);const[n,o]=A.useState(r),[i,a]=A.useState({open:!1,data:{}}),{data:s,isError:c,isPending:l,refetch:u}=da({queryKey:["budgets"],queryFn:Xne,initialData:{data:[]}}),f=ii();A.useEffect(()=>{c&&St.error(bt.ERROR)},[c]);async function d(){try{await bot(i.data.id),u(),h(),St.success(bt.DELETE_SUCCESS)}catch{St.error(bt.ERROR)}}function h(){a({open:!1,data:{}})}const p=[{field:"fiscalYear",headerName:"Budget Fiscal Year",flex:1},{field:"total",headerName:"Total Budgeted Amount",flex:1,valueFormatter:({value:y})=>vo(y)},{field:"actions",headerName:"Options",type:"actions",getActions:({row:y})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:g(y.id)},"updateBtn"),R(yr,{icon:R(Kne,{}),label:"Copy",onClick:g(y.id,"&copy=1"),showInMenu:!0},"copyBtn"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>a({open:!0,data:y}),showInMenu:!0},"deleteBtn")]}],g=(y,b="")=>()=>f(`/administration/budgets/${y}?month=${n.getMonth()}${b}`),m=y=>{o(y)},v=[{name:"New",icon:R(Qa,{}),handleAction:g("new"),primary:!0},{name:"Copy from actual costs",handleAction:g("new","&importfiscalyear=1"),icon:R(Yne,{})}];return xe(Jt,{direction:"column",justifyContent:"space-between",spacing:2,marginInline:2,children:[xe(Jt,{direction:"row",spacing:2,justifyContent:"flex-end",children:[R(nr,{padding:1,children:R(TD,{label:_ot.START_MONTH,format:"MMMM",views:["month"],value:n,onChange:m,openTo:"month",slotProps:{textField:{sx:{width:250},inputProps:{style:{height:3}}},calendarHeader:{sx:{display:"none"}}}})}),R(ts,{actions:v})]}),R(Yn,{columns:p,contextName:kot,csvFilename:"Budgets",dataFetchError:c,loading:l,rows:s.data}),R(Br,{open:i.open,onClose:h,message:"Are you sure you want to remove this budget?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:d,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:h,renderElement:R(oo,{sx:{color:"error.main"}})})]})},Tot="facilities",Iot=()=>{const e=ii(),[{data:t,isFetched:r,isError:n,refetch:o}]=qi({queries:[{queryKey:["facilities"],queryFn:v0,initialData:{data:[]}}]}),[i,a]=A.useState({open:!1,data:{}}),[s,c]=A.useState(!1);async function l(){try{const{data:g}=i,m={...g,isActive:!g.isActive};await lre(g.id,m),o(),St.success(m.isActive?bt.REACTIVATE_SUCCESS:bt.DEACTIVATE_SUCCESS)}catch{St.error(bt.ERROR)}}function u(){a({open:!1,data:{isActive:!1}})}const f=g=>()=>e(`/administration/facilities/${g}`),d=async()=>{i.data.id&&(await l(),u())},h=[{field:"name",headerName:"Facility name",minWidth:144,flex:1},{field:"type",headerName:"Facility type",width:150},{field:"facilityGroups",headerName:"Facility group",width:150,valueGetter:({value:g})=>g.map(v=>v.name).join(", ")},{field:"yearBuilt",headerName:"Year built",width:100,type:"number",valueFormatter:({value:g})=>vo(g,{useGrouping:!1})},{field:"dateClosed",headerName:"Date closed",width:150,type:"date",valueFormatter:({value:g})=>g?Vo(g,"PPP"):"",valueGetter:({row:g})=>g.dateClosed?Hr(g.dateClosed):""},{field:"squareFootage",headerName:"Square footage",type:"number",width:112,valueFormatter:({value:g})=>vo(g,{style:"decimal",maximumFractionDigits:0})},{field:"totalOccupants",headerName:"Occupants",type:"number",width:96,valueFormatter:({value:g})=>vo(g,{useGrouping:!0})},{field:"deactivated",headerName:"Deactivated",width:96,valueGetter:g=>g.row.isActive?"No":"Yes",renderCell:({row:g})=>xe(zr,{children:[R(bo,{label:g.isActive?"No":"Yes",variant:"outlined",color:g.isActive?"success":"error"}),!g.isActive&&R(tC,{infoMessage:"This item does not show up in any reports"})]})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:g,isActive:m,...v}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:f(g)},"updateBtn"),R(yr,{icon:m?R(oy,{}):R(ny,{}),label:m?"Deactivate":"Reactivate",onClick:()=>a({open:!0,data:{...v,id:g,isActive:m}})},"hiddenBtn")]}],p=[{name:"New",icon:R(Qa,{}),handleAction:f("new"),primary:!0}];return xe(Jt,{direction:"column",spacing:2,marginInline:2,justifyContent:"space-between",children:[R(ts,{actions:p}),R(Yn,{columns:h,contextName:Tot,csvFilename:"Facilities",dataFetchError:n,loading:!r,rows:s?t.data:t.data.filter(({isActive:g})=>g),customToolbarOptions:R(oC,{showDeactivatedType:s,setShowDeactivatedType:c,type:"facilities"})}),R(Br,{open:i.open,onClose:u,message:`Deactivating this item will remove all associated data from reports. Are you sure you would like to ${i.data.isActive?"deactivate":"reactivate"} this facility?`,primaryButtonLabel:i.data.isActive?"Deactivate":"Reactivate",onPrimaryButtonClicked:d,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:u,renderElement:i.data.isActive?R(q2,{sx:{color:"error.main"}}):R(G2,{sx:{color:"success.main"}})})]})},Aot=async e=>await fa(mr.FACILITY_GROUPS,{},e),Pot=async e=>await ty(`${mr.FACILITY_GROUPS}/${e}`),Qne=async()=>await Ao(mr.FACILITY_GROUPS),Mot=async(e,t)=>await Ys(`${mr.FACILITY_GROUPS}/${e}`,{},t),Rot="facility-groups",Oot=()=>{const{data:e,isFetching:t,isError:r,refetch:n}=da({queryKey:["facilityGroups"],queryFn:Qne,initialData:{data:[]}}),[o,i]=A.useState({open:!1,data:{id:""}}),a=ii(),{mutate:s,isPending:c}=xs({mutationKey:["deleteFacilityGroup"],mutationFn:async g=>await Pot(g),onMutate:()=>{e.data=e.data.filter(g=>g.id!==o.data.id)},onSuccess:async()=>{await n(),St.success(bt.DELETE_SUCCESS)},onError:()=>{St.error(bt.ERROR)}});function l(){i({open:!1,data:{id:""}})}const u=g=>()=>a(`/administration/facility-groups/${g}`),f=g=>()=>i({open:!0,data:g}),d=async()=>{o.data.id&&(await s(o.data.id),l())},h=[{field:"name",headerName:"Facility group",flex:1},{field:"facilities",headerName:"Number of facilities in group",width:256,renderCell:({value:g})=>R(bo,{label:g}),valueGetter:({value:g})=>(g==null?void 0:g.length)??0},{field:"actions",headerName:"Options",type:"actions",getActions:({row:g})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:u(g.id)},"updateBtn"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:f(g),disabled:c},"deleteBtn")]}],p=[{name:"New",icon:R(Qa,{}),handleAction:u("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",spacing:2,paddingInline:2,children:[R(ts,{actions:p}),R(Yn,{columns:h,contextName:Rot,csvFilename:"Facility Groups",dataFetchError:r,loading:t,rows:e.data}),R(Br,{open:o.open,onClose:l,message:"Are you sure you want to remove this facility group?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:d,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:l,renderElement:R(oo,{sx:{color:"error.main"}})})]})},Zne=({deactivatedFields:e=[],direction:t="row",doc:r={},handleBackAction:n,handleSaveAction:o})=>{const{control:i,clearErrors:a,formState:{errors:s},handleSubmit:c,getValues:l,setError:u,setValue:f,watch:d}=Bn({defaultValues:Zqe(r)}),[{data:h},{data:p},{data:g}]=qi({queries:[{queryKey:["meters"],queryFn:async()=>await kf(),initialData:{data:[]}},{queryKey:["accounts"],queryFn:async()=>await hp(),initialData:{data:[]}},{queryKey:["facilities"],queryFn:v0,initialData:{data:[]}}]}),[m,v]=A.useState(!1),[y,b]=A.useState(!1),[w,E]=A.useState(!1),[I,O]=A.useState(!1),[D]=d(["serviceType"]),{getUser:N}=on(),{organizationId:U}=N(),B=!(r.isActive??!0);A.useEffect(()=>{if(D){const{usageUnit:S}=l();!q8[D].includes(S)&&f("usageUnit",""),D!==Mr.Electric&&f("demandUnit","")}},[D]);const F=()=>{O(S=>!S)},T=()=>{E(S=>!S)},P=S=>{b(S),E(S)},_=Jqe(r,p.data,a,g.data,h.data,D,u,P),C=S=>{v(!0);const x={...S,chargesOnly:S.chargesOnly==="Yes",demandUnit:S.demandUnit&&S.serviceType===Mr.Electric?S.demandUnit:null,multiplier:S.multiplier?parseInt(S.multiplier):null,netMeter:S.netMeter==="Yes",organizationId:U,smartMeter:S.smartMeter==="Yes"};async function k(){try{await Jte(x),n(),St.success(bt.CREATE_SUCCESS)}catch(j){mi.compatible(j)&&gi({getValues:l,setError:u},j),St.error(bt.ERROR)}finally{v(!1)}}async function L(){try{await ere(r.id,x),n(),St.success(bt.UPDATE_SUCCESS)}catch(j){mi.compatible(j)&&gi({getValues:l,setError:u},j)}finally{v(!1)}}o?o({...x,id:r.id}):r.id?L():k()};return xe(nr,{children:[B&&R(dp,{label:"Meter deactivated",labelPlacement:"start",control:R(Tl,{disabled:!0,checked:!0}),style:{display:"flex"}}),R(_o,{title:"Meter information",direction:t,buttons:xe(zr,{children:[R(Ft,{disabled:m||y||B,color:"secondary",variant:"contained",onClick:c(S=>C(S)),disableElevation:!0,sx:{marginRight:2},children:r.id?"Update":"Save"}),R(Ft,{disabled:m,color:"secondary",variant:"outlined",onClick:F,children:"Cancel"})]}),children:R(nr,{children:R(Ot,{container:!0,spacing:2,children:_.map((S,x)=>R(Ot,{item:!0,xs:12,sm:6,display:S!=null&&S.hidden?"none":"grid",children:R(Dn,{control:i,fieldConf:S,errors:s,isViewMode:B||e.includes(S.name)})},x))})})}),R(Br,{open:I,onClose:F,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:n,secondaryButtonLabel:"Save",onSecondaryButtonClicked:F,renderElement:R(qo,{sx:{color:"red"}})}),R(Br,{open:w,onClose:T,message:"This meter name already exists. Meter names need to be unique. Enter a new meter name before saving.",primaryButtonLabel:"Accept",onPrimaryButtonClicked:T,renderElement:R(od,{sx:{color:"yellow"}})})]})},FF=[{name:"United States",abbreviation:"US"},{name:"Canada",abbreviation:"CA"}],NF=[{name:"Alabama",abbreviation:"AL"},{name:"Alaska",abbreviation:"AK"},{name:"American Samoa",abbreviation:"AS"},{name:"Arizona",abbreviation:"AZ"},{name:"Arkansas",abbreviation:"AR"},{name:"California",abbreviation:"CA"},{name:"Colorado",abbreviation:"CO"},{name:"Connecticut",abbreviation:"CT"},{name:"Delaware",abbreviation:"DE"},{name:"District Of Columbia",abbreviation:"DC"},{name:"Federated States Of Micronesia",abbreviation:"FM"},{name:"Florida",abbreviation:"FL"},{name:"Georgia",abbreviation:"GA"},{name:"Guam",abbreviation:"GU"},{name:"Hawaii",abbreviation:"HI"},{name:"Idaho",abbreviation:"ID"},{name:"Illinois",abbreviation:"IL"},{name:"Indiana",abbreviation:"IN"},{name:"Iowa",abbreviation:"IA"},{name:"Kansas",abbreviation:"KS"},{name:"Kentucky",abbreviation:"KY"},{name:"Louisiana",abbreviation:"LA"},{name:"Maine",abbreviation:"ME"},{name:"Marshall Islands",abbreviation:"MH"},{name:"Maryland",abbreviation:"MD"},{name:"Massachusetts",abbreviation:"MA"},{name:"Michigan",abbreviation:"MI"},{name:"Minnesota",abbreviation:"MN"},{name:"Mississippi",abbreviation:"MS"},{name:"Missouri",abbreviation:"MO"},{name:"Montana",abbreviation:"MT"},{name:"Nebraska",abbreviation:"NE"},{name:"Nevada",abbreviation:"NV"},{name:"New Hampshire",abbreviation:"NH"},{name:"New Jersey",abbreviation:"NJ"},{name:"New Mexico",abbreviation:"NM"},{name:"New York",abbreviation:"NY"},{name:"North Carolina",abbreviation:"NC"},{name:"North Dakota",abbreviation:"ND"},{name:"Northern Mariana Islands",abbreviation:"MP"},{name:"Ohio",abbreviation:"OH"},{name:"Oklahoma",abbreviation:"OK"},{name:"Oregon",abbreviation:"OR"},{name:"Palau",abbreviation:"PW"},{name:"Pennsylvania",abbreviation:"PA"},{name:"Puerto Rico",abbreviation:"PR"},{name:"Rhode Island",abbreviation:"RI"},{name:"South Carolina",abbreviation:"SC"},{name:"South Dakota",abbreviation:"SD"},{name:"Tennessee",abbreviation:"TN"},{name:"Texas",abbreviation:"TX"},{name:"Utah",abbreviation:"UT"},{name:"Vermont",abbreviation:"VT"},{name:"Virgin Islands",abbreviation:"VI"},{name:"Virginia",abbreviation:"VA"},{name:"Washington",abbreviation:"WA"},{name:"West Virginia",abbreviation:"WV"},{name:"Wisconsin",abbreviation:"WI"},{name:"Wyoming",abbreviation:"WY"}],Dot=(e={})=>({description:e.description??"",notes:e.notes??"",number:e.number??"",serviceStartDate:e.serviceStartDate?Hr(e.serviceStartDate):null,serviceEndDate:e.serviceEndDate?Hr(e.serviceEndDate):null,utilityId:e.utilityId??"",address1:e.address1??"",address2:e.address2??"",city:e.city??"",state:e.state??"",country:e.country??"",postalCode:e.postalCode??"",isMaster:!!e.isMaster}),Fot=(e,t,r,n,o,i=!1)=>{const a=(l,u)=>{o(u),u?n("number",{type:"custom",message:l}):t("number")},s=async l=>{try{if(!l||l===e.number)return;const{data:u}=await hp({filter:[{field:"number",value:l,operator:"=="}]});u.length?a("Account number already exists",!0):a("",!1)}catch{St.error(bt.ERROR)}};return[{placeholder:"Account Number",label:"Account Number",name:"number",type:"textInput",required:!0,onBlur(l){s(l.target.value)}},{placeholder:"Service Start Date",label:"Service Start Date",name:"serviceStartDate",type:"datePicker",required:!1},{placeholder:"Service End Date",label:"Service End Date",name:"serviceEndDate",type:"datePicker",required:!1},{placeholder:"Utility",label:"Utility",name:"utilityId",type:"selectInput",required:!0,values:r.map(l=>({label:l.name,value:l.id,disabled:!l.isActive}))},{placeholder:"Address 1",label:"Address 1",name:"address1",type:"textInput",required:!1},{placeholder:"Address 2",label:"Address 2",name:"address2",type:"textInput",required:!1},{placeholder:"City",label:"City",name:"city",type:"textInput",required:!1},{placeholder:"State",label:"State",name:"state",type:"selectInput",required:!1,values:NF.map(l=>({label:l.name,value:l.abbreviation}))},{placeholder:"Country",label:"Country",name:"country",type:"selectInput",required:!1,values:FF.map(l=>({label:`${l.name} (${l.abbreviation})`,value:l.name}))},{placeholder:"Postal Code",label:"Postal Code",name:"postalCode",type:"textInput",required:!1},{placeholder:"Account Description",label:"Account Description",multiline:!0,name:"description",type:"textInput",required:!1},...i?[{placeholder:"Is Master",label:"Is Master",name:"isMaster",type:"selectInput",required:!1,values:[{label:"Yes",value:!0},{label:"No",value:!1}]}]:[],{placeholder:"Notes",label:"Notes",multiline:!0,name:"notes",type:"textInput",required:!1}]},Not=({doc:e={},handleBackAction:t})=>{var j,z;const{featureChecker:r,getUser:n}=on(),{organizationId:o}=n(),{control:i,clearErrors:a,formState:{errors:s},handleSubmit:c,...l}=Bn({defaultValues:Dot(e)}),[{data:u},{data:f},{data:d}]=qi({queries:[{queryKey:["facilities"],queryFn:v0,initialData:{data:[]}},{queryKey:["meters"],queryFn:()=>kf(),initialData:{data:[]}},{queryKey:["utilities"],queryFn:ry,initialData:{data:[]}}]}),[h,p]=A.useState(e.meters??[]),g=((j=e.meters)==null?void 0:j.map(({id:Y})=>Y))??[],{mutate:m,isPending:v}=xs({mutationKey:["accountMutation"],mutationFn:async Y=>{await(e.id?P:T)(Y)}}),[y,b]=A.useState(""),[w,E]=A.useState(!1),[I,O]=A.useState(!1),[D,N]=A.useState(!1),[U,B]=A.useState(!1),F=!(e.isActive??!0);async function T(Y){try{await kWe(Y)&&t(),St.success(bt.CREATE_SUCCESS)}catch(K){throw mi.compatible(K)&&gi(l,K),St.error(bt.ERROR),K}}async function P(Y){try{await pte(e.id,Y),h.length!==g.length&&h.filter(({id:Q})=>!g.includes(Q)).forEach(async Q=>{delete Q.id,await Jte(Q)}),t(),St.success(bt.UPDATE_SUCCESS)}catch(K){throw mi.compatible(K)&&gi(l,K),St.error(bt.ERROR),K}}const _=()=>{N(Y=>!Y)},C=Y=>{E(Y),O(Y)},S=()=>{I&&O(!1),D&&N(!1),U&&B(!1)},x=Y=>{const{id:K}=Y;if(K===y){const Q=h.findIndex(({id:J})=>J===K),q=[...h];q[Q]=Y,p(q)}else p([...h,{...Y,id:`id-${Math.random().toString(36).substring(2,9)}-${Date.now()}`,parentFacility:u.data.find(({id:Q})=>Q===Y.parentFacilityId),replacesMeter:f.data.find(({id:Q})=>Q===Y.replacesMeterId)}]);S(),b("")},k=Fot(e,a,d.data,l.setError,C,r.devFeatureEnabled(xf.Experimental)),L=[{field:"name",headerName:"Meter Name",flex:1},{field:"parentFacility",headerName:"Parent Facility",flex:1,valueGetter:({value:Y})=>(Y==null?void 0:Y.name)??""},{field:"replacesMeter",headerName:"Replaces Meter",flex:1,valueGetter:({value:Y})=>(Y==null?void 0:Y.name)??""},{field:"serviceType",headerName:"Service Type",flex:1},{field:"usageUnit",headerName:"Usage Unit",flex:1},{field:"inactiveDate",headerName:"Inactive Date",flex:1,valueFormatter:({value:Y})=>Y?Vo(Y,"PPP"):"",valueGetter:({row:Y})=>Y.inactiveDate?Hr(Y.inactiveDate):""},{field:"id",headerName:"State",width:100,renderCell:({value:Y})=>{const K=g.includes(Y);return R(bo,{color:K?"success":"warning",label:K?"Saved":"To Save",variant:"outlined"})}},{field:"actions",headerName:"Actions",type:"actions",getActions:({id:Y})=>g.includes(Y.toString())?[]:[R(yr,{icon:R(ud,{}),label:"Edit",className:"textPrimary",onClick:()=>{b(Y.toString()),B(!0)},color:"inherit"},"edit-button"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{p(h.filter(({id:K})=>K!==Y))},color:"inherit"},"delete")]}];return xe(nr,{children:[F&&R(dp,{label:"Account deactivated",labelPlacement:"start",control:R(Tl,{disabled:!0,checked:!0}),style:{display:"flex"}}),xe(_o,{title:"Account information",buttons:xe(zr,{children:[R(Ft,{color:"secondary",disabled:v||w||F,disableElevation:!0,onClick:c(Y=>m(Object.assign(Y,{organizationId:o}))),variant:"contained",children:e.id?"Update":"Save"}),e.id&&R(Ft,{color:"secondary",disableElevation:!0,onClick:()=>B(!0),variant:"contained",children:"Add Meter"}),R(Ft,{color:"secondary",onClick:_,variant:"outlined",children:"Cancel"})]}),children:[R(nr,{children:R(Ot,{container:!0,spacing:2,children:k.map((Y,K)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:i,fieldConf:Y,errors:s,isViewMode:F})},K))})}),R(yo,{children:"Meters Associated"}),R(Yn,{checkboxSelection:!1,columns:L,isRowNavigation:!1,rows:h,showToolbar:!1})]}),R(Cs,{open:U,onClose:S,children:R(Zne,{deactivatedFields:["parentAccountId"],direction:"column",doc:y?h.find(({id:Y})=>Y===y):{parentAccountId:e.id,parentFacilityId:((z=[...h].pop())==null?void 0:z.parentFacilityId)??""},handleBackAction:S,handleSaveAction:x})}),R(Br,{open:D,onClose:S,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:_,renderElement:R(qo,{sx:{color:"red"}})}),R(Br,{open:I,onClose:S,message:"This account number already exists. Account numbers need to be unique. Enter a new account number before saving.",primaryButtonLabel:"Accept",onPrimaryButtonClicked:S,renderElement:R(od,{sx:{color:"yellow"}})})]})};function Lot(e){return e.toISOString().split("T")[0]}const $ot=({accountId:e,onDoubleClickSelection:t,onSelectionChange:r})=>{const[{data:n,isFetching:o,isError:i}]=qi({queries:[{queryKey:["accounts"],queryFn:async()=>await hp(),initialData:{data:[]}}]}),{filter:a,setFilter:s,setSortModel:c,sortModel:l}=s4(),[u,f]=A.useState(e??""),d=[{field:"number",headerName:"Account number",flex:1},{field:"utility",headerName:"Utility",flex:1,valueGetter:({row:p})=>{var g;return((g=p.utility)==null?void 0:g.name)??"-"}},{field:"relatedFacilities",headerName:"Facilities",flex:2,valueGetter:({row:p})=>{var m;const g=(m=p.meters)==null?void 0:m.filter(v=>v5(v));return[...new Set(g==null?void 0:g.reduce((v,y)=>{var b;return[...v,(b=y.parentFacility)==null?void 0:b.name]},[]))].join(", ")}},{field:"activeMeters",headerName:"Active Meters",flex:.6,valueGetter:({row:p})=>{var m;const g=(m=p.meters)==null?void 0:m.filter(v=>v5(v));return(g==null?void 0:g.length)??0},renderCell:({value:p})=>R(bo,{label:p})}],h=p=>{if(!p)return;f(p),n.data.find(m=>m.id===p)&&r({accountId:p})};return R(Jt,{direction:"row",width:"100%",children:R(Yn,{rows:n.data.filter(p=>cte(p)),columns:d,handleSelectionChange:([p])=>h==null?void 0:h(p),initialState:{filter:{filterModel:{items:[{field:a.filterColumnName,operator:a.operator,value:a.filterColumnValue}]}},sorting:{sortModel:l}},onFilterModelChange:p=>{const g=p.items[0];s({filterColumnName:(g==null?void 0:g.field)??"",operator:(g==null?void 0:g.operator)??"",filterColumnValue:(g==null?void 0:g.value)??""})},onRowDoubleClick:t,onSortModelChange:p=>c(p),checkboxSelection:!1,dataFetchError:i,loading:o,rowSelectionModel:[u]})})},Bot=({doc:e={},handleBackAction:t})=>{var L;const r=V2()[0].get("account")??"",{mutate:n,isPending:o}=xs({mutationKey:["deleteBill"],mutationFn:async()=>await Ate(e.id),onSuccess:t}),{mutate:i}=xs({mutationKey:["markReviewed"],mutationFn:async()=>await y5(e.id,{needsReview:!1}),onSuccess:t}),a=A.useRef(null),{getUser:s}=on(),{organizationId:c,userType:l}=s(),[u,f]=A.useState(r||e.accountId),[d,h]=A.useState(0),[p,g]=A.useState({...e}),[m,v]=A.useState((p==null?void 0:p.lineItems)??[]),[y,b]=A.useState(!1),[w,E]=A.useState(!1),[I,O]=A.useState(!1),[D,N]=A.useState(!1),[U,B]=A.useState(!1),[F,T]=A.useState(!1);A.useEffect(()=>{r&&h(1),e.id&&e.accountId&&h(2)},[]),A.useMemo(()=>{const{current:j}=a;if(j){const{date:z,startDate:Y,endDate:K,budgetPeriod:Q,...q}=j.form.getValues();if(g({...p,...q,date:Bu(z)&&(z==null?void 0:z.toISOString())||null,startDate:Bu(Y)&&(Y==null?void 0:Y.toISOString())||null,endDate:Bu(K)&&(K==null?void 0:K.toISOString())||null,budgetPeriod:Bu(Q)&&(Q==null?void 0:Q.toISOString())||null}),d===2){const{lineItems:J}=j.data;v([...J])}}},[d,F]);async function P(){const{form:j}=a.current,z=ore(p,a,c);async function Y(){try{const Q=j.getValues().workingImage;B(!0);const J=await(await AGe(z)).text();Q&&J&&await Wz(J,{image:Q}),a.current=null,g({...p,amount:0,startDate:null,estimated:!1}),v([]),h(0),St.success(bt.CREATE_SUCCESS)}catch(Q){if(mi.compatible(Q)){const{getValues:q,setError:J}=j;gi({setError:J,getValues:q},Q)}St.error(bt.ERROR)}finally{B(!1)}}async function K(){try{const Q=j.getValues().workingImage;B(!0),await y5(e.id,z),Q&&await Wz(e.id,{image:Q}),St.success(bt.UPDATE_SUCCESS),t()}catch(Q){const q={message:bt.ERROR};if(mi.compatible(Q)){const{isDirty:J,getValues:G,setError:V}=j;gi({setError:V,getValues:G},Q),!J&&Q.error.length&&(q.message=Q.error[0].fullMessage)}St.error(q.message)}finally{B(!1)}}e.id?K():Y()}const _=()=>R(Jt,{direction:"column",spacing:2,width:"100%",children:R($ot,{accountId:u,onSelectionChange:j=>{f(j.accountId),v([])},onDoubleClickSelection:()=>h(1)})}),C=R(Jt,{spacing:2,children:R(nre,{ref:a,accountId:u,billDoc:p,defaultLineItems:m,showLineItems:d===2})}),S={nextBtnLabel:"Next",backBtnLabel:"Back",cancelBtnLabel:"Cancel",cancelBtnFn:()=>{b(!0)},steps:[{id:"001",directionBtns:"right",label:"Select an Account",render:_(),showNextBtn:!!u,showBackBtn:!1},{id:"002",label:"Enter Bill header information",render:C,directionBtns:"right",actionBtns:[{label:"View Account Bills",display:!0,onClick:()=>{const{current:j}=a;j.data.account.id&&!F&&T(!0)}}],showNextBtn:!0,showBackBtn:!0,nextBtnFn:()=>{if(a.current){const{handleSubmit:j}=a.current.form;j(async z=>{var Q;const{date:Y,amount:K}=z;try{const{meta:{totalCount:q},data:J}=await I8({sort:"date",filter:[{field:"date",value:Lot(Y),operator:_a.EQUALS},{field:"amount",value:K,operator:_a.EQUALS},{field:"accountId",value:a.current.data.account.id,operator:_a.EQUALS}]}),G=q>0&&((Q=J[0])==null?void 0:Q.id)!==e.id;G&&O(G),!G&&h(2)}catch{St.error(bt.ERROR)}})()}else St.error(bt.ERROR)}},{id:"003",label:"Enter Line Items / Submit Bill",render:C,directionBtns:"right",actionBtns:[{label:"Delete",display:!!e.id,disabled:U,onClick:()=>E(!0)},{label:"View Account Bills",display:!0,disabled:U,onClick:()=>{const{current:j}=a;j.data.account.id&&!F&&T(!0)}},...p.needsReview&&l===Pi.SystemAdministrator?[{label:"Mark Reviewed",display:!!e.id,disabled:U,onClick:async()=>{await i()}}]:[]],showNextBtn:!0,showBackBtn:!e.id,nextBtnLabel:e.id?"Update":"Save",nextBtnFn:async()=>{a.current&&await a.current.handleSubmit(P)}}]},x=()=>{O(!1),h(2)},k=()=>{y&&b(!1),I&&O(!1),D&&N(!1),w&&E(!1)};return F&&((L=a.current)!=null&&L.data.account.id)?R(K8,{accountId:a.current.data.account.id,handleBackAction:()=>T(!1)}):xe(nr,{children:[R(nF,{active:d,disableNavigation:U,setActive:h,...S}),R(Br,{open:y,onClose:k,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:k,renderElement:R(qo,{sx:{color:"red"}})}),R(Br,{open:I,onClose:k,message:"Warning: A bill already exists with the same account number, bill date, and amount.",primaryButtonLabel:"Continue",onPrimaryButtonClicked:x,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:k,renderElement:R(od,{sx:{color:"yellow"}})}),R(Br,{open:D,onClose:k,message:`Warning: There are line items with the same start and end date, 
        which can skew reports, analytics, and bill accounting. Best practice is to have 
        the start date be the same as the end date for the previous bill.`,primaryButtonLabel:"Accept",onPrimaryButtonClicked:k,renderElement:R(od,{sx:{color:"yellow"}})}),R(Br,{open:w,onClose:k,message:"Are you sure you want to remove this bill?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:n,isLoading:o,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:k,renderElement:R(oo,{sx:{color:"error.main"}})})]})};var HE={exports:{}};HE.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",u="[object Function]",f="[object GeneratorFunction]",d="[object Map]",h="[object Number]",p="[object Object]",g="[object Promise]",m="[object RegExp]",v="[object Set]",y="[object String]",b="[object Symbol]",w="[object WeakMap]",E="[object ArrayBuffer]",I="[object DataView]",O="[object Float32Array]",D="[object Float64Array]",N="[object Int8Array]",U="[object Int16Array]",B="[object Int32Array]",F="[object Uint8Array]",T="[object Uint8ClampedArray]",P="[object Uint16Array]",_="[object Uint32Array]",C=/[\\^$.*+?()[\]{}|]/g,S=/\w*$/,x=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,L={};L[i]=L[a]=L[E]=L[I]=L[s]=L[c]=L[O]=L[D]=L[N]=L[U]=L[B]=L[d]=L[h]=L[p]=L[m]=L[v]=L[y]=L[b]=L[F]=L[T]=L[P]=L[_]=!0,L[l]=L[u]=L[w]=!1;var j=typeof Er=="object"&&Er&&Er.Object===Object&&Er,z=typeof self=="object"&&self&&self.Object===Object&&self,Y=j||z||Function("return this")(),K=t&&!t.nodeType&&t,Q=K&&!0&&e&&!e.nodeType&&e,q=Q&&Q.exports===K;function J(Re,dt){return Re.set(dt[0],dt[1]),Re}function G(Re,dt){return Re.add(dt),Re}function V(Re,dt){for(var kt=-1,vr=Re?Re.length:0;++kt<vr&&dt(Re[kt],kt,Re)!==!1;);return Re}function X(Re,dt){for(var kt=-1,vr=dt.length,wi=Re.length;++kt<vr;)Re[wi+kt]=dt[kt];return Re}function te(Re,dt,kt,vr){var wi=-1,ma=Re?Re.length:0;for(vr&&ma&&(kt=Re[++wi]);++wi<ma;)kt=dt(kt,Re[wi],wi,Re);return kt}function ee(Re,dt){for(var kt=-1,vr=Array(Re);++kt<Re;)vr[kt]=dt(kt);return vr}function re(Re,dt){return Re==null?void 0:Re[dt]}function se(Re){var dt=!1;if(Re!=null&&typeof Re.toString!="function")try{dt=!!(Re+"")}catch{}return dt}function pe(Re){var dt=-1,kt=Array(Re.size);return Re.forEach(function(vr,wi){kt[++dt]=[wi,vr]}),kt}function ce(Re,dt){return function(kt){return Re(dt(kt))}}function ne(Re){var dt=-1,kt=Array(Re.size);return Re.forEach(function(vr){kt[++dt]=vr}),kt}var he=Array.prototype,oe=Function.prototype,le=Object.prototype,de=Y["__core-js_shared__"],ve=function(){var Re=/[^.]+$/.exec(de&&de.keys&&de.keys.IE_PROTO||"");return Re?"Symbol(src)_1."+Re:""}(),we=oe.toString,ie=le.hasOwnProperty,ge=le.toString,Pe=RegExp("^"+we.call(ie).replace(C,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=q?Y.Buffer:void 0,Ie=Y.Symbol,Oe=Y.Uint8Array,$e=ce(Object.getPrototypeOf,Object),et=Object.create,Ze=le.propertyIsEnumerable,Ne=he.splice,Qe=Object.getOwnPropertySymbols,Xe=Fe?Fe.isBuffer:void 0,rt=ce(Object.keys,Object),ht=Po(Y,"DataView"),At=Po(Y,"Map"),Qt=Po(Y,"Promise"),Nt=Po(Y,"Set"),Ue=Po(Y,"WeakMap"),Ye=Po(Object,"create"),tt=Ts(ht),st=Ts(At),mt=Ts(Qt),_t=Ts(Nt),Pt=Ts(Ue),Ut=Ie?Ie.prototype:void 0,wt=Ut?Ut.valueOf:void 0;function Dt(Re){var dt=-1,kt=Re?Re.length:0;for(this.clear();++dt<kt;){var vr=Re[dt];this.set(vr[0],vr[1])}}function qt(){this.__data__=Ye?Ye(null):{}}function Tt(Re){return this.has(Re)&&delete this.__data__[Re]}function Me(Re){var dt=this.__data__;if(Ye){var kt=dt[Re];return kt===n?void 0:kt}return ie.call(dt,Re)?dt[Re]:void 0}function Ge(Re){var dt=this.__data__;return Ye?dt[Re]!==void 0:ie.call(dt,Re)}function nt(Re,dt){var kt=this.__data__;return kt[Re]=Ye&&dt===void 0?n:dt,this}Dt.prototype.clear=qt,Dt.prototype.delete=Tt,Dt.prototype.get=Me,Dt.prototype.has=Ge,Dt.prototype.set=nt;function fe(Re){var dt=-1,kt=Re?Re.length:0;for(this.clear();++dt<kt;){var vr=Re[dt];this.set(vr[0],vr[1])}}function ke(){this.__data__=[]}function be(Re){var dt=this.__data__,kt=Ht(dt,Re);if(kt<0)return!1;var vr=dt.length-1;return kt==vr?dt.pop():Ne.call(dt,kt,1),!0}function Ce(Re){var dt=this.__data__,kt=Ht(dt,Re);return kt<0?void 0:dt[kt][1]}function Ee(Re){return Ht(this.__data__,Re)>-1}function me(Re,dt){var kt=this.__data__,vr=Ht(kt,Re);return vr<0?kt.push([Re,dt]):kt[vr][1]=dt,this}fe.prototype.clear=ke,fe.prototype.delete=be,fe.prototype.get=Ce,fe.prototype.has=Ee,fe.prototype.set=me;function _e(Re){var dt=-1,kt=Re?Re.length:0;for(this.clear();++dt<kt;){var vr=Re[dt];this.set(vr[0],vr[1])}}function Be(){this.__data__={hash:new Dt,map:new(At||fe),string:new Dt}}function De(Re){return Xs(this,Re).delete(Re)}function je(Re){return Xs(this,Re).get(Re)}function Le(Re){return Xs(this,Re).has(Re)}function lt(Re,dt){return Xs(this,Re).set(Re,dt),this}_e.prototype.clear=Be,_e.prototype.delete=De,_e.prototype.get=je,_e.prototype.has=Le,_e.prototype.set=lt;function vt(Re){this.__data__=new fe(Re)}function Bt(){this.__data__=new fe}function Se(Re){return this.__data__.delete(Re)}function He(Re){return this.__data__.get(Re)}function ct(Re){return this.__data__.has(Re)}function xt(Re,dt){var kt=this.__data__;if(kt instanceof fe){var vr=kt.__data__;if(!At||vr.length<r-1)return vr.push([Re,dt]),this;kt=this.__data__=new _e(vr)}return kt.set(Re,dt),this}vt.prototype.clear=Bt,vt.prototype.delete=Se,vt.prototype.get=He,vt.prototype.has=ct,vt.prototype.set=xt;function Zt(Re,dt){var kt=fu(Re)||Mf(Re)?ee(Re.length,String):[],vr=kt.length,wi=!!vr;for(var ma in Re)(dt||ie.call(Re,ma))&&!(wi&&(ma=="length"||Qs(ma,vr)))&&kt.push(ma);return kt}function Rt(Re,dt,kt){var vr=Re[dt];(!(ie.call(Re,dt)&&Pf(vr,kt))||kt===void 0&&!(dt in Re))&&(Re[dt]=kt)}function Ht(Re,dt){for(var kt=Re.length;kt--;)if(Pf(Re[kt][0],dt))return kt;return-1}function Nr(Re,dt){return Re&&an(dt,hy(dt),Re)}function kr(Re,dt,kt,vr,wi,ma,ns){var Ma;if(vr&&(Ma=ma?vr(Re,wi,ma,ns):vr(Re)),Ma!==void 0)return Ma;if(!O0(Re))return Re;var xi=fu(Re);if(xi){if(Ma=du(Re),!dt)return xn(Re,Ma)}else{var hu=Fi(Re),pu=hu==u||hu==f;if(fy(Re))return Zn(Re,dt);if(hu==p||hu==i||pu&&!ma){if(se(Re))return ma?Re:{};if(Ma=Tf(pu?{}:Re),!dt)return Al(Re,Nr(Ma,Re))}else{if(!L[hu])return ma?Re:{};Ma=_c(Re,hu,kr,dt)}}ns||(ns=new vt);var py=ns.get(Re);if(py)return py;if(ns.set(Re,Ma),!xi)var D0=kt?Pl(Re):hy(Re);return V(D0||Re,function(Ra,gp){D0&&(gp=Ra,Ra=Re[gp]),Rt(Ma,gp,kr(Ra,dt,kt,vr,gp,Re,ns))}),Ma}function _r(Re){return O0(Re)?et(Re):{}}function br(Re,dt,kt){var vr=dt(Re);return fu(Re)?vr:X(vr,kt(Re))}function qr(Re){return ge.call(Re)}function Xn(Re){if(!O0(Re)||pd(Re))return!1;var dt=EC(Re)||se(Re)?Pe:x;return dt.test(Ts(Re))}function fn(Re){if(!If(Re))return rt(Re);var dt=[];for(var kt in Object(Re))ie.call(Re,kt)&&kt!="constructor"&&dt.push(kt);return dt}function Zn(Re,dt){if(dt)return Re.slice();var kt=new Re.constructor(Re.length);return Re.copy(kt),kt}function so(Re){var dt=new Re.constructor(Re.byteLength);return new Oe(dt).set(new Oe(Re)),dt}function bi(Re,dt){var kt=dt?so(Re.buffer):Re.buffer;return new Re.constructor(kt,Re.byteOffset,Re.byteLength)}function Pa(Re,dt,kt){var vr=dt?kt(pe(Re),!0):pe(Re);return te(vr,J,new Re.constructor)}function pa(Re){var dt=new Re.constructor(Re.source,S.exec(Re));return dt.lastIndex=Re.lastIndex,dt}function Cc(Re,dt,kt){var vr=dt?kt(ne(Re),!0):ne(Re);return te(vr,G,new Re.constructor)}function uu(Re){return wt?Object(wt.call(Re)):{}}function Sc(Re,dt){var kt=dt?so(Re.buffer):Re.buffer;return new Re.constructor(kt,Re.byteOffset,Re.length)}function xn(Re,dt){var kt=-1,vr=Re.length;for(dt||(dt=Array(vr));++kt<vr;)dt[kt]=Re[kt];return dt}function an(Re,dt,kt,vr){kt||(kt={});for(var wi=-1,ma=dt.length;++wi<ma;){var ns=dt[wi],Ma=vr?vr(kt[ns],Re[ns],ns,kt,Re):void 0;Rt(kt,ns,Ma===void 0?Re[ns]:Ma)}return kt}function Al(Re,dt){return an(Re,Di(Re),dt)}function Pl(Re){return br(Re,hy,Di)}function Xs(Re,dt){var kt=Re.__data__;return mp(dt)?kt[typeof dt=="string"?"string":"hash"]:kt.map}function Po(Re,dt){var kt=re(Re,dt);return Xn(kt)?kt:void 0}var Di=Qe?ce(Qe,Object):ho,Fi=qr;(ht&&Fi(new ht(new ArrayBuffer(1)))!=I||At&&Fi(new At)!=d||Qt&&Fi(Qt.resolve())!=g||Nt&&Fi(new Nt)!=v||Ue&&Fi(new Ue)!=w)&&(Fi=function(Re){var dt=ge.call(Re),kt=dt==p?Re.constructor:void 0,vr=kt?Ts(kt):void 0;if(vr)switch(vr){case tt:return I;case st:return d;case mt:return g;case _t:return v;case Pt:return w}return dt});function du(Re){var dt=Re.length,kt=Re.constructor(dt);return dt&&typeof Re[0]=="string"&&ie.call(Re,"index")&&(kt.index=Re.index,kt.input=Re.input),kt}function Tf(Re){return typeof Re.constructor=="function"&&!If(Re)?_r($e(Re)):{}}function _c(Re,dt,kt,vr){var wi=Re.constructor;switch(dt){case E:return so(Re);case s:case c:return new wi(+Re);case I:return bi(Re,vr);case O:case D:case N:case U:case B:case F:case T:case P:case _:return Sc(Re,vr);case d:return Pa(Re,vr,kt);case h:case y:return new wi(Re);case m:return pa(Re);case v:return Cc(Re,vr,kt);case b:return uu(Re)}}function Qs(Re,dt){return dt=dt??o,!!dt&&(typeof Re=="number"||k.test(Re))&&Re>-1&&Re%1==0&&Re<dt}function mp(Re){var dt=typeof Re;return dt=="string"||dt=="number"||dt=="symbol"||dt=="boolean"?Re!=="__proto__":Re===null}function pd(Re){return!!ve&&ve in Re}function If(Re){var dt=Re&&Re.constructor,kt=typeof dt=="function"&&dt.prototype||le;return Re===kt}function Ts(Re){if(Re!=null){try{return we.call(Re)}catch{}try{return Re+""}catch{}}return""}function Af(Re){return kr(Re,!0,!0)}function Pf(Re,dt){return Re===dt||Re!==Re&&dt!==dt}function Mf(Re){return U4(Re)&&ie.call(Re,"callee")&&(!Ze.call(Re,"callee")||ge.call(Re)==i)}var fu=Array.isArray;function kC(Re){return Re!=null&&H4(Re.length)&&!EC(Re)}function U4(Re){return z4(Re)&&kC(Re)}var fy=Xe||lo;function EC(Re){var dt=O0(Re)?ge.call(Re):"";return dt==u||dt==f}function H4(Re){return typeof Re=="number"&&Re>-1&&Re%1==0&&Re<=o}function O0(Re){var dt=typeof Re;return!!Re&&(dt=="object"||dt=="function")}function z4(Re){return!!Re&&typeof Re=="object"}function hy(Re){return kC(Re)?Zt(Re):fn(Re)}function ho(){return[]}function lo(){return!1}e.exports=Af})(HE,HE.exports);var Uot=HE.exports;const M5=M1(Uot);function Hot({isCopy:e=!1,importPriorFiscalYear:t=!1},r){const n=[{other:{views:["year"],openTo:"year"},label:"Budget Fiscal Year",placeholder:"Budget Fiscal Year",name:"fiscalYear",type:"datePicker",required:!0}];return(e||t)&&n.push({placeholder:"Adjustment %",label:"Adjustment %",type:"number",name:"adjustment",adorment:"% ",required:!1}),t&&n.push({label:"Prior Fiscal Year",placeholder:"Prior Fiscal Year",name:"importFiscalYear",values:r.map(o=>({label:String(o),value:o})),type:"selectInput",required:!0}),n}const zot=({formControl:e,accesibility:t})=>{const{data:r,isError:n}=da({queryKey:["fiscalYears"],queryFn:wot,initialData:[]}),{formState:{errors:o},control:i}=e,a=Hot(t,r),s=`This will copy the entire budget for all facilities and
  service types from the selected fiscal year. The adjustment factor increases
  all elements of the budget by the selected percentage. Selecting 0% for the 
  adjustment factor will cope the previous budget without making any adjustment.`;return A.useEffect(()=>{n&&St.error(bt.ERROR)},[n]),R(_o,{title:"Budget information",children:R(nr,{children:R(Ot,{container:!0,spacing:2,children:a.map((c,l)=>R(Ot,{item:!0,xs:12,sm:6,display:c!=null&&c.hidden?"none":"grid",children:c.name==="adjustment"?xe(Jt,{flexDirection:"row",children:[R(Dn,{control:i,fieldConf:c,errors:o}),R(tC,{infoMessage:s})]}):R(Dn,{control:i,fieldConf:c,errors:o})},l))})})})};function dC(e,t={month:"long",year:"numeric"}){const r=new Intl.DateTimeFormat("en-US",t).format;return r(e)}const Jne=Object.values(Mr),{View:uV,Edit:dV}=gn,jot=(e,t,r)=>{const n=(i,a,s=!1)=>()=>{t({...e,[i]:{mode:a,ignoreModifications:s}})},o=i=>()=>r(a=>a.filter(({id:s})=>s!==i));return[{field:"serviceType",headerName:"Service Type",flex:1,editable:!0,type:"singleSelect",valueOptions:Jne},{field:"cost",headerName:"Costs",flex:1,editable:!0,type:"number",valueFormatter:({value:i})=>vo(Number(i))},{type:"actions",field:"actions",headerName:"Actions",getActions:({id:i})=>{var s;return((s=e[i])==null?void 0:s.mode)===dV?[R(yr,{icon:R(g0,{}),label:"Save",color:"secondary",onClick:n(i,uV)},"save-button"),R(yr,{icon:R(m0,{}),label:"Cancel",className:"textPrimary",onClick:n(i,uV,!0),color:"inherit"},"cancel-button")]:[R(yr,{icon:R(ud,{}),label:"Edit",className:"textPrimary",onClick:n(i,dV),color:"inherit"},"edit-button"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:o(i),color:"inherit"},"delete-button")]}}]},Vot=({rows:e,facilityId:t,month:r,open:n,facilities:o,onSave:i,onClose:a})=>{const{formState:{errors:s},control:c,handleSubmit:l}=Bn({defaultValues:{facilityId:t}}),[u,f]=A.useState({}),[d,h]=A.useState(e),p=()=>{const m=d.map(({serviceType:b})=>b),y=Jne.filter(b=>!m.includes(b))[0];h([...d,{id:y+(d.length+1),serviceType:y,cost:0}])},g=({facilityId:m})=>{const v=o.find(y=>y.id==m);return d.map(y=>({facility:v,facilityId:m,month:r,...y}))};return R(Cs,{open:n,onClose:a,dialogActions:xe(Jt,{direction:"row",margin:2,spacing:2,children:[R(Ft,{variant:"outlined",onClick:a,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,form:"line-item-form",onClick:l(m=>i(g(m))),children:e.length?"Update":"Add"})]}),children:xe(_o,{title:"Add or edit a facility",children:[R(Dn,{control:c,fieldConf:{disabled:!!t,label:"Facility",placeholder:"Select a facility",name:"facilityId",values:o.map(({id:m,name:v,isActive:y})=>({disabled:!y,label:v,value:m,key:m})),type:"selectInput",required:!0},errors:s}),R(yo,{children:"Service type's"}),R(Yn,{getRowId:({facilityId:m,serviceType:v})=>`${m} - ${v}`,rows:d,rowModesModel:u,isRowNavigation:!1,columns:jot(u,f,h),processRowUpdate:m=>(h(v=>v.map(y=>({...y,...y.id===m.id?m:{}}))),m),customToolbarOptions:R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:p,sx:{alignSelf:"flex-end"},children:"Add service type"})})})]})})},Wot=[{field:"month",headerName:"Fiscal Month",flex:.5,valueFormatter:({value:e})=>e+1},{field:"period",headerName:"Budget Period",flex:1,valueFormatter:({value:e})=>dC(new Date(e))},{field:"cost",headerName:"Cost",flex:1,valueFormatter:({value:e})=>vo(e)}],Got=({fiscalMonths:e,onMonthSelected:t})=>{const[r,n]=A.useState([]);A.useEffect(()=>{t(r[0])},[r]);const o=(i,{api:a})=>{const s=r[0],c=a.getAllRowIds();if(i.length){const l=i.pop();l!==void 0&&c.includes(l)&&n([l])}else c.includes(s)&&n([])};return R(Ot,{container:!0,spacing:2,children:[e.slice(0,6),e.slice(6,12)].map((i,a)=>xe(Ot,{item:!0,width:"50%",children:[a>0?"Second":"First"," fiscal semester",R(Yn,{columns:Wot,rows:i,rowSelectionModel:r,isRowNavigation:!1,handleSelectionChange:o,slotProps:{baseButton:{sx:{display:"none"}},footer:{sx:{display:"none"}}}})]},a))})},qot=e=>[{field:"facilityName",headerName:"Facility Name",flex:1},{field:"services",headerName:"Service Types",valueGetter:({value:t})=>t.join(", "),flex:1},{field:"totalCosts",headerName:"Total Costs",valueFormatter:({value:t})=>vo(Number(t)),flex:1},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:e}],Kot=({monthlyFacilityCosts:e,customToolbar:t,cellActions:r})=>R(Yn,{rows:e,customToolbarOptions:t,columns:qot(r),isRowNavigation:!1}),Yot=({fiscalYear:e,budget:t,onChange:r})=>{const n=V2()[0].get("month")??6,{data:o,isError:i}=da({queryKey:["facilities"],queryFn:v0,initialData:{data:[]}}),[a,s]=A.useState(0),[c,l]=A.useState([]),[u,f]=A.useState(""),[d,h]=A.useState(!1),p=A.useMemo(()=>{const b=[],w=new Date(e-1,Number(n),1);for(let E=0;E<12;E++){const I=E%12,D=t.monthlyDetails.filter(N=>N.month===I).reduce((N,U)=>N+U.cost,0);b.push({id:I,month:I,period:w.toISOString(),cost:D}),w.setMonth(w.getMonth()+1)}return b},[t,n,e]);function g(){return t.monthlyDetails.filter(w=>w.month===a)}const m=A.useMemo(()=>{const b=g();if(b&&b.length){const w={};return b.forEach(E=>{var I,O;if(w[E.facilityId]){const D=w[E.facilityId];D.totalCosts+=E.cost,D.services.includes(E.serviceType)||D.services.push(E.serviceType)}else w[E.facilityId]={totalCosts:E.cost,facilityName:((I=E.facility)==null?void 0:I.name)??((O=o.data.find(({id:D})=>E.facilityId===D))==null?void 0:O.name),id:E.facilityId,services:[E.serviceType]}}),Object.values(w)}else return[]},[a,t]);A.useEffect(()=>{i&&St.error(bt.ERROR)},[i]);const v=b=>{var w;b.total=((w=b.monthlyDetails)==null?void 0:w.reduce((E,I)=>E+I.cost,0))??0,r(b)},y=b=>{s(b)};return xe(zr,{children:[xe(_o,{title:`Budget for ${dC(new Date(e,Number(n),1))}`,children:[xe(nr,{display:"grid",children:[R(Got,{fiscalMonths:p,onMonthSelected:y}),xe(jt,{variant:"subtitle1",textAlign:"end",children:["Total: ",vo(t.total)]})]}),R(yo,{children:"Monthly detail's"}),a===void 0?R(nr,{display:"grid",children:R(jt,{variant:"h6",textAlign:"center",margin:15,children:"Select a fiscal month to show the detail's"})}):xe(zr,{children:[R(Ot,{container:!0,children:R(jt,{variant:"subtitle1",children:"Facilites"})}),R(Kot,{monthlyFacilityCosts:m,customToolbar:R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:()=>{l([]),f(""),h(!0)},sx:{alignSelf:"flex-end"},children:"Add facility"})}),cellActions:({id:b})=>[R(yr,{icon:R(ud,{}),label:"Edit",className:"textPrimary",onClick:()=>{const w=g().filter(E=>E.facilityId===b);l(w),f(b),h(!0)},color:"inherit"},"edit-button"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{if(a>-1){const w=M5(t);w.monthlyDetails=w.monthlyDetails.filter(E=>!(E.facilityId===b&&E.month===a)),v(w)}},color:"inherit"},"delete-button")]})]})]}),d&&R(Vot,{rows:c,facilityId:u,facilities:o.data,month:a,open:d,onSave:b=>{if(a>-1&&b&&b.length){const w=M5(t);w.monthlyDetails=[...w.monthlyDetails.filter(E=>E.facilityId!==b[0].facilityId||E.month!==a),...b],v(w),h(!1),l([]),f("")}},onClose:()=>h(!1)})]})},Xot=({doc:e={monthlyDetails:[],total:0},handleBackAction:t})=>{const{getUser:r}=on(),{organizationId:n}=r(),o=V2()[0],i=o.get("copy")??!1,a=o.get("importfiscalyear")??!1,s=o.get("month")??6,{data:c,isPending:l,isError:u}=da({queryKey:["budgets"],queryFn:Xne,initialData:{data:[]}}),{handleSubmit:f,...d}=Bn({defaultValues:{fiscalYear:e.fiscalYear&&!i?new Date(e.fiscalYear,e.id?e.fiscalStartMonth:Number(s),1):null,adjustment:0,importFiscalYear:""}}),[h,p]=A.useState(e.id&&!i?1:0),[g,m]=A.useState(!1),[v,y]=A.useState(!1),[b,w]=A.useState(E({...e,organizationId:n}));A.useEffect(()=>{g&&I()},[g]),A.useEffect(()=>{u&&St.error(bt.ERROR)},[u]),A.useEffect(()=>{if(h===1){const U=i?{...e,organizationId:n}:b;w(E(U))}},[h]);function E(U){const B=M5(U);if(a||i){let F=0;const T=d.getValues("adjustment")/100+1;B.monthlyDetails=B.monthlyDetails.map(({cost:P,..._})=>{const C=P*T;return F+=C,{..._,cost:C}}),B.total=F}return B}async function I(){try{const U=await xot({fiscalYear:d.getValues("importFiscalYear"),fiscalMonth:s});w(E(U)),m(!1)}catch{St.error(bt.ERROR)}}const O=()=>{var F;const{getValues:U}=d,B=(F=U("fiscalYear"))==null?void 0:F.getFullYear();return g||h!==1?xe(Jt,{spacing:2,margin:10,children:[R(nr,{display:"flex",justifyContent:"center",children:R(Ri,{})}),R(jt,{variant:"h6",textAlign:"center",children:"Wait a minute, we are preparing the budget."})]}):R(nr,{width:"100%",children:R(Yot,{fiscalYear:B,budget:b,onChange:w})})},D=U=>()=>y(U),N={nextBtnLabel:"Next",backBtnLabel:"Back",cancelBtnLabel:"Cancel",cancelBtnFn:D(!0),steps:[{id:"001",label:`Select budget fiscal year${i?` / Copying ${e.fiscalYear} budget fiscal year`:" / Import budget fiscal year"}`,render:R(nr,{width:"100%",children:R(zot,{formControl:d,accesibility:{isCopy:!!i,importPriorFiscalYear:!!a}})}),directionBtns:"right",showNextBtn:!0,showBackBtn:!1,nextBtnFn:f(U=>{let B=!1;if(U){const F=U.fiscalYear.getFullYear();B=!c.data.some(({fiscalYear:T})=>T===F),B||(St.error(`A budget already exists for this ${F} fiscal year.`),d.setError("fiscalYear",{message:"budget fiscal year already exist"}))}else St.error(bt.ERROR);m(!!a),B&&p(1)})},{id:"002",label:"Budget summary / Submit Budget",render:O(),showNextBtn:!0,showBackBtn:!!i||!e.id,nextBtnLabel:e.id&&!i?"update":"save",nextBtnFn:async()=>{try{let U;const B={...b,fiscalYear:d.getValues("fiscalYear").getFullYear(),fiscalStartMonth:Number(s)};e.id&&!i?(U=bt.UPDATE_SUCCESS,await Sot(e.id,B)):(delete B.id,U=bt.CREATE_SUCCESS,await Cot(B)),await t(),St.success(U)}catch{St.error(bt.ERROR)}}}]};return l?R(nr,{display:"flex",justifyContent:"center",marginTop:12,children:R(Ri,{"aria-label":"Loading"})}):xe(zr,{children:[R(nF,{active:h,setActive:p,...N}),R(Br,{open:v,onClose:D(!1),message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:D(!1),renderElement:R(qo,{sx:{color:"red"}})})]})};var jp=(e=>(e.College="College/University",e.Courthouse="Courthouse",e.DrinkingWaterTreatment="Drinking Water Treatment & Distribution",e.FireStation="Fire Station",e.Kto12="K-12 School",e.Library="Library",e.MeetingHall="Social Meeting Hall",e.Museum="Museum",e.NonRefrigeratedWarehouse="Non-Refrigerated Warehouse",e.Office="Office",e.PoliceStation="Police Station",e.PostOffice="Mailing Center/Post Office",e.Prison="Prison/Incarceration",e.Recreation="Recreation",e.ResidenceHall="Residence Hall/Dormitory",e.ResidentialCare="Residential Care Facility",e.StadiumOpen="Stadium (Open)",e.SeniorLiving="Senior Living Community",e.TransportationTerminal="Transportation Terminal/Station",e.WastewaterTreatment="Wastewater Treatment Plant",e.Other="Other",e))(jp||{});function Qot({meters:e=[],onCancel:t,onBack:r}){return R(_o,{title:"Meters associated",buttons:xe(zr,{children:[R(Ft,{color:"secondary",variant:"contained",onClick:r,children:"back"}),R(Ft,{color:"secondary",variant:"outlined",onClick:t,children:"Cancel"})]}),children:R(Yn,{checkboxSelection:!1,columns:[{field:"name",headerName:"Meter Name",flex:1},{field:"parentAccount",headerName:"Parent Account",flex:1,valueFormatter:({value:o})=>(o==null?void 0:o.number)??""},{field:"replacesMeter",headerName:"Replaces Meter",flex:1,valueFormatter:({value:o})=>(o==null?void 0:o.name)??""},{field:"serviceType",headerName:"Service Type",flex:1},{field:"usageUnit",headerName:"Usage Unit",flex:1},{field:"inactiveDate",headerName:"Inactive Date",flex:1,valueGetter:({value:o})=>{let i="";return o&&(i=dC(new Date(o),{month:"long",day:"numeric",year:"numeric"})),i}}],rows:e,showToolbar:!1,isRowNavigation:!1})})}const Zot=(e={})=>{var t;return{address1:e.address1??"",address2:e.address2??"",facilityGroups:[],name:e.name??"",type:e.type??"",number:e.number??"",city:e.city??"",cookingFacilities:e.cookingFacilities===void 0?"":e.cookingFacilities?"Yes":"No",highschool:e.highschool===void 0?"":e.highschool?"Yes":"No",irrigatedSquareFootage:e.irrigatedSquareFootage??0,percentCooled:e.percentCooled??0,percentHeated:e.percentHeated??0,percentOperational:e.percentOperational??0,postalCode:e.postalCode??"",totalOccupants:e.totalOccupants??0,squareFootage:e.squareFootage??0,country:e.country??"",state:e.state??"",weekendOperations:e.weekendOperations===void 0?"":e.weekendOperations?"Yes":"No",yearBuilt:e.yearBuilt??"",dateClosed:e.dateClosed?Hr(e.dateClosed):null,dateOpened:e.dateOpened?Hr(e.dateOpened):null,latitude:e.latitude??"",longitude:e.longitude??"",...((t=e.studentOccupants)==null?void 0:t.toString())&&{studentOccupants:e.studentOccupants.toString()?e.studentOccupants:0}}},Jot=(e,t)=>e?xO(e,t)||ym(e,t):!0,eit=(e,t,r)=>[{placeholder:"Facility Type",label:"Facility Type",name:"type",type:"selectInput",required:!0,values:Object.values(jp).map(o=>({label:o,value:o}))},{placeholder:"Facility Groups",label:"Facility Groups",name:"facilityGroups",type:"selectInput",required:!1,multiple:!0,values:e.map(o=>({label:o.name,value:o.id}))},{placeholder:"Facility Name",label:"Facility Name",name:"name",type:"textInput",required:!0},{placeholder:"Facility Number",label:"Facility Number",name:"number",type:"textInput",required:!1},{placeholder:"Address 1",label:"Address 1",name:"address1",type:"textInput",required:!0},{placeholder:"Address 2",label:"Address 2",name:"address2",type:"textInput",required:!1},{placeholder:"City",label:"City",name:"city",type:"textInput",required:!0},{placeholder:"State",label:"State",name:"state",type:"selectInput",required:!0,values:NF.map(o=>({label:o.name,value:o.abbreviation}))},{placeholder:"Country",label:"Country",name:"country",type:"selectInput",required:!1,values:FF.map(o=>({label:`${o.name} (${o.abbreviation})`,value:o.name}))},{placeholder:"Postal Code",label:"Postal Code",name:"postalCode",type:"textInput",required:!0},{placeholder:"Year Built",label:"Year Built",name:"yearBuilt",type:"number",thousandSeparator:!1,min:0,required:!0},{placeholder:"Square Footage",label:"Square Footage",name:"squareFootage",type:"number",min:0,required:!0,adorment:"sqft ",...r&&{helperAction:{label:"see changes",onClick:()=>r&&r("squareFootageHistoricalValues")}}},{placeholder:"Irrigated Square Footage",label:"Irrigated Square Footage",name:"irrigatedSquareFootage",type:"number",min:0,required:!0,adorment:"sqft "},{placeholder:"Percent Operational",label:"Percent Operational",name:"percentOperational",type:"number",min:0,max:100,required:!0,adorment:"% "},{placeholder:"Total Occupants",label:"Total Occupants",name:"totalOccupants",type:"number",min:0,required:!0,...r&&{helperAction:{label:"see changes",onClick:()=>r&&r("totalOccupantsHistoricalValues")}}},{placeholder:"Number of Student Occupants",label:"Number of Student Occupants",name:"studentOccupants",type:"number",min:0,required:t===jp.Kto12||t===jp.College,hidden:t!==jp.Kto12&&t!==jp.College,...r&&{helperAction:{label:"see changes",onClick:()=>r&&r("studentOccupantsHistoricalValues")}}},{placeholder:"High School",label:"High School",name:"highschool",type:"selectInput",values:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],required:!0},{placeholder:"Weekend Operations",label:"Weekend Operations",name:"weekendOperations",type:"selectInput",values:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],required:!0},{placeholder:"Cooking Facilities",label:"Cooking Facilities",name:"cookingFacilities",type:"selectInput",values:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}],required:!0},{placeholder:"Percent Heated",label:"Percent Heated",name:"percentHeated",type:"number",min:0,max:100,required:!0,adorment:"% "},{placeholder:"Percent Cooled",label:"Percent Cooled",name:"percentCooled",type:"number",min:0,max:100,required:!0,adorment:"% "},{placeholder:"Date Opened",label:"Date Opened",name:"dateOpened",type:"datePicker",required:!1},{placeholder:"Date Closed",label:"Date Closed",name:"dateClosed",type:"datePicker",required:!1,validate:(o,i)=>Jot(o,i.dateOpened)},{placeholder:"Latitude",label:"Latitude",name:"latitude",type:"textInput",required:!1,disabled:!0},{placeholder:"Longitude",label:"Longitude",name:"longitude",type:"textInput",required:!1,disabled:!0}],tit=(e={})=>{const t=r=>r&&typeof r=="string"?Hr(r):r||null;return{startDate:t(e.startDate),endDate:t(e.endDate),value:e.value??0}},rit=()=>[{placeholder:"Start Date",label:"Start Date",name:"startDate",type:"datePicker",required:!0},{placeholder:"Value",label:"Value",name:"value",type:"number",min:0,required:!0}],nit=({doc:e={},open:t,onClose:r,onSave:n})=>{const{control:o,handleSubmit:i,formState:{errors:a}}=Bn({defaultValues:tit(e)}),s=l=>{n(l)},c=rit();return R(Cs,{title:`${Object.keys(e).length?"Edit":"Add"} Historical Value`,open:t,onClose:r,dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:r,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,type:"submit",form:"historical-value-form",children:Object.keys(e).length?"Update line item":"Add line item"})]}),children:R("form",{onSubmit:i(s),id:"historical-value-form",children:R(Ot,{container:!0,spacing:2,mt:.25,children:c.map((l,u)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:l,errors:a})},u))})})})},oit=({initialData:e,dataKey:t,onClose:r,onSave:n,open:o})=>{const[i,a]=A.useState(e??[]),[s,c]=A.useState(!1),[l,u]=A.useState({}),[f,d]=A.useState(""),[h,p]=A.useState(!1),g=B=>{const F=B.sort((T,P)=>T.startDate&&P.startDate?(typeof T.startDate=="string"?Hr(T.startDate):T.startDate)>(typeof P.startDate=="string"?Hr(P.startDate):P.startDate)?1:-1:0).map((T,P)=>P===B.length-1?{...T,endDate:null}:{...T,endDate:B[P+1].startDate});a(F)},m=B=>()=>{u({...l,[B]:{mode:gn.View}})},v=B=>()=>{u({...l,[B]:{mode:gn.View,ignoreModifications:!0}})},y=B=>(i.length>0&&g(i.map(F=>(F==null?void 0:F.id)===B.id?B:F)),B),b=B=>u(B),w=B=>{d(B[0])},E=()=>{c(!1)},I=()=>{(f||f.toString()==="0")&&g(i.filter((B,F)=>F.toString()!==f.toString())),d(""),c(!1)},O=()=>{p(!0)},D=()=>{p(!1),d("")},N=B=>{g([...i,B]),D()},U=[{align:"left",editable:!0,field:"value",headerAlign:"left",headerName:"Value",type:"number",width:150},{editable:!0,field:"startDate",headerName:"Start Date",minWidth:150,flex:1,type:"date",valueFormatter:({value:B})=>B?Vo(B,"PPP"):"",valueGetter:({row:B})=>B.startDate&&typeof B.startDate=="string"?Hr(B.startDate):B.startDate?B.startDate:null},{field:"endDate",headerName:"End Date",minWidth:150,flex:1,type:"date",valueFormatter:({value:B})=>B?Vo(B,"PPP"):"",valueGetter:({row:B})=>B.endDate&&typeof B.endDate=="string"?Hr(B.endDate):B.endDate?B.endDate:null},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:B})=>{var T;return((T=l[B])==null?void 0:T.mode)===gn.Edit?[R(yr,{icon:R(g0,{}),label:"Save",sx:{color:"primary.main"},onClick:m(B)},"save"),R(yr,{icon:R(m0,{}),label:"Cancel",className:"textPrimary",onClick:v(B),color:"inherit"},"cancel")]:[R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{d(B),c(!0)},color:"inherit"},"delete")]}}];return xe(Cs,{title:`Historical ${t} values`,open:o,onClose:r,dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:r,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,onClick:()=>n(i),children:"Save changes"})]}),children:[R(Yn,{editMode:"row",rowModesModel:l,isRowNavigation:!1,processRowUpdate:y,checkboxSelection:!1,columns:U,csvFilename:`Historical ${t} values`,customToolbarOptions:R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:O,sx:{alignSelf:"flex-end"},children:"Add item"})}),handleSelectionChange:w,onRowModesModelChange:b,rows:i.length===0?[]:i.map((B,F)=>({id:F,...B}))}),h&&R(nit,{open:h,onClose:D,onSave:N}),R(Br,{open:s,onClose:E,message:`Are you sure you want to delete this historical ${t} value?`,primaryButtonLabel:"Yes",onPrimaryButtonClicked:I,secondaryButtonLabel:"No",onSecondaryButtonClicked:E,renderElement:R(oo,{sx:{color:"error.main"}})})]})},iit=({doc:e={},handleBackAction:t})=>{const r=!(e.isActive??!0),{handleSubmit:n,formState:{errors:o},control:i,setValue:a,watch:s,...c}=Bn({defaultValues:Zot(e)}),{data:l,isFetched:u}=da({queryKey:["facilityGroups"],queryFn:Qne,initialData:{data:[]}}),[f,d]=A.useState(!1),[h,p]=A.useState(!1),[g,m]=A.useState({data:[],open:!1,property:""}),[v]=s(["type"]),[y,b]=A.useState(!1),{getUser:w}=on(),{organizationId:E}=w(),I=()=>{var _;return((_=e.facilityGroups)==null?void 0:_.map(C=>C.id))??[]};A.useEffect(()=>{u&&a("facilityGroups",I())},[u]);const O=()=>{p(!0)},D=()=>{p(!1)},N=_=>{m({data:_?e[_]:[],open:!g.open,property:_??""})},U=(_=!1)=>()=>{b(_)},B=_=>{if(e[g.property]=_,_.length)switch(g.property){case"squareFootageHistoricalValues":a("squareFootage",_.at(-1).value);break;case"totalOccupantsHistoricalValues":a("totalOccupants",_.at(-1).value);break;case"studentOccupantsHistoricalValues":a("studentOccupants",_.at(-1).value);break}N(g.property)},F=eit(...e.id?[l.data,v,N]:[l.data,v]),T=(_,C)=>{const S=e[`${C}HistoricalValues`];if(!(S!=null&&S.length)&&!_[C])return[];if(S!=null&&S.length)if(S.at(-1).value!==parseInt(_[C])){const x=S.pop();return x.endDate=new Date().toISOString(),[...S,x,{value:parseInt(_[C]),startDate:x.endDate,endDate:null}]}else return S;else return[{value:parseInt(_[C]),startDate:new Date().toISOString(),endDate:null}]},P=_=>{var L;d(!0),delete _.latitude,delete _.longitude;const C=[];(L=_.facilityGroups)==null||L.forEach(j=>{const z=l.data.find(Y=>Y.id===j);z&&C.push(z)});const S={..._,facilityGroups:C,highschool:_.highschool==="Yes",weekendOperations:_.weekendOperations==="Yes",cookingFacilities:_.cookingFacilities==="Yes",irrigatedSquareFootage:parseInt(_.irrigatedSquareFootage),percentCooled:parseFloat(_.percentCooled),percentHeated:parseFloat(_.percentHeated),percentOperational:parseFloat(_.percentOperational),squareFootage:parseInt(_.squareFootage),squareFootageHistoricalValues:T(_,"squareFootage"),totalOccupants:parseInt(_.totalOccupants),totalOccupantsHistoricalValues:T(_,"totalOccupants"),yearBuilt:parseInt(_.yearBuilt),..._.studentOccupants&&{studentOccupants:parseInt(_.studentOccupants),studentOccupantsHistoricalValues:T(_,"studentOccupants")}};async function x(){try{await VKe({...S,organizationId:E})&&t(),St.success(bt.CREATE_SUCCESS)}catch(j){let z=bt.ERROR;mi.compatible(j)&&(z=bt.FORM_FIELDS_ERROR,gi(c,j)),St.error(z)}finally{d(!1)}}async function k(){try{const{Kto12:j,College:z}=jp,{type:Y,regularOccupants:K=null}=S;[z,j].includes(Y)||(S.studentOccupants=K),await lre(e.id,S),t(),St.success(bt.UPDATE_SUCCESS)}catch(j){let z=bt.ERROR;mi.compatible(j)&&(z=bt.FORM_FIELDS_ERROR,gi(c,j)),St.error(z)}finally{d(!1)}}e.id?k():x()};return xe(nr,{children:[r&&R(dp,{label:"Facility deactivated",labelPlacement:"start",control:R(Tl,{disabled:!0,checked:!0}),style:{display:"flex"}}),y?R(Qot,{meters:e.meters,onCancel:O,onBack:U()}):R(_o,{title:"Facility information",buttons:xe(zr,{children:[R(Ft,{disabled:f||r,onClick:n(_=>P(_)),color:"secondary",variant:"contained",disableElevation:!0,children:e.id?"Update":"Save"}),e.id&&R(Ft,{disabled:f,color:"secondary",variant:"contained",onClick:U(!0),children:"view meters"}),R(Ft,{disabled:f,color:"secondary",variant:"outlined",onClick:O,children:"Cancel"})]}),children:R(nr,{children:R(Ot,{container:!0,spacing:2,children:F.map((_,C)=>R(Ot,{item:!0,xs:12,sm:6,display:_!=null&&_.hidden?"none":"grid",children:R(Dn,{control:i,fieldConf:_,errors:o,isViewMode:r})},C))})})}),R(Br,{open:h,onClose:D,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:D,renderElement:R(qo,{sx:{color:"red"}})}),e.id&&g.open&&R(oit,{dataKey:g.property.replace("HistoricalValues","").split(/(?=[A-Z])/).join(" ").toLowerCase(),initialData:g.data,open:g.open,onClose:N,onSave:_=>{B(_)}})]})};var LF={},ait=Wr;Object.defineProperty(LF,"__esModule",{value:!0});var eoe=LF.default=void 0,sit=ait(tn()),lit=rn,cit=(0,sit.default)((0,lit.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");eoe=LF.default=cit;var $F={},uit=Wr;Object.defineProperty($F,"__esModule",{value:!0});var toe=$F.default=void 0,dit=uit(tn()),fit=rn,hit=(0,dit.default)((0,fit.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");toe=$F.default=hit;function Lp(e,t){return e.filter(({value:r})=>t.findIndex(({value:n})=>r===n)===-1)}function EP(e,t){return e.filter(({value:r})=>t.findIndex(({value:n})=>r===n)!==-1)}function pit(e,t){return[...e,...Lp(t,e)]}function mit({items:e,selectedItems:t,onSave:r,onCancel:n}){const[o,i]=A.useState([]),[a,s]=A.useState(Lp(e,t)),[c,l]=A.useState(t),[u,f]=A.useState(""),[d,h]=A.useState([]),p=EP(o,a),g=EP(o,c);A.useEffect(()=>{u&&m(u)},[a,c]);const m=U=>{h(U?a.filter(B=>B.label.toLowerCase().includes(U.toLowerCase())):[])},v=U=>()=>{const B=o.findIndex(({value:T})=>U.value===T),F=[...o];B===-1?F.push(U):F.splice(B,1),i(F)},y=U=>EP(o,U).length,b=U=>()=>{y(U)===U.length?i(Lp(o,U)):i(pit(o,U))},w=()=>{l(c.concat(p)),s(Lp(a,p)),i(Lp(o,p))},E=()=>{s(a.concat(g)),l(Lp(c,g)),i(Lp(o,g))},I=U=>{const B=U.currentTarget.value;f(B),m(B)},O=()=>{f(""),m("")},D=U=>R(f1,{children:R(z1,{sx:{bgcolor:"background.paper",height:"380px",overflow:"auto"},dense:!0,component:"div",role:"list",children:U.map(B=>{const{label:F,value:T}=B,P=`transfer-list-all-item-${T}-label`,_=o.findIndex(({value:C})=>C===T)!==-1;return xe(BI,{role:"listitem",dense:!0,onClick:v(B),children:[R(gl,{children:R(Tl,{checked:_,tabIndex:-1,disableRipple:!0,color:"secondary",inputProps:{"aria-labelledby":P}})}),R(ps,{id:P,primary:F,sx:{color:_?C=>C.palette.secondary.main:"inherit"}})]},T)})})}),N=U=>R(Ft,{onClick:b(U),variant:"contained",color:"secondary",disabled:U.length===0,disableElevation:!0,children:U.length!==y(U)||U.length===0?"Select All":"Unselect All"});return xe(Ot,{container:!0,spacing:2,children:[xe(Ot,{item:!0,container:!0,spacing:2,xs:12,sm:9,justifyContent:"center",alignItems:"center",children:[R(Ot,{item:!0,xs:12,children:xe(N2,{fullWidth:!0,sx:{my:1},children:[R(F2,{htmlFor:"outlined-adornment-amount",children:"Search"}),R(hD,{fullWidth:!0,size:"small",label:"Search",value:u,onChange:I,color:"secondary",startAdornment:R(c1,{position:"start",children:R(eoe,{color:"secondary"})}),endAdornment:R(c1,{position:"end",children:R(toe,{onClick:O,sx:{cursor:"pointer"}})})})]})}),R(Ot,{item:!0,xs:12,sm:5,children:xe(Ho,{spacing:2,direction:"column",children:[R(jt,{component:"h2",color:"secondary",sx:{fontWeight:"bold"},children:`Available (${a.length})${u?` / Filtering (${d.length})`:""}`}),D(u?d:a),N(u?d:a)]})}),R(Ot,{item:!0,xs:12,sm:2,children:xe(Ot,{container:!0,direction:"column",alignItems:"center",children:[R(Ft,{sx:{my:.5},variant:"outlined",color:p.length===0?"primary":"secondary",size:"small",onClick:w,disabled:p.length===0,"aria-label":"move selected right",children:">"}),R(Ft,{sx:{my:.5},variant:"outlined",color:g.length===0?"primary":"secondary",size:"small",onClick:E,disabled:g.length===0,"aria-label":"move selected left",children:"<"})]})}),R(Ot,{item:!0,xs:12,sm:5,children:xe(Ho,{spacing:2,direction:"column",children:[R(jt,{component:"h2",color:"secondary",sx:{fontWeight:"bold"},children:`Selected (${c.length})`}),D(c),N(c)]})})]}),R(Ot,{item:!0,xs:12,sm:3,children:xe(Ho,{spacing:2,direction:"column",mt:1,children:[R(Ft,{onClick:()=>r&&r(c),type:"submit",variant:"contained",color:"secondary",disableElevation:!0,children:"OK"}),R(Ft,{onClick:()=>n&&n(),variant:"outlined",children:"Cancel"})]})})]})}const git=e=>({name:e.name??"",description:e.description??""}),vit=()=>[{label:"Facility Group Name",name:"name",type:"textInput",placeholder:"Enter Facility Group Name",required:!0},{name:"description",placeholder:"Enter Facility Group Description",label:"Facility Group Description",type:"textInput",required:!1,multiline:!0}],yit=[{field:"name",headerName:"Facility name",flex:1},{field:"type",headerName:"Facility type",minWidth:240}],bit=({doc:e={},handleBackAction:t})=>{const{control:r,handleSubmit:n,formState:{errors:o},...i}=Bn({defaultValues:git(e)}),{getUser:a}=on(),{organizationId:s}=a(),{data:c,isFetching:l,isError:u}=da({queryKey:["facilityGroupsForm"],queryFn:v,initialData:[]}),[f,d]=A.useState([]),[h,p]=A.useState(!1),[g,m]=A.useState(!1);async function v(){try{const{data:B}=await v0();if(e.id&&e.facilities){const F=e.facilities.reduce((T,P)=>{const _=B.find(C=>P.id===C.id);return _&&T.push(_),T},[]);d(F)}return B.filter(F=>F.isActive)}catch(B){throw St.error(bt.ERROR),B}}const y=B=>{const F={...B,organizationId:s,facilities:f};async function T(){try{await Aot(F),t(),St.success(bt.CREATE_SUCCESS)}catch(_){mi.compatible(_)&&gi(i,_),St.error(bt.ERROR)}}async function P(){try{await Mot(e.id,F),t(),St.success(bt.UPDATE_SUCCESS)}catch(_){mi.compatible(_)&&gi(i,_),St.error(bt.ERROR)}}e.id?P():T()},b=()=>{p(!0)},w=()=>{p(!1)},E=()=>{m(!0)},I=()=>{m(!1)},O=B=>{const F=B.reduce((T,P)=>{const _=c.find(C=>C.id===P.value);return _&&T.push(_),T},[]);d(F),m(!1)},D=()=>{m(!1)},N=f.map(B=>({value:B.id,label:B.name})),U=c.map(B=>({value:B.id,label:B.name}));return xe(td,{children:[xe(_o,{title:"Facility group information",buttons:xe(zr,{children:[R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,onClick:n(B=>y(B)),children:e.id?"update":"save"}),R(Ft,{onClick:b,variant:"outlined",children:"Cancel"})]}),children:[R(Ho,{spacing:2,children:vit().map((B,F)=>R(Dn,{control:r,fieldConf:B,errors:o},F))}),R(yo,{children:"Facilities associated"}),R(Uh,{href:"#",underline:"always",color:"secondary",onClick:E,width:"fit-content",children:`Select Facilities (${f.length})`}),R(Yn,{checkboxSelection:!1,rows:f,columns:yit,loading:l,dataFetchError:u,showToolbar:!1,isRowNavigation:!1})]}),R(Br,{open:h,onClose:w,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:w,renderElement:R(qo,{sx:{color:"red"}})}),R(Cs,{title:"Select Facilities",open:g,onClose:I,children:R(mit,{items:U,selectedItems:N,onSave:O,onCancel:D})})]})},wit=async e=>await fa(mr.PROJECTS,{},e),xit=async e=>await ty(`${mr.PROJECTS}/${e}`,{}),Cit=async({filter:e}={})=>await Ao(mr.PROJECTS,{...e&&{filters:JSON.stringify(e)}}),Sit=async(e,t)=>await Ys(`${mr.PROJECTS}/${e}`,{},t),_it=(e={})=>({completionDate:e.completionDate?Hr(e.completionDate):null,description:e.description??"",estimatedCost:e.estimatedCost??0,estimatedRebate:e.estimatedRebate??0,estimatedUtilitySavings:e.estimatedUtilitySavings??0,facilities:e.facilities??[],name:e.name??"",startDate:e.startDate?Hr(e.startDate):null}),kit=()=>[{placeholder:"Project Name",label:"Project Name",name:"name",type:"textInput",required:!0},{placeholder:"Description",label:"Description",name:"description",type:"textInput",required:!1},{placeholder:"Start Date",label:"Start Date",name:"startDate",type:"datePicker",required:!0},{placeholder:"Completion Date",label:"Completion Date",name:"completionDate",type:"datePicker",required:!0},{placeholder:"Estimated Cost",label:"Estimated Cost",name:"estimatedCost",type:"number",required:!0,adorment:"$ ",allowNegative:!0},{placeholder:"Estimated Rebate",label:"Estimated Rebate",name:"estimatedRebate",type:"number",required:!0,adorment:"$ ",allowNegative:!0},{placeholder:"Estimated Utility Savings",label:"Estimated Utility Savings",name:"estimatedUtilitySavings",type:"number",required:!0,adorment:"$ ",allowNegative:!0}],Eit=(e={})=>({endDate:e.endDate&&typeof e.endDate=="string"?Hr(e.endDate):e.endDate??null,facilityId:e.facilityId??"",startDate:e.startDate&&typeof e.startDate=="string"?Hr(e.startDate):e.startDate??null}),Tit=e=>[{placeholder:"Facility",label:"Facility",name:"facilityId",type:"autocomplete",required:!0,options:e.map(r=>({label:r.name,value:r.id,disabled:!r.isActive,key:r.id}))},{placeholder:"Start Date",label:"Start Date",name:"startDate",type:"datePicker",required:!0},{placeholder:"End Date",label:"End Date",name:"endDate",type:"datePicker",required:!0}],fV=({doc:e={},facilities:t=[],onClose:r,onSave:n,open:o})=>{const{control:i,handleSubmit:a,formState:{errors:s}}=Bn({defaultValues:Eit(e)}),c=Tit(t),l=u=>n(u);return R(Cs,{title:Object.keys(e).length?"Edit Facilty":"Add Facility",open:o,onClose:r,dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:r,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,type:"submit",form:"facilty-project-form",children:Object.keys(e).length?"Update facility":"Add facility"})]}),children:R("form",{onSubmit:a(l),id:"facilty-project-form",children:R(Ot,{container:!0,spacing:2,mt:.25,children:c.map((u,f)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:i,fieldConf:u,errors:s})},f))})})})},Iit=({initialData:e,onDataChange:t})=>{const{data:r}=da({queryKey:["facilities"],queryFn:v0,initialData:{data:[]}}),[n,o]=A.useState({}),[i,a]=A.useState(!1),[s,c]=A.useState(""),[l,u]=A.useState(!1),[f,d]=A.useState(!1),[h,p]=A.useState(e??[]);A.useEffect(()=>{t==null||t(h)},[h]);const g=F=>()=>{o({...n,[F]:{mode:gn.View}})},m=F=>()=>{o({...n,[F]:{mode:gn.View,ignoreModifications:!0}})},v=F=>(p(h.map((T,P)=>{const{id:_,...C}=F;return(T==null?void 0:T.facilityId)===_||P===_?C:T})),F),y=F=>o(F),b=F=>{c(F[0])},w=()=>{u(!0),d(!1)},E=()=>{u(!1),d(!0)},I=()=>{u(!1),d(!1),c("")},O=F=>{p([...h,F]),I()},D=F=>{(s||s.toString()==="0")&&p(T=>T.map((_,C)=>(_==null?void 0:_.facilityId)===s.toString()?{id:_==null?void 0:_.facilityId,...F}:C.toString()===s.toString()?F:_)),I()},N=()=>{a(!1)},U=()=>{(s||s.toString()==="0")&&p(F=>F.filter((P,_)=>P!=null&&P.facilityId&&(P==null?void 0:P.facilityId)===s?!1:_.toString()!==s.toString())),c(""),a(!1)};return xe(Jt,{direction:"row",children:[R(Yn,{editMode:"row",rowModesModel:n,isRowNavigation:!1,processRowUpdate:v,checkboxSelection:!1,customToolbarOptions:R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:w,sx:{alignSelf:"flex-end"},children:"Add Facility"})}),columns:[{field:"facility",headerName:"Facility Name",minWidth:256,flex:1,valueGetter:({row:F})=>{var T,P,_;return((T=F.facility)==null?void 0:T.name)??((_=(P=r.data)==null?void 0:P.find(C=>C.id===F.facilityId))==null?void 0:_.name)??""}},{editable:!0,field:"startDate",headerName:"Start Date",width:108,type:"date",valueFormatter:({value:F})=>F?Vo(F,"P"):"",valueGetter:({value:F})=>F&&typeof F=="string"?Hr(F):F||null},{editable:!0,field:"endDate",headerName:"End Date",width:108,type:"date",valueFormatter:({value:F})=>F?Vo(F,"P"):"",valueGetter:({value:F})=>F&&typeof F=="string"?Hr(F):F||null},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:F})=>{var P;return((P=n[F])==null?void 0:P.mode)===gn.Edit?[R(yr,{icon:R(g0,{}),label:"Save",sx:{color:"primary.main"},onClick:g(F)},"save"),R(yr,{icon:R(m0,{}),label:"Cancel",className:"textPrimary",onClick:m(F),color:"inherit"},"cancel")]:[R(yr,{icon:R(ud,{}),label:"Edit",className:"textPrimary",onClick:()=>{c(F),E()},color:"inherit"},"edit"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{c(F),a(!0)},color:"inherit"},"delete")]}}],csvFilename:"Initial Facilities",handleSelectionChange:b,onRowModesModelChange:y,rows:h.length===0?[]:h.map((F,T)=>({id:T,...F}))}),l&&R(fV,{facilities:r.data,open:l,onClose:I,onSave:O}),f&&R(fV,{doc:h.find((F,T)=>F!=null&&F.facilityId&&(F==null?void 0:F.facilityId)===s?!0:T.toString()===s.toString()),facilities:r.data,open:f,onClose:I,onSave:D}),R(Br,{open:i,onClose:N,message:"Are you sure you want to remove this facility?",primaryButtonLabel:"Yes",onPrimaryButtonClicked:U,secondaryButtonLabel:"No",onSecondaryButtonClicked:N,renderElement:R(oo,{sx:{color:"error.main"}})})]})},Ait=({doc:e={},handleBackAction:t})=>{const{mutate:r,isPending:n}=xs({mutationKey:["projectForm"],mutationFn:async b=>{await(e.id?v:m)(b)},onSuccess:()=>{const{CREATE_SUCCESS:b,UPDATE_SUCCESS:w}=bt;St.success(e.id?w:b),t()}}),{control:o,formState:{errors:i},getValues:a,handleSubmit:s,setError:c}=Bn({defaultValues:_it(e)}),{getUser:l}=on(),{organizationId:u}=l(),[f,d]=A.useState(!1),[h,p]=A.useState(e.facilities??[]),g=kit();async function m(b){try{return await wit(b)}catch(w){throw mi.compatible(w)&&gi({getValues:a,setError:c},w),St.error(bt.ERROR),w}}async function v(b){try{return await Sit(e.id,b)}catch(w){throw mi.compatible(w)&&gi({getValues:a,setError:c},w),St.error(bt.ERROR),w}}const y=()=>{d(b=>!b)};return xe(nr,{children:[R(_o,{title:"Project Information",buttons:xe(zr,{children:[R(Ft,{disabled:n,disableElevation:!0,color:"secondary",variant:"contained",onClick:s(b=>r(Object.assign(b,{facilities:h,organizationId:u}))),children:e.organizationId?"Update":"Save"}),R(Ft,{disabled:n,disableElevation:!0,color:"secondary",variant:"outlined",onClick:y,children:"Cancel"})]}),children:R(nr,{children:xe(Ot,{container:!0,spacing:2,children:[g.map((b,w)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:b,errors:i})},w)),R(Ot,{item:!0,xs:12,children:R(yo,{children:"Facilities"})}),R(Ot,{item:!0,xs:12,children:R(Iit,{initialData:h,onDataChange:p})})]})})}),R(Br,{open:f,onClose:y,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:y,renderElement:R(qo,{sx:{color:"red"}})})]})},roe=async e=>await fa(mr.USERS,{},e),Pit=async(e,t)=>await fa(`${mr.USERS}/${e}/image`,{},t,eC),Mit=async e=>await g8(`${mr.USERS}/${e}/image`),BF=async e=>await _We(`${mr.USERS}${mr.FORGOT_PASSWORD}`,{},e),noe=async e=>await Ao(`${mr.USERS}/${e}`),Rit=async()=>await Ao(mr.USERS),Oit=async()=>await Ao(`${mr.USERS}`,{allOrganizations:!0}),m4=async(e,t)=>await Ys(`${mr.USERS}/${e}`,{},t),Dit=async()=>await fa(`${mr.USERS}/api-key`,{},{}),UF=(e={})=>({name:e.name??"",email:e.email??"",userType:e.userType??"",title:e.title??"",organizationId:e.organizationId??"",phone:e.phone??"",profilePicture:e.profilePicture??""}),HF=(e,t)=>{const r=[Pi.Administrator,Pi.User],n=[Pi.SystemAdministrator,...r],o=t===Pi.SystemAdministrator?n:r;return[{name:"name",label:"Name",placeholder:"Name",required:!0,type:"textInput"},{name:"email",disabled:e!=="new",label:"Email",placeholder:"Email",required:!0,type:"textInput"},{name:"userType",hidden:t===Pi.User,label:"User Type",placeholder:"User Type",type:"selectInput",required:!0,values:o.map(a=>({label:a,value:a}))},{name:"title",label:"Title",placeholder:"Title",type:"textInput",required:!1},{name:"phone",label:"Phone",placeholder:"Phone",type:"textInput",required:!1}]},Fit=({doc:e={},handleBackAction:t})=>{const{control:r,handleSubmit:n,formState:{errors:o},...i}=Bn({defaultValues:UF(e)}),[a,s]=A.useState(!1),{getUser:c}=on(),{organizationId:l,userType:u}=c(),f=p=>{const g={email:p.email,name:p.name,phone:p.phone,title:p.title,...(u===Pi.Administrator||u===Pi.SystemAdministrator)&&{userType:p.userType}};async function m(){try{await roe({...g,organizationId:l}),t(),St.success(bt.CREATE_SUCCESS)}catch(y){mi.compatible(y)&&gi(i,y),St.error(y===400?bt.ALREADY_EMAIL_IN_USE:bt.ERROR)}}async function v(){try{delete g.email,await m4(e.id,g),t(),St.success(bt.UPDATE_SUCCESS)}catch(y){mi.compatible(y)&&gi(i,y),St.error(y===400?bt.ALREADY_EMAIL_IN_USE:bt.ERROR)}}e.id?v():m()},d=()=>{s(!1)},h=()=>{s(!0)};return xe(td,{children:[R(_o,{title:"User information",buttons:xe(zr,{children:[R(Ft,{color:"secondary",variant:"contained",onClick:n(p=>f(p)),disableElevation:!0,children:e.id?"update":"save"}),R(Ft,{color:"secondary",variant:"outlined",onClick:h,children:"Cancel"})]}),children:R(td,{children:R(Ot,{container:!0,spacing:2,children:HF(e.id??"new",u).map((p,g)=>R(Ot,{item:!0,xs:12,sm:6,display:p!=null&&p.hidden?"none":"grid",children:R(Dn,{control:r,fieldConf:p,errors:o})},g))})})}),R(Br,{open:a,onClose:d,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:d,renderElement:R(qo,{sx:{color:"red"}})})]})},Nit=(e={})=>({billingAddress1:e.billingAddress1??"",billingAddress2:e.billingAddress2??"",billingCity:e.billingCity??"",billingPostalCode:e.billingPostalCode??"",billingState:e.billingState??"",country:e.country??"",description:e.description??"",name:e.name??"",serviceTypes:e.serviceTypes??[],vendorNumber:e.vendorNumber??"",website:e.website??""}),Lit=()=>[{placeholder:"Utility Name",label:"Utility Name",name:"name",type:"textInput",required:!0},{placeholder:"Vendor Number",label:"Vendor Number",name:"vendorNumber",type:"textInput",required:!1},{placeholder:"Utility Description",label:"Utility Description",name:"description",type:"textInput",required:!1,multiline:!0},{placeholder:"Service Types",label:"Service Types",name:"serviceTypes",type:"selectInput",required:!1,multiple:!0,values:Object.values(Mr).map(t=>({label:t,value:t}))},{placeholder:"Billing Address 1",label:"Billing Address 1",name:"billingAddress1",type:"textInput",required:!1},{placeholder:"Billing Address 2",label:"Billing Address 2",name:"billingAddress2",type:"textInput",required:!1},{placeholder:"Billing Address City",label:"Billing Address City",name:"billingCity",type:"textInput",required:!1},{placeholder:"Billing Address State",label:"Billing Address State",name:"billingState",type:"selectInput",required:!1,values:NF.map(t=>({label:`${t.name} (${t.abbreviation})`,value:t.abbreviation}))},{placeholder:"Billing Postal Code",label:"Billing Postal Code",name:"billingPostalCode",type:"textInput",required:!1},{placeholder:"Country",label:"Country",name:"country",type:"selectInput",required:!1,values:FF.map(t=>({label:`${t.name} (${t.abbreviation})`,value:t.name}))},{placeholder:"Utility Website",label:"Utility Website",name:"website",type:"textInput",required:!1}],$it=({doc:e={},handleBackAction:t})=>{const r=Lit(),[n,o]=A.useState(!1),[i,a]=A.useState(!1),{getUser:s}=on(),{organizationId:c}=s(),{control:l,handleSubmit:u,formState:{errors:f},...d}=Bn({defaultValues:Nit(e)}),h=!(e.isActive??!0),p=()=>{a(v=>!v)},g=v=>{o(!0);const y={...v,organizationId:c};async function b(){try{await yqe(y)&&t(),St.success(bt.CREATE_SUCCESS)}catch(E){mi.compatible(E)&&gi(d,E),St.error(bt.ERROR)}finally{o(!1)}}async function w(){try{await Gte(e.id,y),t(),St.success(bt.UPDATE_SUCCESS)}catch(E){mi.compatible(E)&&gi(d,E),St.error(bt.ERROR)}finally{o(!1)}}e.id?w():b()},m=[{field:"number",headerName:"Account Number",flex:1},{field:"serviceStartDate",headerName:"Service Start Date",flex:1,valueFormatter:({value:v})=>v?Vo(v,"PPP"):"",valueGetter:({row:v})=>v.serviceStartDate?Hr(v.serviceStartDate):""},{field:"serviceEndDate",headerName:"Service End Date",flex:1,valueFormatter:({value:v})=>v?Vo(v,"PPP"):"",valueGetter:({row:v})=>v.serviceEndDate?Hr(v.serviceEndDate):""}];return xe(nr,{children:[h&&R(dp,{label:"Utility deactivated",labelPlacement:"start",control:R(Tl,{disabled:!0,checked:!0}),style:{display:"flex"}}),xe(_o,{title:"Utility information",buttons:xe(zr,{children:[R(Ft,{disabled:n||h,color:"secondary",variant:"contained",onClick:u(v=>g(v)),disableElevation:!0,children:e.id?"Update":"Save"}),R(Ft,{color:"secondary",variant:"outlined",onClick:p,children:"Cancel"})]}),children:[R(nr,{children:R(Ot,{container:!0,spacing:2,children:r.map((v,y)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:l,fieldConf:v,errors:f,isViewMode:h})},y))})}),R(yo,{children:"Accounts associated"}),R(Yn,{checkboxSelection:!1,columns:m,rows:e.accounts??[],showToolbar:!1,isRowNavigation:!1})]}),R(Br,{open:i,onClose:p,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:p,renderElement:R(qo,{sx:{color:"red"}})})]})},Bit="meters",Uit=()=>{const[{data:e,refetch:t,isError:r,isFetched:n}]=qi({queries:[{queryKey:["meters"],queryFn:async()=>await kf(),initialData:{data:[]}}]}),[o,i]=A.useState(!1),[a,s]=A.useState({open:!1,data:{}}),[c,l]=A.useState({open:!1,data:{}}),u=ii();function f(){l({open:!1,data:{}})}function d(){s({open:!1,data:{}})}const h=b=>()=>u(`/administration/meters/${b}`),p=async()=>{try{const b=a.data;if(b.id){const w={...b,isActive:!b.isActive};await ere(b.id,w),await t(),d(),St.success(w.isActive?bt.REACTIVATE_SUCCESS:bt.DEACTIVATE_SUCCESS)}else St.error(bt.ERROR)}catch{St.error(bt.ERROR)}},g=()=>i(!o),m=()=>{const b="Reactivate",w="Deactivate";return a.data.isActive?w:b},v=[{field:"name",headerName:"Meter Name",minWidth:100,flex:.5},{field:"parentAccount",headerName:"Parent Account",minWidth:100,flex:1,valueGetter:({value:b})=>(b==null?void 0:b.number)??""},{field:"replacesMeter",headerName:"Replaces Meter",minWidth:100,flex:.5,valueGetter:({value:b})=>(b==null?void 0:b.name)??""},{field:"parentFacility",headerName:"Parent Facility",minWidth:100,flex:1,valueGetter:({value:b})=>(b==null?void 0:b.name)??""},{field:"parentFacilityAddress",headerName:"Parent Facility Address 1",minWidth:100,flex:1,valueGetter:({row:b})=>{var w;return((w=b.parentFacility)==null?void 0:w.address1)??""}},{field:"serviceType",headerName:"Service Type",width:96},{field:"usageUnit",headerName:"Usage Unit",width:80},{field:"demandUnit",headerName:"Demand Unit",width:64},{field:"inactiveDate",headerName:"Inactive Date",type:"dateTime",width:150,valueFormatter:({value:b})=>b?Vo(b,"PPP"):"",valueGetter:({row:b})=>b.inactiveDate?Hr(b.inactiveDate):""},{field:"deactivated",headerName:"Deactivated",width:100,valueGetter:b=>b.row.isActive?"No":"Yes",renderCell:({row:b})=>xe(zr,{children:[R(bo,{label:b.isActive?"No":"Yes",variant:"outlined",color:b.isActive?"success":"error"}),!b.isActive&&R(tC,{infoMessage:"This item does not show up in any reports"})]})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:b,isActive:w,...E}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:h(b)},"updateBtn"),R(yr,{icon:w?R(oy,{}):R(ny,{}),label:w?"Deactivate":"Reactivate",showInMenu:!0,onClick:()=>s({open:!0,data:{...E,id:b,isActive:w}})},"hiddenBtn"),R(yr,{icon:R(Q8,{}),label:"View Bills",onClick:()=>l({open:!0,data:{...E,id:b,isActive:w}}),showInMenu:!0},"viewBillsBtn")]}],y=[{name:"New",icon:R(Qa,{}),handleAction:h("new"),primary:!0}];return c.open?R(K8,{accountId:c.data.parentAccount.id,handleBackAction:f}):xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:y}),R(Yn,{columns:v,contextName:Bit,csvFilename:"Meters",dataFetchError:r,loading:!n,customToolbarOptions:R(oC,{showDeactivatedType:o,setShowDeactivatedType:g,type:"meters"}),rows:o?e.data:e.data.filter(({isActive:b})=>b)}),R(Br,{open:a.open,onClose:d,message:`Deactivating this item will remove all associated data from reports.
         Are you sure you would like to ${m().toLocaleLowerCase()} this meter?`,primaryButtonLabel:m(),onPrimaryButtonClicked:p,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:d,renderElement:a.data.isActive?R(q2,{sx:{color:"error.main"}}):R(G2,{sx:{color:"success.main"}})})]})},Hit=async e=>await fa(mr.ORGANIZATIONS,{},e),zF=async()=>await Ao(mr.ORGANIZATIONS),jF=async(e,t)=>await Ys(`${mr.ORGANIZATIONS}/${e}`,{},t),Bd=({label:e,value:t})=>xe(Ot,{item:!0,xs:12,sm:6,children:[R(jt,{variant:"body1",color:"textSecondary",children:e}),R(jt,{variant:"body1",children:t})]}),hV=()=>{const{getUser:e,refreshUser:t}=on(),{organization:{name:r,products:n,productFeatures:o,fiscalYearStartMonth:i=6},organizationId:a,userType:s}=e(),c=new Date;c.setDate(15),c.setMonth(i);const{control:l,formState:{errors:u},handleSubmit:f,getValues:d}=Bn({defaultValues:{fiscalYearStartMonth:c}}),[h,p]=A.useState(!1),[g,m]=A.useState(!1);async function v(){try{m(!0),await jF(a,{fiscalYearStartMonth:d("fiscalYearStartMonth").getMonth()}),t(),p(!1)}catch{St.error(bt.ERROR)}finally{m(!1)}}return xe(nr,{children:[R(f1,{variant:"outlined",children:R(dx,{children:R(_o,{...s!==Pi.User?{buttons:R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,onClick:()=>p(!0),children:"Update Fiscal Year Start Month"})}:{},title:"Organization Information",children:R(nr,{children:xe(Ot,{container:!0,spacing:2,children:[R(Bd,{label:"Organization Name",value:r}),R(Bd,{label:"Products",value:(n==null?void 0:n.join(", "))||"-"}),R(Bd,{label:"Features",value:(o==null?void 0:o.join(", "))||"-"}),R(Bd,{label:"Fiscal Year Start month",value:dC(c,{month:"long"})})]})})})})}),R(Cs,{fullWidth:!1,open:h,onClose:()=>p(!1),dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{disabled:g,variant:"outlined",onClick:()=>p(!1),children:"close"}),R(Ft,{disabled:g,variant:"contained",color:"secondary",disableElevation:!0,onClick:f(v),children:"Update Start Month"})]}),children:R(_o,{title:"Fiscal Year Start Month",children:R(nr,{display:"flex",justifyContent:"center",width:500,children:R(Dn,{control:l,errors:u,fieldConf:{placeholder:"Fiscal Year Start Month",label:"Fiscal Year Start Month",name:"fiscalYearStartMonth",type:"datePicker",required:!0,other:{views:["month"],slotProps:{calendarHeader:{sx:{display:"none"}}}}}})})})})]})},zit="projects",jit=()=>{const[{data:e,isFetching:t,isError:r,refetch:n}]=qi({queries:[{queryKey:["projects"],queryFn:async()=>await Cit(),initialData:{data:[]}}]}),[o,i]=A.useState({open:!1,data:{}}),a=ii();async function s(){try{await xit(o.data.id),await n(),c(),St.success(bt.DELETE_SUCCESS)}catch{St.error(bt.ERROR)}}function c(){i({open:!1,data:{}})}const l=d=>()=>a(`/administration/projects/${d}`),u=[{field:"name",headerName:"Project Name",flex:1},{field:"description",headerName:"Description",flex:1},{field:"startDate",headerName:"Start Date",flex:1,valueFormatter:({value:d})=>d?Vo(d,"PPP"):"",valueGetter:({row:d})=>d.startDate?Hr(d.startDate):""},{field:"completionDate",headerName:"Completion Date",flex:1,valueFormatter:({value:d})=>d?Vo(d,"PPP"):"",valueGetter:({row:d})=>d.completionDate?Hr(d.completionDate):""},{field:"estimatedCost",headerName:"Estimated Cost",flex:1,renderCell:({value:d})=>vo(d)},{field:"estimatedRebate",headerName:"Estimated Rebate",flex:1,renderCell:({value:d})=>vo(d)},{field:"estimatedUtilitySavings",headerName:"Estimated Utility Savings",flex:1,renderCell:({value:d})=>vo(d)},{field:"facilities",headerName:"Facilities",flex:1,valueFormatter:({value:d})=>(d==null?void 0:d.map(p=>p.facility.name)).join(", ")},{field:"actions",headerName:"Options",type:"actions",getActions:({row:d})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:l(d.id)},"updateBtn"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>i({open:!0,data:d})},"deleteBtn")]}],f=[{name:"New",icon:R(Qa,{}),handleAction:l("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:3,children:[R(ts,{actions:f}),R(Yn,{columns:u,contextName:zit,csvFilename:"Meters",dataFetchError:r,loading:t,rows:e.data}),R(Br,{open:o.open,onClose:c,message:"Are you sure you want to remove this project?",primaryButtonLabel:"Delete",onPrimaryButtonClicked:s,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:c,renderElement:R(oo,{sx:{color:"error.main"}})})]})};var zE=(e=>(e.DEFAULT="password",e.GOOGLE="google.com",e.MICROSOFT="microsoft.com",e))(zE||{}),ooe={exports:{}};(function(e,t){(function(r,n){e.exports=n(kY,A)})(Er,function(r,n){function o(T){return T&&typeof T=="object"&&"default"in T?T:{default:T}}var i=o(r),a=o(n);function s(T,P){for(var _=0;_<P.length;_++){var C=P[_];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(T,C.key,C)}}function c(T,P,_){return P in T?Object.defineProperty(T,P,{value:_,enumerable:!0,configurable:!0,writable:!0}):T[P]=_,T}function l(){return(l=Object.assign||function(T){for(var P=1;P<arguments.length;P++){var _=arguments[P];for(var C in _)Object.prototype.hasOwnProperty.call(_,C)&&(T[C]=_[C])}return T}).apply(this,arguments)}function u(T,P){var _,C=Object.keys(T);return Object.getOwnPropertySymbols&&(_=Object.getOwnPropertySymbols(T),P&&(_=_.filter(function(S){return Object.getOwnPropertyDescriptor(T,S).enumerable})),C.push.apply(C,_)),C}function f(T){for(var P=1;P<arguments.length;P++){var _=arguments[P]!=null?arguments[P]:{};P%2?u(Object(_),!0).forEach(function(C){c(T,C,_[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(_)):u(Object(_)).forEach(function(C){Object.defineProperty(T,C,Object.getOwnPropertyDescriptor(_,C))})}return T}function d(T){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)})(T)}function h(T,P){return(h=Object.setPrototypeOf||function(_,C){return _.__proto__=C,_})(T,P)}function p(T,P){if(T==null)return{};var _,C=function(k,L){if(k==null)return{};for(var j,z={},Y=Object.keys(k),K=0;K<Y.length;K++)j=Y[K],0<=L.indexOf(j)||(z[j]=k[j]);return z}(T,P);if(Object.getOwnPropertySymbols)for(var S=Object.getOwnPropertySymbols(T),x=0;x<S.length;x++)_=S[x],0<=P.indexOf(_)||Object.prototype.propertyIsEnumerable.call(T,_)&&(C[_]=T[_]);return C}function g(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}function m(T){var P=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var _,C,S,x,k=d(T);return C=P?(_=d(this).constructor,Reflect.construct(k,arguments,_)):k.apply(this,arguments),S=this,!(x=C)||typeof x!="object"&&typeof x!="function"?g(S):x}}function v(T,P){return function(_){if(Array.isArray(_))return _}(T)||function(_,C){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(_)))){var S=[],x=!0,k=!1,L=void 0;try{for(var j,z=_[Symbol.iterator]();!(x=(j=z.next()).done)&&(S.push(j.value),!C||S.length!==C);x=!0);}catch(Y){k=!0,L=Y}finally{try{x||z.return==null||z.return()}finally{if(k)throw L}}return S}}(T,P)||y(T,P)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function y(T,P){if(T){if(typeof T=="string")return b(T,P);var _=Object.prototype.toString.call(T).slice(8,-1);return _==="Object"&&T.constructor&&(_=T.constructor.name),_==="Map"||_==="Set"?Array.from(T):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?b(T,P):void 0}}function b(T,P){(P==null||P>T.length)&&(P=T.length);for(var _=0,C=new Array(P);_<P;_++)C[_]=T[_];return C}function w(T,P){return new Promise(function(_,C){var S,x=new Image;x.onload=function(){return _(x)},x.onerror=C,!((S=T)!==null&&S.match(/^\s*data:([a-z]+\/[a-z]+(;[a-z-]+=[a-z-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=\-._~:@/?%\s]*\s*$/i))&&P&&(x.crossOrigin=P),x.src=T})}var E,I=!(typeof window>"u"||typeof navigator>"u"||!("ontouchstart"in window||0<navigator.msMaxTouchPoints)),O=typeof File<"u",D={touch:{react:{down:"onTouchStart",mouseDown:"onMouseDown",drag:"onTouchMove",move:"onTouchMove",mouseMove:"onMouseMove",up:"onTouchEnd",mouseUp:"onMouseUp"},native:{down:"touchstart",mouseDown:"mousedown",drag:"touchmove",move:"touchmove",mouseMove:"mousemove",up:"touchend",mouseUp:"mouseup"}},desktop:{react:{down:"onMouseDown",drag:"onDragOver",move:"onMouseMove",up:"onMouseUp"},native:{down:"mousedown",drag:"dragStart",move:"mousemove",up:"mouseup"}}},N=I?D.touch:D.desktop,U=typeof window<"u"&&window.devicePixelRatio?window.devicePixelRatio:1,B={x:.5,y:.5},F=function(){(function(S,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(x&&x.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),x&&h(S,x)})(C,a.default.Component);var T,P,_=m(C);function C(S){var x;return function(k,L){if(!(k instanceof L))throw new TypeError("Cannot call a class as a function")}(this,C),c(g(x=_.call(this,S)),"state",{drag:!1,my:null,mx:null,image:B}),c(g(x),"handleImageReady",function(k){var L=x.getInitialSize(k.width,k.height);L.resource=k,L.x=.5,L.y=.5,L.backgroundColor=x.props.backgroundColor,x.setState({drag:!1,image:L},x.props.onImageReady),x.props.onLoadSuccess(L)}),c(g(x),"clearImage",function(){x.canvas.getContext("2d").clearRect(0,0,x.canvas.width,x.canvas.height),x.setState({image:B})}),c(g(x),"handleMouseDown",function(k){(k=k||window.event).preventDefault(),x.setState({drag:!0,mx:null,my:null})}),c(g(x),"handleMouseUp",function(){x.state.drag&&(x.setState({drag:!1}),x.props.onMouseUp())}),c(g(x),"handleMouseMove",function(k){var L,j,z,Y,K,Q,q,J,G,V,X,te,ee,re,se,pe;k=k||window.event,x.state.drag!==!1&&(k.preventDefault(),z={mx:L=k.targetTouches?k.targetTouches[0].pageX:k.clientX,my:j=k.targetTouches?k.targetTouches[0].pageY:k.clientY},pe=x.props.rotate,pe=(pe%=360)<0?pe+360:pe,x.state.mx&&x.state.my&&(Y=x.state.mx-L,K=x.state.my-j,Q=x.state.image.width*x.props.scale,q=x.state.image.height*x.props.scale,G=(J=x.getCroppingRect()).x,V=J.y,G*=Q,V*=q,X=function(ce){return ce*(Math.PI/180)},te=Math.cos(X(pe)),re=V+-Y*(ee=Math.sin(X(pe)))+K*te,se={x:(G+Y*te+K*ee)/Q+1/x.props.scale*x.getXScale()/2,y:re/q+1/x.props.scale*x.getYScale()/2},x.props.onPositionChange(se),z.image=f(f({},x.state.image),se)),x.setState(z),x.props.onMouseMove(k))}),c(g(x),"setCanvas",function(k){x.canvas=k}),x.canvas=null,x}return T=C,(P=[{key:"componentDidMount",value:function(){this.props.disableHiDPIScaling&&(U=1);var S,x,k=this.canvas.getContext("2d");this.props.image&&this.loadImage(this.props.image),this.paint(k),document&&(S=!!function(){var L=!1;try{var j=Object.defineProperty({},"passive",{get:function(){L=!0}});window.addEventListener("test",j,j),window.removeEventListener("test",j,j)}catch{L=!1}return L}()&&{passive:!1},x=N.native,document.addEventListener(x.move,this.handleMouseMove,S),document.addEventListener(x.up,this.handleMouseUp,S),I&&(document.addEventListener(x.mouseMove,this.handleMouseMove,S),document.addEventListener(x.mouseUp,this.handleMouseUp,S)))}},{key:"componentDidUpdate",value:function(S,x){this.props.image&&this.props.image!==S.image||this.props.width!==S.width||this.props.height!==S.height||this.props.backgroundColor!==S.backgroundColor?this.loadImage(this.props.image):this.props.image||x.image===B||this.clearImage();var k=this.canvas.getContext("2d");k.clearRect(0,0,this.canvas.width,this.canvas.height),this.paint(k),this.paintImage(k,this.state.image,this.props.border),S.image===this.props.image&&S.width===this.props.width&&S.height===this.props.height&&S.position===this.props.position&&S.scale===this.props.scale&&S.rotate===this.props.rotate&&x.my===this.state.my&&x.mx===this.state.mx&&x.image.x===this.state.image.x&&x.image.y===this.state.image.y&&x.backgroundColor===this.state.backgroundColor||this.props.onImageChange()}},{key:"componentWillUnmount",value:function(){var S;document&&(S=N.native,document.removeEventListener(S.move,this.handleMouseMove,!1),document.removeEventListener(S.up,this.handleMouseUp,!1),I&&(document.removeEventListener(S.mouseMove,this.handleMouseMove,!1),document.removeEventListener(S.mouseUp,this.handleMouseUp,!1)))}},{key:"isVertical",value:function(){return!this.props.disableCanvasRotation&&this.props.rotate%180!=0}},{key:"getBorders",value:function(S){var x=0<arguments.length&&S!==void 0?S:this.props.border;return Array.isArray(x)?x:[x,x]}},{key:"getDimensions",value:function(){var S=this.props,x=S.width,k=S.height,L=S.rotate,j=S.border,z={},Y=v(this.getBorders(j),2),K=Y[0],Q=Y[1],q=x,J=k;return this.isVertical()?(z.width=J,z.height=q):(z.width=q,z.height=J),z.width+=2*K,z.height+=2*Q,{canvas:z,rotate:L,width:x,height:k,border:j}}},{key:"getImage",value:function(){var S=this.getCroppingRect(),x=this.state.image;S.x*=x.resource.width,S.y*=x.resource.height,S.width*=x.resource.width,S.height*=x.resource.height;var k=document.createElement("canvas");this.isVertical()?(k.width=S.height,k.height=S.width):(k.width=S.width,k.height=S.height);var L=k.getContext("2d");return L.translate(k.width/2,k.height/2),L.rotate(this.props.rotate*Math.PI/180),L.translate(-k.width/2,-k.height/2),this.isVertical()&&L.translate((k.width-k.height)/2,(k.height-k.width)/2),x.backgroundColor&&(L.fillStyle=x.backgroundColor,L.fillRect(-S.x,-S.y,x.resource.width,x.resource.height)),L.drawImage(x.resource,-S.x,-S.y),k}},{key:"getImageScaledToCanvas",value:function(){var S=this.getDimensions(),x=S.width,k=S.height,L=document.createElement("canvas");return this.isVertical()?(L.width=k,L.height=x):(L.width=x,L.height=k),this.paintImage(L.getContext("2d"),this.state.image,0,1),L}},{key:"getXScale",value:function(){var S=this.props.width/this.props.height,x=this.state.image.width/this.state.image.height;return Math.min(1,S/x)}},{key:"getYScale",value:function(){var S=this.props.height/this.props.width,x=this.state.image.height/this.state.image.width;return Math.min(1,S/x)}},{key:"getCroppingRect",value:function(){var S=this.props.position||{x:this.state.image.x,y:this.state.image.y},x=1/this.props.scale*this.getXScale(),k=1/this.props.scale*this.getYScale(),L={x:S.x-x/2,y:S.y-k/2,width:x,height:k},j=0,z=1-L.width,Y=0,K=1-L.height;return(this.props.disableBoundaryChecks||1<x||1<k)&&(j=-L.width,Y=-L.height,K=z=1),f(f({},L),{},{x:Math.max(j,Math.min(L.x,z)),y:Math.max(Y,Math.min(L.y,K))})}},{key:"loadImage",value:function(S){var x;O&&S instanceof File?this.loadingImage=(x=S,new Promise(function(k,L){var j=new FileReader;j.onload=function(z){try{var Y=w(z.target.result);k(Y)}catch(K){L(K)}},j.readAsDataURL(x)}).then(this.handleImageReady).catch(this.props.onLoadFailure)):typeof S=="string"&&(this.loadingImage=w(S,this.props.crossOrigin).then(this.handleImageReady).catch(this.props.onLoadFailure))}},{key:"getInitialSize",value:function(S,x){var k,L,j=this.getDimensions();return x/S<j.height/j.width?L=S*((k=this.getDimensions().height)/x):k=x*((L=this.getDimensions().width)/S),{height:k,width:L}}},{key:"paintImage",value:function(S,x,k,L){var j,z=3<arguments.length&&L!==void 0?L:U;x.resource&&(j=this.calculatePosition(x,k),S.save(),S.translate(S.canvas.width/2,S.canvas.height/2),S.rotate(this.props.rotate*Math.PI/180),S.translate(-S.canvas.width/2,-S.canvas.height/2),this.isVertical()&&S.translate((S.canvas.width-S.canvas.height)/2,(S.canvas.height-S.canvas.width)/2),S.scale(z,z),S.globalCompositeOperation="destination-over",S.drawImage(x.resource,j.x,j.y,j.width,j.height),x.backgroundColor&&(S.fillStyle=x.backgroundColor,S.fillRect(j.x,j.y,j.width,j.height)),S.restore())}},{key:"calculatePosition",value:function(S,x){S=S||this.state.image;var k=v(this.getBorders(x),2),L=k[0],j=k[1],z=this.getCroppingRect(),Y=S.width*this.props.scale,K=S.height*this.props.scale,Q=-z.x*Y,q=-z.y*K;return this.isVertical()?(Q+=j,q+=L):(Q+=L,q+=j),{x:Q,y:q,height:K,width:Y}}},{key:"paint",value:function(S){S.save(),S.scale(U,U),S.translate(0,0),S.fillStyle="rgba("+this.props.color.slice(0,4).join(",")+")";var x,k,L,j,z,Y,K,Q,ee=this.props.borderRadius,q=this.getDimensions(),J=v(this.getBorders(q.border),2),G=J[0],V=J[1],X=q.canvas.height,te=q.canvas.width,ee=Math.max(ee,0);ee=Math.min(ee,te/2-G,X/2-V),S.beginPath(),x=S,j=te-2*(k=G),z=X-2*(L=V),(Y=ee)===0?x.rect(k,L,j,z):(K=j-Y,Q=z-Y,x.translate(k,L),x.arc(Y,Y,Y,Math.PI,1.5*Math.PI),x.lineTo(K,0),x.arc(K,Y,Y,1.5*Math.PI,2*Math.PI),x.lineTo(j,Q),x.arc(K,Q,Y,2*Math.PI,.5*Math.PI),x.lineTo(Y,z),x.arc(Y,Q,Y,.5*Math.PI,Math.PI),x.translate(-k,-L)),S.rect(te,0,-te,X),S.fill("evenodd"),S.restore()}},{key:"render",value:function(){var S=this.props,x=(S.scale,S.rotate,S.image,S.border,S.borderRadius,S.width,S.height,S.position,S.color,S.backgroundColor,S.style),k=(S.crossOrigin,S.onLoadFailure,S.onLoadSuccess,S.onImageReady,S.onImageChange,S.onMouseUp,S.onMouseMove,S.onPositionChange,S.disableBoundaryChecks,S.disableHiDPIScaling,S.disableCanvasRotation,p(S,["scale","rotate","image","border","borderRadius","width","height","position","color","backgroundColor","style","crossOrigin","onLoadFailure","onLoadSuccess","onImageReady","onImageChange","onMouseUp","onMouseMove","onPositionChange","disableBoundaryChecks","disableHiDPIScaling","disableCanvasRotation"])),L=this.getDimensions(),j={width:L.canvas.width,height:L.canvas.height,cursor:this.state.drag?"grabbing":"grab",touchAction:"none"},z={width:L.canvas.width*U,height:L.canvas.height*U,style:f(f({},j),x)};return z[N.react.down]=this.handleMouseDown,I&&(z[N.react.mouseDown]=this.handleMouseDown),a.default.createElement("canvas",l({ref:this.setCanvas},z,k))}}])&&s(T.prototype,P),C}();return c(F,"propTypes",{scale:i.default.number,rotate:i.default.number,image:i.default.oneOfType([i.default.string].concat(function(T){if(Array.isArray(T))return b(T)}(E=O?[i.default.instanceOf(File)]:[])||function(T){if(typeof Symbol<"u"&&Symbol.iterator in Object(T))return Array.from(T)}(E)||y(E)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}())),border:i.default.oneOfType([i.default.number,i.default.arrayOf(i.default.number)]),borderRadius:i.default.number,width:i.default.number,height:i.default.number,position:i.default.shape({x:i.default.number,y:i.default.number}),color:i.default.arrayOf(i.default.number),backgroundColor:i.default.string,crossOrigin:i.default.oneOf(["","anonymous","use-credentials"]),onLoadFailure:i.default.func,onLoadSuccess:i.default.func,onImageReady:i.default.func,onImageChange:i.default.func,onMouseUp:i.default.func,onMouseMove:i.default.func,onPositionChange:i.default.func,disableBoundaryChecks:i.default.bool,disableHiDPIScaling:i.default.bool,disableCanvasRotation:i.default.bool}),c(F,"defaultProps",{scale:1,rotate:0,border:25,borderRadius:0,width:200,height:200,color:[0,0,0,.5],onLoadFailure:function(){},onLoadSuccess:function(){},onImageReady:function(){},onImageChange:function(){},onMouseUp:function(){},onMouseMove:function(){},onPositionChange:function(){},disableBoundaryChecks:!1,disableHiDPIScaling:!1,disableCanvasRotation:!0}),F})})(ooe);var Vit=ooe.exports;const Wit=M1(Vit),VF=e=>{if(!e)return"";const t=e.split(" ");return t.length===1?t[0].substring(0,2).toLocaleUpperCase():(t[0].substring(0,1)+t[1].substring(0,1)).toUpperCase()},Git=e=>e?e.split(" ")[0]:"",qit=e=>{if(!e)return"";const t=e.split(" ");return t.length===1?"":t[1]},Kit=A.forwardRef(function(t,r){const{getUserPicture:n,getUser:o}=on(),i=o(),a=A.useRef(null),s=n(),{control:c,formState:{errors:l},getValues:u,handleSubmit:f,setError:d,setValue:h,...p}=Bn({defaultValues:{profilePicture:"",image:null}}),g=[".jpg",".jpeg",".png"],m={fileName:u("profilePicture"),multiple:!1,required:!1,type:"fileUploader",name:"profilePicture",label:"Profile Picture",accept:g.join(", "),validate:b=>!b||g.includes(`.${b.split(".").pop().toLowerCase()}`)?!0:`Invalid extension file ${g.join(", ")}`,onChange:b=>{h("profilePicture",b.name),h("image",b),d("profilePicture",null)},onDelete:()=>{h("profilePicture",""),h("image",null),d("profilePicture",null),y(10)}},[v,y]=A.useState(10);return A.useEffect(()=>{s&&(h("profilePicture",(i==null?void 0:i.profilePicture)??""),h("image",s))},[s]),A.useImperativeHandle(r,()=>({form:{getValues:u,handleSubmit:f},refs:{crop:a}})),xe(_o,{title:"Profile Picture Editor",children:[R(nr,{justifyContent:"center",display:"grid",children:p.watch("image")&&o().profilePicture!==u("profilePicture")?xe(zr,{children:[R(Wit,{ref:a,image:u("image"),borderRadius:150,scale:v/10,rotate:0}),R(wFe,{size:"medium",defaultValue:v,value:v,onChange:b=>y(b.target.value)})]}):R(UD,{sx:{width:250,height:250,fontSize:100},alt:i==null?void 0:i.name,src:p.watch("image"),children:VF(i==null?void 0:i.name)})}),R(nr,{children:R(Ot,{container:!0,spacing:2,children:R(Ot,{item:!0,xs:12,width:500,children:R(Dn,{control:c,fieldConf:m,errors:l})})})})]})}),Yit=()=>[{name:"currentPassword",label:"Current password",placeholder:"Enter your current password",required:!0,type:"password"},{name:"newPassword",label:"New password",placeholder:"Enter your new password",required:!0,type:"password"},{name:"confirmPassword",placeholder:"Confirm your new password",label:"Confirm password",required:!0,type:"password"}],g_={hasCapitalLetter(e){return/[A-Z]/.test(e)},hasSpecialCharacter(e){return/^(?=.*[!@#$%^&*()_\-+=~`[\]{}|:;"'<>,.?\\/]).+$/.test(e)},hasExpectedLength(e){return e.length>=8},paswordsMatch(e,t){return e===t}},g4=(e,t)=>[{constraint:"At least one capital letter",valid:g_.hasCapitalLetter(e)},{constraint:"At least one special character",valid:g_.hasSpecialCharacter(e)},{constraint:"Minimum of 8 characters",valid:g_.hasExpectedLength(e)},{constraint:"Password fields must match",valid:g_.paswordsMatch(e,t)}];var WF={},Xit=Wr;Object.defineProperty(WF,"__esModule",{value:!0});var GF=WF.default=void 0,Qit=Xit(tn()),Zit=rn,Jit=(0,Qit.default)((0,Zit.jsx)("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight");GF=WF.default=Jit;var qF={},eat=Wr;Object.defineProperty(qF,"__esModule",{value:!0});var KF=qF.default=void 0,tat=eat(tn()),rat=rn,nat=(0,tat.default)((0,rat.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline");KF=qF.default=nat;var YF={},oat=Wr;Object.defineProperty(YF,"__esModule",{value:!0});var XF=YF.default=void 0,iat=oat(tn()),aat=rn,sat=(0,iat.default)((0,aat.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");XF=YF.default=sat;const v4=({constraints:e,dirtyFields:t,fieldName:r})=>xe(Es,{sx:{padding:1,backgroundColor:"inherit",height:"fit-content",justifyContent:"center"},variant:"outlined",children:[R(jt,{align:"center",variant:"body2",sx:{display:"flex",alignItems:"center"},children:`Please ensure your ${r} meets the following requirements:`}),R(yo,{sx:{marginY:1}}),e.map(({constraint:n,valid:o})=>{const i=t==null?void 0:t.some(c=>Object.values(c).some(l=>l));return xe(jt,{variant:"caption",color:i?`${o?"success":"error"}.main`:"",sx:{display:"flex",alignItems:"center"},children:[R(i?o?XF:KF:GF,{sx:{width:15,marginRight:1}}),n]},n)})]}),lat=({onCancel:e,onSuccess:t})=>{const{control:r,handleSubmit:n,formState:{errors:o,dirtyFields:i},watch:a}=Bn({defaultValues:{newPassword:"",confirmPassword:"",currentPassword:""}}),{changePassword:s}=on(),[c,l]=A.useState(!1),[u,f]=A.useState(!1),[d,h,p]=a(["newPassword","confirmPassword","currentPassword"]),g=i.newPassword??!1,m=i.confirmPassword??!1,v=g4(d,h),y=v.every(({valid:I})=>I)&&p,b=async({currentPassword:I,newPassword:O})=>{l(!0);try{await s(I,O),St.success(bt.CHANGE_PASSWORD_SUCCESS),t&&t()}catch{St.error(bt.CHANGE_PASSWORD_ERROR)}finally{l(!1)}},w=()=>{f(!0)},E=()=>{f(!1)};return xe(td,{children:[xe(_o,{title:"Change password",buttons:xe(zr,{children:[R(Ft,{disabled:!y||c,type:"submit",color:"secondary",variant:"contained",onClick:n(I=>b(I)),children:"Change password"}),R(Ft,{disabled:c,color:"secondary",variant:"outlined",onClick:w,children:"Cancel"})]}),children:[R(v4,{constraints:v,dirtyFields:[{newPassword:g},{confirmPassword:m}],fieldName:"password"}),R(yo,{}),Yit().map((I,O)=>R(Dn,{control:r,fieldConf:I,errors:o},O))]}),R(Br,{open:u,onClose:E,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:e,secondaryButtonLabel:"Save",onSecondaryButtonClicked:E,renderElement:R(qo,{sx:{color:"red"}})})]})},cat=()=>[{name:"newPassword",label:"New password",placeholder:"Enter your new password",required:!0,type:"password"},{name:"confirmPassword",placeholder:"Confirm your new password",label:"Confirm password",required:!0,type:"password"}],uat=({onCancel:e,onSuccess:t,providerId:r})=>{const{control:n,handleSubmit:o,formState:{errors:i,dirtyFields:a},watch:s}=Bn({defaultValues:{newPassword:"",confirmPassword:""}}),{getUser:c,setPassword:l,signup:u}=on(),{id:f}=c(),[d,h]=s(["newPassword","confirmPassword"]),[p,g]=A.useState(!1),m=g4(d,h),v=cat(),y=()=>{g(I=>!I)},b=A.useMemo(()=>m.some(({valid:I})=>!I),[m]),w=A.useCallback(async(I,O)=>r===zE.GOOGLE?l(I,O):u(I,O),[r]),E=async({newPassword:I})=>{await w(f,I)?(St.success(bt.UPDATE_SUCCESS),t()):St.error(bt.ERROR)};return xe(nr,{children:[xe(_o,{title:"Set password",buttons:xe(zr,{children:[R(Ft,{disabled:b,onClick:o(I=>E(I)),type:"submit",color:"secondary",variant:"contained",disableElevation:!0,children:"Save Password"}),R(Ft,{color:"secondary",variant:"outlined",onClick:y,children:"Cancel"})]}),children:[R(v4,{constraints:m,dirtyFields:[{newPassword:a.newPassword??!1},{confirmPassword:a.confirmPassword??!1}],fieldName:"password"}),R(yo,{}),v.map((I,O)=>R(Dn,{control:n,fieldConf:I,errors:i},O))]}),R(Br,{open:p,onClose:y,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:e,secondaryButtonLabel:"Save",onSecondaryButtonClicked:y,renderElement:R(qo,{sx:{color:"red"}})})]})},dat=({setShowUsersList:e})=>{var S;const{getUser:t,getUserPicture:r,refreshUser:n,verifyUserAccountProvider:o}=on(),{id:i}=t(),a=A.useRef(null),[s,c]=A.useState(!1),[l,u]=A.useState(!1),[f,d]=A.useState(!1),[h,p]=A.useState(!1),[g,m]=A.useState("holas"),[{data:v},{data:y,isError:b,isFetching:w}]=qi({queries:[{queryKey:["userProfile"],queryFn:async()=>await noe(i),initialData:{}},{queryKey:["userAccountProvider"],queryFn:async()=>await o(),initialData:{}}]}),{mutate:E,isPending:I}=xs({mutationKey:["setProfilePicture"],mutationFn:async x=>{await Pit(i,x),await n()},onSuccess:()=>c(!1)}),{mutate:O,isPending:D,isError:N}=xs({mutationKey:["apiKeyGeneration"],mutationFn:async()=>{const x=await Dit();return m(await x.text()),x}}),U=ii(),B=x=>()=>U(`/administration/users/${x}`),F=()=>{d(!0),e&&e(!1)},T=()=>{d(!1),e&&e(!0)},P=()=>{p(!1),m("")},_=async()=>{p(!0),await O()},C=async()=>{var L;const{refs:x}=a==null?void 0:a.current;let k;if((L=x==null?void 0:x.crop)!=null&&L.current){const j=x.crop.current.props.image.name,z=x.crop.current.getImage();k=await new Promise((K,Q)=>{z?z.toBlob(async q=>{const J=new File([q],j,{type:"image/png"});K(J)},"image/png"):Q(new Error("No se pudo obtener el canvas"))})}await E({image:k})};return xe(zr,{children:[f?R(zr,{children:y.providerId===zE.DEFAULT?R(lat,{onCancel:T,onSuccess:T}):R(uat,{onCancel:T,onSuccess:T,providerId:y.providerId})}):R(nr,{children:R(f1,{variant:"outlined",children:R(dx,{children:xe(Ho,{spacing:2,children:[xe(Ho,{direction:"row",spacing:2,justifyContent:"space-between",children:[xe(Ho,{direction:"row",spacing:2,children:[xe(Ho,{direction:"row",spacing:2,position:"relative",children:[R(UD,{onMouseEnter:()=>u(!0),alt:v==null?void 0:v.name,sx:{width:56,height:56},src:r(),children:VF(v==null?void 0:v.name)}),l&&R(ri,{onMouseLeave:()=>u(!1),sx:{position:"absolute",top:0,right:0,padding:2,visibility:l?"visible":"hidden"},onClick:()=>c(!0),children:R(ud,{})})]}),xe(Ho,{children:[R(jt,{variant:"h6",children:v==null?void 0:v.name}),R(jt,{variant:"body2",color:"textSecondary",component:"div",children:v!=null&&v.title?v==null?void 0:v.title:R(nr,{sx:{fontStyle:"italic"},children:"You do not have a title"})})]})]}),xe(Ho,{spacing:2,flex:"30%",maxWidth:256,children:[R(Ft,{onClick:B(i),variant:"contained",color:"secondary",disableElevation:!0,children:"Update Profile"}),R(Ft,{onClick:_,variant:"contained",color:"secondary",disableElevation:!0,children:"generate api key"}),R(Ft,{onClick:F,variant:"outlined",disableElevation:!0,disabled:w||b,children:y.providerId===zE.DEFAULT?"Change Password":"Set Password"})]})]}),R(yo,{}),xe(nr,{children:[R(jt,{variant:"subtitle1",gutterBottom:!0,children:"Personal Information"}),xe(Ot,{container:!0,spacing:2,children:[R(Bd,{label:"First Name",value:Git(v==null?void 0:v.name)}),R(Bd,{label:"Last Name",value:qit(v==null?void 0:v.name)}),R(Bd,{label:"E-mail",value:v==null?void 0:v.email}),R(Bd,{label:"Phone",value:v==null?void 0:v.phone}),R(Bd,{label:"Title",value:v==null?void 0:v.title})]})]})]})})})}),R(Cs,{fullWidth:!1,open:h,onClose:P,dialogActions:xe(Ho,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",disabled:D,onClick:P,children:"close"}),R(Ft,{variant:"contained",disabled:D||N,color:"secondary",disableElevation:!0,onClick:()=>navigator.clipboard.writeText(g),children:"Copy"})]}),children:R(_o,{title:"User Api Key Generated",children:R(nr,{display:"flex",justifyContent:"center",width:500,children:N?R(jt,{children:"Error generating api key"}):D?R(Ri,{}):R(Xa,{sx:{width:"100%"},disabled:!0,value:g})})})}),R(Cs,{fullWidth:!1,open:s,onClose:()=>c(!1),dialogActions:xe(Ho,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",disabled:I,onClick:()=>c(!1),children:"Cancel"}),R(Ft,{variant:"contained",disabled:I,color:"secondary",disableElevation:!0,onClick:(S=a.current)==null?void 0:S.form.handleSubmit(C),children:"Save"})]}),children:R(Kit,{ref:a})})]})};var QF={},fat=Wr;Object.defineProperty(QF,"__esModule",{value:!0});var ZF=QF.default=void 0,hat=fat(tn()),pat=rn,mat=(0,hat.default)((0,pat.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l4 4 4-4H6c0-3.86 3.14-7 7-7s7 3.14 7 7-3.14 7-7 7c-1.9 0-3.62-.76-4.88-1.99L6.7 18.42C8.32 20.01 10.55 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm2 8v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1zm-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1v1z"}),"LockReset");ZF=QF.default=mat;var JF={},gat=Wr;Object.defineProperty(JF,"__esModule",{value:!0});var eN=JF.default=void 0,vat=gat(tn()),yat=rn,bat=(0,vat.default)((0,yat.jsx)("path",{d:"M13 8c0-2.21-1.79-4-4-4S5 5.79 5 8s1.79 4 4 4 4-1.79 4-4zm2 2v2h3v3h2v-3h3v-2h-3V7h-2v3h-3zM1 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4z"}),"PersonAddAlt1");eN=JF.default=bat;var tN={},wat=Wr;Object.defineProperty(tN,"__esModule",{value:!0});var Ix=tN.default=void 0,xat=wat(tn()),Cat=rn,Sat=(0,xat.default)((0,Cat.jsx)("path",{d:"M8.65 5.82C9.36 4.72 10.6 4 12 4c2.21 0 4 1.79 4 4 0 1.4-.72 2.64-1.82 3.35L8.65 5.82zM20 17.17c-.02-1.1-.63-2.11-1.61-2.62-.54-.28-1.13-.54-1.77-.76L20 17.17zm1.19 4.02L2.81 2.81 1.39 4.22l8.89 8.89c-1.81.23-3.39.79-4.67 1.45-1 .51-1.61 1.54-1.61 2.66V20h13.17l2.61 2.61 1.41-1.42z"}),"PersonOff");Ix=tN.default=Sat;var rN={},_at=Wr;Object.defineProperty(rN,"__esModule",{value:!0});var nN=rN.default=void 0,kat=_at(tn()),Eat=rn,Tat=(0,kat.default)((0,Eat.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");nN=rN.default=Tat;const Iat="users",Aat=()=>{const{data:e,isFetching:t,isError:r,refetch:n}=da({queryKey:["users"],queryFn:Rit,initialData:{data:[]}}),[o,i]=A.useState({open:!1,data:{}}),a=ii();async function s(){try{const{data:h}=o;await m4(h.id,{isActive:!h.isActive}),await n(),c(),St.success(h.isActive?bt.DISABLE_SUCCESS:bt.ENABLE_SUCCESS)}catch{St.error(bt.ERROR)}}function c(){i({open:!1,data:{}})}const l=h=>()=>a(`/administration/users/${h}`),u=h=>async()=>{try{await BF({email:h}),St.success(bt.PASSWORD_RESET_EMAIL_SENT)}catch{St.error(bt.ERROR)}},f=[{field:"name",headerName:"Name",width:180},{field:"email",headerName:"Email",width:256},{field:"title",headerName:"Title",width:180},{field:"phone",headerName:"Phone",width:144},{field:"isActive",headerName:"Status",width:112,renderCell:({row:h})=>R(bo,{label:h.isActive===!0?"Enabled":"Disabled",variant:"outlined",color:h.isActive===!0?"success":"warning"})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:h,isActive:p,...g}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:l(h)},"updateBtn"),R(yr,{icon:p?R(Ix,{}):R(nN,{}),label:p?"Disable":"Enable",showInMenu:!0,onClick:()=>i({open:!0,data:{...g,id:h,isActive:p}})},"hiddenBtn"),R(yr,{icon:R(ZF,{}),label:"Reset Password",onClick:u(g.email),showInMenu:!0},"resetPassBtn")]}],d=[{name:"New",icon:R(Qa,{}),handleAction:l("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:d}),R(Yn,{columns:f,contextName:Iat,csvFilename:"Users",dataFetchError:r,loading:t,rows:e.data}),R(Br,{open:o.open,onClose:c,message:`Are you sure you want to ${o.data.isActive?"disable":"enable"} this user?`,primaryButtonLabel:o.data.isActive?"Disable":"Enable",onPrimaryButtonClicked:s,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:c,renderElement:function(){const h=o.data.isActive?Ix:eN;return R(h,{sx:{color:"warning.main"}})}()})]})},Pat=()=>{const[e,t]=A.useState(!0),{getUser:r}=on(),{userType:n}=r(),o=[Pi.Administrator,Pi.SystemAdministrator].includes(n);return xe(Jt,{spacing:2,children:[R(dat,{setShowUsersList:t}),e&&o&&R(Aat,{})]})},Mat="utilities",Rat=()=>{const[{data:e,isFetched:t,isError:r,refetch:n}]=qi({queries:[{queryKey:["utilities"],queryFn:ry,initialData:{data:[]}}]}),[o,i]=A.useState(!1),[a,s]=A.useState({open:!1,data:{}}),c=ii(),l=m=>()=>c(`/administration/utilities/${m}`),u=async()=>{i(!o)};function f(){s({open:!1,data:{isActive:!1}})}const d=async()=>{try{const{id:m,isActive:v}=a.data;await Gte(m,{isActive:!v}),await n(),f(),St.success(v?bt.DEACTIVATE_SUCCESS:bt.REACTIVATE_SUCCESS)}catch{St.error(bt.ERROR)}},h=()=>a.data.isActive?"Deactivate":"Reactivate",p=[{field:"name",headerName:"Utility Name",flex:1},{field:"vendorNumber",headerName:"Vendor Number",width:144},{field:"accounts",headerName:"Number of Accounts",width:160,renderCell:({value:m})=>R(bo,{label:m}),valueGetter:({value:m})=>(m==null?void 0:m.length)??0},{field:"meters",headerName:"Number of Meters",width:160,renderCell:({value:m})=>R(bo,{label:m}),valueGetter:({row:m})=>{var v;return((v=m.accounts)==null?void 0:v.reduce((y,b)=>y+b.meters.length,0))??0}},{field:"serviceTypes",headerName:"Service Types",width:224,valueGetter:m=>{var y;const v=(y=m.row.serviceTypes)==null?void 0:y.map(b=>b);return v==null?void 0:v.join(", ")}},{field:"deactivated",headerName:"Deactivated",width:112,valueGetter:m=>m.row.isActive?"No":"Yes",renderCell:({row:m})=>xe(zr,{children:[R(bo,{label:m.isActive?"No":"Yes",variant:"outlined",color:m.isActive?"success":"error"}),!m.isActive&&R(tC,{infoMessage:"This item does not show up in any reports"})]})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:m,isActive:v,...y}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:l(m)},"updateBtn"),R(yr,{icon:v?R(oy,{}):R(ny,{}),label:v?"Deactivate":"Reactivate",onClick:()=>s({open:!0,data:{...y,id:m,isActive:v}})},"hiddenBtn")]}],g=[{name:"New",icon:R(Qa,{}),handleAction:l("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",spacing:2,marginInline:2,children:[R(ts,{actions:g}),R(Yn,{columns:p,contextName:Mat,csvFilename:"Utilities",dataFetchError:r,loading:!t,customToolbarOptions:R(oC,{showDeactivatedType:o,setShowDeactivatedType:u,type:"utilities"}),rows:o?e.data:e.data.filter(({isActive:m})=>m)}),R(Br,{open:a.open,onClose:f,message:`Deactivating this item will remove all associated data from reports.
         Are you sure you would like to ${h().toLocaleLowerCase()} this utility?`,primaryButtonLabel:h(),onPrimaryButtonClicked:d,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:f,renderElement:a.data.isActive?R(q2,{sx:{color:"error.main"}}):R(G2,{sx:{color:"success.main"}})})]})};var oN={},Oat=Wr;Object.defineProperty(oN,"__esModule",{value:!0});var ioe=oN.default=void 0,Dat=Oat(tn()),Fat=rn,Nat=(0,Dat.default)((0,Fat.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDown");ioe=oN.default=Nat;var iN={},Lat=Wr;Object.defineProperty(iN,"__esModule",{value:!0});var aoe=iN.default=void 0,$at=Lat(tn()),Bat=rn,Uat=(0,$at.default)((0,Bat.jsx)("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");aoe=iN.default=Uat;const soe=A.createContext({organizations:[],setOrganizations:void 0});function loe(){return A.useContext(soe)}function Hat({children:e}){const[t,r]=A.useState([]),n=o=>{r(o)};return R(soe.Provider,{value:{organizations:t,setOrganizations:n},children:e})}const zat=We(e=>R(yMe,{...e,TabIndicatorProps:{children:R("span",{className:"MuiTabs-indicatorSpan"})},variant:"scrollable"}))({"& .MuiTabs-indicator":{display:"flex",height:"3px",justifyContent:"center",backgroundColor:"transparent"},"& .MuiTabs-indicatorSpan":{maxWidth:40,width:"100%",backgroundColor:"#F8A503"}}),jat=We(e=>R(KPe,{disableRipple:!0,...e}))(({theme:e})=>({textTransform:"uppercase",fontWeight:e.typography.fontWeightRegular,fontSize:e.typography.pxToRem(15),marginRight:e.spacing(1)}));function Vat({value:e,handleChange:t,tabs:r}){const{pathname:n}=El(),o=n.split("/")[1];return r===void 0||r.length===0?R(zr,{}):R(zat,{value:e,onChange:t,"aria-label":"styled tabs example",children:r==null?void 0:r.map((i,a)=>R(jat,{hidden:!0,label:i.tabTitle,to:`/${o}/${i.name}`,component:Vm},a))})}const Wat=({title:e,tabs:t,setActiveTab:r,activeTab:n,heading:o,setOpenMobile:i})=>{var D,N,U;const{isAuthenticated:a,getUser:s,getUserPicture:c,logout:l,switchOrganization:u}=on(),{organizations:f}=loe(),[d,h]=A.useState(null),[p,g]=A.useState([]);async function m(){try{const{data:B}=await zF();g(B.filter(F=>F.isActive))}catch{St.error(bt.ERROR)}}A.useEffect(()=>{g(f.filter(B=>B.isActive))},[f]),A.useEffect(()=>{a&&s().userType===Pi.SystemAdministrator&&m()},[a]);const v=!!d,y=ii(),b=(B,F)=>r(F),w=()=>{h(null)},E=B=>{h(B.currentTarget)},I=async B=>{try{await u(B),window.location.reload()}catch{St.error(bt.ERROR)}},O=B=>{const{organizationId:F}=s();F!==B&&I(B)};return xe(nr,{sx:{backgroundColor:"background.paper",boxShadow:1,p:1},children:[xe(Jt,{direction:"row",justifyContent:"space-between",spacing:2,children:[xe(Jt,{alignItems:"center",direction:"row",children:[a()&&R(AH,{lgUp:!0,children:R(ri,{"aria-label":"menu",onClick:()=>i(!0),sx:{height:"auto"},children:R(aoe,{})})}),xe(Jt,{ml:2,children:[R(jt,{textAlign:"left",sx:{typography:{md:"h4",xs:"body1"},color:"primary.main"},variant:"h1",children:o}),xe(AH,{mdDown:!0,children:[R(jt,{variant:"subtitle1",children:e})," "]})]})]}),xe(Jt,{direction:"row",spacing:2,alignItems:"center",children:[xe(Jt,{children:[R(jt,{variant:"h6",align:"right",children:(D=s())==null?void 0:D.name}),R(jt,{variant:"body2",children:(N=s())==null?void 0:N.email})]}),R(UD,{src:c(),children:VF((U=s())==null?void 0:U.name)}),R(ri,{id:"basic-button","aria-controls":v?"basic-menu":void 0,"aria-haspopup":"true","aria-expanded":v?"true":void 0,onClick:E,children:R(ioe,{})}),xe(vD,{id:"basic-menu",anchorEl:d,open:v,onClose:w,onClick:w,MenuListProps:{"aria-labelledby":"basic-button"},children:[!!p.length&&p.map(B=>R(go,{onClick:()=>O(B.id),children:a&&s().organizationId===B.id?R("b",{children:B.name}):B.name},B.id)),!!p.length&&R(yo,{},"dividerItem"),R(go,{onClick:()=>{l(),y("/")},children:"Logout"},"loginItem")]})]})]}),R(Vat,{value:n,handleChange:b,tabs:t})]})};var Gat=["src","alt","height","width","position","fit","style","className","showLoading","errorIcon","shift","distance","shiftDuration","bgColor","wrapperStyle","iconWrapperStyle","wrapperClassName","iconWrapperClassName","duration","easing","onLoad","onError"];function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qg.apply(this,arguments)}function qat(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var Kat=Sr(A.createElement("path",{d:"M21 5v6.59l-2.29-2.3c-.39-.39-1.03-.39-1.42 0L14 12.59 10.71 9.3a.9959.9959 0 0 0-1.41 0L6 12.59 3 9.58V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42 3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l2.29 2.29c.39.39 1.02.39 1.41 0l3.3-3.3 3.29 3.29c.39.39 1.02.39 1.41 0l3.3-3.28z"}),"BrokenImageIcon"),Yat=We("img")({"@keyframes materialize":{"0%":{filter:"saturate(20%) contrast(50%) brightness(120%)"},"75%":{filter:"saturate(60%) contrast(100%) brightness(100%)"},"100%":{filter:"saturate(100%) contrast(100%) brightness(100%)"}}});function fC(e){var t,r=e.src,n=e.alt,o=e.height,i=e.width,a=e.position,s=e.fit,c=e.style,l=e.className,u=e.showLoading,f=e.errorIcon,d=e.shift,h=e.distance,p=e.shiftDuration,g=e.bgColor,m=e.wrapperStyle,v=e.iconWrapperStyle,y=e.wrapperClassName,b=e.iconWrapperClassName,w=e.duration,E=e.easing,I=e.onLoad,O=e.onError,D=qat(e,Gat),N=A.useState(!1),U=N[0],B=N[1],F=A.useState(!1),T=F[0],P=F[1];function _(){B(!0),P(!1),I&&I()}function C(){P(!0),B(!1),O&&O()}var S=(t={},t[d]=U?0:h,t),x={root:Qg({width:i,height:o,display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:g},m),image:Qg({position:a,width:"100%",height:"100%",objectFit:s,transitionProperty:(d?d+", ":"")+"opacity",transitionDuration:(d?(p||w*.3)+"ms, ":"")+w/2+"ms",transitionTimingFunction:E,opacity:U?1:0,animation:U?"materialize "+w+"ms 1 "+E:""},!!d&&S,c),icons:Qg({width:"100%",marginLeft:"-100%",display:"flex",justifyContent:"center",alignItems:"center",opacity:U?0:1},v)},k=typeof f!="boolean"&&f||A.createElement(Kat,{style:{fontSize:56,color:"#bdbdbd"}}),L=typeof u!="boolean"&&u||A.createElement(Ri,{size:56,thickness:6});return A.createElement("div",{style:x.root,className:"mui-image-wrapper "+y},A.createElement(Yat,Qg({src:r,alt:n,style:x.image,className:"mui-image-img "+l,onLoad:_,onError:C},D)),(!!u||!!f)&&A.createElement("div",{style:x.icons,className:"mui-image-iconWrapper "+b},!!f&&T&&k,!!u&&!T&&!U&&L))}fC.defaultProps={alt:"",height:"100%",width:"100%",position:"relative",fit:"cover",showLoading:!1,errorIcon:!0,shift:!1,distance:100,shiftDuration:null,bgColor:"inherit",duration:3e3,easing:"cubic-bezier(0.7, 0, 0.6, 1)",className:"",wrapperClassName:"",iconWrapperClassName:""};fC.propTypes={};const Xat={}.VITE_LOGO||"logo.png",Qat=({open:e,handleOnClick:t})=>{const{pathname:r}=El(),{featureChecker:n,getUser:o}=on(),{userType:i}=o(),[a,s]=A.useState(0),c=ii(),l=i===Pi.SystemAdministrator,u=[{title:"Summary",link:"/summary"},{title:"Usage",link:"/usage"},{title:"Costs",link:"/cost"},{title:"Smart Meters",link:"/smartmeters"},{title:"Reports",link:"/reports"},{title:"Administration",link:"/administration"},{title:"Bill Automation",link:"/billautomation"},{title:"Support",link:"/support"},...n.devFeatureEnabled(xf.Experimental)&&n.productFeatureEnabled(Y1.customDashboards)?[{title:"Custom Dashboards",link:"/customdashboards"}]:[],...l?[{title:"System Administration",link:"/systemadministration"}]:[]];A.useEffect(()=>{if(r==null)return;const h=u.findIndex(p=>r.startsWith(p.link));s(h)},[r]);const f=(h,p,g="/")=>{s(p),c(g)},d=xe(zr,{children:[R(nr,{mt:1,sx:{padding:"0 12px"},children:R(fC,{src:`/${Xat}`,alt:"logo",fit:"contain",height:50})}),R(z1,{component:"nav",sx:{marginTop:4,"& .MuiListItemButton-root:hover":{"&, & .MuiListItemIcon-root":{color:"#fff6"}}},children:u.map((h,p)=>R(M3e,{onClick:g=>{f(g,p,h.link),t(!1)},sx:{color:a===p?"#fff6":"white",backgroundColor:p===a?"primary.light":"transparent",borderRight:p===a?"5px solid":"none",borderColor:"secondary.main"},children:R(ps,{children:h.title})},p))})]});return xe(zr,{children:[R(nr,{sx:{backgroundColor:"primary.main",display:{lg:"block",xs:"none"},height:"100vh",py:1},children:d}),R(a8e,{variant:"temporary",open:e,onClose:()=>t(!1),ModalProps:{keepMounted:!0},sx:{display:{lg:"none",xs:"block"},"& .MuiDrawer-paper":{boxSizing:"border-box",width:240,backgroundColor:"primary.main"}},children:d})]})};function Zat(){const{isAuthenticated:e}=on(),{tabName:t,id:r}=j2(),[n,o]=A.useState(!1),[i,a]=A.useState(0),[s,c]=A.useState(""),[l,u]=A.useState(),[f,d]=A.useState([]),[h,p]=A.useState(),g=El(),m=f.findIndex(v=>v.name===t);return A.useEffect(()=>{a(m>=0?m:0),r&&c(r)},[f,m]),A.useEffect(()=>{c(r)},[r]),A.useEffect(()=>{var v;u((v=f[i<f.length?i:0])==null?void 0:v.subtitle)},[i,f]),A.useMemo(()=>{if(t&&m<0&&f.length>0)throw new Response("Not Found",{status:404})},[f]),e()?xe(Ot,{container:!0,columns:16,children:[R(SJ,{direction:"right",in:!0,mountOnEnter:!0,unmountOnExit:!0,children:R(Ot,{item:!0,lg:2,children:R(Qat,{open:n,handleOnClick:v=>o(v)})})}),R(Ot,{item:!0,sx:{height:"100vh",overflowY:"auto",margin:0},xs:!0,children:xe(Jt,{sx:{height:"100%"},children:[R(Wat,{title:l,tabs:f,heading:h,setActiveTab:a,activeTab:i,setOpenMobile:o}),R(wJ,{context:{setTabs:v=>{d(v),a(0)},activeTab:i,idTab:s,setHeading:p}})]})})]}):R(jm,{to:"/login",state:{from:g},replace:!0})}function Jat(){return y6e()}const est={"facility-groups":"facilityGroups",administration:"utilityCredentials","utility-regex":"utilityRegex"},tst=({formComponent:e,entity:t,id:r})=>{const{pathname:n}=El(),[o,i]=n.split("/").slice(1),a=ii(),s=()=>a(`/${o}/${i}`);if(!e)return R(zr,{});if(r!=="new"){const c=est[t]||t,{data:l,isError:u,isFetching:f}=da({queryKey:["docForm"],queryFn:async()=>await Ao(`/${c}/${r}`),initialData:{},refetchOnWindowFocus:!1});return!f&&!u?R(e,{doc:l,handleBackAction:s}):xe(nr,{display:"flex",justifyContent:"center",marginTop:12,children:[u&&!f&&xe(Jt,{spacing:1,children:[R(jt,{variant:"h6",children:"Sorry, we could not find the document."}),R("div",{children:R(Ft,{sx:{mx:15},variant:"contained",color:"secondary",onClick:s,children:"search here"})})]}),f&&R(Ri,{})]})}return R(e,{handleBackAction:s})},rst=e=>{const{children:t,value:r,index:n,...o}=e;return R(td,{role:"tabpanel",hidden:r!==n,id:`tabpanel-${n}`,"aria-labelledby":`tab-${n}`,sx:{flex:"1 0 auto",p:2},...o,children:r===n&&t})};function hd({tabs:e,heading:t}){const{setTabs:r,activeTab:n,idTab:o,setHeading:i}=Jat(),a=A.useMemo(()=>e.filter(c=>c.featureEnabled==null||c.featureEnabled===!0),[e]),s=!o;return A.useEffect(()=>{i(t),r(a)},[]),R(zr,{children:a.map((c,l)=>{const{component:u,formComponent:f,name:d}=c;return R(rst,{value:n,index:l,children:s?R(u,{}):R(tst,{entity:d,id:o,formComponent:f})},l)})})}function nst(){return{accounts:{},bills:{sort:[{field:"startDate",sort:"desc"}]},budgets:{},facilities:{sort:[{field:"name",sort:"asc"}]},"facility-groups":{},meters:{},projects:{},utilities:{},users:{}}}function ost(){return{organizations:{},users:{}}}function ist(){return{administration:{}}}function ast(){return{summaryDataInsights:{}}}const sst=e=>[{component:Iot,formComponent:iit,name:"facilities",subtitle:"Add, edit, or delete facilities",tabTitle:"Facilities"},{component:Oot,formComponent:bit,name:"facility-groups",subtitle:"Add, edit, or delete facility groups",tabTitle:"Facility Groups"},{component:Rat,formComponent:$it,name:"utilities",subtitle:"Add, edit, or delete utilities",tabTitle:"Utilities"},{component:FKe,formComponent:Not,name:"accounts",subtitle:"Add, edit, or delete accounts",tabTitle:"Accounts"},{component:Uit,formComponent:Zne,name:"meters",subtitle:"Add, edit, or delete meters",tabTitle:"Meters"},{component:uot,formComponent:Bot,name:"bills",subtitle:"Add, edit, or delete bills",tabTitle:"Bills"},{component:Eot,formComponent:Xot,name:"budgets",subtitle:"Add, edit, copy or delete budgets",tabTitle:"Budgets"},{component:jit,formComponent:Ait,name:"projects",subtitle:"Add, edit, or delete projects",tabTitle:"Projects"},{component:Pat,formComponent:Fit,name:"users",subtitle:"Add, edit, or delete users",tabTitle:"Users"},...e!==Pi.User?[{component:hV,formComponent:hV,name:"organization",subtitle:"Organization view or setting",tabTitle:"Organization"}]:[]],lst=({field:e,sort:t})=>!!e&&!!t,cst=({field:e,operator:t,value:r})=>!!e&&!!t&&!!r;function ust(){const{tabName:e}=j2(),t=V2()[0],{getUser:r}=on(),{userType:n}=r(),o=t.get("sort"),i=t.get("filters"),[a,s]=A.useState(nst()),[c,l]=A.useState(!1);return A.useEffect(()=>{if(o||i)try{const u={};if(o){const f=JSON.parse(o);lst(f)&&(u.sort=[f])}if(i){let f=!0;const d=JSON.parse(i);for(const h of d)if(!cst(h)){f=!1;break}f&&(u.filter={items:d.map(h=>({...h,id:Math.floor(Math.random()*100)}))})}s({...a,[e]:{...a[e],...u}})}catch{St.error("Filter params are incorrect")}l(!0)},[]),R(TWe,{children:c&&R(l4,{defaultGlobalState:a,children:R(hd,{tabs:sst(n),heading:"Manage your users, data and bills"})})})}/*! @azure/msal-common v14.5.0 2023-12-01 */const yt={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},v_={SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR_RANGE_START:400,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR_RANGE_START:500,SERVER_ERROR_RANGE_END:599},hC=[yt.OPENID_SCOPE,yt.PROFILE_SCOPE,yt.OFFLINE_ACCESS_SCOPE],pV=[...hC,yt.EMAIL_SCOPE],zu={CONTENT_TYPE:"Content-Type",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},va={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},Vh={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},y_={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},qa={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},mV={PLAIN:"plain",S256:"S256"},pC={QUERY:"query",FRAGMENT:"fragment"},dst={...pC,FORM_POST:"form_post"},coe={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},b_={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},ja={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},Lr={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},R5="appmetadata",fst="client_info",ww="1",xw={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},ol={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},ya={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},uo={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Cw={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},gV={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},vV={username:"username",password:"password"},w_={httpSuccess:200,httpBadRequest:400},gg={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},TP={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Zf={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},hst={Jwt:"JWT",Jwk:"JWK",Pop:"pop"};/*! @azure/msal-common v14.5.0 2023-12-01 */const aN="unexpected_error",pst="post_request_failed";/*! @azure/msal-common v14.5.0 2023-12-01 */const yV={[aN]:"Unexpected error in authentication.",[pst]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class No extends Error{constructor(t,r,n){const o=r?`${t}: ${r}`:t;super(o),Object.setPrototypeOf(this,No.prototype),this.errorCode=t||yt.EMPTY_STRING,this.errorMessage=r||yt.EMPTY_STRING,this.subError=n||yt.EMPTY_STRING,this.name="AuthError"}setCorrelationId(t){this.correlationId=t}}function uoe(e,t){return new No(e,t?`${yV[e]} ${t}`:yV[e])}/*! @azure/msal-common v14.5.0 2023-12-01 */const sN="client_info_decoding_error",doe="client_info_empty_error",lN="token_parsing_error",foe="null_or_empty_token",Rd="endpoints_resolution_error",hoe="network_error",poe="openid_config_error",moe="hash_not_deserialized",y1="invalid_state",goe="state_mismatch",jE="state_not_found",voe="nonce_mismatch",cN="auth_time_not_found",yoe="max_age_transpired",mst="multiple_matching_tokens",gst="multiple_matching_accounts",boe="multiple_matching_appMetadata",woe="request_cannot_be_made",xoe="cannot_remove_empty_scope",Coe="cannot_append_scopeset",O5="empty_input_scopeset",vst="device_code_polling_cancelled",yst="device_code_expired",bst="device_code_unknown_error",uN="no_account_in_silent_request",Soe="invalid_cache_record",dN="invalid_cache_environment",D5="no_account_found",F5="no_crypto_object",N5="unexpected_credential_type",wst="invalid_assertion",xst="invalid_client_credential",Ih="token_refresh_required",Cst="user_timeout_reached",_oe="token_claims_cnf_required_for_signedjwt",koe="authorization_code_missing_from_server_response",Eoe="binding_key_not_removed",Toe="end_session_endpoint_not_supported",fN="key_id_missing",Sst="no_network_connectivity",_st="user_canceled",kst="missing_tenant_id_error",mn="method_not_implemented",Est="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.5.0 2023-12-01 */const bV={[sN]:"The client info could not be parsed/decoded correctly",[doe]:"The client info was empty",[lN]:"Token cannot be parsed",[foe]:"The token is null or empty",[Rd]:"Endpoints cannot be resolved",[hoe]:"Network request failed",[poe]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[moe]:"The hash parameters could not be deserialized",[y1]:"State was not the expected format",[goe]:"State mismatch error",[jE]:"State not found",[voe]:"Nonce mismatch error",[cN]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[yoe]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[mst]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[gst]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[boe]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[woe]:"Token request cannot be made without authorization code or refresh token.",[xoe]:"Cannot remove null or empty scope from ScopeSet",[Coe]:"Cannot append ScopeSet",[O5]:"Empty input ScopeSet cannot be processed",[vst]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[yst]:"Device code is expired.",[bst]:"Device code stopped polling for unknown reasons.",[uN]:"Please pass an account object, silent flow is not supported without account information",[Soe]:"Cache record object was null or undefined.",[dN]:"Invalid environment when attempting to create cache entry",[D5]:"No account found in cache for given key.",[F5]:"No crypto object detected.",[N5]:"Unexpected credential type.",[wst]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[xst]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[Ih]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[Cst]:"User defined timeout for device code polling reached",[_oe]:"Cannot generate a POP jwt if the token_claims are not populated",[koe]:"Server response does not contain an authorization code to proceed",[Eoe]:"Could not remove the credential's binding key from storage.",[Toe]:"The provided authority does not support logout",[fN]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[Sst]:"No network connectivity. Check your internet connection.",[_st]:"User cancelled the flow.",[kst]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[mn]:"This method has not been implemented",[Est]:"The nested app auth bridge is disabled"};class y4 extends No{constructor(t,r){super(t,r?`${bV[t]}: ${r}`:bV[t]),this.name="ClientAuthError",Object.setPrototypeOf(this,y4.prototype)}}function zt(e,t){return new y4(e,t)}/*! @azure/msal-common v14.5.0 2023-12-01 */const VE={createNewGuid:()=>{throw zt(mn)},base64Decode:()=>{throw zt(mn)},base64Encode:()=>{throw zt(mn)},async getPublicKeyThumbprint(){throw zt(mn)},async removeTokenBindingKey(){throw zt(mn)},async clearKeystore(){throw zt(mn)},async signJwt(){throw zt(mn)},async hashString(){throw zt(mn)}};/*! @azure/msal-common v14.5.0 2023-12-01 */var Ji;(function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"})(Ji||(Ji={}));class Jh{constructor(t,r,n){this.level=Ji.Info;const o=()=>{},i=t||Jh.createDefaultLoggerOptions();this.localCallback=i.loggerCallback||o,this.piiLoggingEnabled=i.piiLoggingEnabled||!1,this.level=typeof i.logLevel=="number"?i.logLevel:Ji.Info,this.correlationId=i.correlationId||yt.EMPTY_STRING,this.packageName=r||yt.EMPTY_STRING,this.packageVersion=n||yt.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ji.Info}}clone(t,r,n){return new Jh({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},t,r)}logMessage(t,r){if(r.logLevel>this.level||!this.piiLoggingEnabled&&r.containsPii)return;const i=`${`[${new Date().toUTCString()}] : [${r.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${Ji[r.logLevel]} - ${t}`;this.executeCallback(r.logLevel,i,r.containsPii||!1)}executeCallback(t,r,n){this.localCallback&&this.localCallback(t,r,n)}error(t,r){this.logMessage(t,{logLevel:Ji.Error,containsPii:!1,correlationId:r||yt.EMPTY_STRING})}errorPii(t,r){this.logMessage(t,{logLevel:Ji.Error,containsPii:!0,correlationId:r||yt.EMPTY_STRING})}warning(t,r){this.logMessage(t,{logLevel:Ji.Warning,containsPii:!1,correlationId:r||yt.EMPTY_STRING})}warningPii(t,r){this.logMessage(t,{logLevel:Ji.Warning,containsPii:!0,correlationId:r||yt.EMPTY_STRING})}info(t,r){this.logMessage(t,{logLevel:Ji.Info,containsPii:!1,correlationId:r||yt.EMPTY_STRING})}infoPii(t,r){this.logMessage(t,{logLevel:Ji.Info,containsPii:!0,correlationId:r||yt.EMPTY_STRING})}verbose(t,r){this.logMessage(t,{logLevel:Ji.Verbose,containsPii:!1,correlationId:r||yt.EMPTY_STRING})}verbosePii(t,r){this.logMessage(t,{logLevel:Ji.Verbose,containsPii:!0,correlationId:r||yt.EMPTY_STRING})}trace(t,r){this.logMessage(t,{logLevel:Ji.Trace,containsPii:!1,correlationId:r||yt.EMPTY_STRING})}tracePii(t,r){this.logMessage(t,{logLevel:Ji.Trace,containsPii:!0,correlationId:r||yt.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.5.0 2023-12-01 */const Ioe="@azure/msal-common",hN="14.5.0";/*! @azure/msal-common v14.5.0 2023-12-01 */const pN={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.5.0 2023-12-01 */function _0(e,t){const r=Tst(e);try{const n=t(r);return JSON.parse(n)}catch{throw zt(lN)}}function Tst(e){if(!e)throw zt(foe);const r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!r||r.length<4)throw zt(lN);return r[2]}function Aoe(e,t){if(t===0||Date.now()-3e5>e+t)throw zt(yoe)}/*! @azure/msal-common v14.5.0 2023-12-01 */class ws{static nowSeconds(){return Math.round(new Date().getTime()/1e3)}static isTokenExpired(t,r){const n=Number(t)||0;return ws.nowSeconds()+r>n}static wasClockTurnedBack(t){return Number(t)>ws.nowSeconds()}static delay(t,r){return new Promise(n=>setTimeout(()=>n(r),t))}}/*! @azure/msal-common v14.5.0 2023-12-01 */function Lb(e){return[Ist(e),Ast(e),Pst(e),Mst(e),Rst(e)].join(ja.CACHE_KEY_SEPARATOR).toLowerCase()}function b4(e,t,r,n,o){return{credentialType:Lr.ID_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:r,realm:o}}function w4(e,t,r,n,o,i,a,s,c,l,u,f,d,h,p){var m,v;const g={homeAccountId:e,credentialType:Lr.ACCESS_TOKEN,secret:r,cachedAt:ws.nowSeconds().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:n,realm:o,target:i,tokenType:u||uo.BEARER};if(f&&(g.userAssertionHash=f),l&&(g.refreshOn=l.toString()),h&&(g.requestedClaims=h,g.requestedClaimsHash=p),((m=g.tokenType)==null?void 0:m.toLowerCase())!==uo.BEARER.toLowerCase())switch(g.credentialType=Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME,g.tokenType){case uo.POP:const y=_0(r,c);if(!((v=y==null?void 0:y.cnf)!=null&&v.kid))throw zt(_oe);g.keyId=y.cnf.kid;break;case uo.SSH:g.keyId=d}return g}function Poe(e,t,r,n,o,i){const a={credentialType:Lr.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:n,secret:r};return i&&(a.userAssertionHash=i),o&&(a.familyId=o),a}function mN(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function wV(e){return e?mN(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===Lr.ACCESS_TOKEN||e.credentialType===Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function xV(e){return e?mN(e)&&e.hasOwnProperty("realm")&&e.credentialType===Lr.ID_TOKEN:!1}function CV(e){return e?mN(e)&&e.credentialType===Lr.REFRESH_TOKEN:!1}function Ist(e){return[e.homeAccountId,e.environment].join(ja.CACHE_KEY_SEPARATOR).toLowerCase()}function Ast(e){const t=e.credentialType===Lr.REFRESH_TOKEN&&e.familyId||e.clientId;return[e.credentialType,t,e.realm||""].join(ja.CACHE_KEY_SEPARATOR).toLowerCase()}function Pst(e){return(e.target||"").toLowerCase()}function Mst(e){return(e.requestedClaimsHash||"").toLowerCase()}function Rst(e){return e.tokenType&&e.tokenType.toLowerCase()!==uo.BEARER.toLowerCase()?e.tokenType.toLowerCase():""}function Ost(e,t){const r=e.indexOf(ya.CACHE_KEY)===0;let n=!0;return t&&(n=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),r&&n}/*! @azure/msal-common v14.5.0 2023-12-01 */const Moe="redirect_uri_empty",Dst="claims_request_parsing_error",Roe="authority_uri_insecure",$b="url_parse_error",gN="empty_url_error",Ooe="empty_input_scopes_error",Doe="invalid_prompt_value",vN="invalid_claims",Foe="token_request_empty",Noe="logout_request_empty",Loe="invalid_code_challenge_method",yN="pkce_params_missing",bN="invalid_cloud_discovery_metadata",$oe="invalid_authority_metadata",Boe="untrusted_authority",x4="missing_ssh_jwk",Uoe="missing_ssh_kid",Fst="missing_nonce_authentication_header",Nst="invalid_authentication_header",Hoe="cannot_set_OIDCOptions",zoe="cannot_allow_native_broker",joe="authority_mismatch";/*! @azure/msal-common v14.5.0 2023-12-01 */const Lst={[Moe]:"A redirect URI is required for all calls, and none has been set.",[Dst]:"Could not parse the given claims request object.",[Roe]:"Authority URIs must use https.  Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[$b]:"URL could not be parsed into appropriate segments.",[gN]:"URL was empty or null.",[Ooe]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Doe]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[vN]:"Given claims parameter must be a stringified JSON object.",[Foe]:"Token request was empty and not found in cache.",[Noe]:"The logout request was null or undefined.",[Loe]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[yN]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[bN]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[$oe]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Boe]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[x4]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Uoe]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Fst]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Nst]:"Invalid authentication header provided",[Hoe]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[zoe]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[joe]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class wN extends No{constructor(t){super(t,Lst[t]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,wN.prototype)}}function fo(e){return new wN(e)}/*! @azure/msal-common v14.5.0 2023-12-01 */class nu{static isEmptyObj(t){if(t)try{const r=JSON.parse(t);return Object.keys(r).length===0}catch{}return!0}static startsWith(t,r){return t.indexOf(r)===0}static endsWith(t,r){return t.length>=r.length&&t.lastIndexOf(r)===t.length-r.length}static queryStringToObject(t){const r={},n=t.split("&"),o=i=>decodeURIComponent(i.replace(/\+/g," "));return n.forEach(i=>{if(i.trim()){const[a,s]=i.split(/=(.+)/g,2);a&&s&&(r[o(a)]=o(s))}}),r}static trimArrayEntries(t){return t.map(r=>r.trim())}static removeEmptyStringsFromArray(t){return t.filter(r=>!!r)}static jsonParseHelper(t){try{return JSON.parse(t)}catch{return null}}static matchPattern(t,r){return new RegExp(t.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(r)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class Ii{constructor(t){const r=t?nu.trimArrayEntries([...t]):[],n=r?nu.removeEmptyStringsFromArray(r):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach(o=>this.scopes.add(o))}static fromString(t){const n=(t||yt.EMPTY_STRING).split(" ");return new Ii(n)}static createSearchScopes(t){const r=new Ii(t);return r.containsOnlyOIDCScopes()?r.removeScope(yt.OFFLINE_ACCESS_SCOPE):r.removeOIDCScopes(),r}validateInputScopes(t){if(!t||t.length<1)throw fo(Ooe)}containsScope(t){const r=this.printScopesLowerCase().split(" "),n=new Ii(r);return t?n.scopes.has(t.toLowerCase()):!1}containsScopeSet(t){return!t||t.scopes.size<=0?!1:this.scopes.size>=t.scopes.size&&t.asArray().every(r=>this.containsScope(r))}containsOnlyOIDCScopes(){let t=0;return pV.forEach(r=>{this.containsScope(r)&&(t+=1)}),this.scopes.size===t}appendScope(t){t&&this.scopes.add(t.trim())}appendScopes(t){try{t.forEach(r=>this.appendScope(r))}catch{throw zt(Coe)}}removeScope(t){if(!t)throw zt(xoe);this.scopes.delete(t.trim())}removeOIDCScopes(){pV.forEach(t=>{this.scopes.delete(t)})}unionScopeSets(t){if(!t)throw zt(O5);const r=new Set;return t.scopes.forEach(n=>r.add(n.toLowerCase())),this.scopes.forEach(n=>r.add(n.toLowerCase())),r}intersectingScopeSets(t){if(!t)throw zt(O5);t.containsOnlyOIDCScopes()||t.removeOIDCScopes();const r=this.unionScopeSets(t),n=t.getScopeCount(),o=this.getScopeCount();return r.size<o+n}getScopeCount(){return this.scopes.size}asArray(){const t=[];return this.scopes.forEach(r=>t.push(r)),t}printScopes(){return this.scopes?this.asArray().join(" "):yt.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.5.0 2023-12-01 */function WE(e,t){if(!e)throw zt(doe);try{const r=t(e);return JSON.parse(r)}catch{throw zt(sN)}}function Zg(e){if(!e)throw zt(sN);const t=e.split(ja.CLIENT_INFO_SEPARATOR,2);return{uid:t[0],utid:t.length<2?yt.EMPTY_STRING:t[1]}}/*! @azure/msal-common v14.5.0 2023-12-01 */function L5(e,t){return!!e&&!!t&&e===t.split(".")[1]}function xN(e,t){const{oid:r,sub:n,tid:o,name:i,tfp:a,acr:s}=t,c=o||a||s||"";return{tenantId:c,localAccountId:r||n||"",name:i,isHomeTenant:L5(c,e)}}function CN(e,t,r){let n=e;if(t){const{isHomeTenant:o,...i}=t;n={...e,...i}}if(r){const{isHomeTenant:o,...i}=xN(e.homeAccountId,r);return n={...n,...i,idTokenClaims:r},n}return n}/*! @azure/msal-common v14.5.0 2023-12-01 */const Uc={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.5.0 2023-12-01 */function Voe(e){return e&&(e.tid||e.tfp||e.acr)||null}/*! @azure/msal-common v14.5.0 2023-12-01 */const Zd={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.5.0 2023-12-01 */class Wi{generateAccountId(){return[this.homeAccountId,this.environment].join(ja.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return Wi.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(t=>[t.tenantId,t]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(t){const r=t.homeAccountId.split(".")[1];return[t.homeAccountId,t.environment||"",r||t.tenantId||""].join(ja.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(t,r,n){const o=new Wi;r.authorityType===Uc.Adfs?o.authorityType=b_.ADFS_ACCOUNT_TYPE:r.protocolMode===Zd.AAD?o.authorityType=b_.MSSTS_ACCOUNT_TYPE:o.authorityType=b_.GENERIC_ACCOUNT_TYPE;let i;t.clientInfo&&n&&(i=WE(t.clientInfo,n)),o.clientInfo=t.clientInfo,o.homeAccountId=t.homeAccountId,o.nativeAccountId=t.nativeAccountId;const a=t.environment||r&&r.getPreferredCache();if(!a)throw zt(dN);o.environment=a,o.realm=(i==null?void 0:i.utid)||Voe(t.idTokenClaims)||"",o.localAccountId=(i==null?void 0:i.uid)||t.idTokenClaims.oid||t.idTokenClaims.sub||"";const s=t.idTokenClaims.preferred_username||t.idTokenClaims.upn,c=t.idTokenClaims.emails?t.idTokenClaims.emails[0]:null;if(o.username=s||c||"",o.name=t.idTokenClaims.name,o.cloudGraphHostName=t.cloudGraphHostName,o.msGraphHost=t.msGraphHost,t.tenantProfiles)o.tenantProfiles=t.tenantProfiles;else{const l=[];if(t.idTokenClaims){const u=xN(t.homeAccountId,t.idTokenClaims);l.push(u)}o.tenantProfiles=l}return o}static createFromAccountInfo(t,r,n){var i;const o=new Wi;return o.authorityType=t.authorityType||b_.GENERIC_ACCOUNT_TYPE,o.homeAccountId=t.homeAccountId,o.localAccountId=t.localAccountId,o.nativeAccountId=t.nativeAccountId,o.realm=t.tenantId,o.environment=t.environment,o.username=t.username,o.name=t.name,o.cloudGraphHostName=r,o.msGraphHost=n,o.tenantProfiles=Array.from(((i=t.tenantProfiles)==null?void 0:i.values())||[]),o}static generateHomeAccountId(t,r,n,o,i){if(!(r===Uc.Adfs||r===Uc.Dsts)){if(t)try{const a=WE(t,o.base64Decode);if(a.uid&&a.utid)return`${a.uid}.${a.utid}`}catch{}n.warning("No client info in response")}return(i==null?void 0:i.sub)||""}static isAccountEntity(t){return t?t.hasOwnProperty("homeAccountId")&&t.hasOwnProperty("environment")&&t.hasOwnProperty("realm")&&t.hasOwnProperty("localAccountId")&&t.hasOwnProperty("username")&&t.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(t,r,n){if(!t||!r)return!1;let o=!0;if(n){const i=t.idTokenClaims||{},a=r.idTokenClaims||{};o=i.iat===a.iat&&i.nonce===a.nonce}return t.homeAccountId===r.homeAccountId&&t.localAccountId===r.localAccountId&&t.username===r.username&&t.tenantId===r.tenantId&&t.environment===r.environment&&t.nativeAccountId===r.nativeAccountId&&o}}/*! @azure/msal-common v14.5.0 2023-12-01 */function $st(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.5.0 2023-12-01 */function Woe(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function GE(e){if(!e||e.indexOf("=")<0)return null;try{const t=Woe(e),r=Object.fromEntries(new URLSearchParams(t));if(r.code||r.error||r.error_description||r.state)return r}catch{throw zt(moe)}return null}/*! @azure/msal-common v14.5.0 2023-12-01 */class Pn{get urlString(){return this._urlString}constructor(t){if(this._urlString=t,!this._urlString)throw fo(gN);t.includes("#")||(this._urlString=Pn.canonicalizeUri(t))}static canonicalizeUri(t){if(t){let r=t.toLowerCase();return nu.endsWith(r,"?")?r=r.slice(0,-1):nu.endsWith(r,"?/")&&(r=r.slice(0,-2)),nu.endsWith(r,"/")||(r+="/"),r}return t}validateAsUri(){let t;try{t=this.getUrlComponents()}catch{throw fo($b)}if(!t.HostNameAndPort||!t.PathSegments)throw fo($b);if(!t.Protocol||t.Protocol.toLowerCase()!=="https:")throw fo(Roe)}static appendQueryString(t,r){return r?t.indexOf("?")<0?`${t}?${r}`:`${t}&${r}`:t}static removeHashFromUrl(t){return Pn.canonicalizeUri(t.split("#")[0])}replaceTenantPath(t){const r=this.getUrlComponents(),n=r.PathSegments;return t&&n.length!==0&&(n[0]===Vh.COMMON||n[0]===Vh.ORGANIZATIONS)&&(n[0]=t),Pn.constructAuthorityUriFromObject(r)}getUrlComponents(){const t=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),r=this.urlString.match(t);if(!r)throw fo($b);const n={Protocol:r[1],HostNameAndPort:r[4],AbsolutePath:r[5],QueryString:r[7]};let o=n.AbsolutePath.split("/");return o=o.filter(i=>i&&i.length>0),n.PathSegments=o,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(t){const r=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=t.match(r);if(!n)throw fo($b);return n[2]}static getAbsoluteUrl(t,r){if(t[0]===yt.FORWARD_SLASH){const o=new Pn(r).getUrlComponents();return o.Protocol+"//"+o.HostNameAndPort+t}return t}static constructAuthorityUriFromObject(t){return new Pn(t.Protocol+"//"+t.HostNameAndPort+"/"+t.PathSegments.join("/"))}static hashContainsKnownProperties(t){return!!GE(t)}}/*! @azure/msal-common v14.5.0 2023-12-01 */const Goe={endpointMetadata:{"https://login.microsoftonline.com/common/":{token_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/common/":{token_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/common/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/common/":{token_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/common/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/common/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/common/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/consumers/":{token_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/consumers/":{token_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/consumers/":{token_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/consumers/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/consumers/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"},"https://login.microsoftonline.com/organizations/":{token_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.com/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.com/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.com",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pas.windows.net"},"https://login.chinacloudapi.cn/organizations/":{token_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.chinacloudapi.cn/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"partner.microsoftonline.cn",cloud_graph_host_name:"graph.chinacloudapi.cn",msgraph_host:"microsoftgraph.chinacloudapi.cn",rbac_url:"https://pas.chinacloudapi.cn"},"https://login.microsoftonline.us/organizations/":{token_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/token",token_endpoint_auth_methods_supported:["client_secret_post","private_key_jwt","client_secret_basic"],jwks_uri:"https://login.microsoftonline.us/organizations/discovery/v2.0/keys",response_modes_supported:["query","fragment","form_post"],subject_types_supported:["pairwise"],id_token_signing_alg_values_supported:["RS256"],response_types_supported:["code","id_token","code id_token","id_token token"],scopes_supported:["openid","profile","email","offline_access"],issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",request_uri_parameter_supported:!1,userinfo_endpoint:"https://graph.microsoft.com/oidc/userinfo",authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",device_authorization_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",http_logout_supported:!0,frontchannel_logout_supported:!0,end_session_endpoint:"https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",claims_supported:["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],kerberos_endpoint:"https://login.microsoftonline.us/organizations/kerberos",tenant_region_scope:null,cloud_instance_name:"microsoftonline.us",cloud_graph_host_name:"graph.windows.net",msgraph_host:"graph.microsoft.com",rbac_url:"https://pasff.usgovcloudapi.net"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration","api-version":"1.1",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},SV=Goe.endpointMetadata,SN=Goe.instanceDiscoveryMetadata,qoe=new Set;SN.metadata.forEach(e=>{e.aliases.forEach(t=>{qoe.add(t)})});function Bst(e,t){var o;let r;const n=e.canonicalAuthority;if(n){const i=new Pn(n).getUrlComponents().HostNameAndPort;r=_V(i,(o=e.cloudDiscoveryMetadata)==null?void 0:o.metadata,ol.CONFIG,t)||_V(i,SN.metadata,ol.HARDCODED_VALUES,t)||e.knownAuthorities}return r||[]}function _V(e,t,r,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){const o=qE(t,e);if(o)return n==null||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),o.aliases;n==null||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}function Ust(e){return qE(SN.metadata,e)}function qE(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.aliases.includes(t))return n}return null}/*! @azure/msal-common v14.5.0 2023-12-01 */class $5{constructor(){this.expiresAt=ws.nowSeconds()+xw.REFRESH_TIME_SECONDS}updateCloudDiscoveryMetadata(t,r){this.aliases=t.aliases,this.preferred_cache=t.preferred_cache,this.preferred_network=t.preferred_network,this.aliasesFromNetwork=r}updateEndpointMetadata(t,r){this.authorization_endpoint=t.authorization_endpoint,this.token_endpoint=t.token_endpoint,this.end_session_endpoint=t.end_session_endpoint,this.issuer=t.issuer,this.endpointsFromNetwork=r,this.jwks_uri=t.jwks_uri}updateCanonicalAuthority(t){this.canonical_authority=t}resetExpiresAt(){this.expiresAt=ws.nowSeconds()+xw.REFRESH_TIME_SECONDS}isExpired(){return this.expiresAt<=ws.nowSeconds()}static isAuthorityMetadataEntity(t,r){return r?t.indexOf(xw.CACHE_KEY)===0&&r.hasOwnProperty("aliases")&&r.hasOwnProperty("preferred_cache")&&r.hasOwnProperty("preferred_network")&&r.hasOwnProperty("canonical_authority")&&r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("aliasesFromNetwork")&&r.hasOwnProperty("endpointsFromNetwork")&&r.hasOwnProperty("expiresAt")&&r.hasOwnProperty("jwks_uri"):!1}}/*! @azure/msal-common v14.5.0 2023-12-01 */function Hst(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}/*! @azure/msal-common v14.5.0 2023-12-01 */function zst(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}/*! @azure/msal-common v14.5.0 2023-12-01 */const ft={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromiseMeasurement",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},jst={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.5.0 2023-12-01 */const k0=(e,t,r,n,o)=>(...i)=>{r.trace(`Executing function ${t}`);const a=n==null?void 0:n.startMeasurement(t,o);try{const s=e(...i);return a==null||a.end({success:!0}),r.trace(`Returning result from ${t}`),s}catch(s){r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(s))}catch{r.trace("Unable to print error message.")}throw a==null||a.end({success:!1}),s}},or=(e,t,r,n,o)=>(...i)=>{r.trace(`Executing function ${t}`);const a=n==null?void 0:n.startMeasurement(t,o);return n==null||n.setPreQueueTime(t,o),e(...i).then(s=>(r.trace(`Returning result from ${t}`),a==null||a.end({success:!0}),s)).catch(s=>{r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(s))}catch{r.trace("Unable to print error message.")}throw a==null||a.end({success:!1}),s})};/*! @azure/msal-common v14.5.0 2023-12-01 */class C4{constructor(t,r,n,o){this.networkInterface=t,this.logger=r,this.performanceClient=n,this.correlationId=o}async detectRegion(t,r){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.RegionDiscoveryDetectRegion,this.correlationId);let n=t;if(n)r.region_source=gg.ENVIRONMENT_VARIABLE;else{const i=C4.IMDS_OPTIONS;try{const a=await or(this.getRegionFromIMDS.bind(this),ft.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(yt.IMDS_VERSION,i);if(a.status===w_.httpSuccess&&(n=a.body,r.region_source=gg.IMDS),a.status===w_.httpBadRequest){const s=await or(this.getCurrentVersion.bind(this),ft.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(i);if(!s)return r.region_source=gg.FAILED_AUTO_DETECTION,null;const c=await or(this.getRegionFromIMDS.bind(this),ft.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(s,i);c.status===w_.httpSuccess&&(n=c.body,r.region_source=gg.IMDS)}}catch{return r.region_source=gg.FAILED_AUTO_DETECTION,null}}return n||(r.region_source=gg.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(t,r){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(ft.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${yt.IMDS_ENDPOINT}?api-version=${t}&format=text`,r,yt.IMDS_TIMEOUT)}async getCurrentVersion(t){var r;(r=this.performanceClient)==null||r.addQueueMeasurement(ft.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const n=await this.networkInterface.sendGetRequestAsync(`${yt.IMDS_ENDPOINT}?format=json`,t);return n.status===w_.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}C4.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.5.0 2023-12-01 */class Ua{constructor(t,r,n,o,i,a,s){this.canonicalAuthority=t,this._canonicalAuthority.validateAsUri(),this.networkInterface=r,this.cacheManager=n,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=i,this.performanceClient=a,this.correlationId=s,this.regionDiscovery=new C4(r,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(t){if(t.HostNameAndPort.endsWith(yt.CIAM_AUTH_URL))return Uc.Ciam;const r=t.PathSegments;if(r.length)switch(r[0].toLowerCase()){case yt.ADFS:return Uc.Adfs;case yt.DSTS:return Uc.Dsts}return Uc.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(t){this._canonicalAuthority=new Pn(t),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw zt(Rd)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw zt(Rd)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw zt(Rd)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw zt(Toe);return this.replacePath(this.metadata.end_session_endpoint)}else throw zt(Rd)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw zt(Rd)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw zt(Rd)}canReplaceTenant(t){return t.PathSegments.length===1&&!Ua.reservedTenantDomains.has(t.PathSegments[0])&&this.getAuthorityType(t)===Uc.Default&&this.protocolMode===Zd.AAD}replaceTenant(t){return t.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(t){let r=t;const o=new Pn(this.metadata.canonical_authority).getUrlComponents(),i=o.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((s,c)=>{let l=i[c];if(c===0&&this.canReplaceTenant(o)){const u=new Pn(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];l!==u&&(this.logger.verbose(`Replacing tenant domain name ${l} with id ${u}`),l=u)}s!==l&&(r=r.replace(`/${l}/`,`/${s}/`))}),this.replaceTenant(r)}get defaultOpenIdConfigurationEndpoint(){const t=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Uc.Adfs||this.protocolMode!==Zd.AAD&&!this.isAliasOfKnownMicrosoftAuthority(t)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.AuthorityResolveEndpointsAsync,this.correlationId);const t=this.getCurrentMetadataEntity(),r=await or(this.updateCloudDiscoveryMetadata.bind(this),ft.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(t);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,t.preferred_network);const n=await or(this.updateEndpointMetadata.bind(this),ft.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(t);this.updateCachedMetadata(t,r,{source:n})}getCurrentMetadataEntity(){let t=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return t||(t=new $5,t.updateCanonicalAuthority(this.canonicalAuthority)),t}updateCachedMetadata(t,r,n){r!==ol.CACHE&&(n==null?void 0:n.source)!==ol.CACHE&&(t.resetExpiresAt(),t.updateCanonicalAuthority(this.canonicalAuthority));const o=this.cacheManager.generateAuthorityMetadataCacheKey(t.preferred_cache);this.cacheManager.setAuthorityMetadata(o,t),this.metadata=t}async updateEndpointMetadata(t){var o,i,a;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.AuthorityUpdateEndpointMetadata,this.correlationId);const r=this.updateEndpointMetadataFromLocalSources(t);if(r){if(r.source===ol.HARDCODED_VALUES&&(i=this.authorityOptions.azureRegionConfiguration)!=null&&i.azureRegion&&r.metadata){const s=await or(this.updateMetadataWithRegionalInformation.bind(this),ft.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(r.metadata);t.updateEndpointMetadata(s,!1)}return r.source}let n=await or(this.getEndpointMetadataFromNetwork.bind(this),ft.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(a=this.authorityOptions.azureRegionConfiguration)!=null&&a.azureRegion&&(n=await or(this.updateMetadataWithRegionalInformation.bind(this),ft.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),t.updateEndpointMetadata(n,!0),ol.NETWORK;throw zt(poe,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(t){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const r=this.getEndpointMetadataFromConfig();if(r)return this.logger.verbose("Found endpoint metadata in authority configuration"),t.updateEndpointMetadata(r,!1),{source:ol.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const o=this.getEndpointMetadataFromHardcodedValues();if(o)return t.updateEndpointMetadata(o,!1),{source:ol.HARDCODED_VALUES,metadata:o};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const n=t.isExpired();return this.isAuthoritySameType(t)&&t.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:ol.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(t){return new Pn(t.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw fo($oe)}return null}async getEndpointMetadataFromNetwork(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(ft.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const t={},r=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${r}`);try{const o=await this.networkInterface.sendGetRequestAsync(r,t);return $st(o.body)?o.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(o){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${o}`),null}}getEndpointMetadataFromHardcodedValues(){return this.canonicalAuthority in SV?SV[this.canonicalAuthority]:null}async updateMetadataWithRegionalInformation(t){var n,o,i;(n=this.performanceClient)==null||n.addQueueMeasurement(ft.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const r=(o=this.authorityOptions.azureRegionConfiguration)==null?void 0:o.azureRegion;if(r){if(r!==yt.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=TP.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=r,Ua.replaceWithRegionalInformation(t,r);const a=await or(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),ft.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.environmentRegion,this.regionDiscoveryMetadata);if(a)return this.regionDiscoveryMetadata.region_outcome=TP.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=a,Ua.replaceWithRegionalInformation(t,a);this.regionDiscoveryMetadata.region_outcome=TP.AUTO_DETECTION_REQUESTED_FAILED}return t}async updateCloudDiscoveryMetadata(t){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const r=this.updateCloudDiscoveryMetadataFromLocalSources(t);if(r)return r;const n=await or(this.getCloudDiscoveryMetadataFromNetwork.bind(this),ft.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return t.updateCloudDiscoveryMetadata(n,!0),ol.NETWORK;throw fo(Boe)}updateCloudDiscoveryMetadataFromLocalSources(t){this.logger.verbose("Attempting to get cloud discovery metadata  from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||yt.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||yt.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${t.canonical_authority||yt.NOT_APPLICABLE}`);const r=this.getCloudDiscoveryMetadataFromConfig();if(r)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),t.updateCloudDiscoveryMetadata(r,!1),ol.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const o=Ust(this.hostnameAndPort);if(o)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),t.updateCloudDiscoveryMetadata(o,!1),ol.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const n=t.isExpired();return this.isAuthoritySameType(t)&&t.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),ol.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Uc.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),Ua.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const t=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),r=qE(t.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),r)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),r;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),fo(bN)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),Ua.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const t=`${yt.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,r={};let n=null;try{const i=await this.networkInterface.sendGetRequestAsync(t,r);let a,s;if(Hst(i.body))a=i.body,s=a.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${a.tenant_discovery_endpoint}`);else if(zst(i.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${i.status}`),a=i.body,a.error===yt.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${a.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${a.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),s=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=qE(s,this.hostnameAndPort)}catch(i){if(i instanceof No)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
Error: ${i.errorCode}
Error Description: ${i.errorMessage}`);else{const a=i;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
Error: ${a.name}
Error Description: ${a.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=Ua.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(r=>r&&Pn.getDomainFromUrl(r).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(t,r){let n;if(r&&r.azureCloudInstance!==pN.None){const o=r.tenant?r.tenant:yt.DEFAULT_COMMON_TENANT;n=`${r.azureCloudInstance}/${o}/`}return n||t}static createCloudDiscoveryMetadataFromHost(t){return{preferred_network:t,preferred_cache:t,aliases:[t]}}getPreferredCache(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw zt(Rd)}isAlias(t){return this.metadata.aliases.indexOf(t)>-1}isAliasOfKnownMicrosoftAuthority(t){return qoe.has(t)}static isPublicCloudAuthority(t){return yt.KNOWN_PUBLIC_CLOUDS.indexOf(t)>=0}static buildRegionalAuthorityString(t,r,n){const o=new Pn(t);o.validateAsUri();const i=o.getUrlComponents();let a=`${r}.${i.HostNameAndPort}`;this.isPublicCloudAuthority(i.HostNameAndPort)&&(a=`${r}.${yt.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const s=Pn.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:a}).urlString;return n?`${s}?${n}`:s}static replaceWithRegionalInformation(t,r){const n={...t};return n.authorization_endpoint=Ua.buildRegionalAuthorityString(n.authorization_endpoint,r),n.token_endpoint=Ua.buildRegionalAuthorityString(n.token_endpoint,r),n.end_session_endpoint&&(n.end_session_endpoint=Ua.buildRegionalAuthorityString(n.end_session_endpoint,r)),n}static transformCIAMAuthority(t){let r=t;const o=new Pn(t).getUrlComponents();if(o.PathSegments.length===0&&o.HostNameAndPort.endsWith(yt.CIAM_AUTH_URL)){const i=o.HostNameAndPort.split(".")[0];r=`${r}${i}${yt.AAD_TENANT_DOMAIN_SUFFIX}`}return r}}Ua.reservedTenantDomains=new Set(["{tenant}","{tenantid}",Vh.COMMON,Vh.CONSUMERS,Vh.ORGANIZATIONS]);function Vst(e){const n=new Pn(e).getUrlComponents().PathSegments.slice(-1)[0].toLowerCase();switch(n){case Vh.COMMON:case Vh.ORGANIZATIONS:case Vh.CONSUMERS:return;default:return n}}function Koe(e){return e.endsWith(yt.FORWARD_SLASH)?e:`${e}${yt.FORWARD_SLASH}`}function Wst(e){const t=e.cloudDiscoveryMetadata;let r;if(t)try{r=JSON.parse(t)}catch{throw fo(bN)}return{canonicalAuthority:e.authority?Koe(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:r}}/*! @azure/msal-common v14.5.0 2023-12-01 */class Ud{constructor(t,r,n,o){this.clientId=t,this.cryptoImpl=r,this.commonLogger=n.clone(Ioe,hN),this.staticAuthorityOptions=o}getAllAccounts(t){return this.buildTenantProfiles(this.getAccountsFilteredBy(t||{}),t)}getAccountInfoFilteredBy(t){const r=this.getAllAccounts(t);return r.length>1?r.sort(o=>o.idTokenClaims?-1:1)[0]:r.length===1?r[0]:null}getBaseAccountInfo(t){const r=this.getAccountsFilteredBy(t);return r.length>0?r[0].getAccountInfo():null}buildTenantProfiles(t,r){return t.flatMap(n=>this.getAccountInfoForTenantProfiles(n,r))}getAccountInfoForTenantProfiles(t,r){return this.getTenantProfilesFromAccountEntity(t,r==null?void 0:r.tenantId,r)}getTenantedAccountInfoByFilter(t,r,n,o){let i=null,a;if(o&&!this.tenantProfileMatchesFilter(n,o))return null;const s=this.getIdToken(t,r,n.tenantId);return s&&(a=_0(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(a,o))?null:(i=CN(t,n,a),i)}getTenantProfilesFromAccountEntity(t,r,n){const o=t.getAccountInfo();let i=o.tenantProfiles||new Map;const a=this.getTokenKeys();if(r){const c=i.get(r);if(c)i=new Map([[r,c]]);else return[]}const s=[];return i.forEach(c=>{const l=this.getTenantedAccountInfoByFilter(o,a,c,n);l&&s.push(l)}),s}tenantProfileMatchesFilter(t,r){return!(r.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(t,r.localAccountId)||r.name&&t.name!==r.name||r.isHomeTenant!==void 0&&t.isHomeTenant!==r.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(t,r){return!(r&&(r.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(t,r.localAccountId)||r.loginHint&&!this.matchLoginHintFromTokenClaims(t,r.loginHint)||r.username&&!this.matchUsername(t.preferred_username,r.username)||r.name&&!this.matchName(t,r.name)||r.sid&&!this.matchSid(t,r.sid)))}async saveCacheRecord(t,r){if(!t)throw zt(Soe);t.account&&this.setAccount(t.account),t.idToken&&(r==null?void 0:r.idToken)!==!1&&this.setIdTokenCredential(t.idToken),t.accessToken&&(r==null?void 0:r.accessToken)!==!1&&await this.saveAccessToken(t.accessToken),t.refreshToken&&(r==null?void 0:r.refreshToken)!==!1&&this.setRefreshTokenCredential(t.refreshToken),t.appMetadata&&this.setAppMetadata(t.appMetadata)}async saveAccessToken(t){const r={clientId:t.clientId,credentialType:t.credentialType,environment:t.environment,homeAccountId:t.homeAccountId,realm:t.realm,tokenType:t.tokenType,requestedClaimsHash:t.requestedClaimsHash},n=this.getTokenKeys(),o=Ii.fromString(t.target),i=[];n.accessToken.forEach(a=>{if(!this.accessTokenKeyMatchesFilter(a,r,!1))return;const s=this.getAccessTokenCredential(a);s&&this.credentialMatchesFilter(s,r)&&Ii.fromString(s.target).intersectingScopeSets(o)&&i.push(this.removeAccessToken(a))}),await Promise.all(i),this.setAccessTokenCredential(t)}getAccountsFilteredBy(t){const r=this.getAccountKeys(),n=[];return r.forEach(o=>{var c;if(!this.isAccountKey(o,t.homeAccountId))return;const i=this.getAccount(o,this.commonLogger);if(!i||t.homeAccountId&&!this.matchHomeAccountId(i,t.homeAccountId)||t.username&&!this.matchUsername(i.username,t.username)||t.environment&&!this.matchEnvironment(i,t.environment)||t.realm&&!this.matchRealm(i,t.realm)||t.nativeAccountId&&!this.matchNativeAccountId(i,t.nativeAccountId)||t.authorityType&&!this.matchAuthorityType(i,t.authorityType))return;const a={localAccountId:t==null?void 0:t.localAccountId,name:t==null?void 0:t.name},s=(c=i.tenantProfiles)==null?void 0:c.filter(l=>this.tenantProfileMatchesFilter(l,a));s&&s.length===0||n.push(i)}),n}isAccountKey(t,r,n){return!(t.split(ja.CACHE_KEY_SEPARATOR).length<3||r&&!t.toLowerCase().includes(r.toLowerCase())||n&&!t.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(t){if(t.split(ja.CACHE_KEY_SEPARATOR).length<6)return!1;const r=t.toLowerCase();if(r.indexOf(Lr.ID_TOKEN.toLowerCase())===-1&&r.indexOf(Lr.ACCESS_TOKEN.toLowerCase())===-1&&r.indexOf(Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&r.indexOf(Lr.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(r.indexOf(Lr.REFRESH_TOKEN.toLowerCase())>-1){const n=`${Lr.REFRESH_TOKEN}${ja.CACHE_KEY_SEPARATOR}${this.clientId}${ja.CACHE_KEY_SEPARATOR}`,o=`${Lr.REFRESH_TOKEN}${ja.CACHE_KEY_SEPARATOR}${ww}${ja.CACHE_KEY_SEPARATOR}`;if(r.indexOf(n.toLowerCase())===-1&&r.indexOf(o.toLowerCase())===-1)return!1}else if(r.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(t,r){return!(r.clientId&&!this.matchClientId(t,r.clientId)||r.userAssertionHash&&!this.matchUserAssertionHash(t,r.userAssertionHash)||typeof r.homeAccountId=="string"&&!this.matchHomeAccountId(t,r.homeAccountId)||r.environment&&!this.matchEnvironment(t,r.environment)||r.realm&&!this.matchRealm(t,r.realm)||r.credentialType&&!this.matchCredentialType(t,r.credentialType)||r.familyId&&!this.matchFamilyId(t,r.familyId)||r.target&&!this.matchTarget(t,r.target)||(r.requestedClaimsHash||t.requestedClaimsHash)&&t.requestedClaimsHash!==r.requestedClaimsHash||t.credentialType===Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(r.tokenType&&!this.matchTokenType(t,r.tokenType)||r.tokenType===uo.SSH&&r.keyId&&!this.matchKeyId(t,r.keyId)))}getAppMetadataFilteredBy(t){return this.getAppMetadataFilteredByInternal(t.environment,t.clientId)}getAppMetadataFilteredByInternal(t,r){const n=this.getKeys(),o={};return n.forEach(i=>{if(!this.isAppMetadata(i))return;const a=this.getAppMetadata(i);a&&(t&&!this.matchEnvironment(a,t)||r&&!this.matchClientId(a,r)||(o[i]=a))}),o}getAuthorityMetadataByAlias(t){const r=this.getAuthorityMetadataKeys();let n=null;return r.forEach(o=>{if(!this.isAuthorityMetadata(o)||o.indexOf(this.clientId)===-1)return;const i=this.getAuthorityMetadata(o);i&&i.aliases.indexOf(t)!==-1&&(n=i)}),n}async removeAllAccounts(){const t=this.getAccountKeys(),r=[];t.forEach(n=>{r.push(this.removeAccount(n))}),await Promise.all(r)}async removeAccount(t){const r=this.getAccount(t,this.commonLogger);r&&(await this.removeAccountContext(r),this.removeItem(t))}async removeAccountContext(t){const r=this.getTokenKeys(),n=t.generateAccountId(),o=[];r.idToken.forEach(i=>{i.indexOf(n)===0&&this.removeIdToken(i)}),r.accessToken.forEach(i=>{i.indexOf(n)===0&&o.push(this.removeAccessToken(i))}),r.refreshToken.forEach(i=>{i.indexOf(n)===0&&this.removeRefreshToken(i)}),await Promise.all(o)}updateOutdatedCachedAccount(t,r,n){var o;if(r&&r.isSingleTenant()){(o=this.commonLogger)==null||o.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const i=this.getAccountKeys().filter(u=>u.startsWith(r.homeAccountId)),a=[];i.forEach(u=>{const f=this.getCachedAccountEntity(u);f&&a.push(f)});const s=a.find(u=>L5(u.realm,u.homeAccountId))||a[0];s.tenantProfiles=a.map(u=>({tenantId:u.realm,localAccountId:u.localAccountId,name:u.name,isHomeTenant:L5(u.realm,u.homeAccountId)}));const c=Ud.toObject(new Wi,{...s}),l=c.generateAccountKey();return i.forEach(u=>{u!==l&&this.removeOutdatedAccount(t)}),this.setAccount(c),n==null||n.verbose("Updated an outdated account entity in the cache"),c}return r}async removeAccessToken(t){const r=this.getAccessTokenCredential(t);if(r){if(r.credentialType.toLowerCase()===Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&r.tokenType===uo.POP){const o=r.keyId;if(o)try{await this.cryptoImpl.removeTokenBindingKey(o)}catch{throw zt(Eoe)}}return this.removeItem(t)}}removeAppMetadata(){return this.getKeys().forEach(r=>{this.isAppMetadata(r)&&this.removeItem(r)}),!0}readCacheRecord(t,r,n,o,i){const a=t.tenantId||Vst(r.authority),s=this.getTokenKeys(),c=this.readAccountFromCache(t),l=this.getIdToken(t,s,a,o,i),u=this.getAccessToken(t,r,s,a,o,i),f=this.getRefreshToken(t,!1,s,o,i),d=this.readAppMetadataFromCache(n);return{account:c,idToken:l,accessToken:u,refreshToken:f,appMetadata:d}}readAccountFromCache(t){const r=Wi.generateAccountCacheKey(t);return this.getAccount(r,this.commonLogger)}getIdToken(t,r,n,o,i){this.commonLogger.trace("CacheManager - getIdToken called");const a={homeAccountId:t.homeAccountId,environment:t.environment,credentialType:Lr.ID_TOKEN,clientId:this.clientId,realm:n},s=this.getIdTokensByFilter(a,r),c=s.size;if(c<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(c>1){let l=s;if(!n){const u=new Map;s.forEach((d,h)=>{d.realm===t.tenantId&&u.set(h,d)});const f=u.size;if(f<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),s.values().next().value;if(f===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),u.values().next().value;l=u}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),l.forEach((u,f)=>{this.removeIdToken(f)}),o&&i&&o.addFields({multiMatchedID:s.size},i),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),s.values().next().value}getIdTokensByFilter(t,r){const n=r&&r.idToken||this.getTokenKeys().idToken,o=new Map;return n.forEach(i=>{if(!this.idTokenKeyMatchesFilter(i,{clientId:this.clientId,...t}))return;const a=this.getIdTokenCredential(i);a&&this.credentialMatchesFilter(a,t)&&o.set(i,a)}),o}idTokenKeyMatchesFilter(t,r){const n=t.toLowerCase();return!(r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}removeIdToken(t){this.removeItem(t)}removeRefreshToken(t){this.removeItem(t)}getAccessToken(t,r,n,o,i,a){this.commonLogger.trace("CacheManager - getAccessToken called");const s=Ii.createSearchScopes(r.scopes),c=r.authenticationScheme||uo.BEARER,l=c&&c.toLowerCase()!==uo.BEARER.toLowerCase()?Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME:Lr.ACCESS_TOKEN,u={homeAccountId:t.homeAccountId,environment:t.environment,credentialType:l,clientId:this.clientId,realm:o||t.tenantId,target:s,tokenType:c,keyId:r.sshKid,requestedClaimsHash:r.requestedClaimsHash},f=n&&n.accessToken||this.getTokenKeys().accessToken,d=[];f.forEach(p=>{if(this.accessTokenKeyMatchesFilter(p,u,!0)){const g=this.getAccessTokenCredential(p);g&&this.credentialMatchesFilter(g,u)&&d.push(g)}});const h=d.length;return h<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):h>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),d.forEach(p=>{this.removeAccessToken(Lb(p))}),i&&a&&i.addFields({multiMatchedAT:d.length},a),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),d[0])}accessTokenKeyMatchesFilter(t,r,n){const o=t.toLowerCase();if(r.clientId&&o.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&o.indexOf(r.homeAccountId.toLowerCase())===-1||r.realm&&o.indexOf(r.realm.toLowerCase())===-1||r.requestedClaimsHash&&o.indexOf(r.requestedClaimsHash.toLowerCase())===-1)return!1;if(r.target){const i=r.target.asArray();for(let a=0;a<i.length;a++){if(n&&!o.includes(i[a].toLowerCase()))return!1;if(!n&&o.includes(i[a].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(t){const r=this.getTokenKeys(),n=[];return r.accessToken.forEach(o=>{if(!this.accessTokenKeyMatchesFilter(o,t,!0))return;const i=this.getAccessTokenCredential(o);i&&this.credentialMatchesFilter(i,t)&&n.push(i)}),n}getRefreshToken(t,r,n,o,i){this.commonLogger.trace("CacheManager - getRefreshToken called");const a=r?ww:void 0,s={homeAccountId:t.homeAccountId,environment:t.environment,credentialType:Lr.REFRESH_TOKEN,clientId:this.clientId,familyId:a},c=n&&n.refreshToken||this.getTokenKeys().refreshToken,l=[];c.forEach(f=>{if(this.refreshTokenKeyMatchesFilter(f,s)){const d=this.getRefreshTokenCredential(f);d&&this.credentialMatchesFilter(d,s)&&l.push(d)}});const u=l.length;return u<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(u>1&&o&&i&&o.addFields({multiMatchedRT:u},i),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),l[0])}refreshTokenKeyMatchesFilter(t,r){const n=t.toLowerCase();return!(r.familyId&&n.indexOf(r.familyId.toLowerCase())===-1||!r.familyId&&r.clientId&&n.indexOf(r.clientId.toLowerCase())===-1||r.homeAccountId&&n.indexOf(r.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(t){const r={environment:t,clientId:this.clientId},n=this.getAppMetadataFilteredBy(r),o=Object.keys(n).map(a=>n[a]),i=o.length;if(i<1)return null;if(i>1)throw zt(boe);return o[0]}isAppMetadataFOCI(t){const r=this.readAppMetadataFromCache(t);return!!(r&&r.familyId===ww)}matchHomeAccountId(t,r){return typeof t.homeAccountId=="string"&&r===t.homeAccountId}matchLocalAccountIdFromTokenClaims(t,r){const n=t.oid||t.sub;return r===n}matchLocalAccountIdFromTenantProfile(t,r){return t.localAccountId===r}matchName(t,r){var n;return r.toLowerCase()===((n=t.name)==null?void 0:n.toLowerCase())}matchUsername(t,r){return!!(t&&typeof t=="string"&&(r==null?void 0:r.toLowerCase())===t.toLowerCase())}matchUserAssertionHash(t,r){return!!(t.userAssertionHash&&r===t.userAssertionHash)}matchEnvironment(t,r){if(this.staticAuthorityOptions){const o=Bst(this.staticAuthorityOptions,this.commonLogger);if(o.includes(r)&&o.includes(t.environment))return!0}const n=this.getAuthorityMetadataByAlias(r);return!!(n&&n.aliases.indexOf(t.environment)>-1)}matchCredentialType(t,r){return t.credentialType&&r.toLowerCase()===t.credentialType.toLowerCase()}matchClientId(t,r){return!!(t.clientId&&r===t.clientId)}matchFamilyId(t,r){return!!(t.familyId&&r===t.familyId)}matchRealm(t,r){var n;return((n=t.realm)==null?void 0:n.toLowerCase())===r.toLowerCase()}matchNativeAccountId(t,r){return!!(t.nativeAccountId&&r===t.nativeAccountId)}matchLoginHintFromTokenClaims(t,r){return t.login_hint===r||t.preferred_username===r||t.upn===r}matchSid(t,r){return t.sid===r}matchAuthorityType(t,r){return!!(t.authorityType&&r.toLowerCase()===t.authorityType.toLowerCase())}matchTarget(t,r){return t.credentialType!==Lr.ACCESS_TOKEN&&t.credentialType!==Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME||!t.target?!1:Ii.fromString(t.target).containsScopeSet(r)}matchTokenType(t,r){return!!(t.tokenType&&t.tokenType===r)}matchKeyId(t,r){return!!(t.keyId&&t.keyId===r)}isAppMetadata(t){return t.indexOf(R5)!==-1}isAuthorityMetadata(t){return t.indexOf(xw.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(t){return`${xw.CACHE_KEY}-${this.clientId}-${t}`}static toObject(t,r){for(const n in r)t[n]=r[n];return t}}class Gst extends Ud{setAccount(){throw zt(mn)}getAccount(){throw zt(mn)}getCachedAccountEntity(){throw zt(mn)}setIdTokenCredential(){throw zt(mn)}getIdTokenCredential(){throw zt(mn)}setAccessTokenCredential(){throw zt(mn)}getAccessTokenCredential(){throw zt(mn)}setRefreshTokenCredential(){throw zt(mn)}getRefreshTokenCredential(){throw zt(mn)}setAppMetadata(){throw zt(mn)}getAppMetadata(){throw zt(mn)}setServerTelemetry(){throw zt(mn)}getServerTelemetry(){throw zt(mn)}setAuthorityMetadata(){throw zt(mn)}getAuthorityMetadata(){throw zt(mn)}getAuthorityMetadataKeys(){throw zt(mn)}setThrottlingCache(){throw zt(mn)}getThrottlingCache(){throw zt(mn)}removeItem(){throw zt(mn)}containsKey(){throw zt(mn)}getKeys(){throw zt(mn)}getAccountKeys(){throw zt(mn)}getTokenKeys(){throw zt(mn)}async clear(){throw zt(mn)}updateCredentialCacheKey(){throw zt(mn)}removeOutdatedAccount(){throw zt(mn)}}/*! @azure/msal-common v14.5.0 2023-12-01 */const qst=300,Yoe={tokenRenewalOffsetSeconds:qst,preventCorsPreflight:!1},Kst={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:Ji.Info,correlationId:yt.EMPTY_STRING},Yst={claimsBasedCachingEnabled:!1},Xst={async sendGetRequestAsync(){throw zt(mn)},async sendPostRequestAsync(){throw zt(mn)}},Qst={sku:yt.SKU,version:hN,cpu:yt.EMPTY_STRING,os:yt.EMPTY_STRING},Zst={clientSecret:yt.EMPTY_STRING,clientAssertion:void 0},Jst={azureCloudInstance:pN.None,tenant:`${yt.DEFAULT_COMMON_TENANT}`},elt={application:{appName:"",appVersion:""}};function tlt({authOptions:e,systemOptions:t,loggerOptions:r,cacheOptions:n,storageInterface:o,networkInterface:i,cryptoInterface:a,clientCredentials:s,libraryInfo:c,telemetry:l,serverTelemetryManager:u,persistencePlugin:f,serializableCache:d}){const h={...Kst,...r};return{authOptions:rlt(e),systemOptions:{...Yoe,...t},loggerOptions:h,cacheOptions:{...Yst,...n},storageInterface:o||new Gst(e.clientId,VE,new Jh(h)),networkInterface:i||Xst,cryptoInterface:a||VE,clientCredentials:s||Zst,libraryInfo:{...Qst,...c},telemetry:{...elt,...l},serverTelemetryManager:u||null,persistencePlugin:f||null,serializableCache:d||null}}function rlt(e){return{clientCapabilities:[],azureCloudOptions:Jst,skipAuthorityMetadataCache:!1,...e}}function B5(e){return e.authOptions.authority.options.protocolMode===Zd.OIDC}/*! @azure/msal-common v14.5.0 2023-12-01 */class ep extends No{constructor(t,r,n){super(t,r,n),this.name="ServerError",Object.setPrototypeOf(this,ep.prototype)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class $u{static generateThrottlingStorageKey(t){return`${Cw.THROTTLING_PREFIX}.${JSON.stringify(t)}`}static preProcess(t,r){var i;const n=$u.generateThrottlingStorageKey(r),o=t.getThrottlingCache(n);if(o){if(o.throttleTime<Date.now()){t.removeItem(n);return}throw new ep(((i=o.errorCodes)==null?void 0:i.join(" "))||yt.EMPTY_STRING,o.errorMessage,o.subError)}}static postProcess(t,r,n){if($u.checkResponseStatus(n)||$u.checkResponseForRetryAfter(n)){const o={throttleTime:$u.calculateThrottleTime(parseInt(n.headers[zu.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};t.setThrottlingCache($u.generateThrottlingStorageKey(r),o)}}static checkResponseStatus(t){return t.status===429||t.status>=500&&t.status<600}static checkResponseForRetryAfter(t){return t.headers?t.headers.hasOwnProperty(zu.RETRY_AFTER)&&(t.status<200||t.status>=300):!1}static calculateThrottleTime(t){const r=t<=0?0:t,n=Date.now()/1e3;return Math.floor(Math.min(n+(r||Cw.DEFAULT_THROTTLE_TIME_SECONDS),n+Cw.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(t,r,n,o){const i={clientId:r,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:o,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},a=this.generateThrottlingStorageKey(i);t.removeItem(a)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class nlt{constructor(t,r){this.networkClient=t,this.cacheManager=r}async sendPostRequest(t,r,n){$u.preProcess(this.cacheManager,t);let o;try{o=await this.networkClient.sendPostRequestAsync(r,n)}catch(i){throw i instanceof No?i:zt(hoe)}return $u.postProcess(this.cacheManager,t,o),o}}/*! @azure/msal-common v14.5.0 2023-12-01 */const vl={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.5.0 2023-12-01 */const b1="client_id",olt="redirect_uri",kV="response_type",ilt="response_mode",alt="grant_type",slt="claims",llt="scope",clt="refresh_token",ult="state",dlt="nonce",flt="prompt",hlt="code",plt="code_challenge",mlt="code_challenge_method",glt="code_verifier",vlt="client-request-id",ylt="x-client-SKU",blt="x-client-VER",wlt="x-client-OS",xlt="x-client-CPU",Clt="x-client-current-telemetry",Slt="x-client-last-telemetry",_lt="x-ms-lib-capability",klt="x-app-name",Elt="x-app-ver",Tlt="post_logout_redirect_uri",Ilt="id_token_hint",Alt="device_code",Plt="client_secret",Mlt="client_assertion",Rlt="client_assertion_type",EV="token_type",TV="req_cnf",Olt="assertion",Dlt="requested_token_use",IV="return_spa_code",Flt="nativebroker",Nlt="logout_hint",Llt="sid",$lt="login_hint",Blt="domain_hint";/*! @azure/msal-common v14.5.0 2023-12-01 */class $p{static validateRedirectUri(t){if(!t)throw fo(Moe)}static validatePrompt(t){const r=[];for(const n in qa)r.push(qa[n]);if(r.indexOf(t)<0)throw fo(Doe)}static validateClaims(t){try{JSON.parse(t)}catch{throw fo(vN)}}static validateCodeChallengeParams(t,r){if(!t||!r)throw fo(yN);this.validateCodeChallengeMethod(r)}static validateCodeChallengeMethod(t){if([mV.PLAIN,mV.S256].indexOf(t)<0)throw fo(Loe)}static sanitizeEQParams(t,r){return t?(r.forEach((n,o)=>{t[o]&&delete t[o]}),Object.fromEntries(Object.entries(t).filter(n=>n[1]!==""))):{}}}/*! @azure/msal-common v14.5.0 2023-12-01 */class Sw{constructor(){this.parameters=new Map}addResponseTypeCode(){this.parameters.set(kV,encodeURIComponent(yt.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(kV,encodeURIComponent(`${yt.TOKEN_RESPONSE_TYPE} ${yt.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(t){this.parameters.set(ilt,encodeURIComponent(t||dst.QUERY))}addNativeBroker(){this.parameters.set(Flt,encodeURIComponent("1"))}addScopes(t,r=!0,n=hC){r&&!n.includes("openid")&&!t.includes("openid")&&n.push("openid");const o=r?[...t||[],...n]:t||[],i=new Ii(o);this.parameters.set(llt,encodeURIComponent(i.printScopes()))}addClientId(t){this.parameters.set(b1,encodeURIComponent(t))}addRedirectUri(t){$p.validateRedirectUri(t),this.parameters.set(olt,encodeURIComponent(t))}addPostLogoutRedirectUri(t){$p.validateRedirectUri(t),this.parameters.set(Tlt,encodeURIComponent(t))}addIdTokenHint(t){this.parameters.set(Ilt,encodeURIComponent(t))}addDomainHint(t){this.parameters.set(Blt,encodeURIComponent(t))}addLoginHint(t){this.parameters.set($lt,encodeURIComponent(t))}addCcsUpn(t){this.parameters.set(zu.CCS_HEADER,encodeURIComponent(`UPN:${t}`))}addCcsOid(t){this.parameters.set(zu.CCS_HEADER,encodeURIComponent(`Oid:${t.uid}@${t.utid}`))}addSid(t){this.parameters.set(Llt,encodeURIComponent(t))}addClaims(t,r){const n=this.addClientCapabilitiesToClaims(t,r);$p.validateClaims(n),this.parameters.set(slt,encodeURIComponent(n))}addCorrelationId(t){this.parameters.set(vlt,encodeURIComponent(t))}addLibraryInfo(t){this.parameters.set(ylt,t.sku),this.parameters.set(blt,t.version),t.os&&this.parameters.set(wlt,t.os),t.cpu&&this.parameters.set(xlt,t.cpu)}addApplicationTelemetry(t){t!=null&&t.appName&&this.parameters.set(klt,t.appName),t!=null&&t.appVersion&&this.parameters.set(Elt,t.appVersion)}addPrompt(t){$p.validatePrompt(t),this.parameters.set(`${flt}`,encodeURIComponent(t))}addState(t){t&&this.parameters.set(ult,encodeURIComponent(t))}addNonce(t){this.parameters.set(dlt,encodeURIComponent(t))}addCodeChallengeParams(t,r){if($p.validateCodeChallengeParams(t,r),t&&r)this.parameters.set(plt,encodeURIComponent(t)),this.parameters.set(mlt,encodeURIComponent(r));else throw fo(yN)}addAuthorizationCode(t){this.parameters.set(hlt,encodeURIComponent(t))}addDeviceCode(t){this.parameters.set(Alt,encodeURIComponent(t))}addRefreshToken(t){this.parameters.set(clt,encodeURIComponent(t))}addCodeVerifier(t){this.parameters.set(glt,encodeURIComponent(t))}addClientSecret(t){this.parameters.set(Plt,encodeURIComponent(t))}addClientAssertion(t){t&&this.parameters.set(Mlt,encodeURIComponent(t))}addClientAssertionType(t){t&&this.parameters.set(Rlt,encodeURIComponent(t))}addOboAssertion(t){this.parameters.set(Olt,encodeURIComponent(t))}addRequestTokenUse(t){this.parameters.set(Dlt,encodeURIComponent(t))}addGrantType(t){this.parameters.set(alt,encodeURIComponent(t))}addClientInfo(){this.parameters.set(fst,"1")}addExtraQueryParameters(t){const r=$p.sanitizeEQParams(t,this.parameters);Object.keys(r).forEach(n=>{this.parameters.set(n,t[n])})}addClientCapabilitiesToClaims(t,r){let n;if(!t)n={};else try{n=JSON.parse(t)}catch{throw fo(vN)}return r&&r.length>0&&(n.hasOwnProperty(y_.ACCESS_TOKEN)||(n[y_.ACCESS_TOKEN]={}),n[y_.ACCESS_TOKEN][y_.XMS_CC]={values:r}),JSON.stringify(n)}addUsername(t){this.parameters.set(vV.username,encodeURIComponent(t))}addPassword(t){this.parameters.set(vV.password,encodeURIComponent(t))}addPopToken(t){t&&(this.parameters.set(EV,uo.POP),this.parameters.set(TV,encodeURIComponent(t)))}addSshJwk(t){t&&(this.parameters.set(EV,uo.SSH),this.parameters.set(TV,encodeURIComponent(t)))}addServerTelemetry(t){this.parameters.set(Clt,t.generateCurrentRequestHeaderValue()),this.parameters.set(Slt,t.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(_lt,Cw.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(t){this.parameters.set(Nlt,encodeURIComponent(t))}createQueryString(){const t=new Array;return this.parameters.forEach((r,n)=>{t.push(`${n}=${r}`)}),t.join("&")}}/*! @azure/msal-common v14.5.0 2023-12-01 */class Zm{static async createDiscoveredInstance(t,r,n,o,i,a,s){a==null||a.addQueueMeasurement(ft.AuthorityFactoryCreateDiscoveredInstance,s);const c=Ua.transformCIAMAuthority(Koe(t)),l=Zm.createInstance(c,r,n,o,i,a,s);try{return await or(l.resolveEndpointsAsync.bind(l),ft.AuthorityResolveEndpointsAsync,i,a,s)(),l}catch{throw zt(Rd)}}static createInstance(t,r,n,o,i,a,s){if(!t)throw fo(gN);return new Ua(t,r,n,o,i,a,s)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class _N{constructor(t,r){this.config=tlt(t),this.logger=new Jh(this.config.loggerOptions,Ioe,hN),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.networkManager=new nlt(this.networkClient,this.cacheManager),this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=r}createTokenRequestHeaders(t){const r={};if(r[zu.CONTENT_TYPE]=yt.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&t)switch(t.type){case vl.HOME_ACCOUNT_ID:try{const n=Zg(t.credential);r[zu.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case vl.UPN:r[zu.CCS_HEADER]=`UPN: ${t.credential}`;break}return r}async executePostToTokenEndpoint(t,r,n,o,i,a){var c,l,u,f;a&&((c=this.performanceClient)==null||c.addQueueMeasurement(a,i));const s=await this.networkManager.sendPostRequest(o,t,{body:r,headers:n});return(f=this.performanceClient)==null||f.addFields({refreshTokenSize:((l=s.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:((u=s.headers)==null?void 0:u[zu.X_MS_HTTP_VERSION])||""},i),this.config.serverTelemetryManager&&s.status<500&&s.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),s}async updateAuthority(t,r){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ft.UpdateTokenEndpointAuthority,r);const n=`https://${t}/${this.authority.tenant}/`,o=await Zm.createDiscoveredInstance(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,this.performanceClient,r);this.authority=o}createTokenQueryParameters(t){const r=new Sw;return t.tokenQueryParameters&&r.addExtraQueryParameters(t.tokenQueryParameters),r.createQueryString()}}/*! @azure/msal-common v14.5.0 2023-12-01 */const KE="no_tokens_found",Xoe="native_account_unavailable",Ult="interaction_required",Hlt="consent_required",zlt="login_required";/*! @azure/msal-common v14.5.0 2023-12-01 */const AV=[Ult,Hlt,zlt],jlt=["message_only","additional_action","basic_action","user_password_expired","consent_required"],Vlt={[KE]:"No refresh token found in the cache. Please sign-in.",[Xoe]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API."};class Zu extends No{constructor(t,r,n,o,i,a,s){super(t,r,n),Object.setPrototypeOf(this,Zu.prototype),this.timestamp=o||yt.EMPTY_STRING,this.traceId=i||yt.EMPTY_STRING,this.correlationId=a||yt.EMPTY_STRING,this.claims=s||yt.EMPTY_STRING,this.name="InteractionRequiredAuthError"}}function PV(e,t,r){const n=!!e&&AV.indexOf(e)>-1,o=!!r&&jlt.indexOf(r)>-1,i=!!t&&AV.some(a=>t.indexOf(a)>-1);return n||i||o}function Qoe(e){return new Zu(e,Vlt[e])}/*! @azure/msal-common v14.5.0 2023-12-01 */class bv{constructor(t,r,n,o,i){this.account=t||null,this.idToken=r||null,this.accessToken=n||null,this.refreshToken=o||null,this.appMetadata=i||null}}/*! @azure/msal-common v14.5.0 2023-12-01 */class ou{static setRequestState(t,r,n){const o=ou.generateLibraryState(t,n);return r?`${o}${yt.RESOURCE_DELIM}${r}`:o}static generateLibraryState(t,r){if(!t)throw zt(F5);const n={id:t.createNewGuid()};r&&(n.meta=r);const o=JSON.stringify(n);return t.base64Encode(o)}static parseRequestState(t,r){if(!t)throw zt(F5);if(!r)throw zt(y1);try{const n=r.split(yt.RESOURCE_DELIM),o=n[0],i=n.length>1?n.slice(1).join(yt.RESOURCE_DELIM):yt.EMPTY_STRING,a=t.base64Decode(o),s=JSON.parse(a);return{userRequestState:i||yt.EMPTY_STRING,libraryState:s}}catch{throw zt(y1)}}}/*! @azure/msal-common v14.5.0 2023-12-01 */const Wlt={SW:"sw",UHW:"uhw"};class w1{constructor(t,r){this.cryptoUtils=t,this.performanceClient=r}async generateCnf(t,r){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ft.PopTokenGenerateCnf,t.correlationId);const n=await or(this.generateKid.bind(this),ft.PopTokenGenerateCnf,r,this.performanceClient,t.correlationId)(t),o=this.cryptoUtils.base64Encode(JSON.stringify(n));return{kid:n.kid,reqCnfString:o,reqCnfHash:await this.cryptoUtils.hashString(o)}}async generateKid(t){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(ft.PopTokenGenerateKid,t.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(t),xms_ksl:Wlt.SW}}async signPopToken(t,r,n){return this.signPayload(t,r,n)}async signPayload(t,r,n,o){const{resourceRequestMethod:i,resourceRequestUri:a,shrClaims:s,shrNonce:c,shrOptions:l}=n,u=a?new Pn(a):void 0,f=u==null?void 0:u.getUrlComponents();return this.cryptoUtils.signJwt({at:t,ts:ws.nowSeconds(),m:i==null?void 0:i.toUpperCase(),u:f==null?void 0:f.HostNameAndPort,nonce:c||this.cryptoUtils.createNewGuid(),p:f==null?void 0:f.AbsolutePath,q:f!=null&&f.QueryString?[[],f.QueryString]:void 0,client_claims:s||void 0,...o},r,l,n.correlationId)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class x1{generateAppMetadataKey(){return x1.generateAppMetadataCacheKey(this.environment,this.clientId)}static generateAppMetadataCacheKey(t,r){return[R5,t,r].join(ja.CACHE_KEY_SEPARATOR).toLowerCase()}static createAppMetadataEntity(t,r,n){const o=new x1;return o.clientId=t,o.environment=r,n&&(o.familyId=n),o}static isAppMetadataEntity(t,r){return r?t.indexOf(R5)===0&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("environment"):!1}}/*! @azure/msal-common v14.5.0 2023-12-01 */class Glt{constructor(t,r){this.cache=t,this.hasChanged=r}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.5.0 2023-12-01 */class Jm{constructor(t,r,n,o,i,a,s){this.clientId=t,this.cacheStorage=r,this.cryptoObj=n,this.logger=o,this.serializableCache=i,this.persistencePlugin=a,this.performanceClient=s}validateServerAuthorizationCodeResponse(t,r){if(!t.state||!r)throw t.state?zt(jE,"Cached State"):zt(jE,"Server State");let n,o;try{n=decodeURIComponent(t.state)}catch{throw zt(y1,t.state)}try{o=decodeURIComponent(r)}catch{throw zt(y1,t.state)}if(n!==o)throw zt(goe);if(t.error||t.error_description||t.suberror)throw PV(t.error,t.error_description,t.suberror)?new Zu(t.error||"",t.error_description,t.suberror,t.timestamp||"",t.trace_id||"",t.correlation_id||"",t.claims||""):new ep(t.error||"",t.error_description,t.suberror)}validateTokenResponse(t,r){if(t.error||t.error_description||t.suberror){const n=`${t.error_codes} - [${t.timestamp}]: ${t.error_description} - Correlation ID: ${t.correlation_id} - Trace ID: ${t.trace_id}`,o=new ep(t.error,n,t.suberror);if(r&&t.status&&t.status>=v_.SERVER_ERROR_RANGE_START&&t.status<=v_.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
${o}`);return}else if(r&&t.status&&t.status>=v_.CLIENT_ERROR_RANGE_START&&t.status<=v_.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
${o}`);return}throw PV(t.error,t.error_description,t.suberror)?new Zu(t.error,t.error_description,t.suberror,t.timestamp||yt.EMPTY_STRING,t.trace_id||yt.EMPTY_STRING,t.correlation_id||yt.EMPTY_STRING,t.claims||yt.EMPTY_STRING):o}}async handleServerTokenResponse(t,r,n,o,i,a,s,c,l){var p;(p=this.performanceClient)==null||p.addQueueMeasurement(ft.HandleServerTokenResponse,t.correlation_id);let u;if(t.id_token){if(u=_0(t.id_token||yt.EMPTY_STRING,this.cryptoObj.base64Decode),i&&i.nonce&&u.nonce!==i.nonce)throw zt(voe);if(o.maxAge||o.maxAge===0){const g=u.auth_time;if(!g)throw zt(cN);Aoe(g,o.maxAge)}}this.homeAccountIdentifier=Wi.generateHomeAccountId(t.client_info||yt.EMPTY_STRING,r.authorityType,this.logger,this.cryptoObj,u);let f;i&&i.state&&(f=ou.parseRequestState(this.cryptoObj,i.state)),t.key_id=t.key_id||o.sshKid||void 0;const d=this.generateCacheRecord(t,r,n,o,u,a,i);let h;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),h=new Glt(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(h)),s&&!c&&d.account){const g=d.account.generateAccountKey();if(!this.cacheStorage.getAccount(g,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Jm.generateAuthenticationResult(this.cryptoObj,r,d,!1,o,u,f,void 0,l)}await this.cacheStorage.saveCacheRecord(d,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&h&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(h))}return Jm.generateAuthenticationResult(this.cryptoObj,r,d,!1,o,u,f,t,l)}generateCacheRecord(t,r,n,o,i,a,s){const c=r.getPreferredCache();if(!c)throw zt(dN);const l=Voe(i);let u,f;t.id_token&&i&&(u=b4(this.homeAccountIdentifier,c,t.id_token,this.clientId,l||""),f=kN(this.cacheStorage,r,this.homeAccountIdentifier,i,this.cryptoObj.base64Decode,t.client_info,l,s,void 0,this.logger));let d=null;if(t.access_token){const g=t.scope?Ii.fromString(t.scope):new Ii(o.scopes||[]),m=(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,v=(typeof t.ext_expires_in=="string"?parseInt(t.ext_expires_in,10):t.ext_expires_in)||0,y=(typeof t.refresh_in=="string"?parseInt(t.refresh_in,10):t.refresh_in)||void 0,b=n+m,w=b+v,E=y&&y>0?n+y:void 0;d=w4(this.homeAccountIdentifier,c,t.access_token,this.clientId,l||r.tenant,g.printScopes(),b,w,this.cryptoObj.base64Decode,E,t.token_type,a,t.key_id,o.claims,o.requestedClaimsHash)}let h=null;t.refresh_token&&(h=Poe(this.homeAccountIdentifier,c,t.refresh_token,this.clientId,t.foci,a));let p=null;return t.foci&&(p=x1.createAppMetadataEntity(this.clientId,c,t.foci)),new bv(f,u,d,h,p)}static async generateAuthenticationResult(t,r,n,o,i,a,s,c,l){var b,w,E,I;let u=yt.EMPTY_STRING,f=[],d=null,h,p,g=yt.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===uo.POP){const O=new w1(t),{secret:D,keyId:N}=n.accessToken;if(!N)throw zt(fN);u=await O.signPopToken(D,N,i)}else u=n.accessToken.secret;f=Ii.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),h=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),n.accessToken.refreshOn&&(p=new Date(Number(n.accessToken.refreshOn)*1e3))}n.appMetadata&&(g=n.appMetadata.familyId===ww?ww:"");const m=(a==null?void 0:a.oid)||(a==null?void 0:a.sub)||"",v=(a==null?void 0:a.tid)||"";c!=null&&c.spa_accountid&&n.account&&(n.account.nativeAccountId=c==null?void 0:c.spa_accountid);const y=n.account?CN(n.account.getAccountInfo(),void 0,a):null;return{authority:r.canonicalAuthority,uniqueId:m,tenantId:v,scopes:f,account:y,idToken:((b=n==null?void 0:n.idToken)==null?void 0:b.secret)||"",idTokenClaims:a||{},accessToken:u,fromCache:o,expiresOn:d,extExpiresOn:h,refreshOn:p,correlationId:i.correlationId,requestId:l||yt.EMPTY_STRING,familyId:g,tokenType:((w=n.accessToken)==null?void 0:w.tokenType)||yt.EMPTY_STRING,state:s?s.userRequestState:yt.EMPTY_STRING,cloudGraphHostName:((E=n.account)==null?void 0:E.cloudGraphHostName)||yt.EMPTY_STRING,msGraphHost:((I=n.account)==null?void 0:I.msGraphHost)||yt.EMPTY_STRING,code:c==null?void 0:c.spa_code,fromNativeBroker:!1}}}function kN(e,t,r,n,o,i,a,s,c,l){l==null||l.verbose("setCachedAccount called");const f=e.getAccountKeys().find(g=>g.startsWith(r));let d=null;f&&(d=e.getAccount(f,l));const h=d||Wi.createAccount({homeAccountId:r,idTokenClaims:n,clientInfo:i,cloudGraphHostName:s==null?void 0:s.cloud_graph_host_name,msGraphHost:s==null?void 0:s.msgraph_host,nativeAccountId:c},t,o),p=h.tenantProfiles||[];if(a&&!p.find(g=>g.tenantId===a)){const g=xN(r,n);p.push(g)}return h.tenantProfiles=p,h}/*! @azure/msal-common v14.5.0 2023-12-01 */class Zoe extends _N{constructor(t,r){var n;super(t,r),this.includeRedirectUri=!0,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes}async getAuthCodeUrl(t){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(ft.GetAuthCodeUrl,t.correlationId);const r=await or(this.createAuthCodeUrlQueryString.bind(this),ft.AuthClientCreateQueryString,this.logger,this.performanceClient,t.correlationId)(t);return Pn.appendQueryString(this.authority.authorizationEndpoint,r)}async acquireToken(t,r){var s,c;if((s=this.performanceClient)==null||s.addQueueMeasurement(ft.AuthClientAcquireToken,t.correlationId),!t.code)throw zt(woe);const n=ws.nowSeconds(),o=await or(this.executeTokenRequest.bind(this),ft.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,t.correlationId)(this.authority,t),i=(c=o.headers)==null?void 0:c[zu.X_MS_REQUEST_ID],a=new Jm(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return a.validateTokenResponse(o.body),or(a.handleServerTokenResponse.bind(a),ft.HandleServerTokenResponse,this.logger,this.performanceClient,t.correlationId)(o.body,this.authority,n,t,r,void 0,void 0,void 0,i)}handleFragmentResponse(t,r){if(new Jm(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(t,r),!t.code)throw zt(koe);return t}getLogoutUri(t){if(!t)throw fo(Noe);const r=this.createLogoutUrlQueryString(t);return Pn.appendQueryString(this.authority.endSessionEndpoint,r)}async executeTokenRequest(t,r){var l,u;(l=this.performanceClient)==null||l.addQueueMeasurement(ft.AuthClientExecuteTokenRequest,r.correlationId);const n=this.createTokenQueryParameters(r),o=Pn.appendQueryString(t.tokenEndpoint,n),i=await or(this.createTokenRequestBody.bind(this),ft.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,r.correlationId)(r);let a;if(r.clientInfo)try{const f=WE(r.clientInfo,this.cryptoUtils.base64Decode);a={credential:`${f.uid}${ja.CLIENT_INFO_SEPARATOR}${f.utid}`,type:vl.HOME_ACCOUNT_ID}}catch(f){this.logger.verbose("Could not parse client info for CCS Header: "+f)}const s=this.createTokenRequestHeaders(a||r.ccsCredential),c={clientId:((u=r.tokenBodyParameters)==null?void 0:u.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:r.scopes,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid};return or(this.executePostToTokenEndpoint.bind(this),ft.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,r.correlationId)(o,i,s,c,r.correlationId,ft.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(t){var i,a;(i=this.performanceClient)==null||i.addQueueMeasurement(ft.AuthClientCreateTokenRequestBody,t.correlationId);const r=new Sw;if(r.addClientId(((a=t.tokenBodyParameters)==null?void 0:a[b1])||this.config.authOptions.clientId),this.includeRedirectUri?r.addRedirectUri(t.redirectUri):$p.validateRedirectUri(t.redirectUri),r.addScopes(t.scopes,!0,this.oidcDefaultScopes),r.addAuthorizationCode(t.code),r.addLibraryInfo(this.config.libraryInfo),r.addApplicationTelemetry(this.config.telemetry.application),r.addThrottling(),this.serverTelemetryManager&&!B5(this.config)&&r.addServerTelemetry(this.serverTelemetryManager),t.codeVerifier&&r.addCodeVerifier(t.codeVerifier),this.config.clientCredentials.clientSecret&&r.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const s=this.config.clientCredentials.clientAssertion;r.addClientAssertion(s.assertion),r.addClientAssertionType(s.assertionType)}if(r.addGrantType(coe.AUTHORIZATION_CODE_GRANT),r.addClientInfo(),t.authenticationScheme===uo.POP){const s=new w1(this.cryptoUtils,this.performanceClient),c=await or(s.generateCnf.bind(s),ft.PopTokenGenerateCnf,this.logger,this.performanceClient,t.correlationId)(t,this.logger);r.addPopToken(c.reqCnfString)}else if(t.authenticationScheme===uo.SSH)if(t.sshJwk)r.addSshJwk(t.sshJwk);else throw fo(x4);const n=t.correlationId||this.config.cryptoInterface.createNewGuid();r.addCorrelationId(n),(!nu.isEmptyObj(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(t.claims,this.config.authOptions.clientCapabilities);let o;if(t.clientInfo)try{const s=WE(t.clientInfo,this.cryptoUtils.base64Decode);o={credential:`${s.uid}${ja.CLIENT_INFO_SEPARATOR}${s.utid}`,type:vl.HOME_ACCOUNT_ID}}catch(s){this.logger.verbose("Could not parse client info for CCS Header: "+s)}else o=t.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&o)switch(o.type){case vl.HOME_ACCOUNT_ID:try{const s=Zg(o.credential);r.addCcsOid(s)}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s)}break;case vl.UPN:r.addCcsUpn(o.credential);break}return t.tokenBodyParameters&&r.addExtraQueryParameters(t.tokenBodyParameters),t.enableSpaAuthorizationCode&&(!t.tokenBodyParameters||!t.tokenBodyParameters[IV])&&r.addExtraQueryParameters({[IV]:"1"}),r.createQueryString()}async createAuthCodeUrlQueryString(t){var i,a;(i=this.performanceClient)==null||i.addQueueMeasurement(ft.AuthClientCreateQueryString,t.correlationId);const r=new Sw;r.addClientId(((a=t.extraQueryParameters)==null?void 0:a[b1])||this.config.authOptions.clientId);const n=[...t.scopes||[],...t.extraScopesToConsent||[]];r.addScopes(n,!0,this.oidcDefaultScopes),r.addRedirectUri(t.redirectUri);const o=t.correlationId||this.config.cryptoInterface.createNewGuid();if(r.addCorrelationId(o),r.addResponseMode(t.responseMode),r.addResponseTypeCode(),r.addLibraryInfo(this.config.libraryInfo),B5(this.config)||r.addApplicationTelemetry(this.config.telemetry.application),r.addClientInfo(),t.codeChallenge&&t.codeChallengeMethod&&r.addCodeChallengeParams(t.codeChallenge,t.codeChallengeMethod),t.prompt&&r.addPrompt(t.prompt),t.domainHint&&r.addDomainHint(t.domainHint),t.prompt!==qa.SELECT_ACCOUNT)if(t.sid&&t.prompt===qa.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),r.addSid(t.sid);else if(t.account){const s=this.extractAccountSid(t.account),c=this.extractLoginHint(t.account);if(c){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),r.addLoginHint(c);try{const l=Zg(t.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(s&&t.prompt===qa.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),r.addSid(s);try{const l=Zg(t.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),r.addLoginHint(t.loginHint),r.addCcsUpn(t.loginHint);else if(t.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),r.addLoginHint(t.account.username);try{const l=Zg(t.account.homeAccountId);r.addCcsOid(l)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),r.addLoginHint(t.loginHint),r.addCcsUpn(t.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(t.nonce&&r.addNonce(t.nonce),t.state&&r.addState(t.state),(t.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&r.addClaims(t.claims,this.config.authOptions.clientCapabilities),t.extraQueryParameters&&r.addExtraQueryParameters(t.extraQueryParameters),t.nativeBroker&&(r.addNativeBroker(),t.authenticationScheme===uo.POP)){const s=new w1(this.cryptoUtils),c=await or(s.generateCnf.bind(s),ft.PopTokenGenerateCnf,this.logger,this.performanceClient,t.correlationId)(t,this.logger);r.addPopToken(c.reqCnfHash)}return r.createQueryString()}createLogoutUrlQueryString(t){const r=new Sw;return t.postLogoutRedirectUri&&r.addPostLogoutRedirectUri(t.postLogoutRedirectUri),t.correlationId&&r.addCorrelationId(t.correlationId),t.idTokenHint&&r.addIdTokenHint(t.idTokenHint),t.state&&r.addState(t.state),t.logoutHint&&r.addLogoutHint(t.logoutHint),t.extraQueryParameters&&r.addExtraQueryParameters(t.extraQueryParameters),r.createQueryString()}extractAccountSid(t){var r;return((r=t.idTokenClaims)==null?void 0:r.sid)||null}extractLoginHint(t){var r;return((r=t.idTokenClaims)==null?void 0:r.login_hint)||null}}/*! @azure/msal-common v14.5.0 2023-12-01 */class U5 extends _N{constructor(t,r){super(t,r)}async acquireToken(t){var a,s;(a=this.performanceClient)==null||a.addQueueMeasurement(ft.RefreshTokenClientAcquireToken,t.correlationId);const r=ws.nowSeconds(),n=await or(this.executeTokenRequest.bind(this),ft.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,t.correlationId)(t,this.authority),o=(s=n.headers)==null?void 0:s[zu.X_MS_REQUEST_ID],i=new Jm(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return i.validateTokenResponse(n.body),or(i.handleServerTokenResponse.bind(i),ft.HandleServerTokenResponse,this.logger,this.performanceClient,t.correlationId)(n.body,this.authority,r,t,void 0,void 0,!0,t.forceCache,o)}async acquireTokenByRefreshToken(t){var n;if(!t)throw fo(Foe);if((n=this.performanceClient)==null||n.addQueueMeasurement(ft.RefreshTokenClientAcquireTokenByRefreshToken,t.correlationId),!t.account)throw zt(uN);if(this.cacheManager.isAppMetadataFOCI(t.account.environment))try{return await or(this.acquireTokenWithCachedRefreshToken.bind(this),ft.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,t.correlationId)(t,!0)}catch(o){const i=o instanceof Zu&&o.errorCode===KE,a=o instanceof ep&&o.errorCode===gV.INVALID_GRANT_ERROR&&o.subError===gV.CLIENT_MISMATCH_ERROR;if(i||a)return or(this.acquireTokenWithCachedRefreshToken.bind(this),ft.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,t.correlationId)(t,!1);throw o}return or(this.acquireTokenWithCachedRefreshToken.bind(this),ft.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,t.correlationId)(t,!1)}async acquireTokenWithCachedRefreshToken(t,r){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ft.RefreshTokenClientAcquireTokenWithCachedRefreshToken,t.correlationId);const n=k0(this.cacheManager.getRefreshToken.bind(this.cacheManager),ft.CacheManagerGetRefreshToken,this.logger,this.performanceClient,t.correlationId)(t.account,r,void 0,this.performanceClient,t.correlationId);if(!n)throw Qoe(KE);const o={...t,refreshToken:n.secret,authenticationScheme:t.authenticationScheme||uo.BEARER,ccsCredential:{credential:t.account.homeAccountId,type:vl.HOME_ACCOUNT_ID}};return or(this.acquireToken.bind(this),ft.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(o)}async executeTokenRequest(t,r){var c,l;(c=this.performanceClient)==null||c.addQueueMeasurement(ft.RefreshTokenClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),o=Pn.appendQueryString(r.tokenEndpoint,n),i=await or(this.createTokenRequestBody.bind(this),ft.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t),a=this.createTokenRequestHeaders(t.ccsCredential),s={clientId:((l=t.tokenBodyParameters)==null?void 0:l.clientId)||this.config.authOptions.clientId,authority:r.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return or(this.executePostToTokenEndpoint.bind(this),ft.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(o,i,a,s,t.correlationId,ft.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(t){var o,i,a;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.RefreshTokenClientCreateTokenRequestBody,t.correlationId);const r=t.correlationId,n=new Sw;if(n.addClientId(((i=t.tokenBodyParameters)==null?void 0:i[b1])||this.config.authOptions.clientId),t.redirectUri&&n.addRedirectUri(t.redirectUri),n.addScopes(t.scopes,!0,(a=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:a.defaultScopes),n.addGrantType(coe.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!B5(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),n.addCorrelationId(r),n.addRefreshToken(t.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const s=this.config.clientCredentials.clientAssertion;n.addClientAssertion(s.assertion),n.addClientAssertionType(s.assertionType)}if(t.authenticationScheme===uo.POP){const s=new w1(this.cryptoUtils,this.performanceClient),c=await or(s.generateCnf.bind(s),ft.PopTokenGenerateCnf,this.logger,this.performanceClient,t.correlationId)(t,this.logger);n.addPopToken(c.reqCnfString)}else if(t.authenticationScheme===uo.SSH)if(t.sshJwk)n.addSshJwk(t.sshJwk);else throw fo(x4);if((!nu.isEmptyObj(t.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(t.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&t.ccsCredential)switch(t.ccsCredential.type){case vl.HOME_ACCOUNT_ID:try{const s=Zg(t.ccsCredential.credential);n.addCcsOid(s)}catch(s){this.logger.verbose("Could not parse home account ID for CCS Header: "+s)}break;case vl.UPN:n.addCcsUpn(t.ccsCredential.credential);break}return t.tokenBodyParameters&&n.addExtraQueryParameters(t.tokenBodyParameters),n.createQueryString()}}/*! @azure/msal-common v14.5.0 2023-12-01 */class qlt extends _N{constructor(t,r){super(t,r)}async acquireToken(t){try{const[r,n]=await this.acquireCachedToken(t);return n===Zf.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new U5(this.config,this.performanceClient).acquireTokenByRefreshToken(t).catch(()=>{})),r}catch(r){if(r instanceof y4&&r.errorCode===Ih)return new U5(this.config,this.performanceClient).acquireTokenByRefreshToken(t);throw r}}async acquireCachedToken(t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(ft.SilentFlowClientAcquireCachedToken,t.correlationId);let r=Zf.NOT_APPLICABLE;if(t.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!nu.isEmptyObj(t.claims))throw this.setCacheOutcome(Zf.FORCE_REFRESH_OR_CLAIMS,t.correlationId),zt(Ih);if(!t.account)throw zt(uN);const n=t.authority||this.authority.getPreferredCache(),o=this.cacheManager.readCacheRecord(t.account,t,n,this.performanceClient,t.correlationId);if(o.accessToken){if(ws.wasClockTurnedBack(o.accessToken.cachedAt)||ws.isTokenExpired(o.accessToken.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Zf.CACHED_ACCESS_TOKEN_EXPIRED,t.correlationId),zt(Ih);o.accessToken.refreshOn&&ws.isTokenExpired(o.accessToken.refreshOn,0)&&(r=Zf.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Zf.NO_CACHED_ACCESS_TOKEN,t.correlationId),zt(Ih);return this.setCacheOutcome(r,t.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await or(this.generateResultFromCacheRecord.bind(this),ft.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,t.correlationId)(o,t),r]}setCacheOutcome(t,r){var n,o;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(t),(o=this.performanceClient)==null||o.addFields({cacheOutcome:t},r),t!==Zf.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${t}`)}async generateResultFromCacheRecord(t,r){var o;(o=this.performanceClient)==null||o.addQueueMeasurement(ft.SilentFlowClientGenerateResultFromCacheRecord,r.correlationId);let n;if(t.idToken&&(n=_0(t.idToken.secret,this.config.cryptoInterface.base64Decode)),r.maxAge||r.maxAge===0){const i=n==null?void 0:n.auth_time;if(!i)throw zt(cN);Aoe(i,r.maxAge)}return Jm.generateAuthenticationResult(this.cryptoUtils,this.authority,t,!0,r,n)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class MV{static isThrottlingEntity(t,r){let n=!1;t&&(n=t.indexOf(Cw.THROTTLING_PREFIX)===0);let o=!0;return r&&(o=r.hasOwnProperty("throttleTime")),n&&o}}/*! @azure/msal-common v14.5.0 2023-12-01 */const Klt={sendGetRequestAsync:()=>Promise.reject(zt(mn)),sendPostRequestAsync:()=>Promise.reject(zt(mn))};/*! @azure/msal-common v14.5.0 2023-12-01 */const Joe="missing_kid_error",eie="missing_alg_error";/*! @azure/msal-common v14.5.0 2023-12-01 */const Ylt={[Joe]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[eie]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class EN extends No{constructor(t,r){super(t,r),this.name="JoseHeaderError",Object.setPrototypeOf(this,EN.prototype)}}function RV(e){return new EN(e,Ylt[e])}/*! @azure/msal-common v14.5.0 2023-12-01 */class TN{constructor(t){this.typ=t.typ,this.alg=t.alg,this.kid=t.kid}static getShrHeaderString(t){if(!t.kid)throw RV(Joe);if(!t.alg)throw RV(eie);const r=new TN({typ:t.typ||hst.Pop,kid:t.kid,alg:t.alg});return JSON.stringify(r)}}/*! @azure/msal-common v14.5.0 2023-12-01 */class YE{constructor(t,r){this.cacheOutcome=Zf.NOT_APPLICABLE,this.cacheManager=r,this.apiId=t.apiId,this.correlationId=t.correlationId,this.wrapperSKU=t.wrapperSKU||yt.EMPTY_STRING,this.wrapperVer=t.wrapperVer||yt.EMPTY_STRING,this.telemetryCacheKey=ya.CACHE_KEY+ja.CACHE_KEY_SEPARATOR+t.clientId}generateCurrentRequestHeaderValue(){const t=`${this.apiId}${ya.VALUE_SEPARATOR}${this.cacheOutcome}`,r=[this.wrapperSKU,this.wrapperVer].join(ya.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),o=[t,n].join(ya.VALUE_SEPARATOR);return[ya.SCHEMA_VERSION,o,r].join(ya.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const t=this.getLastRequests(),r=YE.maxErrorsToSend(t),n=t.failedRequests.slice(0,2*r).join(ya.VALUE_SEPARATOR),o=t.errors.slice(0,r).join(ya.VALUE_SEPARATOR),i=t.errors.length,a=r<i?ya.OVERFLOW_TRUE:ya.OVERFLOW_FALSE,s=[i,a].join(ya.VALUE_SEPARATOR);return[ya.SCHEMA_VERSION,t.cacheHits,n,o,s].join(ya.CATEGORY_SEPARATOR)}cacheFailedRequest(t){const r=this.getLastRequests();r.errors.length>=ya.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),t instanceof Error&&t&&t.toString()?t instanceof No?t.subError?r.errors.push(t.subError):t.errorCode?r.errors.push(t.errorCode):r.errors.push(t.toString()):r.errors.push(t.toString()):r.errors.push(ya.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)}incrementCacheHits(){const t=this.getLastRequests();return t.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t),t.cacheHits}getLastRequests(){const t={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||t}clearTelemetryCache(){const t=this.getLastRequests(),r=YE.maxErrorsToSend(t),n=t.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{const o={failedRequests:t.failedRequests.slice(r*2),errors:t.errors.slice(r),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,o)}}static maxErrorsToSend(t){let r,n=0,o=0;const i=t.errors.length;for(r=0;r<i;r++){const a=t.failedRequests[2*r]||yt.EMPTY_STRING,s=t.failedRequests[2*r+1]||yt.EMPTY_STRING,c=t.errors[r]||yt.EMPTY_STRING;if(o+=a.toString().length+s.toString().length+c.length+3,o<ya.MAX_LAST_HEADER_BYTES)n+=1;else break}return n}getRegionDiscoveryFields(){const t=[];return t.push(this.regionUsed||yt.EMPTY_STRING),t.push(this.regionSource||yt.EMPTY_STRING),t.push(this.regionOutcome||yt.EMPTY_STRING),t.join(",")}updateRegionDiscoveryMetadata(t){this.regionUsed=t.region_used,this.regionSource=t.region_source,this.regionOutcome=t.region_outcome}setCacheOutcome(t){this.cacheOutcome=t}}/*! @azure/msal-common v14.5.0 2023-12-01 */class OV{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Xlt{generateId(){return"callback-id"}startMeasurement(t,r){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:jst.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:t,startTimeMs:Date.now(),correlationId:r||""},measurement:new OV}}startPerformanceMeasurement(){return new OV}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const IN="pkce_not_created",tie="crypto_nonexistent",S4="empty_navigate_uri",rie="hash_empty_error",AN="no_state_in_hash",nie="hash_does_not_contain_known_properties",oie="unable_to_parse_state",iie="state_interaction_type_mismatch",aie="interaction_in_progress",sie="popup_window_error",lie="empty_window_error",e0="user_cancelled",Qlt="monitor_popup_timeout",cie="monitor_window_timeout",uie="redirect_in_iframe",die="block_iframe_reload",fie="block_nested_popups",Zlt="iframe_closed_prematurely",_4="silent_logout_unsupported",hie="no_account_error",pie="silent_prompt_value_error",mie="no_token_request_cache_error",gie="unable_to_parse_token_request_cache_error",PN="no_cached_authority_error",Jlt="auth_request_not_set_error",ect="invalid_cache_type",vie="non_browser_environment",Ig="database_not_open",XE="no_network_connectivity",yie="post_request_failed",bie="get_request_failed",H5="failed_to_parse_response",Oc="unable_to_load_token",MN="crypto_key_not_found",wie="auth_code_required",xie="auth_code_or_nativeAccountId_required",Cie="spa_code_and_nativeAccountId_present",RN="database_unavailable",Sie="unable_to_acquire_token_from_native_platform",_ie="native_handshake_timeout",kie="native_extension_not_installed",mC="native_connection_not_established",Eie="uninitialized_public_client_application",Tie="native_prompt_not_supported",Iie="invalid_base64_string";/*! @azure/msal-browser v3.6.0 2023-12-01 */const Td="For more visit: aka.ms/msaljs/browser-errors",tct={[IN]:"The PKCE code challenge and verifier could not be generated.",[tie]:"The crypto object or function is not available.",[S4]:"Navigation URI is empty. Please check stack trace for more info.",[rie]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${Td}`,[AN]:"Hash does not contain state. Please verify that the request originated from msal.",[nie]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash.  ${Td}`,[oie]:"Unable to parse state. Please verify that the request originated from msal.",[iie]:"Hash contains state but the interaction type does not match the caller.",[aie]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API.   ${Td}`,[sie]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[lie]:"window.open returned null or undefined window object.",[e0]:"User cancelled the flow.",[Qlt]:`Token acquisition in popup failed due to timeout.  ${Td}`,[cie]:`Token acquisition in iframe failed due to timeout.  ${Td}`,[uie]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[die]:`Request was blocked inside an iframe because MSAL detected an authentication response.  ${Td}`,[fie]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Zlt]:"The iframe being monitored was closed prematurely.",[_4]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[hie]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[pie]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[mie]:"No token request found in cache.",[gie]:"The cached token request could not be parsed.",[PN]:"No cached authority found.",[Jlt]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[ect]:"Invalid cache type",[vie]:"Login and token requests are not supported in non-browser environments.",[Ig]:"Database is not open!",[XE]:"No network connectivity. Check your internet connection.",[yie]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[bie]:"Network request failed. Please check the network trace to determine root cause.",[H5]:"Failed to parse network response. Check network trace.",[Oc]:"Error loading token to cache.",[MN]:"Cryptographic Key or Keypair not found in browser storage.",[wie]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[xie]:"An authorization code or nativeAccountId must be provided to this flow.",[Cie]:"Request cannot contain both spa code and native account id.",[RN]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[Sie]:`Unable to acquire token from native platform.  ${Td}`,[_ie]:"Timed out while attempting to establish connection to browser extension",[kie]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[mC]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize().  ${Td}`,[Eie]:`You must call and await the initialize function before attempting to call any other MSAL API.  ${Td}`,[Tie]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Iie]:"Invalid base64 encoded string."};class gC extends No{constructor(t){super(t,tct[t]),Object.setPrototypeOf(this,gC.prototype),this.name="BrowserAuthError"}}function ur(e){return new gC(e)}/*! @azure/msal-browser v3.6.0 2023-12-01 */const jc={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Bb={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},em={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},na={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},DV={GET:"GET",POST:"POST"},Wn={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},qf={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},x_={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},To={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var fr;(function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"})(fr||(fr={}));const ea={Startup:"startup",Login:"login",Logout:"logout",AcquireToken:"acquireToken",SsoSilent:"ssoSilent",HandleRedirect:"handleRedirect",None:"none"},FV={scopes:hC},Aie="jwk",rct={React:"@azure/msal-react",Angular:"@azure/msal-angular"},z5="msal.db",nct=1,oct=`${z5}.keys`,Ul={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5};/*! @azure/msal-browser v3.6.0 2023-12-01 */function ict(e){e.location.hash="",typeof e.history.replaceState=="function"&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function act(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}function ON(){return window.parent!==window}function sct(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${jc.POPUP_NAME_PREFIX}.`)===0}function Wd(){return window.location.href.split("?")[0].split("#")[0]}function lct(){const t=new Pn(window.location.href).getUrlComponents();return`${t.Protocol}//${t.HostNameAndPort}/`}function IP(){if(Pn.hashContainsKnownProperties(window.location.hash)&&ON())throw ur(die)}function cct(e,t){const r=ON();if(e===fr.Redirect&&r&&!t)throw ur(uie)}function uct(){if(sct())throw ur(fie)}function dct(e){if(!e)throw ur(vie)}function NV(e){if(!e)throw ur(Eie)}function Pie(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}const fct="modulepreload",hct=function(e){return"/"+e},LV={},Mie=function(t,r,n){if(!r||r.length===0)return t();const o=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=hct(i),i in LV)return;LV[i]=!0;const a=i.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const f=o[u];if(f.href===i&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${s}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":fct,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((u,f)=>{l.addEventListener("load",u),l.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})};/*! @azure/msal-browser v3.6.0 2023-12-01 */class QE{navigateInternal(t,r){return QE.defaultNavigateWindow(t,r)}navigateExternal(t,r){return QE.defaultNavigateWindow(t,r)}static defaultNavigateWindow(t,r){return r.noHistory?window.location.replace(t):window.location.assign(t),new Promise(n=>{setTimeout(()=>{n(!0)},r.timeout)})}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class pct{async sendGetRequestAsync(t,r){let n;try{n=await fetch(t,{method:DV.GET,headers:this.getFetchHeaders(r)})}catch{throw window.navigator.onLine?ur(bie):ur(XE)}try{return{headers:this.getHeaderDict(n.headers),body:await n.json(),status:n.status}}catch{throw ur(H5)}}async sendPostRequestAsync(t,r){const n=r&&r.body||yt.EMPTY_STRING;let o;try{o=await fetch(t,{method:DV.POST,headers:this.getFetchHeaders(r),body:n})}catch{throw window.navigator.onLine?ur(yie):ur(XE)}try{return{headers:this.getHeaderDict(o.headers),body:await o.json(),status:o.status}}catch{throw ur(H5)}}getFetchHeaders(t){const r=new Headers;if(!(t&&t.headers))return r;const n=t.headers;return Object.keys(n).forEach(o=>{r.append(o,n[o])}),r}getHeaderDict(t){const r={};return t.forEach((n,o)=>{r[o]=n}),r}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const mct=6e4,j5=1e4,gct=3e4,vct=2e3;function yct({auth:e,cache:t,system:r,telemetry:n},o){const i={clientId:yt.EMPTY_STRING,authority:`${yt.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:yt.EMPTY_STRING,authorityMetadata:yt.EMPTY_STRING,redirectUri:yt.EMPTY_STRING,postLogoutRedirectUri:yt.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Zd.AAD,OIDCOptions:{serverResponseType:pC.FRAGMENT,defaultScopes:[yt.OPENID_SCOPE,yt.PROFILE_SCOPE,yt.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:pN.None,tenant:yt.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1},a={cacheLocation:na.SessionStorage,temporaryCacheLocation:na.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(t&&t.cacheLocation===na.LocalStorage),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:Ji.Info,piiLoggingEnabled:!1},l={...{...Yoe,loggerOptions:s,networkClient:o?new pct:Klt,navigationClient:new QE,loadFrameTimeout:0,windowHashTimeout:(r==null?void 0:r.loadFrameTimeout)||mct,iframeHashTimeout:(r==null?void 0:r.loadFrameTimeout)||j5,navigateFrameWait:0,redirectNavigationTimeout:gct,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(r==null?void 0:r.nativeBrokerHandshakeTimeout)||vct,pollIntervalMilliseconds:jc.DEFAULT_POLL_INTERVAL_MS},...r,loggerOptions:(r==null?void 0:r.loggerOptions)||s},u={application:{appName:yt.EMPTY_STRING,appVersion:yt.EMPTY_STRING},client:new Xlt};if((e==null?void 0:e.protocolMode)!==Zd.OIDC&&(e!=null&&e.OIDCOptions)&&new Jh(l.loggerOptions).warning(JSON.stringify(fo(Hoe))),e!=null&&e.protocolMode&&e.protocolMode!==Zd.AAD&&(l!=null&&l.allowNativeBroker))throw fo(zoe);return{auth:{...i,...e,OIDCOptions:{...i.OIDCOptions,...e==null?void 0:e.OIDCOptions}},cache:{...a,...t},system:l,telemetry:{...u,...n}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const bct="@azure/msal-browser",DN="3.6.0";/*! @azure/msal-browser v3.6.0 2023-12-01 */class wct{constructor(t){this.browserEnvironment=typeof window<"u",this.config=yct(t,this.browserEnvironment),this.logger=new Jh(this.config.system.loggerOptions,bct,DN),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class t0 extends wct{getModuleName(){return t0.MODULE_NAME}getId(){return t0.ID}async initialize(){return this.available=typeof window<"u",this.available}}t0.MODULE_NAME="";t0.ID="StandardOperatingContext";async function xct(e){const t=new t0(e);return await t.initialize(),(await Mie(()=>Promise.resolve().then(()=>lut),void 0)).StandardController.createController(t)}/*! @azure/msal-browser v3.6.0 2023-12-01 */function AP(e){return encodeURIComponent(FN(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function ZE(e){return Rie(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function FN(e){return Rie(new TextEncoder().encode(e))}function Rie(e){const t=Array.from(e,r=>String.fromCodePoint(r)).join("");return btoa(t)}/*! @azure/msal-browser v3.6.0 2023-12-01 */function Ju(e){return new TextDecoder().decode(Cct(e))}function Cct(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw ur(Iie)}const r=atob(t);return Uint8Array.from(r,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.6.0 2023-12-01 */const Sct="RSASSA-PKCS1-v1_5",Oie="SHA-256",_ct=2048,kct=new Uint8Array([1,0,1]),NN={name:Sct,hash:Oie,modulusLength:_ct,publicExponent:kct};function Ect(e){if("crypto"in window)e.verbose("BrowserCrypto: modern crypto interface available");else throw e.error("BrowserCrypto: crypto interface is unavailable"),ur(tie)}async function Die(e,t,r){t==null||t.addQueueMeasurement(ft.Sha256Digest,r);const o=new TextEncoder().encode(e);return window.crypto.subtle.digest(Oie,o)}function Tct(e){return window.crypto.getRandomValues(e)}function tp(){return window.crypto.randomUUID()}async function Ict(e,t){return window.crypto.subtle.generateKey(NN,e,t)}async function PP(e){return window.crypto.subtle.exportKey(Aie,e)}async function Act(e,t,r){return window.crypto.subtle.importKey(Aie,e,NN,t,r)}async function Pct(e,t){return window.crypto.subtle.sign(NN,e,t)}/*! @azure/msal-browser v3.6.0 2023-12-01 */class Mct{constructor(){this.dbName=z5,this.version=nct,this.tableName=oct,this.dbOpen=!1}async open(){return new Promise((t,r)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",o=>{o.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",o=>{const i=o;this.db=i.target.result,this.dbOpen=!0,t()}),n.addEventListener("error",()=>r(ur(RN)))})}closeConnection(){const t=this.db;t&&this.dbOpen&&(t.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(t){return await this.validateDbIsOpen(),new Promise((r,n)=>{if(!this.db)return n(ur(Ig));const a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(t);a.addEventListener("success",s=>{const c=s;this.closeConnection(),r(c.target.result)}),a.addEventListener("error",s=>{this.closeConnection(),n(s)})})}async setItem(t,r){return await this.validateDbIsOpen(),new Promise((n,o)=>{if(!this.db)return o(ur(Ig));const s=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(r,t);s.addEventListener("success",()=>{this.closeConnection(),n()}),s.addEventListener("error",c=>{this.closeConnection(),o(c)})})}async removeItem(t){return await this.validateDbIsOpen(),new Promise((r,n)=>{if(!this.db)return n(ur(Ig));const a=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(t);a.addEventListener("success",()=>{this.closeConnection(),r()}),a.addEventListener("error",s=>{this.closeConnection(),n(s)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((t,r)=>{if(!this.db)return r(ur(Ig));const i=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();i.addEventListener("success",a=>{const s=a;this.closeConnection(),t(s.target.result)}),i.addEventListener("error",a=>{this.closeConnection(),r(a)})})}async containsKey(t){return await this.validateDbIsOpen(),new Promise((r,n)=>{if(!this.db)return n(ur(Ig));const a=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(t);a.addEventListener("success",s=>{const c=s;this.closeConnection(),r(c.target.result===1)}),a.addEventListener("error",s=>{this.closeConnection(),n(s)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((t,r)=>{const n=window.indexedDB.deleteDatabase(z5);n.addEventListener("success",()=>t(!0)),n.addEventListener("blocked",()=>t(!0)),n.addEventListener("error",()=>r(!1))})}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class V5{constructor(){this.cache=new Map}getItem(t){return this.cache.get(t)||null}setItem(t,r){this.cache.set(t,r)}removeItem(t){this.cache.delete(t)}getKeys(){const t=[];return this.cache.forEach((r,n)=>{t.push(n)}),t}containsKey(t){return this.cache.has(t)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class $V{constructor(t,r){this.inMemoryCache=new V5,this.indexedDBCache=new Mct,this.logger=t,this.storeName=r}handleDatabaseAccessError(t){if(t instanceof gC&&t.errorCode===RN)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw t}async getItem(t){const r=this.inMemoryCache.getItem(t);if(!r)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(t)}catch(n){this.handleDatabaseAccessError(n)}return r}async setItem(t,r){this.inMemoryCache.setItem(t,r);try{await this.indexedDBCache.setItem(t,r)}catch(n){this.handleDatabaseAccessError(n)}}async removeItem(t){this.inMemoryCache.removeItem(t);try{await this.indexedDBCache.removeItem(t)}catch(r){this.handleDatabaseAccessError(r)}}async getKeys(){const t=this.inMemoryCache.getKeys();if(t.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(r){this.handleDatabaseAccessError(r)}return t}async containsKey(t){const r=this.inMemoryCache.containsKey(t);if(!r)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(t)}catch(n){this.handleDatabaseAccessError(n)}return r}clearInMemory(){this.logger.verbose(`Deleting in-memory keystore ${this.storeName}`),this.inMemoryCache.clear(),this.logger.verbose(`In-memory keystore ${this.storeName} deleted`)}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const t=await this.indexedDBCache.deleteDatabase();return t&&this.logger.verbose("Persistent keystore deleted"),t}catch(t){return this.handleDatabaseAccessError(t),!1}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const BV={asymmetricKeys:"asymmetricKeys",symmetricKeys:"symmetricKeys"};class Rct{constructor(t){this.logger=t,this.asymmetricKeys=new $V(this.logger,BV.asymmetricKeys),this.symmetricKeys=new $V(this.logger,BV.symmetricKeys)}async clear(){this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory();try{return await this.asymmetricKeys.clearPersistent(),!0}catch(t){return t instanceof Error?this.logger.error(`Clearing keystore failed with error: ${t.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class C1{constructor(t,r){this.logger=t,Ect(t),this.cache=new Rct(this.logger),this.performanceClient=r}createNewGuid(){return tp()}base64Encode(t){return FN(t)}base64Decode(t){return Ju(t)}async getPublicKeyThumbprint(t){var u;const r=(u=this.performanceClient)==null?void 0:u.startMeasurement(ft.CryptoOptsGetPublicKeyThumbprint,t.correlationId),n=await Ict(C1.EXTRACTABLE,C1.POP_KEY_USAGES),o=await PP(n.publicKey),i={e:o.e,kty:o.kty,n:o.n},a=UV(i),s=await this.hashString(a),c=await PP(n.privateKey),l=await Act(c,!1,["sign"]);return await this.cache.asymmetricKeys.setItem(s,{privateKey:l,publicKey:n.publicKey,requestMethod:t.resourceRequestMethod,requestUri:t.resourceRequestUri}),r&&r.end({success:!0}),s}async removeTokenBindingKey(t){return await this.cache.asymmetricKeys.removeItem(t),!await this.cache.asymmetricKeys.containsKey(t)}async clearKeystore(){return this.cache.clear()}async signJwt(t,r,n,o){var b;const i=(b=this.performanceClient)==null?void 0:b.startMeasurement(ft.CryptoOptsSignJwt,o),a=await this.cache.asymmetricKeys.getItem(r);if(!a)throw ur(MN);const s=await PP(a.publicKey),c=UV(s),l=AP(JSON.stringify({kid:r})),u=TN.getShrHeaderString({...n==null?void 0:n.header,alg:s.alg,kid:l}),f=AP(u);t.cnf={jwk:JSON.parse(c)};const d=AP(JSON.stringify(t)),h=`${f}.${d}`,g=new TextEncoder().encode(h),m=await Pct(a.privateKey,g),v=ZE(new Uint8Array(m)),y=`${h}.${v}`;return i&&i.end({success:!0}),y}async hashString(t){const r=await Die(t),n=new Uint8Array(r);return ZE(n)}}C1.POP_KEY_USAGES=["sign","verify"];C1.EXTRACTABLE=!0;function UV(e){return JSON.stringify(e,Object.keys(e).sort())}/*! @azure/msal-browser v3.6.0 2023-12-01 */const Fie="storage_not_supported",Qi="stubbed_public_client_application_called",Nie="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.6.0 2023-12-01 */const Oct={[Fie]:"Given storage configuration option was not supported.",[Qi]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[Nie]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};class LN extends No{constructor(t,r){super(t,r),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,LN.prototype)}}function $i(e){return new LN(e,Oct[e])}/*! @azure/msal-browser v3.6.0 2023-12-01 */class HV{constructor(t){this.validateWindowStorage(t),this.windowStorage=window[t]}validateWindowStorage(t){if(t!==na.LocalStorage&&t!==na.SessionStorage||!window[t])throw $i(Fie)}getItem(t){return this.windowStorage.getItem(t)}setItem(t,r){this.windowStorage.setItem(t,r)}removeItem(t){this.windowStorage.removeItem(t)}getKeys(){return Object.keys(this.windowStorage)}containsKey(t){return this.windowStorage.hasOwnProperty(t)}}/*! @azure/msal-browser v3.6.0 2023-12-01 */function Lie(e,t){if(!t)return null;try{return ou.parseRequestState(e,t).libraryState.meta}catch{throw zt(y1)}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class W5 extends Ud{constructor(t,r,n,o,i){super(t,n,o,i),this.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,this.cacheConfig=r,this.logger=o,this.internalStorage=new V5,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupTemporaryCacheStorage(this.cacheConfig.temporaryCacheLocation,this.cacheConfig.cacheLocation),r.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps())}setupBrowserStorage(t){switch(t){case na.LocalStorage:case na.SessionStorage:try{return new HV(t)}catch(r){this.logger.verbose(r);break}}return this.cacheConfig.cacheLocation=na.MemoryStorage,new V5}setupTemporaryCacheStorage(t,r){switch(r){case na.LocalStorage:case na.SessionStorage:try{return new HV(t||na.SessionStorage)}catch(n){return this.logger.verbose(n),this.internalStorage}case na.MemoryStorage:default:return this.internalStorage}}migrateCacheEntries(){const t=`${yt.CACHE_PREFIX}.${va.ID_TOKEN}`,r=`${yt.CACHE_PREFIX}.${va.CLIENT_INFO}`,n=`${yt.CACHE_PREFIX}.${va.ERROR}`,o=`${yt.CACHE_PREFIX}.${va.ERROR_DESC}`,i=this.browserStorage.getItem(t),a=this.browserStorage.getItem(r),s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(o),l=[i,a,s,c];[va.ID_TOKEN,va.CLIENT_INFO,va.ERROR,va.ERROR_DESC].forEach((f,d)=>this.migrateCacheEntry(f,l[d]))}migrateCacheEntry(t,r){r&&this.setTemporaryCache(t,r,!0)}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const t=this.getItem(qf.ACCOUNT_KEYS),r=this.getItem(`${qf.TOKEN_KEYS}.${this.clientId}`);if(t&&r){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(o=>{if(this.isCredentialKey(o)){const i=this.getItem(o);if(i){const a=this.validateAndParseJson(i);if(a&&a.hasOwnProperty("credentialType"))switch(a.credentialType){case Lr.ID_TOKEN:if(xV(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${o} found, saving key to token key map`);const s=a,c=this.updateCredentialCacheKey(o,s);this.addTokenKey(c,Lr.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${o}`);break;case Lr.ACCESS_TOKEN:case Lr.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(wV(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${o} found, saving key to token key map`);const s=a,c=this.updateCredentialCacheKey(o,s);this.addTokenKey(c,Lr.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${o}`);break;case Lr.REFRESH_TOKEN:if(CV(a)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${o} found, saving key to token key map`);const s=a,c=this.updateCredentialCacheKey(o,s);this.addTokenKey(c,Lr.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${o}`);break}}}if(this.isAccountKey(o)){const i=this.getItem(o);if(i){const a=this.validateAndParseJson(i);a&&Wi.isAccountEntity(a)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${o} found, saving key to account key map`),this.addAccountKeyToMap(o))}}})}validateAndParseJson(t){try{const r=JSON.parse(t);return r&&typeof r=="object"?r:null}catch{return null}}getItem(t){return this.browserStorage.getItem(t)}setItem(t,r){this.browserStorage.setItem(t,r)}getAccount(t,r){this.logger.trace("BrowserCacheManager.getAccount called");const n=this.getCachedAccountEntity(t);return this.updateOutdatedCachedAccount(t,n,r)}getCachedAccountEntity(t){const r=this.getItem(t);if(!r)return this.removeAccountKeyFromMap(t),null;const n=this.validateAndParseJson(r);return!n||!Wi.isAccountEntity(n)?(this.removeAccountKeyFromMap(t),null):Ud.toObject(new Wi,n)}setAccount(t){this.logger.trace("BrowserCacheManager.setAccount called");const r=t.generateAccountKey();this.setItem(r,JSON.stringify(t)),this.addAccountKeyToMap(r)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const t=this.getItem(qf.ACCOUNT_KEYS);return t?JSON.parse(t):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${t}`);const r=this.getAccountKeys();r.indexOf(t)===-1?(r.push(t),this.setItem(qf.ACCOUNT_KEYS,JSON.stringify(r)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${t}`);const r=this.getAccountKeys(),n=r.indexOf(t);n>-1?(r.splice(n,1),this.setItem(qf.ACCOUNT_KEYS,JSON.stringify(r)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(t){super.removeAccount(t),this.removeAccountKeyFromMap(t)}removeOutdatedAccount(t){this.removeItem(t),this.removeAccountKeyFromMap(t)}removeIdToken(t){super.removeIdToken(t),this.removeTokenKey(t,Lr.ID_TOKEN)}async removeAccessToken(t){super.removeAccessToken(t),this.removeTokenKey(t,Lr.ACCESS_TOKEN)}removeRefreshToken(t){super.removeRefreshToken(t),this.removeTokenKey(t,Lr.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const t=this.getItem(`${qf.TOKEN_KEYS}.${this.clientId}`);if(t){const r=this.validateAndParseJson(t);if(r&&r.hasOwnProperty("idToken")&&r.hasOwnProperty("accessToken")&&r.hasOwnProperty("refreshToken"))return r;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(t,r){this.logger.trace("BrowserCacheManager addTokenKey called");const n=this.getTokenKeys();switch(r){case Lr.ID_TOKEN:n.idToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(t));break;case Lr.ACCESS_TOKEN:n.accessToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(t));break;case Lr.REFRESH_TOKEN:n.refreshToken.indexOf(t)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(t));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${r}`),zt(N5)}this.setItem(`${qf.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}removeTokenKey(t,r){this.logger.trace("BrowserCacheManager removeTokenKey called");const n=this.getTokenKeys();switch(r){case Lr.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${t} from map`);const o=n.idToken.indexOf(t);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case Lr.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${t} from map`);const i=n.accessToken.indexOf(t);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case Lr.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${t} from map`);const a=n.refreshToken.indexOf(t);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${r}`),zt(N5)}this.setItem(`${qf.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}getIdTokenCredential(t){const r=this.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Lr.ID_TOKEN),null;const n=this.validateAndParseJson(r);return!n||!xV(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(t,Lr.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),n)}setIdTokenCredential(t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const r=Lb(t);this.setItem(r,JSON.stringify(t)),this.addTokenKey(r,Lr.ID_TOKEN)}getAccessTokenCredential(t){const r=this.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Lr.ACCESS_TOKEN),null;const n=this.validateAndParseJson(r);return!n||!wV(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(t,Lr.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),n)}setAccessTokenCredential(t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const r=Lb(t);this.setItem(r,JSON.stringify(t)),this.addTokenKey(r,Lr.ACCESS_TOKEN)}getRefreshTokenCredential(t){const r=this.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Lr.REFRESH_TOKEN),null;const n=this.validateAndParseJson(r);return!n||!CV(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(t,Lr.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),n)}setRefreshTokenCredential(t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const r=Lb(t);this.setItem(r,JSON.stringify(t)),this.addTokenKey(r,Lr.REFRESH_TOKEN)}getAppMetadata(t){const r=this.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(r);return!n||!x1.isAppMetadataEntity(t,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Ud.toObject(new x1,n))}setAppMetadata(t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const r=t.generateAppMetadataKey();this.setItem(r,JSON.stringify(t))}getServerTelemetry(t){const r=this.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const n=this.validateAndParseJson(r);return!n||!Ost(t,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n)}setServerTelemetry(t,r){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(t,JSON.stringify(r))}getAuthorityMetadata(t){const r=this.internalStorage.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(r);return n&&$5.isAuthorityMetadataEntity(t,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Ud.toObject(new $5,n)):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(r=>this.isAuthorityMetadata(r))}setWrapperMetadata(t,r){this.internalStorage.setItem(x_.WRAPPER_SKU,t),this.internalStorage.setItem(x_.WRAPPER_VER,r)}getWrapperMetadata(){const t=this.internalStorage.getItem(x_.WRAPPER_SKU)||yt.EMPTY_STRING,r=this.internalStorage.getItem(x_.WRAPPER_VER)||yt.EMPTY_STRING;return[t,r]}setAuthorityMetadata(t,r){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(t,JSON.stringify(r))}getActiveAccount(){const t=this.generateCacheKey(va.ACTIVE_ACCOUNT_FILTERS),r=this.getItem(t);if(!r){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const o=this.generateCacheKey(va.ACTIVE_ACCOUNT),i=this.getItem(o);if(!i)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const a=this.getAccountInfoFilteredBy({localAccountId:i});return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a),a):null}const n=this.validateAndParseJson(r);return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(t){const r=this.generateCacheKey(va.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(va.ACTIVE_ACCOUNT);if(t){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:t.homeAccountId,localAccountId:t.localAccountId,tenantId:t.tenantId};this.browserStorage.setItem(r,JSON.stringify(o)),this.browserStorage.setItem(n,t.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(r),this.browserStorage.removeItem(n)}getThrottlingCache(t){const r=this.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const n=this.validateAndParseJson(r);return!n||!MV.isThrottlingEntity(t,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Ud.toObject(new MV,n))}setThrottlingCache(t,r){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(t,JSON.stringify(r))}getTemporaryCache(t,r){const n=r?this.generateCacheKey(t):t;if(this.cacheConfig.storeAuthStateInCookie){const i=this.getItemCookie(n);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),i}const o=this.temporaryCacheStorage.getItem(n);if(!o){if(this.cacheConfig.cacheLocation===na.LocalStorage){const i=this.browserStorage.getItem(n);if(i)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),i}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(t,r,n){const o=n?this.generateCacheKey(t):t;this.temporaryCacheStorage.setItem(o,r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,r))}removeItem(t){this.browserStorage.removeItem(t),this.temporaryCacheStorage.removeItem(t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(t))}containsKey(t){return this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t)}getKeys(){return[...this.browserStorage.getKeys(),...this.temporaryCacheStorage.getKeys()]}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.getKeys().forEach(t=>{(this.browserStorage.containsKey(t)||this.temporaryCacheStorage.containsKey(t))&&(t.indexOf(yt.CACHE_PREFIX)!==-1||t.indexOf(this.clientId)!==-1)&&this.removeItem(t)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(t){t.addQueueMeasurement(ft.ClearTokensAndKeysWithClaims);const r=this.getTokenKeys(),n=[];r.accessToken.forEach(o=>{const i=this.getAccessTokenCredential(o);i!=null&&i.requestedClaimsHash&&o.includes(i.requestedClaimsHash.toLowerCase())&&n.push(this.removeAccessToken(o))}),await Promise.all(n),n.length>0&&this.logger.warning(`${n.length} access tokens with claims in the cache keys have been removed from the cache.`)}setItemCookie(t,r,n){let o=`${encodeURIComponent(t)}=${encodeURIComponent(r)};path=/;SameSite=Lax;`;if(n){const i=this.getCookieExpirationTime(n);o+=`expires=${i};`}this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o}getItemCookie(t){const r=`${encodeURIComponent(t)}=`,n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];for(;i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(r)===0)return decodeURIComponent(i.substring(r.length,i.length))}return yt.EMPTY_STRING}clearMsalCookies(){const t=`${yt.CACHE_PREFIX}.${this.clientId}`;document.cookie.split(";").forEach(n=>{for(;n.charAt(0)===" ";)n=n.substring(1);if(n.indexOf(t)===0){const o=n.split("=")[0];this.clearItemCookie(o)}})}clearItemCookie(t){this.setItemCookie(t,yt.EMPTY_STRING,-1)}getCookieExpirationTime(t){const r=new Date;return new Date(r.getTime()+t*this.COOKIE_LIFE_MULTIPLIER).toUTCString()}getCache(){return this.browserStorage}setCache(){}generateCacheKey(t){return this.validateAndParseJson(t)?JSON.stringify(t):nu.startsWith(t,yt.CACHE_PREFIX)||nu.startsWith(t,va.ADAL_ID_TOKEN)?t:`${yt.CACHE_PREFIX}.${this.clientId}.${t}`}generateAuthorityKey(t){const{libraryState:{id:r}}=ou.parseRequestState(this.cryptoImpl,t);return this.generateCacheKey(`${Wn.AUTHORITY}.${r}`)}generateNonceKey(t){const{libraryState:{id:r}}=ou.parseRequestState(this.cryptoImpl,t);return this.generateCacheKey(`${Wn.NONCE_IDTOKEN}.${r}`)}generateStateKey(t){const{libraryState:{id:r}}=ou.parseRequestState(this.cryptoImpl,t);return this.generateCacheKey(`${Wn.REQUEST_STATE}.${r}`)}getCachedAuthority(t){const r=this.generateStateKey(t),n=this.getTemporaryCache(r);if(!n)return null;const o=this.generateAuthorityKey(n);return this.getTemporaryCache(o)}updateCacheEntries(t,r,n,o,i){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const a=this.generateStateKey(t);this.setTemporaryCache(a,t,!1);const s=this.generateNonceKey(t);this.setTemporaryCache(s,r,!1);const c=this.generateAuthorityKey(t);if(this.setTemporaryCache(c,n,!1),i){const l={credential:i.homeAccountId,type:vl.HOME_ACCOUNT_ID};this.setTemporaryCache(Wn.CCS_CREDENTIAL,JSON.stringify(l),!0)}else if(o){const l={credential:o,type:vl.UPN};this.setTemporaryCache(Wn.CCS_CREDENTIAL,JSON.stringify(l),!0)}}resetRequestCache(t){this.logger.trace("BrowserCacheManager.resetRequestCache called"),t&&(this.getKeys().forEach(r=>{r.indexOf(t)!==-1&&this.removeItem(r)}),this.removeItem(this.generateStateKey(t)),this.removeItem(this.generateNonceKey(t)),this.removeItem(this.generateAuthorityKey(t))),this.removeItem(this.generateCacheKey(Wn.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(Wn.ORIGIN_URI)),this.removeItem(this.generateCacheKey(Wn.URL_HASH)),this.removeItem(this.generateCacheKey(Wn.CORRELATION_ID)),this.removeItem(this.generateCacheKey(Wn.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(Wn.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(t){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),t){const r=this.generateStateKey(t),n=this.temporaryCacheStorage.getItem(r);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n||yt.EMPTY_STRING)}this.clearMsalCookies()}cleanRequestByInteractionType(t){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(r=>{if(r.indexOf(Wn.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(r);if(!n)return;const o=Lie(this.cryptoImpl,n);o&&o.interactionType===t&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n))}),this.clearMsalCookies(),this.setInteractionInProgress(!1)}cacheCodeRequest(t){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const r=FN(JSON.stringify(t));this.setTemporaryCache(Wn.REQUEST_PARAMS,r,!0)}getCachedRequest(t){this.logger.trace("BrowserCacheManager.getCachedRequest called");const r=this.getTemporaryCache(Wn.REQUEST_PARAMS,!0);if(!r)throw ur(mie);let n;try{n=JSON.parse(Ju(r))}catch(o){throw this.logger.errorPii(`Attempted to parse: ${r}`),this.logger.error(`Parsing cached token request threw with error: ${o}`),ur(gie)}if(this.removeItem(this.generateCacheKey(Wn.REQUEST_PARAMS)),!n.authority){const o=this.generateAuthorityKey(t),i=this.getTemporaryCache(o);if(!i)throw ur(PN);n.authority=i}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const t=this.getTemporaryCache(Wn.NATIVE_REQUEST,!0);if(!t)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const r=this.validateAndParseJson(t);return r||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(t){const r=this.getInteractionInProgress();return t?r===this.clientId:!!r}getInteractionInProgress(){const t=`${yt.CACHE_PREFIX}.${Wn.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(t,!1)}setInteractionInProgress(t){const r=`${yt.CACHE_PREFIX}.${Wn.INTERACTION_STATUS_KEY}`;if(t){if(this.getInteractionInProgress())throw ur(aie);this.setTemporaryCache(r,this.clientId,!1)}else!t&&this.getInteractionInProgress()===this.clientId&&this.removeItem(r)}getLegacyLoginHint(){const t=this.getTemporaryCache(va.ADAL_ID_TOKEN);t&&(this.browserStorage.removeItem(va.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const r=this.getTemporaryCache(va.ID_TOKEN,!0);r&&(this.removeItem(this.generateCacheKey(va.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=r||t;if(n){const o=_0(n,Ju);if(o.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.preferred_username;if(o.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(t,r){const n=Lb(r);if(t!==n){const o=this.getItem(t);if(o)return this.removeItem(t),this.setItem(n,o),this.logger.verbose(`Updated an outdated ${r.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${r.credentialType} cache key but no item matching the outdated key was found in storage`)}return t}getRedirectRequestContext(){return this.getTemporaryCache(Wn.REDIRECT_CONTEXT,!0)}setRedirectRequestContext(t){this.setTemporaryCache(Wn.REDIRECT_CONTEXT,t,!0)}async hydrateCache(t,r){var s,c,l,u,f;const n=b4((s=t.account)==null?void 0:s.homeAccountId,(c=t.account)==null?void 0:c.environment,t.idToken,this.clientId,t.tenantId);let o;r.claims&&(o=await this.cryptoImpl.hashString(r.claims));const i=w4((l=t.account)==null?void 0:l.homeAccountId,t.account.environment,t.accessToken,this.clientId,t.tenantId,t.scopes.join(" "),((u=t.expiresOn)==null?void 0:u.getTime())||0,((f=t.extExpiresOn)==null?void 0:f.getTime())||0,Ju,void 0,t.tokenType,void 0,r.sshKid,r.claims,o),a=new bv(void 0,n,i);return this.saveCacheRecord(a)}}const Dct=(e,t)=>{const r={cacheLocation:na.MemoryStorage,temporaryCacheLocation:na.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new W5(e,r,VE,t)};/*! @azure/msal-browser v3.6.0 2023-12-01 */const wr={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.6.0 2023-12-01 */class Fct{constructor(t,r){this.eventCallbacks=new Map,this.logger=t,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}addEventCallback(t){if(typeof window<"u"){const r=tp();return this.eventCallbacks.set(r,t),this.logger.verbose(`Event callback registered with id: ${r}`),r}return null}removeEventCallback(t){this.eventCallbacks.delete(t),this.logger.verbose(`Event callback ${t} removed.`)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}emitEvent(t,r,n,o){if(typeof window<"u"){const i={eventType:t,interactionType:r||null,payload:n||null,error:o||null,timestamp:Date.now()};this.logger.info(`Emitting event: ${t}`),this.eventCallbacks.forEach((a,s)=>{this.logger.verbose(`Emitting event to callback ${s}: ${t}`),a.apply(null,[i])})}}handleAccountCacheChange(t){try{const r=t.newValue||t.oldValue;if(!r)return;const n=JSON.parse(r);if(typeof n!="object"||!Wi.isAccountEntity(n))return;const i=Ud.toObject(new Wi,n).getAccountInfo();!t.oldValue&&t.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(wr.ACCOUNT_ADDED,void 0,i)):!t.newValue&&t.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(wr.ACCOUNT_REMOVED,void 0,i))}catch{return}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class $ie{constructor(t,r,n,o,i,a,s,c,l){this.config=t,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=i,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||tp(),this.logger=o.clone(jc.MSAL_SKU,DN,this.correlationId),this.performanceClient=s}async clearCacheOnLogout(t){if(t){Wi.accountInfoIsEqual(t,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(Wi.generateAccountCacheKey(t)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}async initializeBaseRequest(t,r){this.performanceClient.addQueueMeasurement(ft.InitializeBaseRequest,this.correlationId);const n=t.authority||this.config.auth.authority;r&&await this.validateRequestAuthority(n,r);const o=[...t&&t.scopes||[]],i={...t,correlationId:this.correlationId,authority:n,scopes:o};if(!i.authenticationScheme)i.authenticationScheme=uo.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(i.authenticationScheme===uo.SSH){if(!t.sshJwk)throw fo(x4);if(!t.sshKid)throw fo(Uoe)}this.logger.verbose(`Authentication Scheme set to "${i.authenticationScheme}" as configured in Auth request`)}return this.config.cache.claimsBasedCachingEnabled&&t.claims&&!nu.isEmptyObj(t.claims)&&(i.requestedClaimsHash=await this.browserCrypto.hashString(t.claims)),i}getRedirectUri(t){this.logger.verbose("getRedirectUri called");const r=t||this.config.auth.redirectUri||Wd();return Pn.getAbsoluteUrl(r,Wd())}async validateRequestAuthority(t,r){if(!(await this.getDiscoveredAuthority(t)).isAlias(r.environment))throw fo(joe)}initializeServerTelemetryManager(t,r){this.logger.verbose("initializeServerTelemetryManager called");const n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:t,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new YE(n,this.browserStorage)}async getDiscoveredAuthority(t){this.logger.verbose("getDiscoveredAuthority called");const r={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata};return t?(this.logger.verbose("Creating discovered authority with request authority"),Zm.createDiscoveredInstance(t,this.config.system.networkClient,this.browserStorage,r,this.logger)):(this.logger.verbose("Creating discovered authority with configured authority"),Zm.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r,this.logger))}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const Nct=32;async function Lct(e,t,r){e.addQueueMeasurement(ft.GeneratePkceCodes,r);const n=k0($ct,ft.GenerateCodeVerifier,t,e,r)(e,t,r),o=await or(Bct,ft.GenerateCodeChallengeFromVerifier,t,e,r)(n,e,t,r);return{verifier:n,challenge:o}}function $ct(e,t,r){try{const n=new Uint8Array(Nct);return k0(Tct,ft.GetRandomValues,t,e,r)(n),ZE(n)}catch{throw ur(IN)}}async function Bct(e,t,r,n){t.addQueueMeasurement(ft.GenerateCodeChallengeFromVerifier,n);try{const o=await or(Die,ft.Sha256Digest,r,t,n)(e,t,n);return ZE(new Uint8Array(o))}catch{throw ur(IN)}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class ly extends $ie{async initializeAuthorizationCodeRequest(t){this.performanceClient.addQueueMeasurement(ft.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const r=await or(Lct,ft.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),n={...t,redirectUri:t.redirectUri,code:yt.EMPTY_STRING,codeVerifier:r.verifier};return t.codeChallenge=r.challenge,t.codeChallengeMethod=yt.S256_CODE_CHALLENGE_METHOD,n}initializeLogoutRequest(t){this.logger.verbose("initializeLogoutRequest called",t==null?void 0:t.correlationId);const r={correlationId:this.correlationId||tp(),...t};if(t)if(t.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(t.account){const n=this.getLogoutHintFromIdTokenClaims(t.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),r.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!t||t.postLogoutRedirectUri!==null?t&&t.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",r.correlationId),r.postLogoutRedirectUri=Pn.getAbsoluteUrl(t.postLogoutRedirectUri,Wd())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",r.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",r.correlationId),r.postLogoutRedirectUri=Pn.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Wd())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",r.correlationId),r.postLogoutRedirectUri=Pn.getAbsoluteUrl(Wd(),Wd())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",r.correlationId),r}getLogoutHintFromIdTokenClaims(t){const r=t.idTokenClaims;if(r){if(r.login_hint)return r.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(t,r,n){this.performanceClient.addQueueMeasurement(ft.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const o=await or(this.getClientConfiguration.bind(this),ft.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(t,r,n);return new Zoe(o,this.performanceClient)}async getClientConfiguration(t,r,n){this.performanceClient.addQueueMeasurement(ft.StandardInteractionClientGetClientConfiguration,this.correlationId);const o=await or(this.getDiscoveredAuthority.bind(this),ft.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)(r,n),i=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:i.loggerCallback,piiLoggingEnabled:i.piiLoggingEnabled,logLevel:i.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:jc.MSAL_SKU,version:DN,cpu:yt.EMPTY_STRING,os:yt.EMPTY_STRING},telemetry:this.config.telemetry}}async getDiscoveredAuthority(t,r){this.performanceClient.addQueueMeasurement(ft.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const n={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},o=t||this.config.auth.authority,i=Ua.generateAuthority(o,r||this.config.auth.azureCloudOptions);return or(Zm.createDiscoveredInstance.bind(Zm),ft.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(i,this.config.system.networkClient,this.browserStorage,n,this.logger,this.performanceClient,this.correlationId)}async initializeAuthorizationRequest(t,r){this.performanceClient.addQueueMeasurement(ft.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const n=this.getRedirectUri(t.redirectUri),o={interactionType:r},i=ou.setRequestState(this.browserCrypto,t&&t.state||yt.EMPTY_STRING,o),s={...await or(this.initializeBaseRequest.bind(this),ft.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)(t),redirectUri:n,state:i,nonce:t.nonce||tp(),responseMode:this.config.auth.OIDCOptions.serverResponseType},c=t.account||this.browserStorage.getActiveAccount();if(c&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${c.homeAccountId}`,this.correlationId),s.account=c),!s.loginHint&&!c){const l=this.browserStorage.getLegacyLoginHint();l&&(s.loginHint=l)}return s}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const Uct="ContentError",Bie="user_switch";/*! @azure/msal-browser v3.6.0 2023-12-01 */const Hct="USER_INTERACTION_REQUIRED",zct="USER_CANCEL",jct="NO_NETWORK",Vct="PERSISTENT_ERROR",Wct="DISABLED",Gct="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.6.0 2023-12-01 */const qct=-2147186943,Kct={[Bie]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Hd extends No{constructor(t,r,n){super(t,r),Object.setPrototypeOf(this,Hd.prototype),this.name="NativeAuthError",this.ext=n}}function Ag(e){if(e.ext&&e.ext.status&&(e.ext.status===Vct||e.ext.status===Wct)||e.ext&&e.ext.error&&e.ext.error===qct)return!0;switch(e.errorCode){case Uct:return!0;default:return!1}}function G5(e,t,r){if(r&&r.status)switch(r.status){case Gct:return Qoe(Xoe);case Hct:return new Zu(e,t);case zct:return ur(e0);case jct:return ur(XE)}return new Hd(e,Kct[e]||t,r)}/*! @azure/msal-browser v3.6.0 2023-12-01 */class Uie extends ly{async acquireToken(t){this.performanceClient.addQueueMeasurement(ft.SilentCacheClientAcquireToken,t.correlationId);const r=this.initializeServerTelemetryManager(To.acquireTokenSilent_silentFlow),n=await this.createSilentFlowClient(r,t.authority,t.azureCloudOptions);this.logger.verbose("Silent auth client created");try{const i=(await or(n.acquireCachedToken.bind(n),ft.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,t.correlationId)(t))[0];return this.performanceClient.addFields({fromCache:!0},t.correlationId),i}catch(o){throw o instanceof gC&&o.errorCode===MN&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),o}}logout(t){this.logger.verbose("logoutRedirect called");const r=this.initializeLogoutRequest(t);return this.clearCacheOnLogout(r==null?void 0:r.account)}async createSilentFlowClient(t,r,n){const o=await or(this.getClientConfiguration.bind(this),ft.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(t,r,n);return new qlt(o,this.performanceClient)}async initializeSilentRequest(t,r){this.performanceClient.addQueueMeasurement(ft.InitializeSilentRequest,this.correlationId);const n=await or(this.initializeBaseRequest.bind(this),ft.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)(t,r);return{...t,...n,account:r,forceRefresh:t.forceRefresh||!1}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const MP={BROKER_CLIENT_ID:"brk_client_id",BROKER_REDIRECT_URI:"brk_redirect_uri"};class wv extends $ie{constructor(t,r,n,o,i,a,s,c,l,u,f,d){super(t,r,n,o,i,a,c,l,d),this.apiId=s,this.accountId=u,this.nativeMessageHandler=l,this.nativeStorageManager=f,this.silentCacheClient=new Uie(t,this.nativeStorageManager,n,o,i,a,c,l,d)}async acquireToken(t){this.performanceClient.addQueueMeasurement(ft.NativeInteractionClientAcquireToken,t.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const r=this.performanceClient.startMeasurement(ft.NativeInteractionClientAcquireToken,t.correlationId),n=ws.nowSeconds(),o=await this.initializeNativeRequest(t);try{const c=await this.acquireTokensFromCache(this.accountId,o);return r.end({success:!0,isNativeBroker:!1,fromCache:!0}),c}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const i={method:em.GetToken,request:o},a=await this.nativeMessageHandler.sendMessage(i),s=this.validateNativeResponse(a);return this.handleNativeResponse(s,o,n).then(c=>(r.end({success:!0,isNativeBroker:!0,requestId:c.requestId}),c)).catch(c=>{throw r.end({success:!1,errorCode:c.errorCode,subErrorCode:c.subError,isNativeBroker:!0}),c})}createSilentCacheRequest(t,r){return{authority:t.authority,correlationId:this.correlationId,scopes:Ii.fromString(t.scope).asArray(),account:r,forceRefresh:!1}}async acquireTokensFromCache(t,r){if(!t)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),zt(D5);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:t});if(!n)throw zt(D5);try{const o=this.createSilentCacheRequest(r,n),i=await this.silentCacheClient.acquireToken(o),a={...n,idTokenClaims:i==null?void 0:i.idTokenClaims};return{...i,account:a}}catch(o){throw o}}async acquireTokenRedirect(t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const r=await this.initializeNativeRequest(t),n={method:em.GetToken,request:r};try{const a=await this.nativeMessageHandler.sendMessage(n);this.validateNativeResponse(a)}catch(a){if(a instanceof Hd&&Ag(a))throw a}this.browserStorage.setTemporaryCache(Wn.NATIVE_REQUEST,JSON.stringify(r),!0);const o={apiId:To.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},i=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(t.redirectUri);await this.navigationClient.navigateExternal(i,o)}async handleRedirectPromise(){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getCachedNativeRequest();if(!t)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),null;const{prompt:r,...n}=t;r&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Wn.NATIVE_REQUEST));const o={method:em.GetToken,request:n},i=ws.nowSeconds();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const a=await this.nativeMessageHandler.sendMessage(o);this.validateNativeResponse(a);const s=this.handleNativeResponse(a,n,i);return this.browserStorage.setInteractionInProgress(!1),await s}catch(a){throw this.browserStorage.setInteractionInProgress(!1),a}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(t,r,n){if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),t.account.id!==r.accountId)throw G5(Bie);const o=await this.getDiscoveredAuthority(r.authority),i=_0(t.id_token,Ju),a=this.createHomeAccountIdentifier(t,i),s=kN(this.browserStorage,o,a,i,Ju,t.client_info,i.tid,void 0,t.account.id,this.logger),c=await this.generateAuthenticationResult(t,r,i,s,o.canonicalAuthority,n);return this.cacheAccount(s),this.cacheNativeTokens(t,r,a,i,c.accessToken,c.tenantId,n),c}createHomeAccountIdentifier(t,r){return Wi.generateHomeAccountId(t.client_info||yt.EMPTY_STRING,Uc.Default,this.logger,this.browserCrypto,r)}generateScopes(t,r){return t.scope?Ii.fromString(t.scope):Ii.fromString(r.scope)}async generatePopAccessToken(t,r){if(r.tokenType===uo.POP){if(t.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),t.shr;const n=new w1(this.browserCrypto),o={resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,shrNonce:r.shrNonce};if(!r.keyId)throw zt(fN);return n.signPopToken(t.access_token,r.keyId,o)}else return t.access_token}async generateAuthenticationResult(t,r,n,o,i,a){const s=this.addTelemetryFromNativeResponse(t),c=t.scope?Ii.fromString(t.scope):Ii.fromString(r.scope),l=t.account.properties||{},u=l.UID||n.oid||n.sub||yt.EMPTY_STRING,f=l.TenantId||n.tid||yt.EMPTY_STRING,d=CN(o.getAccountInfo(),void 0,n),h=await this.generatePopAccessToken(t,r),p=r.tokenType===uo.POP?uo.POP:uo.BEARER;return{authority:i,uniqueId:u,tenantId:f,scopes:c.asArray(),account:d,idToken:t.id_token,idTokenClaims:n,accessToken:h,fromCache:s?this.isResponseFromCache(s):!1,expiresOn:new Date(Number(a+t.expires_in)*1e3),tokenType:p,correlationId:this.correlationId,state:t.state,fromNativeBroker:!0}}cacheAccount(t){this.browserStorage.setAccount(t),this.browserStorage.removeAccountContext(t).catch(r=>{this.logger.error(`Error occurred while removing account context from browser storage. ${r}`)})}cacheNativeTokens(t,r,n,o,i,a,s){const c=b4(n,r.authority,t.id_token||"",r.clientId,o.tid||""),l=r.tokenType===uo.POP?yt.SHR_NONCE_VALIDITY:(typeof t.expires_in=="string"?parseInt(t.expires_in,10):t.expires_in)||0,u=s+l,f=this.generateScopes(t,r),d=w4(n,r.authority,i,r.clientId,o.tid||a,f.printScopes(),u,0,Ju),h=new bv(void 0,c,d);this.nativeStorageManager.saveCacheRecord(h,r.storeInCache)}addTelemetryFromNativeResponse(t){const r=this.getMATSFromResponse(t);return r?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:r.broker_version,matsAccountJoinOnStart:r.account_join_on_start,matsAccountJoinOnEnd:r.account_join_on_end,matsDeviceJoin:r.device_join,matsPromptBehavior:r.prompt_behavior,matsApiErrorCode:r.api_error_code,matsUiVisible:r.ui_visible,matsSilentCode:r.silent_code,matsSilentBiSubCode:r.silent_bi_sub_code,matsSilentMessage:r.silent_message,matsSilentStatus:r.silent_status,matsHttpStatus:r.http_status,matsHttpEventCount:r.http_event_count},this.correlationId),r):null}validateNativeResponse(t){if(t.hasOwnProperty("access_token")&&t.hasOwnProperty("id_token")&&t.hasOwnProperty("client_info")&&t.hasOwnProperty("account")&&t.hasOwnProperty("scope")&&t.hasOwnProperty("expires_in"))return t;throw uoe(aN,"Response missing expected properties.")}getMATSFromResponse(t){if(t.properties.MATS)try{return JSON.parse(t.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(t){return typeof t.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!t.is_cached}async initializeNativeRequest(t){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const r=t.authority||this.config.auth.authority;t.account&&await this.validateRequestAuthority(r,t.account);const n=new Pn(r);n.validateAsUri();const{scopes:o,...i}=t,a=new Ii(o||[]);a.appendScopes(hC);const s=()=>{switch(this.apiId){case To.ssoSilent:case To.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),qa.NONE}if(!t.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(t.prompt){case qa.NONE:case qa.CONSENT:case qa.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),t.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${t.prompt} is not compatible with native flow`),ur(Tie)}},c={...i,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:a.printScopes(),redirectUri:this.getRedirectUri(t.redirectUri),prompt:s(),correlationId:this.correlationId,tokenType:t.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...t.extraQueryParameters,...t.tokenQueryParameters},extendedExpiryToken:!1};if(this.handleExtraBrokerParams(c),c.extraParameters=c.extraParameters||{},c.extraParameters.telemetry=Bb.MATS_TELEMETRY,t.authenticationScheme===uo.POP){const l={resourceRequestUri:t.resourceRequestUri,resourceRequestMethod:t.resourceRequestMethod,shrClaims:t.shrClaims,shrNonce:t.shrNonce},u=new w1(this.browserCrypto),f=await or(u.generateCnf.bind(u),ft.PopTokenGenerateCnf,this.logger,this.performanceClient,this.correlationId)(l,this.logger);c.reqCnf=f.reqCnfHash,c.keyId=f.kid}return c}handleExtraBrokerParams(t){if(t.extraParameters&&t.extraParameters.hasOwnProperty(MP.BROKER_CLIENT_ID)&&t.extraParameters.hasOwnProperty(MP.BROKER_REDIRECT_URI)&&t.extraParameters.hasOwnProperty(b1)){const r=t.extraParameters[b1],n=t.redirectUri,o=t.extraParameters[MP.BROKER_REDIRECT_URI];t.extraParameters={child_client_id:r,child_redirect_uri:n},t.redirectUri=o}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class ju{constructor(t,r,n,o){this.logger=t,this.handshakeTimeoutMs=r,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(ft.NativeMessageHandlerHandshake)}async sendMessage(t){this.logger.trace("NativeMessageHandler - sendMessage called.");const r={channel:Bb.CHANNEL_ID,extensionId:this.extensionId,responseId:tp(),body:t};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(r)}`),this.messageChannel.port1.postMessage(r),new Promise((n,o)=>{this.resolvers.set(r.responseId,{resolve:n,reject:o})})}static async createProvider(t,r,n){t.trace("NativeMessageHandler - createProvider called.");try{const o=new ju(t,r,n,Bb.PREFERRED_EXTENSION_ID);return await o.sendHandshakeRequest(),o}catch{const i=new ju(t,r,n);return await i.sendHandshakeRequest(),i}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const t={channel:Bb.CHANNEL_ID,extensionId:this.extensionId,responseId:tp(),body:{method:em.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=r=>{this.onChannelMessage(r)},window.postMessage(t,window.origin,[this.messageChannel.port2]),new Promise((r,n)=>{this.handshakeResolvers.set(t.responseId,{resolve:r,reject:n}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),n(ur(_ie)),this.handshakeResolvers.delete(t.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(t){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),t.source!==window)return;const r=t.data;if(!(!r.channel||r.channel!==Bb.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===em.HandshakeRequest){const n=this.handshakeResolvers.get(r.responseId);if(!n){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${r.responseId}`);return}this.logger.verbose(r.extensionId?`Extension with id: ${r.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),n.reject(ur(kie))}}onChannelMessage(t){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const r=t.data,n=this.resolvers.get(r.responseId),o=this.handshakeResolvers.get(r.responseId);try{const i=r.body.method;if(i===em.Response){if(!n)return;const a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(a)}`),a.status!=="Success")n.reject(G5(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(G5(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw uoe(aN,"Event does not contain result.");this.resolvers.delete(r.responseId)}else if(i===em.HandshakeResponse){if(!o){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${r.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(i){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${i}`),this.logger.errorPii(`Unable to parse ${t}`),n?n.reject(i):o&&o.reject(i)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(t,r,n,o){if(r.trace("isNativeAvailable called"),!t.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(o)switch(o){case uo.BEARER:case uo.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class $N{constructor(t,r,n,o,i){this.authModule=t,this.browserStorage=r,this.authCodeRequest=n,this.logger=o,this.performanceClient=i}async handleCodeResponse(t,r){this.performanceClient.addQueueMeasurement(ft.HandleCodeResponse,r.correlationId);let n;try{n=this.authModule.handleFragmentResponse(t,r.state)}catch(o){throw o instanceof ep&&o.subError===e0?ur(e0):o}return or(this.handleCodeResponseFromServer.bind(this),ft.HandleCodeResponseFromServer,this.logger,this.performanceClient,r.correlationId)(n,r)}async handleCodeResponseFromServer(t,r,n=!0){if(this.performanceClient.addQueueMeasurement(ft.HandleCodeResponseFromServer,r.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=t.code,t.cloud_instance_host_name&&await or(this.authModule.updateAuthority.bind(this.authModule),ft.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,r.correlationId)(t.cloud_instance_host_name,r.correlationId),n&&(t.nonce=r.nonce||void 0),t.state=r.state,t.client_info)this.authCodeRequest.clientInfo=t.client_info;else{const i=this.createCcsCredentials(r);i&&(this.authCodeRequest.ccsCredential=i)}return await or(this.authModule.acquireToken.bind(this.authModule),ft.AuthClientAcquireToken,this.logger,this.performanceClient,r.correlationId)(this.authCodeRequest,t)}createCcsCredentials(t){return t.account?{credential:t.account.homeAccountId,type:vl.HOME_ACCOUNT_ID}:t.loginHint?{credential:t.loginHint,type:vl.UPN}:null}}/*! @azure/msal-browser v3.6.0 2023-12-01 */function Hie(e,t,r){const n=GE(e);if(!n)throw Woe(e)?(r.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),r.errorPii(`The ${t} detected is: ${e}`),ur(nie)):(r.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),ur(rie));return n}function Yct(e,t,r){if(!e.state)throw ur(AN);const n=Lie(t,e.state);if(!n)throw ur(oie);if(n.interactionType!==r)throw ur(iie)}/*! @azure/msal-browser v3.6.0 2023-12-01 */class Xct extends ly{constructor(t,r,n,o,i,a,s,c,l,u){super(t,r,n,o,i,a,s,l,u),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=c}acquireToken(t){try{const r=this.generatePopupName(t.scopes||hC,t.authority||this.config.auth.authority),n=t.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(t,r,n);{this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");const o=this.openSizedPopup("about:blank",r,n);return this.acquireTokenPopupAsync(t,r,n,o)}}catch(r){return Promise.reject(r)}}logout(t){try{this.logger.verbose("logoutPopup called");const r=this.initializeLogoutRequest(t),n=this.generateLogoutPopupName(r),o=t&&t.authority,i=t&&t.mainWindowRedirectUri,a=(t==null?void 0:t.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(r,n,a,o,void 0,i);{this.logger.verbose("asyncPopup set to false, opening popup");const s=this.openSizedPopup("about:blank",n,a);return this.logoutPopupAsync(r,n,a,o,s,i)}}catch(r){return Promise.reject(r)}}async acquireTokenPopupAsync(t,r,n,o){this.logger.verbose("acquireTokenPopupAsync called");const i=this.initializeServerTelemetryManager(To.acquireTokenPopup),a=await or(this.initializeAuthorizationRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(t,fr.Popup);Pie(a.authority);try{const s=await or(this.initializeAuthorizationCodeRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(a),c=await or(this.createAuthCodeClient.bind(this),ft.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(i,a.authority,a.azureCloudOptions),l=ju.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme);let u;l&&(u=this.performanceClient.startMeasurement(ft.FetchAccountIdWithNativeBroker,t.correlationId));const f=await c.getAuthCodeUrl({...a,nativeBroker:l}),d=new $N(c,this.browserStorage,s,this.logger,this.performanceClient),h={popup:o,popupName:r,popupWindowAttributes:n},p=this.initiateAuthRequest(f,h);this.eventHandler.emitEvent(wr.POPUP_OPENED,fr.Popup,{popupWindow:p},null);const g=await this.monitorPopupForHash(p),m=k0(Hie,ft.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,this.config.auth.OIDCOptions.serverResponseType,this.logger);if($u.removeThrottle(this.browserStorage,this.config.auth.clientId,s),m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),u&&u.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ur(mC);const y=new wv(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,To.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,m.accountId,this.nativeStorage,a.correlationId),{userRequestState:b}=ou.parseRequestState(this.browserCrypto,a.state);return await y.acquireToken({...a,state:b,prompt:void 0})}return await d.handleCodeResponse(m,a)}catch(s){throw o&&o.close(),s instanceof No&&(s.setCorrelationId(this.correlationId),i.cacheFailedRequest(s)),s}}async logoutPopupAsync(t,r,n,o,i,a){var c,l;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(wr.LOGOUT_START,fr.Popup,t);const s=this.initializeServerTelemetryManager(To.logoutPopup);try{await this.clearCacheOnLogout(t.account);const u=await or(this.createAuthCodeClient.bind(this),ft.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(s,o);try{u.authority.endSessionEndpoint}catch{if((c=t.account)!=null&&c.homeAccountId&&t.postLogoutRedirectUri&&u.authority.protocolMode===Zd.OIDC){if(this.browserStorage.removeAccount((l=t.account)==null?void 0:l.homeAccountId),this.eventHandler.emitEvent(wr.LOGOUT_SUCCESS,fr.Popup,t),a){const h={apiId:To.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},p=Pn.getAbsoluteUrl(a,Wd());await this.navigationClient.navigateInternal(p,h)}i&&i.close();return}}const f=u.getLogoutUri(t);this.eventHandler.emitEvent(wr.LOGOUT_SUCCESS,fr.Popup,t);const d=this.openPopup(f,{popupName:r,popupWindowAttributes:n,popup:i});if(this.eventHandler.emitEvent(wr.POPUP_OPENED,fr.Popup,{popupWindow:d},null),await this.monitorPopupForHash(d).catch(()=>{}),a){const h={apiId:To.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},p=Pn.getAbsoluteUrl(a,Wd());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${p}`),await this.navigationClient.navigateInternal(p,h)}else this.logger.verbose("No main window navigation requested")}catch(u){throw i&&i.close(),u instanceof No&&(u.setCorrelationId(this.correlationId),s.cacheFailedRequest(u)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(wr.LOGOUT_FAILURE,fr.Popup,null,u),this.eventHandler.emitEvent(wr.LOGOUT_END,fr.Popup),u}this.eventHandler.emitEvent(wr.LOGOUT_END,fr.Popup)}initiateAuthRequest(t,r){if(t)return this.logger.infoPii(`Navigate to: ${t}`),this.openPopup(t,r);throw this.logger.error("Navigate url is empty"),ur(S4)}monitorPopupForHash(t){return new Promise((r,n)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const o=setInterval(()=>{if(t.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),n(ur(e0));return}let i="";try{i=t.location.href}catch{}if(!i||i==="about:blank")return;clearInterval(o);let a="";const s=this.config.auth.OIDCOptions.serverResponseType;t&&(s===pC.QUERY?a=t.location.search:a=t.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),r(a)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(t)})}openPopup(t,r){try{let n;if(r.popup?(n=r.popup,this.logger.verbosePii(`Navigating popup window to: ${t}`),n.location.assign(t)):typeof r.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${t}`),n=this.openSizedPopup(t,r.popupName,r.popupWindowAttributes)),!n)throw ur(lie);return n.focus&&n.focus(),this.currentWindow=n,window.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),this.browserStorage.setInteractionInProgress(!1),ur(sie)}}openSizedPopup(t,r,n){var d,h,p,g;const o=window.screenLeft?window.screenLeft:window.screenX,i=window.screenTop?window.screenTop:window.screenY,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let c=(d=n.popupSize)==null?void 0:d.width,l=(h=n.popupSize)==null?void 0:h.height,u=(p=n.popupPosition)==null?void 0:p.top,f=(g=n.popupPosition)==null?void 0:g.left;return(!c||c<0||c>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),c=jc.POPUP_WIDTH),(!l||l<0||l>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),l=jc.POPUP_HEIGHT),(!u||u<0||u>s)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),u=Math.max(0,s/2-jc.POPUP_HEIGHT/2+i)),(!f||f<0||f>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),f=Math.max(0,a/2-jc.POPUP_WIDTH/2+o)),window.open(t,r,`width=${c}, height=${l}, top=${u}, left=${f}, scrollbars=yes`)}unloadWindow(t){this.browserStorage.cleanRequestByInteractionType(fr.Popup),this.currentWindow&&this.currentWindow.close(),t.preventDefault()}cleanPopup(t){t&&t.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(t,r){return`${jc.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t.join("-")}.${r}.${this.correlationId}`}generateLogoutPopupName(t){const r=t.account&&t.account.homeAccountId;return`${jc.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${r}.${this.correlationId}`}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class zV{constructor(t,r,n,o,i){this.authModule=t,this.browserStorage=r,this.authCodeRequest=n,this.logger=o,this.performanceClient=i}async initiateAuthRequest(t,r){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),t){r.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(Wn.ORIGIN_URI,r.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(Wn.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${t}`);const n={apiId:To.acquireTokenRedirect,timeout:r.redirectTimeout,noHistory:!1};if(typeof r.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),r.onRedirectNavigate(t)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await r.navigationClient.navigateExternal(t,n);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await r.navigationClient.navigateExternal(t,n);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ur(S4)}async handleCodeResponse(t,r){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const n=this.browserStorage.generateStateKey(r),o=this.browserStorage.getTemporaryCache(n);if(!o)throw zt(jE,"Cached State");let i;try{i=this.authModule.handleFragmentResponse(t,o)}catch(l){throw l instanceof ep&&l.subError===e0?ur(e0):l}const a=this.browserStorage.generateNonceKey(o),s=this.browserStorage.getTemporaryCache(a);if(this.authCodeRequest.code=i.code,i.cloud_instance_host_name&&await or(this.authModule.updateAuthority.bind(this.authModule),ft.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(i.cloud_instance_host_name,this.authCodeRequest.correlationId),i.nonce=s||void 0,i.state=o,i.client_info)this.authCodeRequest.clientInfo=i.client_info;else{const l=this.checkCcsCredentials();l&&(this.authCodeRequest.ccsCredential=l)}const c=await this.authModule.acquireToken(this.authCodeRequest,i);return this.browserStorage.cleanRequestByState(r),c}checkCcsCredentials(){const t=this.browserStorage.getTemporaryCache(Wn.CCS_CREDENTIAL,!0);if(t)try{return JSON.parse(t)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${t}`)}return null}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class Qct extends ly{constructor(t,r,n,o,i,a,s,c,l,u){super(t,r,n,o,i,a,s,l,u),this.nativeStorage=c}async acquireToken(t){const r=await or(this.initializeAuthorizationRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(t,fr.Redirect);this.browserStorage.updateCacheEntries(r.state,r.nonce,r.authority,r.loginHint||"",r.account||null);const n=this.initializeServerTelemetryManager(To.acquireTokenRedirect),o=i=>{i.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(r.state),this.eventHandler.emitEvent(wr.RESTORE_FROM_BFCACHE,fr.Redirect))};try{const i=await or(this.initializeAuthorizationCodeRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(r),a=await or(this.createAuthCodeClient.bind(this),ft.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(n,r.authority,r.azureCloudOptions),s=new zV(a,this.browserStorage,i,this.logger,this.performanceClient),c=await a.getAuthCodeUrl({...r,nativeBroker:ju.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=this.getRedirectStartPage(t.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${l}`),window.addEventListener("pageshow",o),await s.initiateAuthRequest(c,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:l,onRedirectNavigate:t.onRedirectNavigate})}catch(i){throw i instanceof No&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),window.removeEventListener("pageshow",o),this.browserStorage.cleanRequestByState(r.state),i}}async handleRedirectPromise(t){const r=this.initializeServerTelemetryManager(To.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[n,o]=this.getRedirectResponse(t||"");if(!n)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(fr.Redirect),null;const i=this.browserStorage.getTemporaryCache(Wn.ORIGIN_URI,!0)||yt.EMPTY_STRING,a=Pn.removeHashFromUrl(i),s=Pn.removeHashFromUrl(window.location.href);if(a===s&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),i.indexOf("#")>-1&&act(i),await this.handleResponse(n,r);if(this.config.auth.navigateToLoginRequestUrl){if(!ON()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(Wn.URL_HASH,o,!0);const c={apiId:To.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let l=!0;if(!i||i==="null"){const u=lct();this.browserStorage.setTemporaryCache(Wn.ORIGIN_URI,u,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),l=await this.navigationClient.navigateInternal(u,c)}else this.logger.verbose(`Navigating to loginRequestUrl: ${i}`),l=await this.navigationClient.navigateInternal(i,c);if(!l)return await this.handleResponse(n,r)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(n,r);return null}catch(n){throw n instanceof No&&(n.setCorrelationId(this.correlationId),r.cacheFailedRequest(n)),this.browserStorage.cleanRequestByInteractionType(fr.Redirect),n}}getRedirectResponse(t){this.logger.verbose("getRedirectResponseHash called");let r=t;r||(this.config.auth.OIDCOptions.serverResponseType===pC.QUERY?r=window.location.search:r=window.location.hash);let n=GE(r);if(n){try{Yct(n,this.browserCrypto,fr.Redirect)}catch(i){return i instanceof No&&this.logger.error(`Interaction type validation failed due to ${i.errorCode}: ${i.errorMessage}`),[null,""]}return ict(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,r]}const o=this.browserStorage.getTemporaryCache(Wn.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(Wn.URL_HASH)),o&&(n=GE(o),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,o]):[null,""]}async handleResponse(t,r){const n=t.state;if(!n)throw ur(AN);const o=this.browserStorage.getCachedRequest(n);if(this.logger.verbose("handleResponse called, retrieved cached request"),t.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ur(mC);const c=new wv(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,To.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,t.accountId,this.nativeStorage,o.correlationId),{userRequestState:l}=ou.parseRequestState(this.browserCrypto,n);return c.acquireToken({...o,state:l,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(n)})}const i=this.browserStorage.getCachedAuthority(n);if(!i)throw ur(PN);const a=await or(this.createAuthCodeClient.bind(this),ft.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(r,i);return $u.removeThrottle(this.browserStorage,this.config.auth.clientId,o),new zV(a,this.browserStorage,o,this.logger,this.performanceClient).handleCodeResponse(t,n)}async logout(t){var o,i;this.logger.verbose("logoutRedirect called");const r=this.initializeLogoutRequest(t),n=this.initializeServerTelemetryManager(To.logout);try{this.eventHandler.emitEvent(wr.LOGOUT_START,fr.Redirect,t),await this.clearCacheOnLogout(r.account);const a={apiId:To.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},s=await or(this.createAuthCodeClient.bind(this),ft.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)(n,t&&t.authority);if(s.authority.protocolMode===Zd.OIDC)try{s.authority.endSessionEndpoint}catch{if((o=r.account)!=null&&o.homeAccountId){this.browserStorage.removeAccount((i=r.account)==null?void 0:i.homeAccountId),this.eventHandler.emitEvent(wr.LOGOUT_SUCCESS,fr.Redirect,r);return}}const c=s.getLogoutUri(r);if(this.eventHandler.emitEvent(wr.LOGOUT_SUCCESS,fr.Redirect,r),t&&typeof t.onRedirectNavigate=="function")if(t.onRedirectNavigate(c)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(c,a);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(c,a);return}}catch(a){throw a instanceof No&&(a.setCorrelationId(this.correlationId),n.cacheFailedRequest(a)),this.eventHandler.emitEvent(wr.LOGOUT_FAILURE,fr.Redirect,null,a),this.eventHandler.emitEvent(wr.LOGOUT_END,fr.Redirect),a}this.eventHandler.emitEvent(wr.LOGOUT_END,fr.Redirect)}getRedirectStartPage(t){const r=t||window.location.href;return Pn.getAbsoluteUrl(r,Wd())}}/*! @azure/msal-browser v3.6.0 2023-12-01 */async function Zct(e,t,r,n,o){if(t.addQueueMeasurement(ft.SilentHandlerInitiateAuthRequest,n),!e)throw r.info("Navigate url is empty"),ur(S4);return o?or(eut,ft.SilentHandlerLoadFrame,r,t,n)(e,o,t,n):k0(tut,ft.SilentHandlerLoadFrameSync,r,t,n)(e)}async function Jct(e,t,r,n,o,i,a){return n.addQueueMeasurement(ft.SilentHandlerMonitorIframeForHash,i),new Promise((s,c)=>{t<j5&&o.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (${j5}ms). This may result in timeouts.`);const l=window.setTimeout(()=>{window.clearInterval(u),c(ur(cie))},t),u=window.setInterval(()=>{let f="";const d=e.contentWindow;try{f=d?d.location.href:""}catch{}if(!f||f==="about:blank")return;let h="";d&&(a===pC.QUERY?h=d.location.search:h=d.location.hash),window.clearTimeout(l),window.clearInterval(u),s(h)},r)}).finally(()=>{k0(rut,ft.RemoveHiddenIframe,o,n,i)(e)})}function eut(e,t,r,n){return r.addQueueMeasurement(ft.SilentHandlerLoadFrame,n),new Promise((o,i)=>{const a=zie();window.setTimeout(()=>{if(!a){i("Unable to load iframe");return}a.src=e,o(a)},t)})}function tut(e){const t=zie();return t.src=e,t}function zie(){const e=document.createElement("iframe");return e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function rut(e){document.body===e.parentNode&&document.body.removeChild(e)}/*! @azure/msal-browser v3.6.0 2023-12-01 */class nut extends ly{constructor(t,r,n,o,i,a,s,c,l,u,f){super(t,r,n,o,i,a,c,u,f),this.apiId=s,this.nativeStorage=l}async acquireToken(t){if(this.performanceClient.addQueueMeasurement(ft.SilentIframeClientAcquireToken,t.correlationId),!t.loginHint&&!t.sid&&(!t.account||!t.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),t.prompt&&t.prompt!==qa.NONE&&t.prompt!==qa.NO_SESSION)throw ur(pie);const r=await or(this.initializeAuthorizationRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,t.correlationId)({...t,prompt:t.prompt||qa.NONE},fr.Silent);Pie(r.authority);const n=this.initializeServerTelemetryManager(this.apiId);try{const o=await or(this.createAuthCodeClient.bind(this),ft.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,t.correlationId)(n,r.authority,r.azureCloudOptions);return await or(this.silentTokenHelper.bind(this),ft.SilentIframeClientTokenHelper,this.logger,this.performanceClient,t.correlationId)(o,r)}catch(o){throw o instanceof No&&(o.setCorrelationId(this.correlationId),n.cacheFailedRequest(o)),o}}logout(){return Promise.reject(ur(_4))}async silentTokenHelper(t,r){const n=r.correlationId;this.performanceClient.addQueueMeasurement(ft.SilentIframeClientTokenHelper,n);const o=await or(this.initializeAuthorizationCodeRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(r),i=await or(t.getAuthCodeUrl.bind(t),ft.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...r,nativeBroker:ju.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}),a=new $N(t,this.browserStorage,o,this.logger,this.performanceClient),s=await or(Zct,ft.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(i,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait),c=this.config.auth.OIDCOptions.serverResponseType,l=await or(Jct,ft.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(s,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,c),u=k0(Hie,ft.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(l,c,this.logger);if(u.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ur(mC);const f=new wv(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,u.accountId,this.browserStorage,n),{userRequestState:d}=ou.parseRequestState(this.browserCrypto,r.state);return or(f.acquireToken.bind(f),ft.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...r,state:d,prompt:r.prompt||qa.NONE})}return or(a.handleCodeResponse.bind(a),ft.HandleCodeResponse,this.logger,this.performanceClient,n)(u,r)}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class out extends ly{async acquireToken(t){this.performanceClient.addQueueMeasurement(ft.SilentRefreshClientAcquireToken,t.correlationId);const r=await or(this.initializeBaseRequest.bind(this),ft.InitializeBaseRequest,this.logger,this.performanceClient,t.correlationId)(t,t.account),n={...t,...r},o=this.initializeServerTelemetryManager(To.acquireTokenSilent_silentFlow),i=await this.createRefreshTokenClient(o,n.authority,n.azureCloudOptions);return or(i.acquireTokenByRefreshToken.bind(i),ft.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,t.correlationId)(n).catch(a=>{throw a.setCorrelationId(this.correlationId),o.cacheFailedRequest(a),a})}logout(){return Promise.reject(ur(_4))}async createRefreshTokenClient(t,r,n){const o=await or(this.getClientConfiguration.bind(this),ft.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(t,r,n);return new U5(o,this.performanceClient)}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class iut{constructor(t,r,n,o){this.isBrowserEnvironment=typeof window<"u",this.config=t,this.storage=r,this.logger=n,this.cryptoObj=o}loadExternalTokens(t,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw ur(Oc);const o=_0(r.id_token,Ju);let i,a,s;if(t.account)s=Wi.createFromAccountInfo(t.account),i=new bv(s,this.loadIdToken(r.id_token,s.homeAccountId,t.account.environment,t.account.tenantId),this.loadAccessToken(t,r,s.homeAccountId,t.account.environment,t.account.tenantId,n),this.loadRefreshToken(t,r,s.homeAccountId,t.account.environment));else if(t.authority){const c=Ua.generateAuthority(t.authority,t.azureCloudOptions),l={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(a=new Ua(c,this.config.system.networkClient,this.storage,l,this.logger),n.clientInfo)this.logger.trace("TokenCache - homeAccountId from options"),s=this.loadAccount(o,a,n.clientInfo),i=new bv(s,this.loadIdToken(r.id_token,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(t,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(t,r,s.homeAccountId,a.hostnameAndPort));else if(r.client_info)this.logger.trace("TokenCache - homeAccountId from response"),s=this.loadAccount(o,a,r.client_info),i=new bv(s,this.loadIdToken(r.id_token,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(t,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(t,r,s.homeAccountId,a.hostnameAndPort));else throw ur(Oc)}else throw ur(Oc);return this.generateAuthenticationResult(t,o,i,s,a)}loadAccount(t,r,n,o){if(this.isBrowserEnvironment){this.logger.verbose("TokenCache - loading account");let i;if(o?i=o:r.authorityType!==void 0&&n&&(i=Wi.generateHomeAccountId(n,r.authorityType,this.logger,this.cryptoObj,t)),!i)throw ur(Oc);const a=t.tid,s=kN(this.storage,r,i,t,Ju,n,a,void 0,void 0,this.logger);return this.storage.setAccount(s),s}else throw ur(Oc)}loadIdToken(t,r,n,o){const i=b4(r,n,t,this.config.auth.clientId,o);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(i),i;throw ur(Oc)}loadAccessToken(t,r,n,o,i,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in||!a.extendedExpiresOn)throw ur(Oc);const s=new Ii(t.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,u=w4(n,o,r.access_token,this.config.auth.clientId,i,s,c,l,Ju);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(u),u;throw ur(Oc)}loadRefreshToken(t,r,n,o){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;const i=Poe(n,o,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(i),i;throw ur(Oc)}generateAuthenticationResult(t,r,n,o,i){var d,h;let a=yt.EMPTY_STRING,s=[],c=null,l;n!=null&&n.accessToken&&(a=n.accessToken.secret,s=Ii.fromString(n.accessToken.target).asArray(),c=new Date(Number(n.accessToken.expiresOn)*1e3),l=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));const u=r.oid||r.sub||yt.EMPTY_STRING,f=r.tid||yt.EMPTY_STRING;return{authority:i?i.canonicalAuthority:yt.EMPTY_STRING,uniqueId:u,tenantId:f,scopes:s,account:o.getAccountInfo(),idToken:((d=n.idToken)==null?void 0:d.secret)||"",idTokenClaims:r||{},accessToken:a,fromCache:!0,expiresOn:c,correlationId:t.correlationId||yt.EMPTY_STRING,requestId:yt.EMPTY_STRING,extExpiresOn:l,familyId:yt.EMPTY_STRING,tokenType:((h=n==null?void 0:n.accessToken)==null?void 0:h.tokenType)||yt.EMPTY_STRING,state:yt.EMPTY_STRING,cloudGraphHostName:o.cloudGraphHostName||yt.EMPTY_STRING,msGraphHost:o.msGraphHost||yt.EMPTY_STRING,code:void 0,fromNativeBroker:!1}}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class aut extends Zoe{constructor(t){super(t),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class sut extends ly{constructor(t,r,n,o,i,a,s,c,l,u){super(t,r,n,o,i,a,c,l,u),this.apiId=s}async acquireToken(t){if(!t.code)throw ur(wie);const r=await or(this.initializeAuthorizationRequest.bind(this),ft.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,t.correlationId)(t,fr.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{const o={...r,code:t.code},i=await or(this.getClientConfiguration.bind(this),ft.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,t.correlationId)(n,r.authority),a=new aut(i);this.logger.verbose("Auth code client created");const s=new $N(a,this.browserStorage,o,this.logger,this.performanceClient);return await or(s.handleCodeResponseFromServer.bind(s),ft.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)({code:t.code,msgraph_host:t.msGraphHost,cloud_graph_host_name:t.cloudGraphHostName,cloud_instance_host_name:t.cloudInstanceHostName},r,!1)}catch(o){throw o instanceof No&&(o.setCorrelationId(this.correlationId),n.cacheFailedRequest(o)),o}}logout(){return Promise.reject(ur(_4))}}/*! @azure/msal-browser v3.6.0 2023-12-01 */class k4{constructor(t){this.atsAsyncMeasurement=void 0,this.operatingContext=t,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=t.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new C1(this.logger,this.performanceClient):VE,this.eventHandler=new Fct(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new W5(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,Wst(this.config.auth)):Dct(this.config.auth.clientId,this.logger);const r={cacheLocation:na.MemoryStorage,temporaryCacheLocation:na.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new W5(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new iut(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(t){const r=new k4(t);return await r.initialize(),r}trackPageVisibility(){this.atsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.atsAsyncMeasurement.increment({visibilityChangeCount:1}))}async initialize(){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}const t=this.config.system.allowNativeBroker,r=this.performanceClient.startMeasurement(ft.InitializeClientApplication);if(this.eventHandler.emitEvent(wr.INITIALIZE_START),t)try{this.nativeExtensionProvider=await ju.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(n){this.logger.verbose(n)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await or(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),ft.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient)(this.performanceClient)),this.initialized=!0,this.eventHandler.emitEvent(wr.INITIALIZE_END),r.end({allowNativeBroker:t,success:!0})}async handleRedirectPromise(t){this.logger.verbose("handleRedirectPromise called"),NV(this.initialized);const r=this.getAllAccounts();if(this.isBrowserEnvironment){const n=t||"";let o=this.redirectResponse.get(n);if(typeof o>"u"){this.eventHandler.emitEvent(wr.HANDLE_REDIRECT_START,fr.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise");const i=this.browserStorage.getCachedNativeRequest();let a;if(i&&ju.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!t)this.logger.trace("handleRedirectPromise - acquiring token from native platform"),a=new wv(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,To.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,i.accountId,this.nativeInternalStorage,i.correlationId).handleRedirectPromise();else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const s=this.browserStorage.getTemporaryCache(Wn.CORRELATION_ID,!0)||yt.EMPTY_STRING;a=this.createRedirectClient(s).handleRedirectPromise(t)}o=a.then(s=>(s&&(r.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(wr.LOGIN_SUCCESS,fr.Redirect,s),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_SUCCESS,fr.Redirect,s),this.logger.verbose("handleRedirectResponse returned result, acquire token success"))),this.eventHandler.emitEvent(wr.HANDLE_REDIRECT_END,fr.Redirect),s)).catch(s=>{throw r.length>0?this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_FAILURE,fr.Redirect,null,s):this.eventHandler.emitEvent(wr.LOGIN_FAILURE,fr.Redirect,null,s),this.eventHandler.emitEvent(wr.HANDLE_REDIRECT_END,fr.Redirect),s}),this.redirectResponse.set(n,o)}else this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call");return o}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async acquireTokenRedirect(t){const r=this.getRequestCorrelationId(t);this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(fr.Redirect);const n=this.getAllAccounts().length>0;n?this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_START,fr.Redirect,t):this.eventHandler.emitEvent(wr.LOGIN_START,fr.Redirect,t);let o;return this.nativeExtensionProvider&&this.canUseNative(t)?o=new wv(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,To.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(t),this.nativeInternalStorage,r).acquireTokenRedirect(t).catch(a=>{if(a instanceof Hd&&Ag(a))return this.nativeExtensionProvider=void 0,this.createRedirectClient(r).acquireToken(t);if(a instanceof Zu)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(r).acquireToken(t);throw this.getBrowserStorage().setInteractionInProgress(!1),a}):o=this.createRedirectClient(r).acquireToken(t),o.catch(i=>{throw n?this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_FAILURE,fr.Redirect,null,i):this.eventHandler.emitEvent(wr.LOGIN_FAILURE,fr.Redirect,null,i),i})}acquireTokenPopup(t){const r=this.getRequestCorrelationId(t),n=this.performanceClient.startMeasurement(ft.AcquireTokenPopup,r);try{this.logger.verbose("acquireTokenPopup called",r),this.preflightBrowserEnvironmentCheck(fr.Popup)}catch(a){return Promise.reject(a)}const o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_START,fr.Popup,t):this.eventHandler.emitEvent(wr.LOGIN_START,fr.Popup,t);let i;return this.canUseNative(t)?i=this.acquireTokenNative({...t,correlationId:r},To.acquireTokenPopup).then(a=>(this.getBrowserStorage().setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,requestId:a.requestId}),a)).catch(a=>{if(a instanceof Hd&&Ag(a))return this.nativeExtensionProvider=void 0,this.createPopupClient(r).acquireToken(t);if(a instanceof Zu)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(r).acquireToken(t);throw this.getBrowserStorage().setInteractionInProgress(!1),a}):i=this.createPopupClient(r).acquireToken(t),i.then(a=>(o.length<this.getAllAccounts().length?this.eventHandler.emitEvent(wr.LOGIN_SUCCESS,fr.Popup,a):this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_SUCCESS,fr.Popup,a),n.add({accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length}),n.end({success:!0,requestId:a.requestId}),a)).catch(a=>(o.length>0?this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_FAILURE,fr.Popup,null,a):this.eventHandler.emitEvent(wr.LOGIN_FAILURE,fr.Popup,null,a),n.end({errorCode:a.errorCode,subErrorCode:a.subError,success:!1}),Promise.reject(a)))}trackPageVisibilityWithMeasurement(){const t=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;t&&(this.logger.info("Perf: Visibility change detected in ",t.event.name),t.increment({visibilityChangeCount:1}))}async ssoSilent(t){var i;const r=this.getRequestCorrelationId(t),n={...t,prompt:t.prompt,correlationId:r};this.preflightBrowserEnvironmentCheck(fr.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(ft.SsoSilent,r),(i=this.ssoSilentMeasurement)==null||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",r),this.eventHandler.emitEvent(wr.SSO_SILENT_START,fr.Silent,n);let o;return this.canUseNative(n)?o=this.acquireTokenNative(n,To.ssoSilent).catch(a=>{if(a instanceof Hd&&Ag(a))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw a}):o=this.createSilentIframeClient(n.correlationId).acquireToken(n),o.then(a=>{var s,c;return this.eventHandler.emitEvent(wr.SSO_SILENT_SUCCESS,fr.Silent,a),(s=this.ssoSilentMeasurement)==null||s.add({accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length}),(c=this.ssoSilentMeasurement)==null||c.end({success:!0,isNativeBroker:a.fromNativeBroker,requestId:a.requestId}),a}).catch(a=>{var s;throw this.eventHandler.emitEvent(wr.SSO_SILENT_FAILURE,fr.Silent,null,a),(s=this.ssoSilentMeasurement)==null||s.end({errorCode:a.errorCode,subErrorCode:a.subError,success:!1}),a}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(t){const r=this.getRequestCorrelationId(t);this.preflightBrowserEnvironmentCheck(fr.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_BY_CODE_START,fr.Silent,t);const n=this.performanceClient.startMeasurement(ft.AcquireTokenByCode,r);try{if(t.code&&t.nativeAccountId)throw ur(Cie);if(t.code){const o=t.code;let i=this.hybridAuthCodeResponses.get(o);return i?(this.logger.verbose("Existing acquireTokenByCode request found",r),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),i=this.acquireTokenByCodeAsync({...t,correlationId:r}).then(a=>(this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_BY_CODE_SUCCESS,fr.Silent,a),this.hybridAuthCodeResponses.delete(o),n.add({accessTokenSize:a.accessToken.length,idTokenSize:a.idToken.length}),n.end({success:!0,isNativeBroker:a.fromNativeBroker,requestId:a.requestId}),a)).catch(a=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_BY_CODE_FAILURE,fr.Silent,null,a),n.end({errorCode:a.errorCode,subErrorCode:a.subError,success:!1}),a}),this.hybridAuthCodeResponses.set(o,i)),await i}else if(t.nativeAccountId){if(this.canUseNative(t,t.nativeAccountId))return await this.acquireTokenNative({...t,correlationId:r},To.acquireTokenByCode,t.nativeAccountId).catch(o=>{throw o instanceof Hd&&Ag(o)&&(this.nativeExtensionProvider=void 0),o});throw ur(Sie)}else throw ur(xie)}catch(o){throw this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_BY_CODE_FAILURE,fr.Silent,null,o),n.end({errorCode:o instanceof No&&o.errorCode||void 0,subErrorCode:o instanceof No&&o.subError||void 0,success:!1}),o}}async acquireTokenByCodeAsync(t){var o;return this.logger.trace("acquireTokenByCodeAsync called",t.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(ft.AcquireTokenByCodeAsync,t.correlationId),(o=this.acquireTokenByCodeAsyncMeasurement)==null||o.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(t.correlationId).acquireToken(t).then(i=>{var a;return(a=this.acquireTokenByCodeAsyncMeasurement)==null||a.end({success:!0,fromCache:i.fromCache,isNativeBroker:i.fromNativeBroker,requestId:i.requestId}),i}).catch(i=>{var a;throw(a=this.acquireTokenByCodeAsyncMeasurement)==null||a.end({errorCode:i.errorCode,subErrorCode:i.subError,success:!1}),i}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(t,r,n){switch(this.performanceClient.addQueueMeasurement(ft.AcquireTokenFromCache,r.correlationId),n){case Ul.Default:case Ul.AccessToken:case Ul.AccessTokenAndRefreshToken:return or(t.acquireToken.bind(t),ft.SilentCacheClientAcquireToken,this.logger,this.performanceClient,r.correlationId)(r);default:throw zt(Ih)}}async acquireTokenByRefreshToken(t,r){switch(this.performanceClient.addQueueMeasurement(ft.AcquireTokenByRefreshToken,t.correlationId),r){case Ul.Default:case Ul.AccessTokenAndRefreshToken:case Ul.RefreshToken:case Ul.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(t.correlationId);return or(n.acquireToken.bind(n),ft.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(t);default:throw zt(Ih)}}async acquireTokenBySilentIframe(t){this.performanceClient.addQueueMeasurement(ft.AcquireTokenBySilentIframe,t.correlationId);const r=this.createSilentIframeClient(t.correlationId);return or(r.acquireToken.bind(r),ft.SilentIframeClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(t)}async logout(t){const r=this.getRequestCorrelationId(t);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),this.logoutRedirect({correlationId:r,...t})}async logoutRedirect(t){const r=this.getRequestCorrelationId(t);return this.preflightBrowserEnvironmentCheck(fr.Redirect),this.createRedirectClient(r).logout(t)}logoutPopup(t){try{const r=this.getRequestCorrelationId(t);return this.preflightBrowserEnvironmentCheck(fr.Popup),this.createPopupClient(r).logout(t)}catch(r){return Promise.reject(r)}}async clearCache(t){const r=this.getRequestCorrelationId(t);return this.createSilentCacheClient(r).logout(t)}getAllAccounts(t){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts(t):[]}getAccount(t){if(this.logger.trace("getAccount called"),Object.keys(t).length===0)return this.logger.warning("getAccount: No accountFilter provided"),null;const r=this.browserStorage.getAccountInfoFilteredBy(t);return r?(this.logger.verbose("getAccount: Account matching provided filter found, returning"),r):(this.logger.verbose("getAccount: No matching account found, returning null"),null)}getAccountByUsername(t){if(this.logger.trace("getAccountByUsername called"),!t)return this.logger.warning("getAccountByUsername: No username provided"),null;const r=this.browserStorage.getAccountInfoFilteredBy({username:t});return r?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${t}`),r):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)}getAccountByHomeId(t){if(this.logger.trace("getAccountByHomeId called"),!t)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;const r=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:t});return r?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${t}`),r):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)}getAccountByLocalId(t){if(this.logger.trace("getAccountByLocalId called"),!t)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;const r=this.browserStorage.getAccountInfoFilteredBy({localAccountId:t});return r?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${t}`),r):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)}setActiveAccount(t){this.browserStorage.setActiveAccount(t)}getActiveAccount(){return this.browserStorage.getActiveAccount()}async hydrateCache(t,r){this.logger.verbose("hydrateCache called");const n=Wi.createFromAccountInfo(t.account,t.cloudGraphHostName,t.msGraphHost);return this.browserStorage.setAccount(n),t.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(t,r)):this.browserStorage.hydrateCache(t,r)}preflightBrowserEnvironmentCheck(t,r=!1){if(this.logger.verbose("preflightBrowserEnvironmentCheck started"),dct(this.isBrowserEnvironment),cct(t,this.config.system.allowRedirectInIframe),IP(),uct(),NV(this.initialized),t===fr.Redirect&&this.config.cache.cacheLocation===na.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw $i(Nie);(t===fr.Redirect||t===fr.Popup)&&this.preflightInteractiveRequest(!r)}preflightInteractiveRequest(t){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),IP(),t&&this.getBrowserStorage().setInteractionInProgress(!0)}async acquireTokenNative(t,r,n){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ur(mC);return new wv(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(t),this.nativeInternalStorage,t.correlationId).acquireToken(t)}canUseNative(t,r){if(this.logger.trace("canUseNative called"),!ju.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(t.prompt)switch(t.prompt){case qa.NONE:case qa.CONSENT:case qa.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${t.prompt} is not compatible with native flow, returning false`),!1}return!r&&!this.getNativeAccountId(t)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(t){const r=t.account||this.getAccount({loginHint:t.loginHint,sid:t.sid})||this.getActiveAccount();return r&&r.nativeAccountId||""}createPopupClient(t){return new Xct(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,t)}createRedirectClient(t){return new Qct(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,t)}createSilentIframeClient(t){return new nut(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,To.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,t)}createSilentCacheClient(t){return new Uie(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,t)}createSilentRefreshClient(t){return new out(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,t)}createSilentAuthCodeClient(t){return new sut(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,To.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,t)}addEventCallback(t){return this.eventHandler.addEventCallback(t)}removeEventCallback(t){this.eventHandler.removeEventCallback(t)}addPerformanceCallback(t){return this.performanceClient.addPerformanceCallback(t)}removePerformanceCallback(t){return this.performanceClient.removePerformanceCallback(t)}enableAccountStorageEvents(){this.eventHandler.enableAccountStorageEvents()}disableAccountStorageEvents(){this.eventHandler.disableAccountStorageEvents()}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(t){this.logger=t}initializeWrapperLibrary(t,r){this.browserStorage.setWrapperMetadata(t,r)}setNavigationClient(t){this.navigationClient=t}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}getBrowserStorage(){return this.browserStorage}isBrowserEnv(){return this.isBrowserEnvironment}getEventHandler(){return this.eventHandler}getRequestCorrelationId(t){return t!=null&&t.correlationId?t.correlationId:this.isBrowserEnvironment?tp():yt.EMPTY_STRING}async loginRedirect(t){const r=this.getRequestCorrelationId(t);return this.logger.verbose("loginRedirect called",r),this.acquireTokenRedirect({correlationId:r,...t||FV})}loginPopup(t){const r=this.getRequestCorrelationId(t);return this.logger.verbose("loginPopup called",r),this.acquireTokenPopup({correlationId:r,...t||FV})}async acquireTokenSilent(t){const r=this.getRequestCorrelationId(t),n=this.performanceClient.startMeasurement(ft.AcquireTokenSilent,r);n.add({cacheLookupPolicy:t.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(fr.Silent),this.logger.verbose("acquireTokenSilent called",r);const o=t.account||this.getActiveAccount();if(!o)throw ur(hie);const i={clientId:this.config.auth.clientId,authority:t.authority||yt.EMPTY_STRING,scopes:t.scopes,homeAccountIdentifier:o.homeAccountId,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid,shrOptions:t.shrOptions},a=JSON.stringify(i),s=this.activeSilentTokenRequests.get(a);if(typeof s>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",r);const c=or(this.acquireTokenSilentAsync.bind(this),ft.AcquireTokenSilentAsync,this.logger,this.performanceClient,r)({...t,correlationId:r},o).then(l=>(this.activeSilentTokenRequests.delete(a),n.add({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),n.end({success:!0,fromCache:l.fromCache,isNativeBroker:l.fromNativeBroker,cacheLookupPolicy:t.cacheLookupPolicy,requestId:l.requestId}),l)).catch(l=>{throw this.activeSilentTokenRequests.delete(a),n.end({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l});return this.activeSilentTokenRequests.set(a,c),c}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",r),n.discard(),s}async acquireTokenSilentAsync(t,r){var o;this.performanceClient.addQueueMeasurement(ft.AcquireTokenSilentAsync,t.correlationId),this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_START,fr.Silent,t),this.atsAsyncMeasurement=this.performanceClient.startMeasurement(ft.AcquireTokenSilentAsync,t.correlationId),(o=this.atsAsyncMeasurement)==null||o.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility);let n;if(ju.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,t.authenticationScheme)&&r.nativeAccountId){this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform");const i={...t,account:r};n=this.acquireTokenNative(i,To.acquireTokenSilent_silentFlow).catch(async a=>{if(a instanceof Hd&&Ag(a))return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,this.createSilentIframeClient(t.correlationId).acquireToken(t);throw a})}else{this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow");const i=this.createSilentCacheClient(t.correlationId),a=await or(i.initializeSilentRequest.bind(i),ft.InitializeSilentRequest,this.logger,this.performanceClient,t.correlationId)(t,r),s=t.cacheLookupPolicy||Ul.Default;n=or(this.acquireTokenFromCache.bind(this),ft.AcquireTokenFromCache,this.logger,this.performanceClient,a.correlationId)(i,a,s).catch(c=>{if(t.cacheLookupPolicy===Ul.AccessToken)throw c;return IP(),this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_NETWORK_START,fr.Silent,a),or(this.acquireTokenByRefreshToken.bind(this),ft.AcquireTokenByRefreshToken,this.logger,this.performanceClient,a.correlationId)(a,s).catch(l=>{const u=!(l instanceof Zu)&&(l.errorCode===jc.INVALID_GRANT_ERROR||l.errorCode===Ih)||l.errorCode===KE,f=s===Ul.Default||s===Ul.Skip||s===Ul.RefreshTokenAndNetwork;if(u&&f)return this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",t.correlationId),or(this.acquireTokenBySilentIframe.bind(this),ft.AcquireTokenBySilentIframe,this.logger,this.performanceClient,a.correlationId)(a);throw l})})}return n.then(i=>{var a;return this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_SUCCESS,fr.Silent,i),(a=this.atsAsyncMeasurement)==null||a.end({success:!0,fromCache:i.fromCache,isNativeBroker:i.fromNativeBroker,requestId:i.requestId}),i}).catch(i=>{var a;throw this.eventHandler.emitEvent(wr.ACQUIRE_TOKEN_FAILURE,fr.Silent,null,i),(a=this.atsAsyncMeasurement)==null||a.end({errorCode:i.errorCode,subErrorCode:i.subError,success:!1}),i}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibility)})}}const lut=Object.freeze(Object.defineProperty({__proto__:null,StandardController:k4},Symbol.toStringTag,{value:"Module"}));/*! @azure/msal-browser v3.6.0 2023-12-01 */class BN{static async createPublicClientApplication(t){const r=await xct(t);return new BN(t,r)}constructor(t,r){if(r)this.controller=r;else{const n=new t0(t);this.controller=new k4(n)}}async initialize(){return this.controller.initialize()}async acquireTokenPopup(t){return this.controller.acquireTokenPopup(t)}acquireTokenRedirect(t){return this.controller.acquireTokenRedirect(t)}acquireTokenSilent(t){return this.controller.acquireTokenSilent(t)}acquireTokenByCode(t){return this.controller.acquireTokenByCode(t)}addEventCallback(t){return this.controller.addEventCallback(t)}removeEventCallback(t){return this.controller.removeEventCallback(t)}addPerformanceCallback(t){return this.controller.addPerformanceCallback(t)}removePerformanceCallback(t){return this.controller.removePerformanceCallback(t)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(t){return this.controller.getAccount(t)}getAccountByHomeId(t){return this.controller.getAccountByHomeId(t)}getAccountByLocalId(t){return this.controller.getAccountByLocalId(t)}getAccountByUsername(t){return this.controller.getAccountByUsername(t)}getAllAccounts(t){return this.controller.getAllAccounts(t)}handleRedirectPromise(t){return this.controller.handleRedirectPromise(t)}loginPopup(t){return this.controller.loginPopup(t)}loginRedirect(t){return this.controller.loginRedirect(t)}logout(t){return this.controller.logout(t)}logoutRedirect(t){return this.controller.logoutRedirect(t)}logoutPopup(t){return this.controller.logoutPopup(t)}ssoSilent(t){return this.controller.ssoSilent(t)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(t){this.controller.setLogger(t)}setActiveAccount(t){this.controller.setActiveAccount(t)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(t,r){return this.controller.initializeWrapperLibrary(t,r)}setNavigationClient(t){this.controller.setNavigationClient(t)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(t,r){return this.controller.hydrateCache(t,r)}clearCache(t){return this.controller.clearCache(t)}}/*! @azure/msal-browser v3.6.0 2023-12-01 */const cut={initialize:()=>Promise.reject($i(Qi)),acquireTokenPopup:()=>Promise.reject($i(Qi)),acquireTokenRedirect:()=>Promise.reject($i(Qi)),acquireTokenSilent:()=>Promise.reject($i(Qi)),acquireTokenByCode:()=>Promise.reject($i(Qi)),getAllAccounts:()=>[],getAccountByHomeId:()=>null,getAccountByUsername:()=>null,getAccountByLocalId:()=>null,handleRedirectPromise:()=>Promise.reject($i(Qi)),loginPopup:()=>Promise.reject($i(Qi)),loginRedirect:()=>Promise.reject($i(Qi)),logout:()=>Promise.reject($i(Qi)),logoutRedirect:()=>Promise.reject($i(Qi)),logoutPopup:()=>Promise.reject($i(Qi)),ssoSilent:()=>Promise.reject($i(Qi)),addEventCallback:()=>null,removeEventCallback:()=>{},addPerformanceCallback:()=>"",removePerformanceCallback:()=>!1,enableAccountStorageEvents:()=>{},disableAccountStorageEvents:()=>{},getTokenCache:()=>{throw $i(Qi)},getLogger:()=>{throw $i(Qi)},setLogger:()=>{},setActiveAccount:()=>{},getActiveAccount:()=>null,initializeWrapperLibrary:()=>{},setNavigationClient:()=>{},getConfiguration:()=>{throw $i(Qi)},hydrateCache:()=>Promise.reject($i(Qi)),clearCache:()=>Promise.reject($i(Qi))};/*! @azure/msal-browser v3.6.0 2023-12-01 */class uut{static getInteractionStatusFromEvent(t,r){switch(t.eventType){case wr.LOGIN_START:return ea.Login;case wr.SSO_SILENT_START:return ea.SsoSilent;case wr.ACQUIRE_TOKEN_START:if(t.interactionType===fr.Redirect||t.interactionType===fr.Popup)return ea.AcquireToken;break;case wr.HANDLE_REDIRECT_START:return ea.HandleRedirect;case wr.LOGOUT_START:return ea.Logout;case wr.SSO_SILENT_SUCCESS:case wr.SSO_SILENT_FAILURE:if(r&&r!==ea.SsoSilent)break;return ea.None;case wr.LOGOUT_END:if(r&&r!==ea.Logout)break;return ea.None;case wr.HANDLE_REDIRECT_END:if(r&&r!==ea.HandleRedirect)break;return ea.None;case wr.LOGIN_SUCCESS:case wr.LOGIN_FAILURE:case wr.ACQUIRE_TOKEN_SUCCESS:case wr.ACQUIRE_TOKEN_FAILURE:case wr.RESTORE_FROM_BFCACHE:if(t.interactionType===fr.Redirect||t.interactionType===fr.Popup){if(r&&r!==ea.Login&&r!==ea.AcquireToken)break;return ea.None}break}return null}}/*! @azure/msal-react v2.0.8 2023-12-01 */const dut={instance:cut,inProgress:ea.None,accounts:[],logger:new Jh({})},UN=A.createContext(dut);UN.Consumer;/*! @azure/msal-react v2.0.8 2023-12-01 */function jV(e,t){if(e.length!==t.length)return!1;const r=[...t];return e.every(n=>{const o=r.shift();return!n||!o?!1:n.homeAccountId===o.homeAccountId&&n.localAccountId===o.localAccountId&&n.username===o.username})}/*! @azure/msal-react v2.0.8 2023-12-01 */const fut="@azure/msal-react",VV="2.0.8";/*! @azure/msal-react v2.0.8 2023-12-01 */const JE={UNBLOCK_INPROGRESS:"UNBLOCK_INPROGRESS",EVENT:"EVENT"},hut=(e,t)=>{const{type:r,payload:n}=t;let o=e.inProgress;switch(r){case JE.UNBLOCK_INPROGRESS:e.inProgress===ea.Startup&&(o=ea.None,n.logger.info("MsalProvider - handleRedirectPromise resolved, setting inProgress to 'none'"));break;case JE.EVENT:const a=n.message,s=uut.getInteractionStatusFromEvent(a,e.inProgress);s&&(n.logger.info(`MsalProvider - ${a.eventType} results in setting inProgress from ${e.inProgress} to ${s}`),o=s);break;default:throw new Error(`Unknown action type: ${r}`)}const i=n.instance.getAllAccounts();return o!==e.inProgress&&!jV(i,e.accounts)?{...e,inProgress:o,accounts:i}:o!==e.inProgress?{...e,inProgress:o}:jV(i,e.accounts)?e:{...e,accounts:i}};function put({instance:e,children:t}){A.useEffect(()=>{e.initializeWrapperLibrary(rct.React,VV)},[e]);const r=A.useMemo(()=>e.getLogger().clone(fut,VV),[e]),[n,o]=A.useReducer(hut,void 0,()=>({inProgress:ea.Startup,accounts:e.getAllAccounts()}));A.useEffect(()=>{const a=e.addEventCallback(s=>{o({payload:{instance:e,logger:r,message:s},type:JE.EVENT})});return r.verbose(`MsalProvider - Registered event callback with id: ${a}`),e.initialize().then(()=>{e.handleRedirectPromise().catch(()=>{}).finally(()=>{o({payload:{instance:e,logger:r},type:JE.UNBLOCK_INPROGRESS})})}).catch(()=>{}),()=>{a&&(r.verbose(`MsalProvider - Removing event callback ${a}`),e.removeEventCallback(a))}},[e,r]);const i={instance:e,inProgress:n.inProgress,accounts:n.accounts,logger:r};return sr.createElement(UN.Provider,{value:i},t)}/*! @azure/msal-react v2.0.8 2023-12-01 */const mut=()=>A.useContext(UN);function gut(e={}){const{nonce:t,onScriptLoadSuccess:r,onScriptLoadError:n}=e,[o,i]=A.useState(!1),a=A.useRef(r);a.current=r;const s=A.useRef(n);return s.current=n,A.useEffect(()=>{const c=document.createElement("script");return c.src="https://accounts.google.com/gsi/client",c.async=!0,c.defer=!0,c.nonce=t,c.onload=()=>{var l;i(!0),(l=a.current)===null||l===void 0||l.call(a)},c.onerror=()=>{var l;i(!1),(l=s.current)===null||l===void 0||l.call(s)},document.body.appendChild(c),()=>{document.body.removeChild(c)}},[t]),o}const jie=A.createContext(null);function vut({clientId:e,nonce:t,onScriptLoadSuccess:r,onScriptLoadError:n,children:o}){const i=gut({nonce:t,onScriptLoadSuccess:r,onScriptLoadError:n}),a=A.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:i}),[e,i]);return sr.createElement(jie.Provider,{value:a},o)}function yut(){const e=A.useContext(jie);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function but(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const wut={large:40,medium:32,small:20};function Vie({onSuccess:e,onError:t,useOneTap:r,promptMomentNotification:n,type:o="standard",theme:i="outline",size:a="large",text:s,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d,containerProps:h,...p}){const g=A.useRef(null),{clientId:m,scriptLoadedSuccessfully:v}=yut(),y=A.useRef(e);y.current=e;const b=A.useRef(t);b.current=t;const w=A.useRef(n);return w.current=n,A.useEffect(()=>{var E,I,O,D,N,U,B,F,T;if(v)return(O=(I=(E=window==null?void 0:window.google)===null||E===void 0?void 0:E.accounts)===null||I===void 0?void 0:I.id)===null||O===void 0||O.initialize({client_id:m,callback:P=>{var _;if(!(P!=null&&P.credential))return(_=b.current)===null||_===void 0?void 0:_.call(b);const{credential:C,select_by:S}=P;y.current({credential:C,clientId:but(P),select_by:S})},...p}),(U=(N=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||N===void 0?void 0:N.id)===null||U===void 0||U.renderButton(g.current,{type:o,theme:i,size:a,text:s,shape:c,logo_alignment:l,width:u,locale:f,click_listener:d}),r&&((T=(F=(B=window==null?void 0:window.google)===null||B===void 0?void 0:B.accounts)===null||F===void 0?void 0:F.id)===null||T===void 0||T.prompt(w.current)),()=>{var P,_,C;r&&((C=(_=(P=window==null?void 0:window.google)===null||P===void 0?void 0:P.accounts)===null||_===void 0?void 0:_.id)===null||C===void 0||C.cancel())}},[m,v,r,o,i,a,s,c,l,u,f]),sr.createElement("div",{...h,ref:g,style:{height:wut[a],...h==null?void 0:h.style}})}class xut{constructor(t,r){this.env=t,this.org=r}devFeatureEnabled(t){return this.env!=="production"}productFeatureEnabled(t){var r;return!!((r=this.org.productFeatures)!=null&&r.includes(t))}}const Cut=()=>{const e=localStorage.getItem("user");if(!e)return;const t=JSON.parse(e);if(new Date().getTime()>t.expires){Wie();return}return delete t.expires,t},Sut=e=>{localStorage.setItem("user",e?JSON.stringify({...e,expires:Date.now()+864e5}):"")},Wie=()=>{localStorage.removeItem("user")},_ut="142349041982-llg7dorgrll84h4hcgl96qg0td2tglcj.apps.googleusercontent.com",kut=new BN({auth:{clientId:"82f92bae-e2e2-46d6-92ad-d5abf9c6e56e",redirectUri:"https://client.nimble-energy.com"}});function Gie({children:e}){var U;const{isFetching:t,refetch:r}=da({queryKey:["profilePicture"],queryFn:async()=>l(n.id),enabled:!1}),[n,o]=A.useState(Cut()),[i,a]=A.useState(null),s=()=>i,c=()=>n;A.useEffect(()=>{n&&n.profilePicture&&!t&&r()},[]);async function l(B){try{const F=await Mit(B);return a(URL.createObjectURL(F)),!0}catch{a(null)}}const u=async B=>{Sut(B),o(B),B!=null&&B.id&&(B!=null&&B.profilePicture)?await l(B.id):a(null)},f=()=>{Wie(),u(void 0)},d=async B=>{try{const F=await fetch("/auth/ssoLogin",{body:JSON.stringify({jwt:B}),headers:{"Content-Type":"application/json"},method:"post"});if(F.redirected&&(window.location.href=F.url),!F.ok)throw new Error("unable to login");const T=await F.json();return u(T),!0}catch{return!1}},h=async(B,F)=>{try{const T=await fetch(`/auth/${B}`,{body:JSON.stringify(F),headers:{"Content-Type":"application/json"},method:"post"});if(T.redirected&&(window.location.href=T.url),!T.ok)throw new Error("unable to login");const P=await T.json();return u(P),!0}catch{return!1}},p=async()=>{try{const B=await fetch("/auth/refreshUserToken",{body:JSON.stringify(n),headers:{"Content-Type":"application/json "},method:"post"});B.redirected&&(window.location.href=B.url);const F=await B.json();u(F)}catch(B){console.log("error:",B)}},g=async B=>h("google",{idToken:B}),m=()=>!!n,v=async(B,F)=>h("login",{email:B,password:F}),y=async()=>{try{if(!(await fetch("/auth/logout")).ok)throw new Error("something went wrong");return f(),!0}catch{return!1}},b=async B=>h("microsoft",{accessToken:B}),w=async(B,F)=>{try{const T=await fetch("/auth/signup",{body:JSON.stringify({uid:B,password:F}),headers:{"Content-Type":"application/json"},method:"post"});if(T.redirected&&(window.location.href=T.url),!T.ok)throw new Error("unable to signup");const P=await T.json();return u(P),!0}catch{return!1}},E=async(B,F)=>{try{if(!(await fetch("/auth/changePassword",{body:JSON.stringify({currentPassword:B,newPassword:F}),headers:{"Content-Type":"application/json"},method:"post"})).ok)throw new Error("unable to change the password");return!0}catch{return!1}},I=async(B,F)=>{try{if(!(await fetch("/auth/setPassword",{body:JSON.stringify({uid:B,password:F}),headers:{"Content-Type":"application/json"},method:"post"})).ok)throw new Error("unable to set password");return!0}catch{return!1}},O=async B=>{try{const F=await fetch(`/auth/switchOrganization/${B}`);if(F.redirected&&(window.location.href=F.url),!F.ok)throw new Error("unable to refresh JWT");const T=await F.json();return u(T),!0}catch{return!1}},D=async()=>{try{const B=await fetch("/auth/verifyCurrentUserAccountProvider",{method:"get"});if(!B.ok)throw new Error("unable to verify the current user");return await B.json()}catch{return!1}},N={featureChecker:new xut((U={}.DEPLOY_ENV)==null?void 0:U.toLowerCase(),(n==null?void 0:n.organization)??{}),changePassword:E,getUser:c,getUserPicture:s,googleLogin:g,isAuthenticated:m,login:v,logout:y,microsoftLogin:b,refreshUser:p,setPassword:I,signup:w,ssoAuthLogin:d,switchOrganization:O,verifyUserAccountProvider:D};return R(AJ.Provider,{value:N,children:R(vut,{clientId:_ut,children:R(put,{instance:kut,children:e})})})}const Eut=async e=>await fa(mr.UTILITY_CREDENTIALS,{},e),Tut=async(e,t)=>await fa(`${mr.UTILITY_CREDENTIALS}/${e}/changePassword`,{},t),Iut=async()=>await Ao(mr.UTILITY_CREDENTIALS),Aut=async(e,t)=>await Ys(`${mr.UTILITY_CREDENTIALS}/${e}`,{},t),Put="administration",Mut=()=>{const[{data:e,isFetching:t,isError:r}]=qi({queries:[{queryKey:["utilitiesCredentials"],queryFn:Iut,initialData:{data:[]}}]}),n=ii(),o=s=>()=>n(`/billautomation/administration/${s}`),i=[{field:"utility",headerName:"Utility",flex:1,valueGetter:({value:s})=>(s==null?void 0:s.name)??""},{field:"username",headerName:"Username",flex:1},{field:"actions",headerName:"Options",type:"actions",getActions:({row:s})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:o(s.id)},"updateBtn")]}],a=[{name:"New",icon:R(Qa,{}),handleAction:o("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:a}),R(Yn,{columns:i,contextName:Put,csvFilename:"Facilities",dataFetchError:r,loading:t,rows:e.data})]})},Rut=(e={})=>({utility:e.utilityId??"",username:e.username??"",password:e.password??""}),Out=e=>[{placeholder:"Utility",label:"Utility",name:"utilityId",type:"selectInput",required:!0,values:e.map(r=>({label:r.name,value:r.id,disabled:!r.isActive}))},{placeholder:"Username",label:"Username",name:"username",type:"textInput",required:!0}],Dut=()=>[{placeholder:"Password",label:"Password",name:"password",type:"password",required:!0}],Fut=()=>({previousPassword:"",newPassword:"",confirmPassword:""}),Nut=()=>{const e=(r,n)=>r!==n?"Passwords do not match":!0;return[{placeholder:"Previous Password",label:"Previous Password",name:"previousPassword",type:"password",required:!0},{placeholder:"New Password",label:"New Password",name:"newPassword",type:"password",required:!0},{placeholder:"Confirm Password",label:"Confirm Password",name:"confirmPassword",type:"password",required:!0,validate:(r,n)=>e(n.newPassword,r)}]},Lut=({utilityCredentialId:e,onClose:t,open:r})=>{const{control:n,handleSubmit:o,formState:{errors:i},reset:a}=Bn({defaultValues:Fut()}),{mutate:s,isPending:c}=xs({mutationKey:["changePassword"],mutationFn:async f=>{await u(f)},onSuccess:()=>{St.success(bt.CHANGE_PASSWORD_SUCCESS),t(),a()},onError:f=>{St.error(f.status===403?bt.CHANGE_PASSWORD_ERROR:bt.ERROR),a()}}),l=Nut();async function u(f){try{return await Tut(e,{previousPassword:f.previousPassword,newPassword:f.newPassword})}catch(d){throw d}}return R(Cs,{title:"Change Utility Credential Password",maxWidth:"sm",open:r,onClose:t,dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:t,disabled:c,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disabled:c,disableElevation:!0,type:"submit",form:"change-utility-credential-password-form",children:"Change Password"})]}),children:R("form",{onSubmit:o(f=>{s(f)}),id:"change-utility-credential-password-form",children:R(Ot,{container:!0,spacing:2,mt:.25,children:l.map((f,d)=>R(Ot,{item:!0,xs:12,md:12,children:R(Dn,{control:n,fieldConf:f,errors:i})},d))})})})},$ut=({doc:e={},handleBackAction:t})=>{const{getUser:r}=on(),{organizationId:n}=r(),{control:o,formState:{errors:i,isDirty:a},handleSubmit:s,...c}=Bn({defaultValues:Rut(e)}),{data:l}=da({queryKey:["utilities"],queryFn:async()=>await ry(),initialData:{data:[]}}),{mutate:u,isPending:f}=xs({mutationKey:["administrationForm"],mutationFn:async E=>{await(e.id?b:y)(E)},onSuccess:()=>{const{CREATE_SUCCESS:E,UPDATE_SUCCESS:I}=bt;St.success(e.id?I:E),t()},onError:E=>{mi.compatible(E)&&gi(c,E);const{ALREADY_USERNAME_IN_USE:I,ERROR:O}=bt;St.error(E.status===400?I:O)}}),[d,h]=A.useState(!1),[p,g]=A.useState(!1),m=Out(l.data),v=Dut();async function y(E){try{return await Eut({utilityId:E.utilityId,username:E.username,password:E.password,organizationId:n})}catch(I){throw I}}async function b(E){try{return await Aut(e.id,{utilityId:E.utilityId,username:E.username})}catch(I){throw I}}const w=()=>{h(E=>!E)};return xe(nr,{children:[R(_o,{title:"Utility Credential Information",buttons:xe(zr,{children:[R(Ft,{disabled:f||!a,color:"secondary",variant:"contained",onClick:s(E=>{u(E)}),disableElevation:!0,children:e.id?"Update":"Save"}),R(Ft,{disabled:f,color:"secondary",variant:"outlined",onClick:w,children:"Cancel"}),e.id&&R(Ft,{color:"secondary",variant:"outlined",onClick:()=>g(!0),children:"Change Password"})]}),children:R(nr,{children:xe(Ot,{container:!0,spacing:2,children:[m.map((E,I)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:E,errors:i})},I)),!e.id&&v.map((E,I)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:E,errors:i})},I))]})})}),R(Br,{open:d,onClose:w,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:w,renderElement:R(qo,{sx:{color:"red"}})}),e.id&&R(Lut,{open:p,onClose:()=>g(!1),utilityCredentialId:e.id})]})};function cy(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(f){a(f)}}function c(u){try{l(n.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})}function uy(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(u){l=[6,u],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function WV(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function GV(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var But=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function vC(e,t){var r=Uut(e);if(typeof r.path!="string"){var n=e.webkitRelativePath;Object.defineProperty(r,"path",{value:typeof t=="string"?t:typeof n=="string"&&n.length>0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function Uut(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),o=But.get(n);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Hut=[".DS_Store","Thumbs.db"];function zut(e){return cy(this,void 0,void 0,function(){return uy(this,function(t){return eT(e)&&jut(e.dataTransfer)?[2,qut(e.dataTransfer,e.type)]:Vut(e)?[2,Wut(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,Gut(e)]:[2,[]]})})}function jut(e){return eT(e)}function Vut(e){return eT(e)&&eT(e.target)}function eT(e){return typeof e=="object"&&e!==null}function Wut(e){return q5(e.target.files).map(function(t){return vC(t)})}function Gut(e){return cy(this,void 0,void 0,function(){var t;return uy(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return vC(n)})]}})})}function qut(e,t){return cy(this,void 0,void 0,function(){var r,n;return uy(this,function(o){switch(o.label){case 0:return e.items?(r=q5(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Kut))]):[3,2];case 1:return n=o.sent(),[2,qV(qie(n))];case 2:return[2,qV(q5(e.files).map(function(i){return vC(i)}))]}})})}function qV(e){return e.filter(function(t){return Hut.indexOf(t.name)===-1})}function q5(e){if(e===null)return[];for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(n)}return t}function Kut(e){if(typeof e.webkitGetAsEntry!="function")return KV(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Kie(t):KV(e)}function qie(e){return e.reduce(function(t,r){return GV(GV([],WV(t),!1),WV(Array.isArray(r)?qie(r):[r]),!1)},[])}function KV(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var r=vC(t);return Promise.resolve(r)}function Yut(e){return cy(this,void 0,void 0,function(){return uy(this,function(t){return[2,e.isDirectory?Kie(e):Xut(e)]})})}function Kie(e){var t=e.createReader();return new Promise(function(r,n){var o=[];function i(){var a=this;t.readEntries(function(s){return cy(a,void 0,void 0,function(){var c,l,u;return uy(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return c=f.sent(),r(c),[3,4];case 3:return l=f.sent(),n(l),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(Yut)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(s){n(s)})}i()})}function Xut(e){return cy(this,void 0,void 0,function(){return uy(this,function(t){return[2,new Promise(function(r,n){e.file(function(o){var i=vC(o,e.fullPath);r(i)},function(o){n(o)})})]})})}var Qut=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return r.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?n.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function YV(e){return edt(e)||Jut(e)||Xie(e)||Zut()}function Zut(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jut(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function edt(e){if(Array.isArray(e))return K5(e)}function XV(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function QV(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XV(Object(r),!0).forEach(function(n){Yie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XV(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ax(e,t){return ndt(e)||rdt(e,t)||Xie(e,t)||tdt()}function tdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xie(e,t){if(e){if(typeof e=="string")return K5(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K5(e,t)}}function K5(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rdt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,s;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function ndt(e){if(Array.isArray(e))return e}var odt="file-invalid-type",idt="file-too-large",adt="file-too-small",sdt="too-many-files",ldt=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var r=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:odt,message:"File type must be ".concat(r)}},ZV=function(t){return{code:idt,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},JV=function(t){return{code:adt,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},cdt={code:sdt,message:"Too many files"};function Qie(e,t){var r=e.type==="application/x-moz-file"||Qut(e,t);return[r,r?null:ldt(t)]}function Zie(e,t,r){if(Vp(e.size))if(Vp(t)&&Vp(r)){if(e.size>r)return[!1,ZV(r)];if(e.size<t)return[!1,JV(t)]}else{if(Vp(t)&&e.size<t)return[!1,JV(t)];if(Vp(r)&&e.size>r)return[!1,ZV(r)]}return[!0,null]}function Vp(e){return e!=null}function udt(e){var t=e.files,r=e.accept,n=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(c){var l=Qie(c,r),u=Ax(l,1),f=u[0],d=Zie(c,n,o),h=Ax(d,1),p=h[0],g=s?s(c):null;return f&&p&&!g})}function tT(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function C_(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function eW(e){e.preventDefault()}function ddt(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fdt(e){return e.indexOf("Edge/")!==-1}function hdt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return ddt(e)||fdt(e)}function wu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!tT(n)&&s&&s.apply(void 0,[n].concat(i)),tT(n)})}}function pdt(){return"showOpenFilePicker"in window}function mdt(e){if(Vp(e)){var t=Object.entries(e).filter(function(r){var n=Ax(r,2),o=n[0],i=n[1],a=!0;return Jie(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(eae))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(r,n){var o=Ax(n,2),i=o[0],a=o[1];return QV(QV({},r),{},Yie({},i,a))},{});return[{description:"Files",accept:t}]}return e}function gdt(e){if(Vp(e))return Object.entries(e).reduce(function(t,r){var n=Ax(r,2),o=n[0],i=n[1];return[].concat(YV(t),[o],YV(i))},[]).filter(function(t){return Jie(t)||eae(t)}).join(",")}function vdt(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ydt(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Jie(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function eae(e){return/^.*\.[\w]+$/.test(e)}var bdt=["children"],wdt=["open"],xdt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Cdt=["refKey","onChange","onClick"];function Sdt(e){return Edt(e)||kdt(e)||tae(e)||_dt()}function _dt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kdt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Edt(e){if(Array.isArray(e))return Y5(e)}function RP(e,t){return Adt(e)||Idt(e,t)||tae(e,t)||Tdt()}function Tdt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tae(e,t){if(e){if(typeof e=="string")return Y5(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Y5(e,t)}}function Y5(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Idt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,s;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function Adt(e){if(Array.isArray(e))return e}function tW(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function $o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tW(Object(r),!0).forEach(function(n){X5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tW(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X5(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rT(e,t){if(e==null)return{};var r=Pdt(e,t),n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pdt(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var HN=A.forwardRef(function(e,t){var r=e.children,n=rT(e,bdt),o=nae(n),i=o.open,a=rT(o,wdt);return A.useImperativeHandle(t,function(){return{open:i}},[i]),sr.createElement(A.Fragment,null,r($o($o({},a),{},{open:i})))});HN.displayName="Dropzone";var rae={disabled:!1,getFilesFromEvent:zut,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};HN.defaultProps=rae;HN.propTypes={children:ue.func,accept:ue.objectOf(ue.arrayOf(ue.string)),multiple:ue.bool,preventDropOnDocument:ue.bool,noClick:ue.bool,noKeyboard:ue.bool,noDrag:ue.bool,noDragEventsBubbling:ue.bool,minSize:ue.number,maxSize:ue.number,maxFiles:ue.number,disabled:ue.bool,getFilesFromEvent:ue.func,onFileDialogCancel:ue.func,onFileDialogOpen:ue.func,useFsAccessApi:ue.bool,autoFocus:ue.bool,onDragEnter:ue.func,onDragLeave:ue.func,onDragOver:ue.func,onDrop:ue.func,onDropAccepted:ue.func,onDropRejected:ue.func,onError:ue.func,validator:ue.func};var Q5={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function nae(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=$o($o({},rae),e),r=t.accept,n=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,d=t.onDrop,h=t.onDropAccepted,p=t.onDropRejected,g=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,w=t.noClick,E=t.noKeyboard,I=t.noDrag,O=t.noDragEventsBubbling,D=t.onError,N=t.validator,U=A.useMemo(function(){return gdt(r)},[r]),B=A.useMemo(function(){return mdt(r)},[r]),F=A.useMemo(function(){return typeof m=="function"?m:rW},[m]),T=A.useMemo(function(){return typeof g=="function"?g:rW},[g]),P=A.useRef(null),_=A.useRef(null),C=A.useReducer(Mdt,Q5),S=RP(C,2),x=S[0],k=S[1],L=x.isFocused,j=x.isFileDialogActive,z=A.useRef(typeof window<"u"&&window.isSecureContext&&v&&pdt()),Y=function(){!z.current&&j&&setTimeout(function(){if(_.current){var ge=_.current.files;ge.length||(k({type:"closeDialog"}),T())}},300)};A.useEffect(function(){return window.addEventListener("focus",Y,!1),function(){window.removeEventListener("focus",Y,!1)}},[_,j,T,z]);var K=A.useRef([]),Q=function(ge){P.current&&P.current.contains(ge.target)||(ge.preventDefault(),K.current=[])};A.useEffect(function(){return b&&(document.addEventListener("dragover",eW,!1),document.addEventListener("drop",Q,!1)),function(){b&&(document.removeEventListener("dragover",eW),document.removeEventListener("drop",Q))}},[P,b]),A.useEffect(function(){return!n&&y&&P.current&&P.current.focus(),function(){}},[P,y,n]);var q=A.useCallback(function(ie){D?D(ie):console.error(ie)},[D]),J=A.useCallback(function(ie){ie.preventDefault(),ie.persist(),le(ie),K.current=[].concat(Sdt(K.current),[ie.target]),C_(ie)&&Promise.resolve(o(ie)).then(function(ge){if(!(tT(ie)&&!O)){var Pe=ge.length,Fe=Pe>0&&udt({files:ge,accept:U,minSize:a,maxSize:i,multiple:s,maxFiles:c,validator:N}),Ie=Pe>0&&!Fe;k({isDragAccept:Fe,isDragReject:Ie,isDragActive:!0,type:"setDraggedFiles"}),l&&l(ie)}}).catch(function(ge){return q(ge)})},[o,l,q,O,U,a,i,s,c,N]),G=A.useCallback(function(ie){ie.preventDefault(),ie.persist(),le(ie);var ge=C_(ie);if(ge&&ie.dataTransfer)try{ie.dataTransfer.dropEffect="copy"}catch{}return ge&&f&&f(ie),!1},[f,O]),V=A.useCallback(function(ie){ie.preventDefault(),ie.persist(),le(ie);var ge=K.current.filter(function(Fe){return P.current&&P.current.contains(Fe)}),Pe=ge.indexOf(ie.target);Pe!==-1&&ge.splice(Pe,1),K.current=ge,!(ge.length>0)&&(k({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),C_(ie)&&u&&u(ie))},[P,u,O]),X=A.useCallback(function(ie,ge){var Pe=[],Fe=[];ie.forEach(function(Ie){var Oe=Qie(Ie,U),$e=RP(Oe,2),et=$e[0],Ze=$e[1],Ne=Zie(Ie,a,i),Qe=RP(Ne,2),Xe=Qe[0],rt=Qe[1],ht=N?N(Ie):null;if(et&&Xe&&!ht)Pe.push(Ie);else{var At=[Ze,rt];ht&&(At=At.concat(ht)),Fe.push({file:Ie,errors:At.filter(function(Qt){return Qt})})}}),(!s&&Pe.length>1||s&&c>=1&&Pe.length>c)&&(Pe.forEach(function(Ie){Fe.push({file:Ie,errors:[cdt]})}),Pe.splice(0)),k({acceptedFiles:Pe,fileRejections:Fe,type:"setFiles"}),d&&d(Pe,Fe,ge),Fe.length>0&&p&&p(Fe,ge),Pe.length>0&&h&&h(Pe,ge)},[k,s,U,a,i,c,d,h,p,N]),te=A.useCallback(function(ie){ie.preventDefault(),ie.persist(),le(ie),K.current=[],C_(ie)&&Promise.resolve(o(ie)).then(function(ge){tT(ie)&&!O||X(ge,ie)}).catch(function(ge){return q(ge)}),k({type:"reset"})},[o,X,q,O]),ee=A.useCallback(function(){if(z.current){k({type:"openDialog"}),F();var ie={multiple:s,types:B};window.showOpenFilePicker(ie).then(function(ge){return o(ge)}).then(function(ge){X(ge,null),k({type:"closeDialog"})}).catch(function(ge){vdt(ge)?(T(ge),k({type:"closeDialog"})):ydt(ge)?(z.current=!1,_.current?(_.current.value=null,_.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):q(ge)});return}_.current&&(k({type:"openDialog"}),F(),_.current.value=null,_.current.click())},[k,F,T,v,X,q,B,s]),re=A.useCallback(function(ie){!P.current||!P.current.isEqualNode(ie.target)||(ie.key===" "||ie.key==="Enter"||ie.keyCode===32||ie.keyCode===13)&&(ie.preventDefault(),ee())},[P,ee]),se=A.useCallback(function(){k({type:"focus"})},[]),pe=A.useCallback(function(){k({type:"blur"})},[]),ce=A.useCallback(function(){w||(hdt()?setTimeout(ee,0):ee())},[w,ee]),ne=function(ge){return n?null:ge},he=function(ge){return E?null:ne(ge)},oe=function(ge){return I?null:ne(ge)},le=function(ge){O&&ge.stopPropagation()},de=A.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ge=ie.refKey,Pe=ge===void 0?"ref":ge,Fe=ie.role,Ie=ie.onKeyDown,Oe=ie.onFocus,$e=ie.onBlur,et=ie.onClick,Ze=ie.onDragEnter,Ne=ie.onDragOver,Qe=ie.onDragLeave,Xe=ie.onDrop,rt=rT(ie,xdt);return $o($o(X5({onKeyDown:he(wu(Ie,re)),onFocus:he(wu(Oe,se)),onBlur:he(wu($e,pe)),onClick:ne(wu(et,ce)),onDragEnter:oe(wu(Ze,J)),onDragOver:oe(wu(Ne,G)),onDragLeave:oe(wu(Qe,V)),onDrop:oe(wu(Xe,te)),role:typeof Fe=="string"&&Fe!==""?Fe:"presentation"},Pe,P),!n&&!E?{tabIndex:0}:{}),rt)}},[P,re,se,pe,ce,J,G,V,te,E,I,n]),ve=A.useCallback(function(ie){ie.stopPropagation()},[]),we=A.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ge=ie.refKey,Pe=ge===void 0?"ref":ge,Fe=ie.onChange,Ie=ie.onClick,Oe=rT(ie,Cdt),$e=X5({accept:U,multiple:s,type:"file",style:{display:"none"},onChange:ne(wu(Fe,te)),onClick:ne(wu(Ie,ve)),tabIndex:-1},Pe,_);return $o($o({},$e),Oe)}},[_,r,s,te,n]);return $o($o({},x),{},{isFocused:L&&!n,getRootProps:de,getInputProps:we,rootRef:P,inputRef:_,open:ne(ee)})}function Mdt(e,t){switch(t.type){case"focus":return $o($o({},e),{},{isFocused:!0});case"blur":return $o($o({},e),{},{isFocused:!1});case"openDialog":return $o($o({},Q5),{},{isFileDialogActive:!0});case"closeDialog":return $o($o({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return $o($o({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return $o($o({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return $o({},Q5);default:return e}}function rW(){}const Rdt="billupload",Odt=()=>{const[e,t]=A.useState(!1),[r,n]=A.useState(""),[o,i]=A.useState([]),{getRootProps:a,getInputProps:s,open:c}=nae({onDrop:g=>{i([...o,...g])},accept:{"image/png":[".png"],"image/jpeg":[".jpg"],"application/pdf":[".pdf"]},noClick:!0,noKeyboard:!0}),l=g=>n(g),u=()=>{t(!1)},f=()=>{i(o.filter(g=>g.lastModified.toString()!==r)),t(!1),n("")},{mutate:d,isPending:h}=xs({mutationKey:["uploadBillFiles"],mutationFn:async g=>await MGe({files:g}),onSuccess:()=>{i([]),St.success(bt.UPLOAD_FILES_SUCCESS)},onError:()=>{St.error(bt.UPLOAD_FILES_ERROR)}}),p=[{field:"path",headerName:"File Path",flex:1},{field:"size",headerName:"File Size",flex:1,valueFormatter:({value:g})=>`${(g/1024).toFixed(2)} KB`},{field:"type",headerName:"File Type",flex:1},{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:g})=>[R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{n(g.toString()),t(!0)},color:"inherit"},"delete")]}];return xe(zr,{children:[xe(Jt,{direction:"column",spacing:3,justifyContent:"space-between",children:[xe(Jt,{direction:"row",spacing:3,justifyContent:"space-between",sx:{alignItems:"center",border:2,borderColor:"grey.300",borderRadius:1,borderStyle:"dashed",p:2},...a(),children:[xe(Jt,{direction:"column",spacing:1,children:[R(jt,{variant:"h6",children:"Drop your bill files here"}),R(jt,{variant:"body2",sx:{color:"grey.500"},gutterBottom:!1,children:"Accepted file types: PDF, JPG, PNG"}),R(jt,{variant:"body2",children:"Each file should contain only one bill or consolidated bill for a single utility"})]}),R(Ft,{variant:"contained",color:"primary",disableElevation:!0,onClick:c,children:"Select Files"}),R("input",{...s()})]}),R(Yn,{checkboxSelection:!1,contextName:Rdt,columns:p,csvFilename:"Bills Upload",getRowId:g=>g.lastModified.toString(),handleSelectionChange:l,rows:o,showToolbar:!1}),R(Ft,{variant:"contained",color:"secondary",disabled:o.length===0||h,disableElevation:!0,onClick:()=>d(o),children:"Upload Bill Files"}),R(Br,{open:e,onClose:u,message:"Are you sure you want to remove this file?",primaryButtonLabel:"Yes",onPrimaryButtonClicked:f,secondaryButtonLabel:"No",onSecondaryButtonClicked:u,renderElement:R(oo,{sx:{color:"error.main"}})})]}),R(Yh,{open:h,children:R(Ri,{})})]})};/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ddt=new Set(["children","localName","ref","style","className"]),nW=new WeakMap,Fdt=(e,t,r,n,o)=>{const i=o==null?void 0:o[t];i===void 0||r===n?(e[t]=r,r==null&&t in HTMLElement.prototype&&e.removeAttribute(t)):((a,s,c)=>{let l=nW.get(a);l===void 0&&nW.set(a,l=new Map);let u=l.get(s);c!==void 0?u===void 0?(l.set(s,u={handleEvent:c}),a.addEventListener(s,u)):u.handleEvent=c:u!==void 0&&(l.delete(s),a.removeEventListener(s,u))})(e,i,r)},Ndt=({react:e,tagName:t,elementClass:r,events:n,displayName:o})=>{const i=new Set(Object.keys(n??{})),a=e.forwardRef((s,c)=>{const l=e.useRef(null),u=e.useRef(null),f={},d={};for(const[h,p]of Object.entries(s))Ddt.has(h)?f[h==="className"?"class":h]=p:i.has(h)||h in r.prototype?d[h]=p:f[h]=p;return e.useLayoutEffect(()=>{if(u.current!==null){for(const h in d)Fdt(u.current,h,s[h],l.current?l.current[h]:void 0,n);l.current=s}}),e.useLayoutEffect(()=>{var h;(h=u.current)==null||h.removeAttribute("defer-hydration")},[]),f.suppressHydrationWarning=!0,e.createElement(t,{...f,ref:e.useCallback(h=>{u.current=h,typeof c=="function"?c(h):c!==null&&(c.current=h)},[c])})});return a.displayName=o??r.name,a};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ldt=e=>(t,r)=>{r!==void 0?r.addInitializer(()=>{customElements.define(e,t)}):customElements.define(e,t)};/**
 * @license
 * Copyright 2019 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const hk=globalThis,zN=hk.ShadowRoot&&(hk.ShadyCSS===void 0||hk.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,jN=Symbol(),oW=new WeakMap;let oae=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==jN)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o;const r=this.t;if(zN&&t===void 0){const n=r!==void 0&&r.length===1;n&&(t=oW.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&oW.set(r,t))}return t}toString(){return this.cssText}};const $dt=e=>new oae(typeof e=="string"?e:e+"",void 0,jN),Bdt=(e,...t)=>{const r=e.length===1?e[0]:t.reduce((n,o,i)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[i+1],e[0]);return new oae(r,e,jN)},Udt=(e,t)=>{if(zN)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(const r of t){const n=document.createElement("style"),o=hk.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=r.cssText,e.appendChild(n)}},iW=zN?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(const n of t.cssRules)r+=n.cssText;return $dt(r)})(e):e;/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const{is:Hdt,defineProperty:zdt,getOwnPropertyDescriptor:jdt,getOwnPropertyNames:Vdt,getOwnPropertySymbols:Wdt,getPrototypeOf:Gdt}=Object,Wh=globalThis,aW=Wh.trustedTypes,qdt=aW?aW.emptyScript:"",OP=Wh.reactiveElementPolyfillSupport,_w=(e,t)=>e,nT={toAttribute(e,t){switch(t){case Boolean:e=e?qdt:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},VN=(e,t)=>!Hdt(e,t),sW={attribute:!0,type:String,converter:nT,reflect:!1,hasChanged:VN};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Wh.litPropertyMetadata??(Wh.litPropertyMetadata=new WeakMap);class Pg extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=sW){if(r.state&&(r.attribute=!1),this._$Ei(),this.elementProperties.set(t,r),!r.noAccessor){const n=Symbol(),o=this.getPropertyDescriptor(t,n,r);o!==void 0&&zdt(this.prototype,t,o)}}static getPropertyDescriptor(t,r,n){const{get:o,set:i}=jdt(this.prototype,t)??{get(){return this[r]},set(a){this[r]=a}};return{get(){return o==null?void 0:o.call(this)},set(a){const s=o==null?void 0:o.call(this);i.call(this,a),this.requestUpdate(t,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??sW}static _$Ei(){if(this.hasOwnProperty(_w("elementProperties")))return;const t=Gdt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_w("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_w("properties"))){const r=this.properties,n=[...Vdt(r),...Wdt(r)];for(const o of n)this.createProperty(o,r[o])}const t=this[Symbol.metadata];if(t!==null){const r=litPropertyMetadata.get(t);if(r!==void 0)for(const[n,o]of r)this.elementProperties.set(n,o)}this._$Eh=new Map;for(const[r,n]of this.elementProperties){const o=this._$Eu(r,n);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const r=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const o of n)r.unshift(iW(o))}else t!==void 0&&r.push(iW(t));return r}static _$Eu(t,r){const n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(r=>this.enableUpdating=r),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(r=>r(this))}addController(t){var r;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((r=t.hostConnected)==null||r.call(t))}removeController(t){var r;(r=this._$EO)==null||r.delete(t)}_$E_(){const t=new Map,r=this.constructor.elementProperties;for(const n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Udt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostConnected)==null?void 0:n.call(r)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(r=>{var n;return(n=r.hostDisconnected)==null?void 0:n.call(r)})}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$EC(t,r){var i;const n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){const a=(((i=n.converter)==null?void 0:i.toAttribute)!==void 0?n.converter:nT).toAttribute(r,n.type);this._$Em=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$Em=null}}_$AK(t,r){var i;const n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const a=n.getPropertyOptions(o),s=typeof a.converter=="function"?{fromAttribute:a.converter}:((i=a.converter)==null?void 0:i.fromAttribute)!==void 0?a.converter:nT;this._$Em=o,this[o]=s.fromAttribute(r,a.type),this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??VN)(this[t],r))return;this.P(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,r,n){this._$AL.has(t)||this._$AL.set(t,r),n.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,a]of this._$Ep)this[i]=a;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[i,a]of o)a.wrapped!==!0||this._$AL.has(i)||this[i]===void 0||this.P(i,this[i],a)}let t=!1;const r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),(n=this._$EO)==null||n.forEach(o=>{var i;return(i=o.hostUpdate)==null?void 0:i.call(o)}),this.update(r)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(r)}willUpdate(t){}_$AE(t){var r;(r=this._$EO)==null||r.forEach(n=>{var o;return(o=n.hostUpdated)==null?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(r=>this._$EC(r,this[r]))),this._$EU()}updated(t){}firstUpdated(t){}}Pg.elementStyles=[],Pg.shadowRootOptions={mode:"open"},Pg[_w("elementProperties")]=new Map,Pg[_w("finalized")]=new Map,OP==null||OP({ReactiveElement:Pg}),(Wh.reactiveElementVersions??(Wh.reactiveElementVersions=[])).push("2.0.4");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Kdt={attribute:!0,type:String,converter:nT,reflect:!1,hasChanged:VN},Ydt=(e=Kdt,t,r)=>{const{kind:n,metadata:o}=r;let i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),i.set(r.name,e),n==="accessor"){const{name:a}=r;return{set(s){const c=t.get.call(this);t.set.call(this,s),this.requestUpdate(a,c,e)},init(s){return s!==void 0&&this.P(a,void 0,e),s}}}if(n==="setter"){const{name:a}=r;return function(s){const c=this[a];t.call(this,s),this.requestUpdate(a,c,e)}}throw Error("Unsupported decorator location: "+n)};function Qr(e){return(t,r)=>typeof r=="object"?Ydt(e,t,r):((n,o,i)=>{const a=o.hasOwnProperty(i);return o.constructor.createProperty(i,a?{...n,wrapped:!0}:n),a?Object.getOwnPropertyDescriptor(o,i):void 0})(e,t,r)}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function yC(e){return Qr({...e,state:!0,attribute:!1})}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const lW=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,r),r);/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */function WN(e,t){return(r,n,o)=>{const i=a=>{var s;return((s=a.renderRoot)==null?void 0:s.querySelector(e))??null};if(t){const{get:a,set:s}=typeof n=="object"?r:o??(()=>{const c=Symbol();return{get(){return this[c]},set(l){this[c]=l}}})();return lW(r,n,{get(){let c=a.call(this);return c===void 0&&(c=i(this),(c!==null||this.hasUpdated)&&s.call(this,c)),c}})}return lW(r,n,{get(){return i(this)}})}}const GN=(e,t)=>{let r="The dashboard component encountered an error";typeof(t==null?void 0:t.dashboardId)=="string"&&(r+=` for dashboard with id ${t.dashboardId}`),typeof(t==null?void 0:t.dashboardSlug)=="string"&&(r+=` for dashboard with slug ${t.dashboardSlug}`),typeof(t==null?void 0:t.container)=="string"&&(r+=` in container ${t.container}`),e&&(r+=`:
${e}`,console.warn(r))},Xdt=e=>{let t=!1,r="";const o=(document.body||document.documentElement).style,i={svg:!!("createElementNS"in document&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),flexbox:o.webkitFlexWrap===""||o.flexWrap==="",postMessage:!!window.postMessage},a=["svg","flexbox","postMessage"];for(const u of a)i[u]||(t=!0,e.browserNotSupported=e.browserNotSupported||[],e.browserNotSupported.push(u),r+=`Your browser does not support: ${u}
`);const s=window.navigator.userAgent,c=s.includes("MSIE"),l=s.includes("Trident/");(c||l)&&(t=!0,r="IE is not supported."),t&&GN(r)},cc={appServer:"https://app.luzmo.com/",apiHost:"https://api.luzmo.com/",dashboardId:null,dashboardSlug:null,container:null,key:null,token:null,language:"auto",qeVersion:null,editMode:null,screenMode:null,switchScreenModeOnResize:!0,itemId:null,mainColor:"",accentColor:"",itemDimensions:{width:"auto",height:"auto"},loaderBackground:"#f9f9f9",loaderFontColor:"#5a5a5a",loaderSpinnerColor:"rgba(255, 165, 0, 0.7)",loaderSpinnerBackground:"rgba(169, 169, 169, 0.14)",timezoneId:null,contextId:null},iae=[{mode:"mobile",width:[150,767]},{mode:"tablet",width:[768,1199]},{mode:"desktop",width:[1200,1599]},{mode:"largeScreen",width:[1600,9999]},{mode:"fixed",width:[]}],cW={initializing:{en:"Initializing...",nl:"Laden...",fr:"Chargement..."},errorDashboard:{en:"Oops, we could not load this dashboard!",nl:"Oeps, we konden het dashboard niet laden.",fr:"Le chargement a echoué."},errorItem:{en:"Oops, we could not load this item!",nl:"Oeps, we konden de grafiek niet laden.",fr:"Le chargement a echoué."}},kw=e=>e?e.endsWith("/")?e:`${e}/`:"",hb=e=>e?e.endsWith("/")?e.slice(0,-1):e:"",Qdt=(e,t,r,n)=>{var s;const o=(c,l)=>{var g;const u=c.users.find(m=>m.id===l.id),f=u&&u.userAccessRight?{flagRead:u.userAccessRight.flagRead,flagUse:u.userAccessRight.flagUse,flagModify:u.userAccessRight.flagModify,flagOwn:u.userAccessRight.flagOwn}:{flagRead:!1,flagUse:!1,flagModify:!1,flagOwn:!1},h=c.groups.filter(m=>l.userGroups.includes(m.id)||m.public===!0).map(m=>{if(m.groupAccessRight)return m.groupAccessRight});for(const m of h)!f.flagRead&&m.flagRead&&(f.flagRead=m.flagRead),!f.flagUse&&m.flagUse&&(f.flagUse=m.flagUse),!f.flagModify&&m.flagModify&&(f.flagModify=m.flagModify),!f.flagOwn&&m.flagOwn&&(f.flagOwn=m.flagOwn);const p=((g=c.integrations)==null?void 0:g.length)>0?c.integrations.map(m=>{if(m.integrationAccessRight)return m.integrationAccessRight}):[];for(const m of p)!f.flagRead&&m.flagRead&&(f.flagRead=m.flagRead),!f.flagUse&&m.flagUse&&(f.flagUse=m.flagUse),!f.flagModify&&m.flagModify&&(f.flagModify=m.flagModify);return f},i=(c,l)=>{if(c==null)return"";if(typeof c!="object"||Object.keys(c).length===0)return typeof c=="object"&&Object.keys(c).length===0?"":c;let u;return u=l&&c[l]?c[l]:c[Object.keys(c)[0]],u==null&&(u=""),u},a=[];for(const c of e){const l={accessibleBy:[],accessRights:o(c,r),id:c.id,modifiedAt:c.modified_at,name:i(c.name,n.language),slug:null,tags:c.tags.map(p=>p.tag).sort((p,g)=>p.localeCompare(g))},u=c.integrations.find(p=>p.id===t);(s=u==null?void 0:u.integrationAccessRight)!=null&&s.slug&&(l.slug=u.integrationAccessRight.slug);const f=c.users.map(p=>({model:"User",id:p.id,name:i(p.name,r.locale_id)})),d=c.groups.map(p=>({model:"Group",id:p.id,name:i(p.name,r.locale_id)||{}})),h=c.integrations.map(p=>({model:"Integration",id:p.id,name:i(p.name,r.locale_id)||{}}));l.accessibleBy=[...f,...d,...h],a.push(l)}return a},Zdt="0.0.0-shared-luzmo",Jdt=e=>{const t=/^(%20|\s)*(javascript|data)/im,r=/[^\u0020-\u007E]/gim,n=/^([^:]+):/gm,o=new Set([".","/"]),i=l=>o.has(l[0]);if(!e)return"about:blank";const a=e.replaceAll(r,"").trim();if(i(a))return a;const s=a.match(n);if(!s)return a;const c=s[0];return t.test(c)?"about:blank":a},uW=e=>JSON.parse(JSON.stringify(e)),eft=e=>e&&typeof e=="object",Z5=(e,t)=>(Object.entries(t).forEach(([r,n])=>{r in e?e[r]===void 0?e[r]=n:e[r]=eft(n)?Z5(e[r],n):e[r]:e[r]=n}),e),E0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)}),dW=e=>{const t=[],{appServer:r,language:n,qeVersion:o,loaderBackground:i,loaderSpinnerColor:a,loaderSpinnerBackground:s,loaderFontColor:c,screenMode:l,key:u,token:f,timezoneId:d,itemEmbedding:h,itemDimensions:p,dashboardId:g,dashboardSlug:m,itemId:v,mainColor:y,accentColor:b,editMode:w}=e.params;n&&n!=="auto"&&t.push("language="+n),o&&t.push(`qe_version=${o}`),i&&t.push(`ldrbg=${i}`),c&&t.push(`ldrftclr=${c}`),a&&t.push(`ldrspclr=${a}`),s&&t.push(`ldrspbg=${s}`),y&&t.push(`mainColor=${y}`),b&&t.push(`accentColor=${b}`),l&&l!=="auto"&&t.push("screenMode="+l),d&&t.push("timezoneId="+d),h&&p&&p.width&&t.push("width="+p.width),h&&p&&p.height&&t.push("height="+p.height),w&&t.push("editMode="+w);const E=u&&f?"#"+u+":"+f:"";t.push("version="+(e.VERSION||Zdt));const I=h?`${r}i/${g||m}/${v}?${encodeURIComponent(t.join("&"))}${E}`:`${r}i/${g||m}?${encodeURIComponent(t.join("&"))}${E}`;return Jdt(I)},fW=e=>{let t;(e.params.error||e.browserNotSupported.length>0)&&(e.params.error=!0,e.browserNotSupported&&(t="Browser is not supported."));const r=cW.initializing[e.params.language]||cW.initializing.en;return e.browserNotSupported||e.params.error?{loadingMsg:r,errorMsg:t}:{loadingMsg:r,errorMsg:""}};function Tp(e,t,r){e.promises[t]&&(e.promises[t].resolve(r),delete e.promises[t])}function S_(e,t,r){e.promises[t]&&(e.promises[t].reject(r),delete e.promises[t])}function aae(e){const t={};return e.params.loaderBackground&&!e.iframeLoaded&&(t.background=e.params.loaderBackground),t}function tft(e){var o;const t=((o=e.params.itemDimensions)==null?void 0:o.height)||cc.itemDimensions.height,r=e.params.itemEmbedding&&t!=="auto";return{display:e.iframeLoaded?"none":"",height:`${r?t:e.minHeight}px`}}function rft(e){var r,n;const t=e.params.loaderBackground||cc.loaderBackground;if(e.params.itemEmbedding){e.loaderSize=24,e.borderWidth=4,e.minHeight=200;const o=((r=e.params.itemDimensions)==null?void 0:r.width)||cc.itemDimensions.width,i=((n=e.params.itemDimensions)==null?void 0:n.height)||cc.itemDimensions.height,a=o!=="auto",s=i!=="auto";return{background:t,width:a?`${o}px`:"100%",height:`${s?i:"200"}px`,"min-height":s?"":"200px"}}return{background:t}}function nft(e){const{loaderSpinnerColor:t,loaderSpinnerBackground:r}=cc,n=pW(e.borderWidth,e.params.loaderSpinnerColor||t),o=pW(e.borderWidth,e.params.loaderSpinnerBackground||r),i=`${e.loaderSize}px`;return{"border-top":n,"border-right":n,"border-bottom":o,"border-left":o,width:i,height:i}}function oft(e){var i;const t=((i=e.params.itemDimensions)==null?void 0:i.height)||cc.itemDimensions.height,r=e.params.itemEmbedding&&t!=="auto",n=a=>`${(a-e.loaderSize-32)/2}px`;return{padding:`${e.params.itemId?n(r?Number.parseInt(`${t}`,10):e.minHeight):"128px"} 16px`}}function hW(e){var o,i;const t=((o=e.params.itemDimensions)==null?void 0:o.height)||cc.itemDimensions.height,r=((i=e.params.itemDimensions)==null?void 0:i.width)||cc.itemDimensions.width;e.params.itemEmbedding&&t!=="auto"?e.iframeHeight=`${t}px`:e.params.itemEmbedding?e.iframeHeight="200px":["editFull","editLimited"].includes(e.params.editMode)?e.iframeHeight="100%":e.iframeHeight="400px",e.iframeWidth=e.params.itemEmbedding&&r!=="auto"?`${r}px`:"100%";const n={height:e.iframeHeight,width:e.iframeWidth};return e.iframeLoaded?n.opacity=1:e.error?(n.opacity=1,n.width="100%",n.height="400px"):n.opacity=0,n}function pW(e,t){return`${e}px solid ${t}`}const ift=(e,t)=>{e!=null&&e.contentWindow&&e.contentWindow.location.replace(t)},mW=(e,t,r)=>{const n=E0();return t!=null&&t.contentWindow?(t.contentWindow.postMessage({action:"exportDashboard",format:r||"png",_version:e.VERSION,requestId:n},"*"),new Promise((o,i)=>{e.promises[n]={resolve:o,reject:i},setTimeout(()=>{if(e.promises[n]){const a="exportDashboard request timed out.";e.promises[n].reject(new Error(a)),delete e.promises[n]}},12e5)})):Promise.reject(new Error("Cannot retrieve contentWindow."))},aft=e=>{if((e.currentAuthKey??e.authKey)&&(e.currentAuthToken??e.authToken)){const t=new Promise((r,n)=>{(()=>{try{window.fetch(`${kw(e.params.apiHost)}0.1.0/authorization`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",body:JSON.stringify({action:"get",version:"0.1.0",key:e.currentAuthKey??e.authKey,token:e.currentAuthToken??e.authToken,find:{where:{id:e.authKey},attributes:["id","integration_id"],include:[{model:"User",attributes:["id","name","locale_id"],include:[{model:"Group"}]}]}})}).then(i=>i.json()).then(i=>{!i||!i.rows||i.rows.length===0||!i.rows[0].user?n("Authorization failed, please check authKey and authToken. If the problem persists, please contact support@luzmo.com."):(i.rows[0].user.userGroups=i.rows[0].user.groups.map(a=>a.id),delete i.rows[0].user.groups,r({integrationId:i.rows[0].integration_id,user:i.rows[0].user}))})}catch(o){n(o)}})()});return new Promise((r,n)=>void(()=>{try{t.then(o=>{window.fetch(`${kw(e.params.apiHost)}0.1.0/securable`,{method:"POST",mode:"cors",cache:"no-cache",headers:{"Content-Type":"application/json"},redirect:"follow",body:JSON.stringify({action:"get",version:"0.1.0",key:e.currentAuthKey??e.authKey,token:e.currentAuthToken??e.authToken,find:{where:{type:"dashboard",is_variant:!1},attributes:["id","name","modified_at"],order:[["modified_at","desc"]],include:[{model:"Tag",attributes:["tag"]},{model:"User",attributes:["id","name"]},{model:"Group",attributes:["id","name","public"]},{model:"Integration",attributes:["id","name"]}]}})}).then(a=>a.json()).then(a=>{const s=a.rows.length>0?Qdt(a.rows,o.integrationId,o.user,e):[];r(s)})}).catch(o=>{n(o)})}catch(o){n(o)}})())}throw new Error("No authKey or authToken found in the luzmo-dashboard component.")},sft=(e,t,r)=>{if(t!=null&&t.contentWindow){const n=E0();return t.contentWindow.postMessage({action:"getData",id:r,_version:e.VERSION,requestId:n},"*"),new Promise((o,i)=>{e.promises[n]={resolve:o,reject:i},setTimeout(()=>{if(e.promises[n]){const a="getData request timed out.";e.promises[n].reject(new Error(a)),delete e.promises[n]}},2e3)})}return Promise.reject(new Error("Cannot retrieve contentWindow."))},lft=(e,t)=>{if(t!=null&&t.contentWindow){const r=E0();return t.contentWindow.postMessage({action:"getFilters",_version:e.VERSION,requestId:r},"*"),new Promise((n,o)=>{e.promises[r]={resolve:n,reject:o},setTimeout(()=>{if(e.promises[r]){const i="getFilters request timed out.";e.promises[r].reject(new Error(i)),delete e.promises[r]}},2e3)})}return Promise.reject(new Error("Cannot retrieve contentWindow."))},gW=(e,t,r)=>t?(t.contentWindow.postMessage({action:"refreshData",id:r??null,_version:e.VERSION},"*"),Promise.resolve()):Promise.reject(new Error("Cannot retrieve contentWindow.")),cft=(e,t)=>t?(t.contentWindow.postMessage({action:"reloadDashboard",_version:e.VERSION},"*"),Promise.resolve()):Promise.reject(new Error("Cannot retrieve contentWindow.")),uft=(e,t,r,n)=>t?(t.contentWindow.postMessage({action:"setAuthorization",key:r,token:n,_version:e.VERSION},"*"),Promise.resolve()):Promise.reject(new Error("Cannot retrieve contentWindow.")),dft=(e,t,r)=>{if(t&&t.contentWindow){const n=E0();return e.params.editMode===r?Promise.reject(new Error("editMode parameter is currently already set to "+r)):r!=="editFull"&&r!=="editLimited"&&r!=="view"?Promise.reject(new Error("The editMode parameter must be one of the following values: 'editFull', 'editLimited' or 'view'.")):(t.contentWindow.postMessage({action:"setEditMode",editMode:r,_version:e.VERSION,requestId:n},"*"),new Promise((o,i)=>{e.promises[n]={resolve:o,reject:i}}))}return Promise.reject(new Error("Cannot retrieve contentWindow."))},fft=(e,t,r,n)=>{if(t){const o=E0();return t.contentWindow.postMessage({action:"setFilters",itemId:r,filters:n,_version:e.VERSION,requestId:o},"*"),new Promise((i,a)=>{e.promises[o]={resolve:i,reject:a},setTimeout(()=>{if(e.promises[o]){const s="setFilters request timed out.";e.promises[o].reject(new Error(s)),delete e.promises[o]}},2e3)})}return Promise.reject()},hft=(e,t,r)=>{if(t){const n=E0();return t.contentWindow.postMessage({action:"setPreview",preview:r,requestId:n,_version:e.VERSION},"*"),new Promise((o,i)=>{e.promises[n]={resolve:o,reject:i},setTimeout(()=>{if(e.promises[n]){const a="setPreview request timed out.";e.promises[n].reject(new Error(a)),delete e.promises[n]}},2e3)})}return Promise.reject(new Error("Cannot retrieve contentWindow."))},pk=e=>{var c,l,u,f,d,h,p,g;if(!e.dimensions){e.params.error=!0,GN("Got no valid dimensions.",e.params);return}const t=Object.keys(e.dimensions),r=[];let n,o=0,i=0;if(!e.params.switchScreenModeOnResize&&e.currentScreenMode&&(e.params.screenMode=e.currentScreenMode),e.dimensions&&(t==null?void 0:t[0])==="fixed")n="fixed",o=e.dimensions.fixed[0],i=e.dimensions.fixed[1];else{const m=["mobile","tablet","desktop","largeScreen"];if(e.params.itemEmbedding){const[v]=t;let y=uW(v);for(const b of m){const w=t.find(E=>E===b);w?y=uW(w):e.dimensions[b]=e.dimensions[y]}}for(const v of t)if(m.includes(v)){const y=iae.find(b=>b.mode===v);r.push({...y,height:e.dimensions[v][1]||50})}if(r.map(v=>v.mode).includes(e.params.screenMode)||(e.params.screenMode="auto"),e.params.screenMode==="auto"){r.sort((v,y)=>m.indexOf(v.mode)-m.indexOf(y.mode));for(const v of r){const[y,b]=v.width;e.params.itemEmbedding&&e.params.itemDimensions&&e.params.itemDimensions.width!=="auto"&&e.params.itemDimensions.height==="auto"?y<e.params.itemDimensions.width&&(n=v.mode,o=Number.parseInt(e.params.itemDimensions.width,10),i=e.dimensions[n][1]):y<e.containerWidth&&(n=v.mode,e.params.itemEmbedding?(o=(c=e.params.itemDimensions)!=null&&c.width&&((l=e.params.itemDimensions)==null?void 0:l.width)!=="auto"?Number.parseInt(e.params.itemDimensions.width,10):Math.min(e.containerWidth,b),i=(u=e.params.itemDimensions)!=null&&u.height&&((f=e.params.itemDimensions)==null?void 0:f.height)!=="auto"?Number.parseInt(e.params.itemDimensions.height,10):e.dimensions[n][1],e.params.itemDimensions&&e.params.itemDimensions.width!=="auto"&&e.params.itemDimensions.height==="auto"&&(o=Number.parseInt(e.params.itemDimensions.width,10),i=e.dimensions[n][1])):(o=Math.max(Math.min(b,e.containerWidth),y),i=v.height))}}else{const{height:v,width:[y,b]}=r.find(w=>w.mode===e.params.screenMode);n=e.params.screenMode,o=Math.max(Math.min(b,e.containerWidth),y),i=v,e.params.itemEmbedding&&((d=e.params.itemDimensions)!=null&&d.width&&((h=e.params.itemDimensions)==null?void 0:h.width)!=="auto"&&(o=Number.parseInt(e.params.itemDimensions.width,10)),(p=e.params.itemDimensions)!=null&&p.height&&((g=e.params.itemDimensions)==null?void 0:g.height)!=="auto"&&(i=Number.parseInt(e.params.itemDimensions.height,10)))}if(!n&&r.length>0){const[v]=r;n=v.mode,o=v.width[0],i=v.height}}e.currentScreenMode=n;const a={height:i===0?"100%":`${String(i)}px`,width:o===0?"100%":`${String(o)}px`,opacity:1};["editFull","editLimited"].includes(e.params.editMode)?(a.height="100%",a.width="100%"):e.params.itemEmbedding&&e.params.itemDimensions?(a.height=e.params.itemDimensions.height==="auto"?a.height:`${String(e.params.itemDimensions.height).replace("px","")}px`,a.width=e.params.itemDimensions.width==="auto"?a.width:`${String(e.params.itemDimensions.width).replace("px","")}px`):(a.height=i===0?"100%":`${String(i)}px`,a.width=o===0?"100%":`${String(o)}px`),e.currentScreenMode=n,e.iframeStyle=a},vW=e=>{const t=Object.keys(cc),r=[],n=["appServer","language","apiHost"],o=["key","token","screenMode","timezoneId","itemId","container","loaderBackground","loaderFontColor","loaderSpinnerColor","loaderSpinnerBackground"],i=["itemDimensions"],a=["mobile","tablet","desktop","largeScreen","fixed","auto"];for(const s of t)e.params[s]===null&&delete e.params[s];e.params=Z5(e.params,cc),(!e.params.dashboardId||typeof e.params.dashboardId!="string")&&(!e.params.dashboardSlug||typeof e.params.dashboardSlug!="string")&&(delete e.params.dashboardId,delete e.params.dashboardSlug);for(const s of n)typeof e.params[s]!="string"&&(delete e.params[s],r.push(`${s} needs to be of type string.`));for(const s of o)typeof e.params[s]!="string"&&e.params[s]!==null&&e.params[s]!==void 0&&(delete e.params[s],r.push(`${s} needs to be of type string or empty.`));if(e.params.screenMode&&!a.includes(e.params.screenMode)){const s=a.map(c=>`"${c}"`).join(", ");r.push(`"screenMode" needs should be one of these types: ${s}`),e.params.screenMode="auto"}e.params.itemId&&(e.params.itemEmbedding=!0);for(const s of i)typeof e.params[s]!="object"&&e.params[s]!==null&&(delete e.params[s],r.push(`${s} needs to be of type object or empty.`));if(typeof e.params.switchScreenModeOnResize!="boolean"&&(r.push("switchScreenModeOnResize needs to be of type boolean."),e.params.switchScreenModeOnResize=!0),e.params.itemDimensions){const s=["width","height"];for(const c of s)!["string","number"].includes(typeof e.params.itemDimensions[c])&&e.params.itemDimensions[c]!==null&&r.push(`itemDimensions ${c} needs to be of type string, number or empty.`)}e.params=Z5(e.params,cc),e.params.screenMode&&e.params.screenMode!=="auto"&&(e.params.switchScreenModeOnResize=!1),e.params.itemDimensions.width!=="auto"&&(e.params.itemDimensions.width=Number.parseInt(`${e.params.itemDimensions.width}`.replace("px",""),10)||"auto"),e.params.itemDimensions.height!=="auto"&&(e.params.itemDimensions.height=Number.parseInt(`${e.params.itemDimensions.height}`.replace("px",""),10)||"auto"),e.params.itemEmbedding=!!e.params.itemId,(e.params.error||r.length>0)&&GN(r.join(`
`),e.params)},J5="luzmo-embed-container",Ub={},pft=async(e,t)=>{const r=typeof e=="function"?await e():e,n=document.createElement("script");n.type="text/javascript",n.addEventListener("load",t),n.src=r,document.querySelectorAll("head")[0].append(n)},yW=e=>({});async function mft(e){const t=Ub[e];if(t.inited)return t.lib;if(t.format==="var")return new Promise(r=>{const n=()=>{t.inited||(t.lib=window[e],t.lib.init(yW(t.from)),t.inited=!0),r(t.lib)};return pft(t.url,n)});if(["esm","systemjs"].includes(t.format))return new Promise((r,n)=>{(typeof t.url=="function"?t.url:()=>Promise.resolve(t.url))().then(i=>{Mie(()=>import(i),[]).then(a=>{if(!t.inited){const s=yW(t.from);a.init(s),t.lib=a,t.lib.init(s),t.inited=!0}r(t.lib)}).catch(n)})})}function gft(e,t){if(!(e!=null&&e.default)&&t){const r=Object.create(null);return r.default=e,r.__esModule=!0,r}return e}async function vft(e,t){return mft(e).then(r=>r.get(t).then(n=>n()))}/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ew=globalThis,oT=Ew.trustedTypes,bW=oT?oT.createPolicy("lit-html",{createHTML:e=>e}):void 0,sae="$lit$",lh=`lit$${Math.random().toFixed(9).slice(2)}$`,lae="?"+lh,yft=`<${lae}>`,r0=document,Px=()=>r0.createComment(""),Mx=e=>e===null||typeof e!="object"&&typeof e!="function",qN=Array.isArray,bft=e=>qN(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",DP=`[ 	
\f\r]`,pb=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wW=/-->/g,xW=/>/g,Ip=RegExp(`>|${DP}(?:([^\\s"'>=/]+)(${DP}*=${DP}*(?:[^ 	
\f\r"'\`<>=]|("|')|))|$)`,"g"),CW=/'/g,SW=/"/g,cae=/^(?:script|style|textarea|title)$/i,wft=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),Rc=wft(1),n0=Symbol.for("lit-noChange"),ia=Symbol.for("lit-nothing"),_W=new WeakMap,tm=r0.createTreeWalker(r0,129);function uae(e,t){if(!qN(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return bW!==void 0?bW.createHTML(t):t}const xft=(e,t)=>{const r=e.length-1,n=[];let o,i=t===2?"<svg>":t===3?"<math>":"",a=pb;for(let s=0;s<r;s++){const c=e[s];let l,u,f=-1,d=0;for(;d<c.length&&(a.lastIndex=d,u=a.exec(c),u!==null);)d=a.lastIndex,a===pb?u[1]==="!--"?a=wW:u[1]!==void 0?a=xW:u[2]!==void 0?(cae.test(u[2])&&(o=RegExp("</"+u[2],"g")),a=Ip):u[3]!==void 0&&(a=Ip):a===Ip?u[0]===">"?(a=o??pb,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,l=u[1],a=u[3]===void 0?Ip:u[3]==='"'?SW:CW):a===SW||a===CW?a=Ip:a===wW||a===xW?a=pb:(a=Ip,o=void 0);const h=a===Ip&&e[s+1].startsWith("/>")?" ":"";i+=a===pb?c+yft:f>=0?(n.push(l),c.slice(0,f)+sae+c.slice(f)+lh+h):c+lh+(f===-2?s:h)}return[uae(e,i+(e[r]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class Rx{constructor({strings:t,_$litType$:r},n){let o;this.parts=[];let i=0,a=0;const s=t.length-1,c=this.parts,[l,u]=xft(t,r);if(this.el=Rx.createElement(l,n),tm.currentNode=this.el.content,r===2||r===3){const f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(o=tm.nextNode())!==null&&c.length<s;){if(o.nodeType===1){if(o.hasAttributes())for(const f of o.getAttributeNames())if(f.endsWith(sae)){const d=u[a++],h=o.getAttribute(f).split(lh),p=/([.?@])?(.*)/.exec(d);c.push({type:1,index:i,name:p[2],strings:h,ctor:p[1]==="."?Sft:p[1]==="?"?_ft:p[1]==="@"?kft:E4}),o.removeAttribute(f)}else f.startsWith(lh)&&(c.push({type:6,index:i}),o.removeAttribute(f));if(cae.test(o.tagName)){const f=o.textContent.split(lh),d=f.length-1;if(d>0){o.textContent=oT?oT.emptyScript:"";for(let h=0;h<d;h++)o.append(f[h],Px()),tm.nextNode(),c.push({type:2,index:++i});o.append(f[d],Px())}}}else if(o.nodeType===8)if(o.data===lae)c.push({type:2,index:i});else{let f=-1;for(;(f=o.data.indexOf(lh,f+1))!==-1;)c.push({type:7,index:i}),f+=lh.length-1}i++}}static createElement(t,r){const n=r0.createElement("template");return n.innerHTML=t,n}}function S1(e,t,r=e,n){var a,s;if(t===n0)return t;let o=n!==void 0?(a=r.o)==null?void 0:a[n]:r.l;const i=Mx(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==i&&((s=o==null?void 0:o._$AO)==null||s.call(o,!1),i===void 0?o=void 0:(o=new i(e),o._$AT(e,r,n)),n!==void 0?(r.o??(r.o=[]))[n]=o:r.l=o),o!==void 0&&(t=S1(e,o._$AS(e,t.values),o,n)),t}class Cft{constructor(t,r){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:r},parts:n}=this._$AD,o=((t==null?void 0:t.creationScope)??r0).importNode(r,!0);tm.currentNode=o;let i=tm.nextNode(),a=0,s=0,c=n[0];for(;c!==void 0;){if(a===c.index){let l;c.type===2?l=new bC(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new Eft(i,this,t)),this._$AV.push(l),c=n[++s]}a!==(c==null?void 0:c.index)&&(i=tm.nextNode(),a++)}return tm.currentNode=r0,o}p(t){let r=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,r),r+=n.strings.length-2):n._$AI(t[r])),r++}}class bC{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,r,n,o){this.type=2,this._$AH=ia,this._$AN=void 0,this._$AA=t,this._$AB=r,this._$AM=n,this.options=o,this.v=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const r=this._$AM;return r!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=r.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,r=this){t=S1(this,t,r),Mx(t)?t===ia||t==null||t===""?(this._$AH!==ia&&this._$AR(),this._$AH=ia):t!==this._$AH&&t!==n0&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):bft(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ia&&Mx(this._$AH)?this._$AA.nextSibling.data=t:this.T(r0.createTextNode(t)),this._$AH=t}$(t){var i;const{values:r,_$litType$:n}=t,o=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=Rx.createElement(uae(n.h,n.h[0]),this.options)),n);if(((i=this._$AH)==null?void 0:i._$AD)===o)this._$AH.p(r);else{const a=new Cft(o,this),s=a.u(this.options);a.p(r),this.T(s),this._$AH=a}}_$AC(t){let r=_W.get(t.strings);return r===void 0&&_W.set(t.strings,r=new Rx(t)),r}k(t){qN(this._$AH)||(this._$AH=[],this._$AR());const r=this._$AH;let n,o=0;for(const i of t)o===r.length?r.push(n=new bC(this.O(Px()),this.O(Px()),this,this.options)):n=r[o],n._$AI(i),o++;o<r.length&&(this._$AR(n&&n._$AB.nextSibling,o),r.length=o)}_$AR(t=this._$AA.nextSibling,r){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,r);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var r;this._$AM===void 0&&(this.v=t,(r=this._$AP)==null||r.call(this,t))}}class E4{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,r,n,o,i){this.type=1,this._$AH=ia,this._$AN=void 0,this.element=t,this.name=r,this._$AM=o,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=ia}_$AI(t,r=this,n,o){const i=this.strings;let a=!1;if(i===void 0)t=S1(this,t,r,0),a=!Mx(t)||t!==this._$AH&&t!==n0,a&&(this._$AH=t);else{const s=t;let c,l;for(t=i[0],c=0;c<i.length-1;c++)l=S1(this,s[n+c],r,c),l===n0&&(l=this._$AH[c]),a||(a=!Mx(l)||l!==this._$AH[c]),l===ia?t=ia:t!==ia&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}a&&!o&&this.j(t)}j(t){t===ia?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Sft extends E4{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ia?void 0:t}}class _ft extends E4{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ia)}}class kft extends E4{constructor(t,r,n,o,i){super(t,r,n,o,i),this.type=5}_$AI(t,r=this){if((t=S1(this,t,r,0)??ia)===n0)return;const n=this._$AH,o=t===ia&&n!==ia||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==ia&&(n===ia||o);o&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var r;typeof this._$AH=="function"?this._$AH.call(((r=this.options)==null?void 0:r.host)??this.element,t):this._$AH.handleEvent(t)}}class Eft{constructor(t,r,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){S1(this,t)}}const FP=Ew.litHtmlPolyfillSupport;FP==null||FP(Rx,bC),(Ew.litHtmlVersions??(Ew.litHtmlVersions=[])).push("3.2.0");const Tft=(e,t,r)=>{const n=(r==null?void 0:r.renderBefore)??t;let o=n._$litPart$;if(o===void 0){const i=(r==null?void 0:r.renderBefore)??null;n._$litPart$=o=new bC(t.insertBefore(Px(),i),i,void 0,r??{})}return o._$AI(e),o};/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */class Tw extends Pg{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var r;const t=super.createRenderRoot();return(r=this.renderOptions).renderBefore??(r.renderBefore=t.firstChild),t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Tft(r,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return n0}}var oq;Tw._$litElement$=!0,Tw.finalized=!0,(oq=globalThis.litElementHydrateSupport)==null||oq.call(globalThis,{LitElement:Tw});const NP=globalThis.litElementPolyfillSupport;NP==null||NP({LitElement:Tw});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const Ift={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Aft=e=>(...t)=>({_$litDirective$:e,values:t});class Pft{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this.t=t,this._$AM=r,this.i=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}}/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const dae="important",Mft=" !"+dae,Ap=Aft(class extends Pft{constructor(e){var t;if(super(e),e.type!==Ift.ATTRIBUTE||e.name!=="style"||((t=e.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return n==null?t:t+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(e,[t]){const{style:r}=e.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const n of this.ft)t[n]==null&&(this.ft.delete(n),n.includes("-")?r.removeProperty(n):r[n]=null);for(const n in t){const o=t[n];if(o!=null){this.ft.add(n);const i=typeof o=="string"&&o.endsWith(Mft);n.includes("-")||i?r.setProperty(n,i?o.slice(0,-11):o,i?dae:""):r[n]=o}}return n0}});var Rft=Object.defineProperty,Oft=Object.getOwnPropertyDescriptor,Tr=(e,t,r,n)=>{for(var o=n>1?void 0:n?Oft(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Rft(t,r,o),o},Dft="6.0.0",Fft=class{constructor(){this._components=[]}},e6=new Fft,Nft=()=>{typeof window.__luzmoMessageHandler!="function"&&(window.__luzmoMessageHandler=e=>{var r,n;const t=e6._components.find(o=>e.data.name===o._iframeId);if(t)switch((r=e.data)==null?void 0:r.type){case"load":{t.dispatchEvent(new CustomEvent("load",{detail:{data:e.data}})),t._loadTimeoutHandle&&(clearTimeout(t._loadTimeoutHandle),t._loadTimeoutHandle=void 0),t.iframeLoaded=!0,t.dimensions=e.data.dimensions,t._calculateDimAfterDashboardLoaded();break}case"error":{t.dashboardError=!0,t._loadTimeoutHandle&&(clearTimeout(t._loadTimeoutHandle),t._loadTimeoutHandle=void 0),t.iframeLoaded=!0,t._displayError(),console.error("Dashboard error: ",e.data.errorMsg??((n=e.data.error)==null?void 0:n.msg));break}case"data":{Tp(t,e.data.requestId,e.data.data);break}case"filters":{Tp(t,e.data.requestId,e.data.filters);break}case"getAccessibleDashboards":{Tp(t,e.data.requestId,e.data.accessibleDashboards);break}case"dashboardAction":{t.dispatchEvent(new CustomEvent("dashboardAction",{detail:{data:e.data}}));break}case"export":{e.data.error?S_(t,e.data.requestId,e.data):(t.dispatchEvent(new CustomEvent("exported",{detail:{data:e.data}})),Tp(t,e.data.requestId,e.data));break}case"changedFilters":{t.dispatchEvent(new CustomEvent("changedFilters",{detail:{data:e.data}}));break}case"customEvent":{t.dispatchEvent(new CustomEvent("customEvent",{detail:{data:e.data}}));break}case"chartsRendered":case"itemsRendered":{e.data.type="itemsRendered",t.dispatchEvent(new CustomEvent("itemsRendered",{detail:{data:e.data}}));break}case"setEditMode":{e.data.error?S_(t,e.data.requestId,e.data):(Tp(t,e.data.requestId,e.data),t.params.editMode=e.data.editMode,t._containerStyle=aae(t),t.dimensions&&pk(t));break}case"setFilters":{e.data.error?S_(t,e.data.requestId,e.data):Tp(t,e.data.requestId,e.data);break}case"setPreview":{e.data.error?S_(t,e.data.requestId,e.data):Tp(t,e.data.requestId,e.data);break}}},window.addEventListener("message",window.__luzmoMessageHandler,!1))},Lft=Bdt`
  :host {
    display: block;
    height: 100%;
  }

  @-webkit-keyframes spin {
    0% {
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
    }
    100% {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }

  @keyframes spin {
    0% {
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
    }
    100% {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }
  :host {
    position: relative;
    width: 100%;
  }

  .luzmo-embed-dashboard {
    background: transparent;
    padding: 0;
    border: 0;
  }

  .luzmo-embed-dashboard-ede {
  }

  .luzmo-embed-container-ede {
    width: 100%;
    height: 100%;
  }

  .luzmo-container-loader {
    width: 100%;
    position: relative;
  }

  .luzmo-lc {
    margin: 0 auto;
  }

  .luzmo-loading-message {
    width: 100%;
    height: 20px;
    text-align: center;
    margin-bottom: 16px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
  }

  .luzmo-loading-circle {
    box-sizing: border-box;
    margin: 16px auto;
    position: relative;
    text-indent: -9999em;
    animation: spin 0.6s infinite linear;
  }

  .luzmo-loading-circle,
  .luzmo-loading-circle:after {
    border-radius: 50%;
    width: 32px;
    height: 32px;
  }

  .itemEmbedding:after {
    width: 24px;
    height: 24px;
  }

  .luzmo-error {
    background: transparent;
    padding: 48px 0;
    margin: 0 auto;
    width: 80%;
    border: 0;
    text-align: center;
    min-height: 192px;
  }

  .dashboard-error {
    font-size: 30px;
    background: transparent;
    padding: 48px 0;
    margin: 0 auto;
    width: 80%;
    border: 0;
    text-align: center;
    min-height: 192px;
  }

  .luzmo-loader {
    top: 0;
    left: 0;
    width: 100%;
    min-height: 400px;
    position: absolute;
    transition-duration: 0.3s;
  }
`,Ir=class extends Tw{constructor(){super(),this.language="auto",this.screenMode="auto",this.switchScreenModeOnResize=!0,this.editMode="view",this.experimental=!1,this.iframeStyle={},this._containerStyle={},this._loaderStyle={},this._lcStyle={},this._loadingCircleStyle={},this._containerLoaderStyle={},this._loaderMsg="",this._itemEmbedding=!1,this.browserError=!1,this.browserErrorMsg="",this.dashboardError=!1,this.browserNotSupported=[],this.VERSION=Dft+"-wc-luzmo",this.isLibraryLoaded=!1,this.currentAuthKey=null,this.currentAuthToken=null,this.isInitCalled=!1,this.attributesMap={dashboardId:"dashboard-id",dashboardSlug:"dashboard-slug",itemId:"item-id",language:"language",qeVersion:"qe-version",screenMode:"screen-mode",switchScreenModeOnResize:"switch-screen-mode-on-resize",authKey:"auth-key",authToken:"auth-token",editMode:"edit-mode",mainColor:"main-color",accentColor:"accent-color",loaderBackground:"loader-background",loaderFontColor:"loader-font-color",loaderSpinnerColor:"loader-spinner-color",loaderSpinnerBackground:"loader-spinner-background",appServer:"app-server",apiHost:"api-host",itemDimensions:"item-dimensions",timezoneId:"timezone-id"},this.loaderSize=32,this.borderWidth=3,this.minHeight=400,this._containerId=E0(),this._iframeId=`luzmo-dashboard-${this._containerId}`,this.iframeLoaded=!1,this.promises={},this.params=this._setOptions(),this._onResize=()=>{var e;if((e=this.shadowRoot)!=null&&e.querySelector(".dashboard-container")){if(this.containerWidth=this.luzmoEmbedContainer.offsetWidth,this.params.switchScreenModeOnResize&&this.params.screenMode==="auto")for(const t of iae)t.width[0]<=window.innerWidth&&window.innerWidth<=t.width[1]&&(this.currentScreenMode=t.mode);this.iframeLoaded?this._calculateDimAfterDashboardLoaded():this.dimensions&&(this.containerWidth=this.luzmoEmbedContainer.offsetWidth,pk(this))}},this._resizeObserver=new ResizeObserver(e=>{window.requestAnimationFrame(()=>{!Array.isArray(e)||e.length===0||this._onResize()})})}loadLibrary(e){return Ub[e]?Promise.resolve(Ub[e].module):(Ub[e]={url:e!=null&&e.startsWith("http://localhost")?`${hb(e)}/remoteEntry.mjs`:`${hb(e)}/dashboard-app/remoteEntry.mjs`,format:"esm",from:"vite",module:void 0},vft(e,"./DashboardApp").then(t=>{const r=gft(t,!0);return Ub[e].module=r,r}))}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.disconnect();for(const e of Object.keys(this.promises))this.promises[e].reject(new Error("Dashboard component was removed"))}firstUpdated(){var e;this._loaderMsg=(e=fW(this))==null?void 0:e.loadingMsg,this._loaderStyles(),e6._components.push(this),this.luzmoEmbedContainer&&this._resizeObserver.observe(this.luzmoEmbedContainer)}initComponent(){var e,t;this.params=this._setOptions(),this.getIsViewMode()?(this._setupLoader(),this._loaderStyles(),this.loadLibrary(this.params.appServer).then(async()=>{this.isLibraryLoaded=!0,await this.updateComplete;const r=this.renderRoot.querySelector("dashboard-component");this.dashboardReference=r.cloneNode(!0),r.replaceWith(this.dashboardReference),this.dashboardReference.addEventListener("load",n=>{this.containerWidth=this.dashboardReference.offsetWidth,this.dimensions=n.detail.dimensions,pk(this),window.dispatchEvent(new Event("resize")),this.dispatchEvent(new CustomEvent("load",n))}),this.dashboardReference.addEventListener("itemsRendered",n=>this.dispatchEvent(new CustomEvent("itemsRendered",n))),this.dashboardReference.addEventListener("customEvent",n=>this.dispatchEvent(new CustomEvent("customEvent",n))),this.dashboardReference.addEventListener("changedFilters",n=>this.dispatchEvent(new CustomEvent("changedFilters",n))),this.dashboardReference.addEventListener("dashboardAction",n=>this.dispatchEvent(new CustomEvent("dashboardAction",n))),this.dashboardReference.addEventListener("export",n=>this.dispatchEvent(new CustomEvent("exported",n))),this.setAllAttributes()})):(this.containerWidth=(e=this.container)==null?void 0:e.clientWidth,vW(this),Xdt(this),this._setupLoader(),this.params.error||(this._loaderStyles(),Nft(),this._iframeUrl=dW(this),(t=this.iframe)==null||t.setAttribute("src",this._iframeUrl),this.iframeStyle=hW(this)))}setAllAttributes(){if(this.dashboardReference){for(const e in this.attributesMap)!["authKey","authToken","apiHost","itemDimensions"].includes(e)&&this.params[e]&&this.dashboardReference.setAttribute(this.attributesMap[e],this.params[e]);this.params.itemDimensions&&this.dashboardReference.setAttribute("item-dimensions",JSON.stringify(this.params.itemDimensions)),this.params.apiHost&&this.dashboardReference.setAttribute("api-host",hb(this.params.apiHost)),this.params.key&&this.dashboardReference.setAttribute("auth-key",this.params.key),this.params.token&&this.dashboardReference.setAttribute("auth-token",this.params.token)}}updated(e){var o;const t=new Set(["dashboardId","dashboardSlug","itemId","language","qeVersion","editMode","screenMode","switchScreenModeOnResize","authToken","authKey","appServer","timezoneId","itemDimensions"]),r=["dashboardId","dashboardSlug","itemId"];let n=!1;for(const i of r)n=n||e.get(i)===void 0&&this[i]!==void 0;if(n&&!this.isInitCalled){this.initComponent(),this.isInitCalled=!0;return}if(this.getIsViewMode()){if(this.dashboardReference){for(const[i]of e.entries())if(i==="appSever")this.loadLibrary(e[i]).then(async()=>{this.isLibraryLoaded=!0,await this.updateComplete,this.dashboardReference=this.renderRoot.querySelector("dashboard-component"),this.setAllAttributes()});else if(this.attributesMap[i]){const a=this.attributesMap[i]??i,s=typeof this[i]=="object"?JSON.stringify(this[i]):((o=this[i])==null?void 0:o.toString())||this[i];this.dashboardReference.setAttribute(a,s)}}}else for(const[i]of e.entries())t.has(i)&&i!=="editMode"?(this.iframeLoaded=!1,this._loadTimeoutHandle&&clearTimeout(this._loadTimeoutHandle),this._loadTimeoutHandle=setTimeout(()=>{console.warn("Failed to load dashboard, appServer is likely down or unreachable.")},15*1e3),this.params=this._setOptions(),vW(this),this._setupLoader(),this._loaderStyles(),this._iframeUrl=dW(this),this.iframe&&this._updateIframeUrl(),this.iframeStyle=hW(this)):t.has(i)&&i==="editMode"&&(this.iframeLoaded&&this.setEditMode(this.editMode),this.params=this._setOptions())}_setOptions(){const e={dashboardId:this.dashboardId,dashboardSlug:this.dashboardSlug};return this.itemId?(e.itemId=this.itemId,this._itemEmbedding=!0):this._itemEmbedding=!1,this.language&&(e.language=this.language),this.qeVersion&&(e.qeVersion=this.qeVersion),this.screenMode&&(e.screenMode=this.screenMode),e.switchScreenModeOnResize=this.switchScreenModeOnResize,this.authToken&&(e.token=this.authToken),this.authKey&&(e.key=this.authKey),this.editMode&&(e.editMode=this.editMode),this.mainColor&&(e.mainColor=this.mainColor),this.accentColor&&(e.accentColor=this.accentColor),this.loaderBackground&&(e.loaderBackground=this.loaderBackground),this.loaderFontColor&&(e.loaderFontColor=this.loaderFontColor),this.loaderSpinnerColor&&(e.loaderSpinnerColor=this.loaderSpinnerColor),this.loaderSpinnerBackground&&(e.loaderSpinnerBackground=this.loaderSpinnerBackground),this.timezoneId&&(e.timezoneId=this.timezoneId),this.itemDimensions&&(e.itemDimensions=this.itemDimensions),this.appServer?(this.appServer=this.getIsViewMode()?hb(this.appServer):kw(this.appServer),e.appServer=this.appServer):(this.appServer=kw(cc.appServer),e.appServer=this.appServer),this.apiHost?(this.apiHost=this.getIsViewMode()?hb(this.apiHost):kw(this.apiHost),e.apiHost=this.apiHost):(this.apiHost=this.appServer.includes("luzmo.com")?this.appServer.replace("app","api"):this.appServer,e.apiHost=this.apiHost),this.currentAuthKey=this.authKey,this.currentAuthToken=this.authToken,e}_updateIframeUrl(){ift(this.iframe,this._iframeUrl)}_setupLoader(){const e=fW(this);this._loaderMsg=e.loadingMsg,e.errorMsg&&(this.browserError=!0,this.browserErrorMsg=e.errorMsg,this._displayError())}_displayError(){this.dashboardError&&(this._loaderStyles(),this.iframeStyle.opacity=1),this.browserError&&(this._containerStyle.display="none")}_calculateDimAfterDashboardLoaded(){this.dashboardError=!1,this._loaderStyles(),pk(this)}_loaderStyles(){this._containerStyle=aae(this),this._loaderStyle=rft(this),this._loadingCircleStyle=nft(this),this._containerLoaderStyle=tft(this),this._lcStyle=oft(this)}static get styles(){return[Lft]}render(){let e;const t=Rc`
      <div
        class="luzmo-container-loader"
        id="luzmo-container-loader-${this._containerId}"
        style=${Ap(this._containerLoaderStyle)}
      >
        <div
          class="luzmo-loader"
          id="luzmo-loader-${this._containerId}"
          style=${Ap(this._loaderStyle)}
        >
          <div
            class="luzmo-lc"
            style=${Ap(this._lcStyle)}
          >
            <div
              class="luzmo-loading-circle"
              style=${Ap(this._loadingCircleStyle)}
            ></div>
            ${this._itemEmbedding?"":Rc`
                <div
                  class="luzmo-loading-message"
                  style=${Ap({color:this.loaderFontColor})}
                >
                  ${this._loaderMsg}
                </div>
              `}
          </div>
        </div>
      </div>
    `;return this.getIsViewMode()?e=this.isLibraryLoaded?Rc`
          ${this.dashboardId||this.dashboardSlug?Rc`
            <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
                                 api-host="${this.params.apiHost}"></dashboard-component>`:Rc`
            <div id="luzmo-error-${this._containerId}">
              <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
            </div>
          `}
        `:Rc`${t}`:e=Rc`
        ${this.dashboardId||this.dashboardSlug?Rc`
            ${t}
            <iframe
              class="luzmo-embed-dashboard ${this.getIsViewMode()?"":"luzmo-embed-dashboard-ede"}"
              id="${this._iframeId}"
              name="${this._iframeId}"
              style=${Ap(this.iframeStyle)}
              src="${this._iframeUrl}"
              frameborder="0"
            ></iframe>
          `:Rc`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
        ${this.browserError?Rc`
            <div id="luzmo-error-${this._containerId}">
              <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
            </div>
          `:""}
      `,Rc`
      <div class="${J5} ${this.getIsViewMode()?"":`${J5}-ede`}">
        <div
          class="dashboard-container"
          style=${Ap(Object.assign({},this._containerStyle,{width:this.iframeStyle.width??"100%",height:this.iframeStyle.height??"100%"}))}
        >
          ${e}
        </div>
      </div>

    `}getDashboards(){return new Promise(e=>e(e6._components))}getData(e){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.getData(e):this.getIsViewMode()?Promise.reject():sft(this,this.iframe,e)}getFilters(){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.getFilters():this.getIsViewMode()?Promise.reject():lft(this,this.iframe)}setFilters(e,t){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.setFilters(e,t):this.getIsViewMode()?Promise.reject():fft(this,this.iframe,e,t)}setAuthorization(e,t){return this.currentAuthKey=e,this.currentAuthToken=t,this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.setAuthorization(e,t):this.getIsViewMode()?Promise.reject():uft(this,this.iframe,e,t)}refreshData(e){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.refreshData(e):this.getIsViewMode()?Promise.reject():e?gW(this,this.iframe,e):gW(this,this.iframe)}reloadDashboard(){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.reloadDashboard():this.getIsViewMode()?Promise.reject():cft(this,this.iframe)}exportDashboard(e){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.exportDashboard(e):this.getIsViewMode()?Promise.reject():e?mW(this,this.iframe,e):mW(this,this.iframe)}getAccessibleDashboards(){return aft(this)}addFilters(e,t){return this.dashboardReference.addFilters(e,t)}setEditMode(e){return this.dashboardReference&&e==="view"?(this.editMode="view",this.params.editMode="view",this.initComponent(),Promise.resolve({type:"setEditMode",editMode:e})):this.dashboardReference&&["editFull","editLimited"].includes(e)?(this.editMode=e,this.params.editMode=e,this.initComponent(),Promise.resolve({type:"setEditMode",editMode:e})):this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.setEditMode(e):this.getIsViewMode()?Promise.reject():dft(this,this.iframe,e)}setPreview(e){return this.getIsViewMode()&&this.dashboardReference?this.dashboardReference.setPreview(e):hft(this,this.iframe,e)}getIsViewMode(){return this.experimental&&this.params.editMode==="view"||this.params.editMode===void 0}};Tr([WN(".dashboard-container")],Ir.prototype,"container",2);Tr([WN(`.${J5}`)],Ir.prototype,"luzmoEmbedContainer",2);Tr([WN("iframe")],Ir.prototype,"iframe",2);Tr([Qr()],Ir.prototype,"dashboardId",2);Tr([Qr()],Ir.prototype,"dashboardSlug",2);Tr([Qr()],Ir.prototype,"itemId",2);Tr([Qr()],Ir.prototype,"language",2);Tr([Qr()],Ir.prototype,"qeVersion",2);Tr([Qr()],Ir.prototype,"screenMode",2);Tr([Qr({converter:{fromAttribute:e=>e==="true",toAttribute:String}})],Ir.prototype,"switchScreenModeOnResize",2);Tr([Qr()],Ir.prototype,"editMode",2);Tr([Qr()],Ir.prototype,"mainColor",2);Tr([Qr()],Ir.prototype,"accentColor",2);Tr([Qr()],Ir.prototype,"authToken",2);Tr([Qr()],Ir.prototype,"authKey",2);Tr([Qr()],Ir.prototype,"loaderBackground",2);Tr([Qr()],Ir.prototype,"loaderFontColor",2);Tr([Qr()],Ir.prototype,"loaderSpinnerColor",2);Tr([Qr()],Ir.prototype,"loaderSpinnerBackground",2);Tr([Qr()],Ir.prototype,"appServer",2);Tr([Qr()],Ir.prototype,"timezoneId",2);Tr([Qr()],Ir.prototype,"apiHost",2);Tr([Qr({type:Object})],Ir.prototype,"itemDimensions",2);Tr([Qr({converter:{fromAttribute:e=>e==="true",toAttribute:String}})],Ir.prototype,"experimental",2);Tr([Qr({attribute:!1})],Ir.prototype,"_containerId",2);Tr([Qr({attribute:!1})],Ir.prototype,"_iframeId",2);Tr([Qr({attribute:!1})],Ir.prototype,"params",2);Tr([Qr({attribute:!1})],Ir.prototype,"_iframeUrl",2);Tr([Qr({attribute:!1})],Ir.prototype,"iframeLoaded",2);Tr([Qr({attribute:!1})],Ir.prototype,"promises",2);Tr([Qr({attribute:!1})],Ir.prototype,"iframeStyle",2);Tr([Qr({attribute:!1})],Ir.prototype,"_containerStyle",2);Tr([Qr({attribute:!1})],Ir.prototype,"_loaderStyle",2);Tr([Qr({attribute:!1})],Ir.prototype,"_lcStyle",2);Tr([Qr({attribute:!1})],Ir.prototype,"_loadingCircleStyle",2);Tr([Qr({attribute:!1})],Ir.prototype,"_containerLoaderStyle",2);Tr([Qr({attribute:!1})],Ir.prototype,"_loaderMsg",2);Tr([Qr({attribute:!1})],Ir.prototype,"containerWidth",2);Tr([Qr({attribute:!1})],Ir.prototype,"dimensions",2);Tr([Qr({attribute:!1})],Ir.prototype,"currentScreenMode",2);Tr([Qr({attribute:!1})],Ir.prototype,"_itemEmbedding",2);Tr([Qr({attribute:!1})],Ir.prototype,"browserError",2);Tr([Qr({attribute:!1})],Ir.prototype,"browserErrorMsg",2);Tr([Qr({attribute:!1})],Ir.prototype,"dashboardError",2);Tr([Qr({attribute:!1})],Ir.prototype,"browserNotSupported",2);Tr([Qr()],Ir.prototype,"VERSION",2);Tr([yC()],Ir.prototype,"isLibraryLoaded",2);Tr([yC()],Ir.prototype,"dashboardReference",2);Tr([yC()],Ir.prototype,"currentAuthKey",2);Tr([yC()],Ir.prototype,"currentAuthToken",2);Tr([yC()],Ir.prototype,"isInitCalled",2);var t6=class extends Ir{};t6=Tr([Ldt("luzmo-embed-dashboard")],t6);var $ft={name:"@luzmo/react-embed",version:"5.0.18",typings:"./index.d.ts",dependencies:{"@lit/react":"1.0.3","@luzmo/embed":"6.0.0"},peerDependencies:{react:"^16 || ^17 || ^18","react-dom":"^16 || ^17 || ^18"},keywords:["react","react-luzmo","luzmo","front-end","development","dashboard","visualization","chart","cumul.io","component"]},KN=Ndt({react:jv,tagName:"luzmo-embed-dashboard",elementClass:t6,events:{itemsRendered:"itemsRendered",load:"load",changedFilters:"changedFilters",customEvent:"customEvent",exported:"exported",dashboardAction:"dashboardAction"}});KN.defaultProps={VERSION:$ft.version+"-react-luzmo"};const Bft="https://app.us.luzmo.com",Uft="https://api.us.luzmo.com",qn=({dashboardSlug:e=void 0})=>{const[t,r]=A.useState(),[n,o]=A.useState();return A.useEffect(()=>{async function i(){const a=await fetch("/dashboard");a.ok;const s=await a.json();r(s.key),o(s.token)}i()},[e]),t&&n?R(nr,{children:R(KN,{dashboardSlug:e,authKey:t,authToken:n,appServer:Bft,apiHost:Uft,mainColor:"pink",accentColor:"black",loaderSpinnerColor:"rgb(0, 81, 126)",loaderSpinnerBackground:"rgb(236 248 255)"})}):R(nr,{display:"flex",justifyContent:"center",marginTop:12,children:R(Ri,{"aria-label":"Loading"})})},Hft=()=>xe(Jt,{spacing:2,padding:2,sx:{borderRadius:1,border:"1px solid rgba(0, 0, 0, 0.12)",position:"relative",height:"100%",width:"100%","&:before":{content:'" "',backgroundImage:'url("/bill_automation_dashboard.PNG")',backgroundRepeat:"no-repeat",backgroundSize:"cover",position:"absolute",left:0,opacity:.2,top:0,height:"100%",width:"100%",zIndex:-1}},children:[R(jt,{variant:"h4",alignSelf:"center",children:"Data Automation Available"}),xe(jt,{variant:"body1",component:"div",children:["Data automation of your utility bills is available for your account. We can do the work of adding and reviewing bills for you. Just send us a message"," ",R(Uh,{href:"support",target:"_blank",rel:"noreferrer",children:"here"})," ","or email us at"," ",R(Uh,{href:"mailto:support@nimble-energy.com",children:"support@nimble-energy.com"})," ","and we'll get right on it! Some key benefits you will get from having Nimble Energy automate your utility bill data include:"]}),R(z1,{children:["Save time by not having to enter the bills yourself","Lower cost to get bills into the system via our APIs and machine vision tools","Quality review of all bill data to ensure accuracy and identify potential bill errors","Timely entry of bills to keep your bills up to date","Transparency into the automation process so you always know what's in queue, process, or completed"].map(t=>R(BI,{dense:!0,children:R(ps,{primary:t})},t))}),R(jt,{variant:"body1",component:"div",children:"There are many more benefits, so contact us today to automate your bill data!"})]});function zft(){const{featureChecker:e}=on(),t=e.productFeatureEnabled(Y1.billAutomation),r=A.useMemo(()=>[{component:()=>t?R(qn,{dashboardSlug:"billautomationsummary"}):R(Hft,{}),formComponent:()=>{},name:"billautomationsummary",subtitle:"Status of your bill automation",tabTitle:"Summary"},{component:Mut,featureEnabled:t,formComponent:$ut,name:"administration",subtitle:"Manage your credentials and settings for your utilities",tabTitle:"Administration"},{component:Odt,featureEnabled:t,formComponent:()=>{},name:"billupload",subtitle:"Upload your bills for automated data entry",tabTitle:"Bill Upload"}],[]);return R(l4,{defaultGlobalState:ist(),children:R(hd,{tabs:r,heading:"Automated bill data entry and QA"})})}const jft={}.VITE_ERROR_IMG||"/404_Error_Page_src.png";function fae(){const e=bJ();return xe(Jt,{alignItems:"center",justifyContent:"center",height:"100vh",children:[R(fC,{src:jft,alt:"Error",height:"fit-content",style:{width:"auto",height:"24rem",zIndex:-1}}),R(jt,{variant:"h3",children:(e==null?void 0:e.status)??"OOPS!"}),R(jt,{variant:"body1",children:(e==null?void 0:e.statusText)??"Sorry, We are having some technical issues. Try again later."}),R(Ft,{component:Vm,to:"/",variant:"contained",color:"secondary",sx:{mt:2},children:"Back to Home Page"}),R(nr,{position:"absolute",bottom:0,right:0,children:xe(jt,{variant:"caption",align:"center",children:[R(Vm,{to:"https://www.freepik.com/free-vector/page-found-with-people-connecting-plug-concept-illustration_7938315.htm#query=something%20went%20wrong&position=24&from_view=search&track=ais",target:"_blank",rel:"noopener noreferrer",children:"Image by storyset"})," ","on Freepik"]})})]})}function Vft(){const{search:e}=El();return A.useMemo(()=>new URLSearchParams(e),[e])}function hae({fetchImageFile:e,title:t}){const{isAuthenticated:r}=on(),{id:n}=j2(),[o,i]=A.useState(null),s=Vft().get("page"),{data:c,isFetching:l,isError:u}=da({queryKey:[t,n],queryFn:async()=>await e(n??""),initialData:void 0});return A.useEffect(()=>{if(c){const f=URL.createObjectURL(c);return i(f),()=>{URL.revokeObjectURL(f)}}},[c]),r()?u?R(fae,{}):l?R(Yh,{open:l,children:R(Ri,{})}):c?R("div",{children:c.type.includes("image")?R("img",{alt:t,src:o??"",style:{maxWidth:"100%"}}):R("iframe",{title:t,src:s?`${o}#page=${s}`:o,style:{width:"100vw",height:"100vh"}})}):null:R(jm,{to:"/login",replace:!0})}function Wft(){return R(hae,{fetchImageFile:PGe,title:"Bill file"})}function Gft(){const{featureChecker:e}=on(),t=A.useMemo(()=>[{component:()=>R(qn,{dashboardSlug:"costallutilities"}),name:"costallutilities",subtitle:"Analyze cost trends across all utilities",tabTitle:"All Utilities"},{component:()=>R(qn,{dashboardSlug:"costyoy"}),name:"costyoy",subtitle:"Analyze year-over-year costs",tabTitle:"Year-over-Year"},{component:()=>R(qn,{dashboardSlug:"costyoybar"}),name:"costyoybar",subtitle:"Analyze year-over-year costs",tabTitle:"Year-over-Year Bar"},{component:()=>R(qn,{dashboardSlug:"lineitemcost"}),name:"lineitemcost",subtitle:"Analyze cost by line item type and description",tabTitle:"Line Items Cost"},{component:()=>R(qn,{dashboardSlug:"weathernormalizedcost"}),name:"weathernormalizedcost",subtitle:"Analyze costs in relation to changes in weather",tabTitle:"Weather Normalized Cost"},{component:()=>R(qn,{dashboardSlug:"budgetsactuals"}),name:"budgetsactuals",subtitle:"Analyze budget scenarios vs. actual costs",tabTitle:"Budget vs. Actuals"},{component:()=>R(qn,{dashboardSlug:"uniteconomics"}),featureEnabled:e.devFeatureEnabled(xf.Experimental),name:"uniteconomics",subtitle:"Analyze utility unit economics and rate trends",tabTitle:"Unit Economics"}],[]);return R(hd,{tabs:t,heading:"Explore cost drivers, trends, and variances"})}var YN={},qft=Wr;Object.defineProperty(YN,"__esModule",{value:!0});var iT=YN.default=void 0,Kft=qft(tn()),Yft=rn,Xft=(0,Kft.default)((0,Yft.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack");iT=YN.default=Xft;var XN={},Qft=Wr;Object.defineProperty(XN,"__esModule",{value:!0});var pae=XN.default=void 0,Zft=Qft(tn()),Jft=rn,eht=(0,Zft.default)((0,Jft.jsx)("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"}),"LockOpen");pae=XN.default=eht;function tht(){const[e,t]=A.useState(""),[r,n]=A.useState(!1),{control:o,handleSubmit:i,formState:{errors:a}}=Bn({defaultValues:{email:""}}),s=async l=>{try{await BF({email:l}),t(l)}catch{St.error(bt.FORGOT_PASSWORD_ERROR)}finally{n(!1)}};return e?R(Jt,{alignItems:"center",justifyContent:"center",direction:"column",height:"100vh",children:xe(Jt,{spacing:2,alignItems:"center",width:"20rem",children:[xe(jt,{children:["If there is an account associated with ",e,", you will receive an email with instructions to reset your password. If you don't receive an email, please check your spam folder."]}),R(Ft,{variant:"text",startIcon:R(iT,{}),component:Vm,to:"/login",children:"Back to login"})]})}):xe(nr,{children:[xe(Jt,{spacing:2,alignItems:"center",marginTop:4,children:[R(Jt,{width:"4.5rem",height:"4.5rem",justifyContent:"center",alignItems:"center",position:"relative",sx:{borderRadius:"50%",backgroundColor:l=>to(l.palette.secondary.main,.1)},children:R(Jt,{width:"3rem",height:"3rem",alignItems:"center",justifyContent:"center",sx:{borderRadius:"50%",backgroundColor:l=>to(l.palette.secondary.main,.1)},children:R(pae,{fontSize:"large",color:"secondary"})})}),R(jt,{variant:"h3",textAlign:"center",children:"Forgot password?"}),R(jt,{variant:"body1",textAlign:"center",children:"No worries, we got you! Enter your email address and we will send reset instructions."})]}),R("form",{autoComplete:"off",onSubmit:i(({email:l})=>{n(!0),s(l)}),children:xe(Jt,{spacing:2,alignItems:"center",marginTop:4,children:[R(nr,{sx:{width:"20rem"},children:R(_E,{name:"email",control:o,render:({field:l})=>(delete l.ref,R(b5,{name:"email",type:"email",placeholder:"Email",label:"Email",error:!!a.email,required:!0,...l})),rules:{required:!0}})}),R(Ft,{disabled:r,type:"submit",variant:"contained",disableElevation:!0,children:"Reset Password"}),R(Ft,{disabled:r,variant:"text",startIcon:R(iT,{}),component:Vm,to:"/login",children:"Back to login"})]})})]})}const rht=async e=>await g8(`${mr.IN_PROCESS_BILLS}/${e}/image`);function nht(){return R(hae,{fetchImageFile:rht,title:"In Process Bill file"})}const mae=({onError:e,onSuccess:t})=>{const{instance:r}=mut();return R(Ft,{variant:"outlined",sx:{width:"24rem",height:"2.375rem",textTransform:"none",borderColor:"rgba(0, 0, 0, 0.23)"},onClick:async()=>{try{const n=await r.loginPopup({scopes:["user.read"]});t(n)}catch{e()}},children:xe(Jt,{direction:"row",spacing:1,alignItems:"center",children:[xe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",children:[R("title",{children:"MS-SymbolLockup"}),R("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#f25022"}),R("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00a4ef"}),R("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7fba00"}),R("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#ffb900"})]}),R("span",{children:"Sign in with Microsoft"})]})})},oht={}.VITE_LOGO_LIGHT||"logo.blue.png";function iht(){var w,E;const{isAuthenticated:e,googleLogin:t,login:r,microsoftLogin:n}=on(),{control:o,handleSubmit:i,watch:a}=Bn({defaultValues:{email:"",password:""}}),[s,c]=a(["email","password"]),[l,u]=A.useState(!1),[f,d]=A.useState(!1),[h,p]=A.useState(!1);let m=(E=(w=El().state)==null?void 0:w.from)==null?void 0:E.pathname;(!m||m==="/login")&&(m="/");const v=async I=>{p(!0),await r(I.email,I.password)||u(!0),p(!1)},y=async I=>{p(!0),await t(I.credential)||d(!0),p(!1)},b=async I=>{p(!0),await n(I.accessToken)||d(!0),p(!1)};return e()?R(jm,{to:m,replace:!0}):xe(zr,{children:[R(Jt,{alignItems:"center",justifyContent:"center",spacing:4,sx:{background:"linear-gradient(135deg, rgba(191,210,237,1) 0%, rgba(34,56,84,1) 60%, rgba(14,36,60,1) 80%, rgba(14,36,60,1) 100%);",width:"100wh",height:"100vh"},children:R(Es,{elevation:6,sx:{padding:"0 2rem 2rem",maxWidth:"28rem",width:"28rem"},children:xe(Jt,{spacing:2,marginTop:4,alignItems:"center",children:[R(fC,{src:`/${oht}`,alt:"logo",fit:"contain",width:240}),R(jt,{variant:"h5",textAlign:"center",paddingTop:1,children:"Log in to your account"}),xe(jt,{variant:"body2",children:["Don't have an account?"," ",R(Uh,{href:"https://nimble-energy.com/contact-us/",underline:"none",target:"_blank",rel:"noreferer",children:"Contact us to start"})]}),R(Vie,{logo_alignment:"center",text:"continue_with",width:384,onSuccess:y,onError:()=>{u(!0)}}),R(mae,{onSuccess:b,onError:()=>u(!0)}),R(nr,{width:"24rem",children:R(yo,{sx:{mt:2},children:"Or with email and password"})}),R("form",{autoComplete:"off",noValidate:!0,onSubmit:i(v),children:xe(Jt,{spacing:2,alignItems:"center",children:[R(_E,{name:"email",control:o,rules:{required:!0},render:({field:I})=>R(Xa,{...I,sx:{width:"24rem"},error:l,label:"Email",variant:"outlined"})}),(s||c)&&xe(zr,{children:[R(_E,{name:"password",control:o,rules:{required:!0},render:({field:I})=>R(Xa,{...I,sx:{width:"24rem"},error:l,label:"Password",type:"password",variant:"outlined"})}),R(Vm,{to:"/login/forgot-password",style:{color:"inherit",textDecoration:"inherit"},children:R(jt,{variant:"body2",children:"Forgot password?"})}),R(Ft,{type:"submit",variant:"contained",disableElevation:!0,children:"Login"})]}),xe(jt,{textAlign:"center",sx:{color:"error.main"},children:[(l||f)&&"Unable to login. ",l&&!f&&"Please verify that your email and password are correct.",!l&&f&&"We do not recognize that account."]})]})}),xe(jt,{variant:"caption",children:["By continuing you agree to our"," ",R(Uh,{href:"https://nimble-energy.com/terms-conditions",underline:"none",target:"_blank",rel:"noreferer",children:"Terms of Service"})," ","and"," ",R(Uh,{href:"https://privacy.nimble-energy.com/",underline:"none",target:"_blank",rel:"noreferer",children:"Privacy Policy"})]})]})})}),R(Yh,{open:h,children:R(Ri,{"aria-label":"Logging in"})})]})}const aht="https://app.us.luzmo.com",sht="https://api.us.luzmo.com",LP="new";function kW(e){return e.filter(r=>{var n;return(n=r.name)==null?void 0:n.en}).map(r=>({id:r.id,name:r.name.en}))}function lht(){const[e,t]=A.useState([]),[r,n]=A.useState(!1),[o,i]=A.useState(),[a,s]=A.useState(),[c,l]=A.useState(),[u,f]=A.useState(null),d=A.useRef();return A.useEffect(()=>{async function p(){const g=await fetch("/dashboard/edit");g.ok;const m=await g.json(),v=kW(m.dashboards??[]),y=v.length?v[0].id:LP;s(m.key),l(m.token),i(y)}p()},[]),A.useEffect(()=>{async function p(){const g=await fetch("/dashboard/edit");g.ok;const m=await g.json(),v=kW(m.dashboards??[]);t(v),n(!1)}r&&p()},[r]),a&&c?xe(Jt,{children:[xe(Jt,{direction:"row",children:[R(Ft,{onClick:p=>{f(p.currentTarget),n(!0)},children:"Select Dashboard"}),R(vD,{anchorEl:u,onClose:()=>{f(null)},open:!!u,children:(()=>r?R(go,{children:R(Ri,{})}):e.length?e.map(p=>R(go,{onClick:()=>{i(p.id),f(null)},children:p.name},p.id)):R(go,{children:"No available dashboards, please create a new one"}))()}),R(Ft,{onClick:()=>{i(LP)},children:"Create New"})]}),R(nr,{sx:{height:"100vh"},children:R(KN,{dashboardId:o,authKey:a,authToken:c,appServer:aht,apiHost:sht,editMode:o===LP?"editFull":"view",mainColor:"pink",accentColor:"black",loaderSpinnerColor:"rgb(0, 81, 126)",loaderSpinnerBackground:"rgb(236 248 255)",ref:d},o)})]}):R(nr,{display:"flex",justifyContent:"center",marginTop:12,children:R(Ri,{"aria-label":"Loading"})})}function cht(){const{featureChecker:e}=on();if(!e.productFeatureEnabled(Y1.customDashboards))throw{status:"Unauthorizoried",statusText:"You do not have access to this page"};return R(hd,{tabs:[{component:()=>R(lht,{}),name:"My Dashboards",subtitle:"",tabTitle:"My Dashboards"}],heading:"Custom Dashboards"})}function uht(){return R(Gie,{children:R(wJ,{})})}var QN={},dht=Wr;Object.defineProperty(QN,"__esModule",{value:!0});var gae=QN.default=void 0,fht=dht(tn()),hht=rn,pht=(0,fht.default)((0,hht.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");gae=QN.default=pht;const r6=async(e,t={})=>await Ao(mr.DASHBOARDS+`/${e}`,t),mht=(e,t)=>{let r;return(...n)=>{r&&clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}},mb=({disabled:e=!1,filters:t,headerTitle:r,options:n=[],setFilter:o,children:i})=>{const[a,s]=A.useState([]);A.useEffect(()=>{c(a,t)},[a]);const c=A.useCallback(mht((l,u)=>o(f=>{const d=f.items.filter(({field:h})=>h!==u.field);return l.length&&d.push({...u,id:Math.random(),value:[...l.map(({value:h})=>h)]}),{items:d}}),1e3),[]);return xe(nr,{sx:{background:"white",border:1,borderRadius:1,borderColor:"#ececec"},children:[R(jt,{fontSize:13,color:"initial",paddingY:1,textAlign:"center",children:r}),R(yo,{}),i??R(Bh,{disabled:e,multiple:!0,options:n,defaultValue:[],disableCloseOnSelect:!0,getOptionLabel:l=>l.label,onChange:(l,u)=>s(u),isOptionEqualToValue:(l,u)=>l.value===u.value,renderOption:(l,{value:u,label:f},{selected:d})=>A.createElement(go,{...l,key:u,value:u},R(Tl,{checked:d}),R(jt,{style:{display:"inline-block",whiteSpace:"pre-line"},children:f})),renderInput:l=>R(Xa,{placeholder:"Select...",...l,sx:{fontSize:"10px",padding:"0px !important","& .MuiInputBase-root":{height:"40px",padding:0}}}),renderTags:(l,u)=>R(nr,{sx:{display:"flex","&::-webkit-scrollbar":{width:"4px",height:"4px",position:"absolute"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"4px"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"},overflow:"auto",whiteSpace:"nowrap",maxWidth:"80%",fontSize:"8px"},children:l.map((f,d)=>R(bo,{variant:"outlined",label:f.label,...u({index:d}),style:{marginRight:4,fontSize:"10px",background:"#0000001a"}},d))}),sx:{margin:2,".MuiAutocomplete-tag":{display:"inline-flex"},".MuiAutocomplete-input":{padding:0}}})]})},ght=e=>{const{classes:t}=e;return pt({root:["treeDataGroupingCell"],toggle:["treeDataGroupingCellToggle"]},Rr,t)};function vht(e){const{id:t,field:r,rowNode:n,row:o,hideDescendantCount:i,formattedValue:a,fetchData:s}=e,c=Il(),l=J1(),u=ght({classes:c.classes}),f=n.childrenExpanded?c.slots.treeDataCollapseIcon:c.slots.treeDataExpandIcon,d=h=>{if(!o.childrenFetched){const p=s(n);l.current.updateRows(p)}l.current.setRowChildrenExpansion(t,!n.childrenExpanded),l.current.setCellFocus(t,r),h.stopPropagation()};return xe(nr,{className:u.root,sx:{ml:n.depth*2},children:[R("div",{className:u.toggle,children:n.depth===0&&R(ri,{size:"small",onClick:d,tabIndex:-1,"aria-label":n.childrenExpanded?l.current.getLocaleText("treeDataCollapse"):l.current.getLocaleText("treeDataExpand"),children:R(f,{fontSize:"inherit"})})}),xe("span",{children:[a===void 0?n.groupingKey:a,!i&&o.descendantCount>0?` (${o.descendantCount})`:""]})]})}const yht=e=>({renderCell:t=>R(vht,{...t,fetchData:e})}),bht=({apiRef:e,fetchData:t})=>(A.useEffect(()=>{const r=async o=>{const i=e.current.getRow(o.id);!o.childrenExpanded||!i||i.childrenFetched},n=(o,i)=>{const a=e.current.getCellParams(o.id,o.field),s=o.rowNode,c=e.current.getRow(s.id);a.colDef.type==="treeDataGroup"&&i.key===" "&&(i.stopPropagation(),i.preventDefault(),i.defaultMuiPrevented=!0,c.childrenFetched||e.current.updateRows([{id:`placeholder-children-${s.id}`,tree:[...c.tree,""]}]),e.current.setRow(l=>({...l,hols:"hola"})),e.current.setRowChildrenExpansion(o.id,!o.rowNode.childrenExpanded))};e.current.subscribeEvent("rowExpansionChange",r),e.current.subscribeEvent("cellKeyDown",n,{isFirst:!0})},[e]),{groupingColDef:yht(t)}),aT=2e4,EW={initialPageParam:0,getNextPageParam:(e,t)=>(e==null?void 0:e.length)===aT?t.length*aT:void 0,initialData:{pages:[],pageParams:[]}},wht=()=>{const[{data:e},{data:t},{data:r}]=qi({queries:[{queryKey:["accounts"],queryFn:async()=>await hp(),initialData:{data:[]}},{queryKey:["meters"],queryFn:async()=>await kf(),initialData:{data:[]}},{queryKey:["utilities"],queryFn:async()=>await ry(),initialData:{data:[]}}]}),{data:n,fetchNextPage:o,hasNextPage:i,isFetching:a,isFetchingNextPage:s}=jR({...EW,queryKey:["billsDataSetBQ"],queryFn:async({pageParam:U=0})=>await r6("bills",{limit:aT,offset:U})}),{data:c,fetchNextPage:l,hasNextPage:u,isFetchingNextPage:f}=jR({...EW,queryKey:["lineItemsDataSetBQ"],queryFn:async({pageParam:U=0})=>await r6("line_items",{limit:aT,offset:U})});A.useMemo(()=>{i&&!s&&o()},[i,s,o]),A.useMemo(()=>{u&&!f&&l()},[u,f,l]);const[d,h]=A.useState({items:[]}),[p,g]=A.useState([]),m=m8();function v(){return n.pages.flat().map(B=>({id:B.bill_id,tree:[B.bill_id],account:B.account,billAmount:parseFloat(B.billAmount),billDate:B.billDate.value,billNumber:B.billNumber,budgetPeriod:B.budgetPeriod?new Date(B.budgetPeriod.value):"",budgetPeriodYear:B.budget_period_year,dueDate:B.dueDate?new Date(B.dueDate.value):"",estimated:B.bill_estimated,endDate:new Date(B.endDate.value),notes:B.notes,startDate:new Date(B.startDate.value)}))}const y={operator:"inRange",filterOperators:[{label:"inRange",value:"inRange",getApplyFilterFn:U=>{const[B,F]=U.value;if(B&&F)return({value:T})=>T>=B&&T<=F}}]},b=[{field:"account",headerName:"Account Number",width:150,valueFormatter:({value:U})=>{var B;return U?(B=e.data.find(({id:F})=>F===U))==null?void 0:B.number:""}},{field:"utility",headerName:"Utility",width:150,valueGetter:({row:U})=>{if(!U.account)return"";const B=e.data.find(({id:F})=>F===U.account);return B==null?void 0:B.utility.id},valueFormatter:({value:U})=>{if(!U)return"";const B=r.data.find(({id:F})=>F===U);return B==null?void 0:B.name}},{field:"billAmount",headerName:"Bill Amount",valueFormatter:({value:U})=>vo(U)},{field:"budgetPeriod",headerName:"Budget Period",type:"date"},{field:"budgetPeriodYear",headerName:"Year",width:50},{field:"estimated",headerName:"Estimated",width:70,valueGetter:({value:U})=>{if(U!==void 0)return U?"Yes":"No"}},{field:"startDate",headerName:"Start Date",type:"date",filterOperators:y.filterOperators},{field:"endDate",headerName:"End Date",type:"date"}],w=[{field:"meter",headerName:"Meter",valueFormatter:({value:U})=>{var B;return((B=t.data.find(({id:F})=>F===U))==null?void 0:B.name)??""}},{field:"facility",headerName:"Facility",valueGetter:({row:U})=>{var F;const B=(F=t.data.find(({id:T})=>T===U.meter))==null?void 0:F.parentFacility;return B==null?void 0:B.name}},{field:"lineItemType",headerName:"Line Item type"},{field:"lineItemUnit",headerName:"Line Item Unit"},{field:"lineItemUsage",headerName:"Line Item Usage"},{field:"lineItemCost",headerName:"Cost",valueFormatter:({value:U})=>vo(U)}],E=U=>U.tree,I=.1,O=We(lte)(({theme:U})=>({background:"white","& .MuiDataGrid-virtualScroller":{minHeight:"45vh",maxHeight:"93vh","&::-webkit-scrollbar":{width:"12px",height:"12px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#888",borderRadius:"10px",border:"3px solid #f0f0f0"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"},"&::-webkit-scrollbar-track":{backgroundColor:"#f0f0f0",borderRadius:"10px"}},"& .stripped-cell":{fontSize:"11.2px",borderColor:U.palette.grey[300]},"& .blue-header":{background:"rgb(14, 36, 60)",color:"rgb(245, 245, 245)",fontSize:"12px","& .MuiSvgIcon-root":{color:"white"}},[`& .${qe.row}.even`]:{backgroundColor:U.palette.grey[200],"&:hover":{backgroundColor:U.palette.grey[300],"@media (hover: none)":{backgroundColor:"transparent"}},"&.Mui-selected":{backgroundColor:to(U.palette.primary.main,I+U.palette.action.selectedOpacity),"&:hover":{backgroundColor:to(U.palette.primary.main,I+U.palette.action.selectedOpacity+U.palette.action.hoverOpacity)}}}}));A.useEffect(()=>{if(!m.current)return;const U=BJ(m);JSON.stringify(U)!==JSON.stringify(p)&&g(U)},[m.current]);const{groupingColDef:D}=bht({apiRef:m,fetchData:({id:U})=>c.pages.flat().filter(({bill:B})=>B===U).map(B=>({bill:U,id:B.line_item_id,tree:[U,B.line_item_id],endDate:B.endDate?new Date(B.endDate.value):"",lineItemCost:B.cost,lineItemUnit:B.unitOfMeasure,lineItemUsage:B.usage,lineItemType:B.lineItemType,startDate:B.startDate?new Date(B.startDate.value):"",meter:B.meter}))}),N=()=>{const U=J1();return R(tee,{sx:{justifyContent:"end",margin:1,position:"absolute",width:"100%"},children:R(ri,{...{size:"small",sx:{color:"white",zIndex:1,marginInline:1.5,background:"rgb(14, 36, 60)","&:hover":{background:"#4d546f"}}},onClick:((T={})=>()=>{U.current.exportDataAsCsv({...T,fileName:`${new Date().toLocaleDateString()}-bills-report`})})(),children:R(gae,{fontSize:"small"})})})};return xe(nr,{sx:{margin:1.5},justifyContent:"space-between",style:{maxHeight:"100vh"},children:[xe(Ot,{container:!0,spacing:2,paddingBottom:1.5,children:[R(Ot,{item:!0,xs:3,children:R(mb,{disabled:i||a,headerTitle:"Filter on Account Number",filters:{field:"account",operator:"isAnyOf"},setFilter:h,options:e.data.map(({id:U,number:B})=>({value:U,label:B}))})}),R(Ot,{item:!0,xs:3,children:R(mb,{disabled:i||a,headerTitle:"Filter on Utility",filters:{field:"utility",operator:"isAnyOf"},setFilter:h,options:r.data.map(({id:U,name:B})=>({value:U,label:B}))})}),R(Ot,{item:!0,xs:3,children:R(mb,{headerTitle:"Filter on Year",filters:{field:"year",operator:"contains"},setFilter:h,children:R(TD,{disabled:i||a,views:["year"],openTo:"year",onChange:U=>{h(B=>{const F=B.items.filter(({field:T})=>T!=="budgetPeriodYear");return U&&F.push({field:"budgetPeriodYear",operator:"contains",id:Math.random(),value:U.getFullYear()+""}),{items:F}})},slotProps:{field:{clearable:!0},textField:{sx:{width:"100%",padding:2,"& .MuiInputBase-root":{height:"40px"}}},calendarHeader:{sx:{display:"none"}}}})})}),R(Ot,{item:!0,xs:3,children:R(mb,{disabled:i||a,headerTitle:"Filter on Estimated",filters:{field:"estimated",operator:"isAnyOf"},setFilter:h,options:[{label:"Yes",value:"Yes"},{label:"No",value:"No"}]})}),R(Ot,{item:!0,xs:6,children:R(mb,{headerTitle:"Filter on Start Date Range",setFilter:h,filters:{field:"startDate",operator:"inRange"},children:R(Yte,{label:"Select...",error:"a",name:"startDate",helperText:"Start Date Range",placeholder:"Start Date Range",slotProps:{field:{clearable:!0},textField:{InputLabelProps:{sx:{margin:1}},sx:{width:"100%",padding:2,"& .MuiInputBase-root":{height:"40px"}}}},onChange:([U,B])=>{const F=d.items.filter(({field:T})=>T!=="startDate");U&&B&&F.push({field:"startDate",operator:y.operator,value:[U,B]}),h({...d,items:F})}})})}),R(Ot,{item:!0,xs:3,children:xe(nr,{sx:{background:"white",textAlign:"center",padding:2,border:1,borderRadius:1,borderColor:"#ececec"},children:[R(jt,{fontSize:18,children:"Total Cost"}),R(jt,{fontSize:35,children:i||a?R(Ri,{}):vo(p.reduce((U,B)=>U+(B.model.tree.length===1&&B.model.billAmount||0),0))})]})}),R(Ot,{item:!0,xs:3,children:xe(nr,{sx:{background:"white",textAlign:"center",padding:2,border:1,borderRadius:1,borderColor:"#ececec"},children:[R(jt,{fontSize:18,children:"Total Bills"}),R(jt,{fontSize:35,children:i||a?R(Ri,{}):vo(p.filter(({model:U})=>U.tree.length===1).length,{})})]})})]}),R(O,{apiRef:m,averageChildren:100,groupingField:"tree",maxDepth:2,rowHeight:30,disableChildrenFiltering:!0,treeData:!0,rows:i||a?[]:v(),columns:[...b,...w].map(U=>({cellClassName:"stripped-cell",headerClassName:"blue-header",width:100,...U})),filterModel:d,loading:i||a,showCellVerticalBorder:!0,getTreeDataPath:E,groupingColDef:{...D,minWidth:100,headerName:"Bill Date",valueGetter:({row:U})=>U.tree.length===1?new Date(U.billDate).toDateString():"",headerClassName:"blue-header",cellClassName:"stripped-cell"},getRowClassName:({indexRelativeToCurrentPage:U})=>U%2===0?"even":"odd",slots:{toolbar:N},slotProps:{footer:{sx:{display:"none"}}}})]})};function xht(){return R(hd,{tabs:[{component:()=>R(qn,{dashboardSlug:"accountdetails"}),name:"accountdetails",subtitle:"Account and line-item details",tabTitle:"Account Details"},{component:()=>R(qn,{dashboardSlug:"reportcalendarnormalized"}),name:"reportcalendarnormalized",subtitle:"Calendar normalized data by facility",tabTitle:"Calendar Normalized"},{component:()=>R(qn,{dashboardSlug:"reportfacilities"}),name:"reportfacilities",subtitle:"Facility details",tabTitle:"Facilities"},{component:()=>R(wht,{}),name:"reportBills",subtitle:"Bill details",tabTitle:"Bills"},{component:()=>R(qn,{dashboardSlug:"historicalusagecost"}),name:"historicalusagecost",subtitle:"Analyze total historical usage and cost together by month",tabTitle:"Historical Usage and Cost"},{component:()=>R(qn,{dashboardSlug:"totalenergycosts"}),name:"totalenergycosts",subtitle:"View total energy costs and changes by fiscal year",tabTitle:" Total Energy Costs"}],heading:"Generate exportable reports"})}var ZN={},Cht=Wr;Object.defineProperty(ZN,"__esModule",{value:!0});var vae=ZN.default=void 0,Sht=Cht(tn()),_ht=rn,kht=(0,Sht.default)((0,_ht.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock");vae=ZN.default=kht;const Eht=()=>[{name:"newPassword",label:"New password",placeholder:"Enter your new password",required:!0,type:"password"},{name:"confirmPassword",placeholder:"Confirm your new password",label:"Confirm password",required:!0,type:"password"}];function Tht(){const{control:e,handleSubmit:t,formState:{errors:r,dirtyFields:n},watch:o}=Bn({defaultValues:{newPassword:"",confirmPassword:""}}),i=ii(),a=n.newPassword??!1,s=n.confirmPassword??!1,[c,l]=A.useState(!1),[u,f]=o(["newPassword","confirmPassword"]),d=g4(u,f),h=()=>new URLSearchParams(window.location.search).get("oobCode")??"";A.useEffect(()=>{h()||i("/login")},[]);const p=async(m,v)=>{try{if(!(await fetch("/auth/resetPassword",{body:JSON.stringify({oobCode:m,newPassword:v}),headers:{"Content-Type":"application/json"},method:"post"})).ok)throw new Error("unable to change the password");St.success(bt.CHANGE_PASSWORD_SUCCESS),i("/login")}catch{St.error(bt.CHANGE_PASSWORD_ERROR)}finally{l(!1)}},g=({newPassword:m})=>{l(!0);const v=h();p(v,m)};return xe(td,{children:[xe(Ho,{spacing:2,alignItems:"center",marginTop:4,children:[R(Ho,{width:"4.5rem",height:"4.5rem",justifyContent:"center",alignItems:"center",position:"relative",sx:{borderRadius:"50%",backgroundColor:m=>to(m.palette.secondary.main,.1)},children:R(Ho,{width:"3rem",height:"3rem",alignItems:"center",justifyContent:"center",sx:{borderRadius:"50%",backgroundColor:m=>to(m.palette.secondary.main,.1)},children:R(vae,{fontSize:"large",color:"secondary"})})}),R(jt,{variant:"h3",textAlign:"center",children:"Reset your password"})]}),R("form",{onSubmit:t(m=>g(m)),children:xe(Ho,{spacing:2,alignItems:"center",marginTop:4,children:[R(v4,{constraints:d,dirtyFields:[{newPassword:a},{confirmPassword:s}],fieldName:"password"}),R(Ho,{spacing:2,width:"24rem",children:Eht().map((m,v)=>R(Dn,{control:e,fieldConf:m,errors:r},v))}),R(Ft,{disabled:c,type:"submit",variant:"contained",disableElevation:!0,children:"Reset Password"}),R(Ft,{disabled:c,variant:"text",startIcon:R(iT,{}),component:Vm,to:"/login",children:"Back to login"})]})})]})}const Iht=()=>xe(Jt,{spacing:2,padding:2,sx:{borderRadius:1,border:"1px solid rgba(0, 0, 0, 0.12)",position:"relative",height:"100%",width:"100%","&:before":{content:'" "',backgroundImage:'url("/smart_meter_dashboard.png")',backgroundRepeat:"no-repeat",backgroundSize:"cover",position:"absolute",left:0,opacity:.5,top:0,height:"100%",width:"100%",zIndex:-1}},children:[R(jt,{variant:"h4",alignSelf:"center",children:"Smart Meters Available but Not Connected"}),xe(jt,{children:["Smart meters are available for your account but not yet connected. We can identify and connect them for you via our platform's API. Just send us a message e"," ",R(Uh,{href:"support",target:"_blank",rel:"noreferrer",children:"here"})," ","or email us at"," ",R(Uh,{href:"mailto:support@nimble-energy.com",children:"support@nimble-energy.com"})," ","and we'll get right on it! Some key benefits you will get from having smart meters on the Nimble Energy platform include:"]}),R(z1,{children:["Unlocking additional platform analytics to identify schedule issues, equipment malfunctions, and more","Identifying high peak use times and investigating causes to reduce demand charges","Real-time identification of unusual usage patterns and savings measurement","Predicting future demand based on forecasted weather Insights into how weather and occupancy impact your costs","Detailed disaggregation of usage by load types such as cooling, heating, baseload, and plug load"].map(t=>R(BI,{dense:!0,children:R(ps,{primary:t})},t))}),R(jt,{variant:"body1",component:"div",children:"There are many more benefits, so contact us today to connect your smart meters!"})]});function Aht(){const{featureChecker:e}=on(),t=e.productFeatureEnabled(Y1.smartMeters),r=A.useMemo(()=>[{component:()=>t?R(qn,{dashboardSlug:"smartmeterhourly"}):R(Iht,{}),name:"smartmeterhourly",subtitle:" Analyze smart meter hourly data",tabTitle:"Hourly Trends"},{component:()=>R(qn,{dashboardSlug:"smartmeterweekly"}),featureEnabled:t,name:"smartmeterweekly",subtitle:"Analyze smart meter weekly trend profiles",tabTitle:"Weekly trends"},{component:()=>R(qn,{dashboardSlug:"smartmetermonthly"}),featureEnabled:t,name:"smartmetermonthly",subtitle:"Analyze smart meter monthly trend profiles",tabTitle:"Monthly Trends"},{component:()=>R(qn,{dashboardSlug:"smartmeterbaselines"}),featureEnabled:t,name:"smartmeterbaselines",subtitle:"Use predicted baseline models to identify anomalies",tabTitle:"Meter Baselines"}],[]);return R(hd,{tabs:r,heading:"Identify hard-to-find issues with interval data"})}const Ox="DEFAULT_X_AXIS_KEY",Dx="DEFAULT_Y_AXIS_KEY",Pht={top:50,bottom:50,left:50,right:50},Mht=(e,t,r)=>{const n=W({},Pht,r);return A.useMemo(()=>({left:n.left,top:n.top,right:n.right,bottom:n.bottom,width:Math.max(0,e-n.left-n.right),height:Math.max(0,t-n.top-n.bottom)}),[e,t,n.top,n.bottom,n.left,n.right])},Rht=Mht,T0=A.createContext({top:0,left:0,bottom:0,right:0,height:300,width:400,chartId:""}),T4=A.createContext({current:null});function Oht(e){const{width:t,height:r,margin:n,svgRef:o,children:i}=e,a=Rht(t,r,n),s=dn(),c=A.useMemo(()=>W({chartId:s??""},a),[s,a]);return R(T4.Provider,{value:o,children:R(T0.Provider,{value:c,children:i})})}function mk(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Dht(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function JN(e){let t,r,n;e.length!==2?(t=mk,r=(s,c)=>mk(e(s),c),n=(s,c)=>e(s)-c):(t=e===mk||e===Dht?e:Fht,r=e,n=e);function o(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const f=l+u>>>1;r(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const f=l+u>>>1;r(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){const f=o(s,c,l,u-1);return f>l&&n(s[f-1],c)>-n(s[f],c)?f-1:f}return{left:o,center:a,right:i}}function Fht(){return 0}function Nht(e){return e===null?NaN:+e}const Lht=JN(mk),$ht=Lht.right;JN(Nht).center;const Bht=$ht;class TW extends Map{constructor(t,r=zht){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,o]of t)this.set(n,o)}get(t){return super.get(IW(this,t))}has(t){return super.has(IW(this,t))}set(t,r){return super.set(Uht(this,t),r)}delete(t){return super.delete(Hht(this,t))}}function IW({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function Uht({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function Hht({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function zht(e){return e!==null&&typeof e=="object"?e.valueOf():e}const jht=Math.sqrt(50),Vht=Math.sqrt(10),Wht=Math.sqrt(2);function sT(e,t,r){const n=(t-e)/Math.max(0,r),o=Math.floor(Math.log10(n)),i=n/Math.pow(10,o),a=i>=jht?10:i>=Vht?5:i>=Wht?2:1;let s,c,l;return o<0?(l=Math.pow(10,-o)/a,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,o)*a,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=r&&r<2?sT(e,t,r*2):[s,c,l]}function n6(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[o,i,a]=n?sT(t,e,r):sT(e,t,r);if(!(i>=o))return[];const s=i-o+1,c=new Array(s);if(n)if(a<0)for(let l=0;l<s;++l)c[l]=(i-l)/-a;else for(let l=0;l<s;++l)c[l]=(i-l)*a;else if(a<0)for(let l=0;l<s;++l)c[l]=(o+l)/-a;else for(let l=0;l<s;++l)c[l]=(o+l)*a;return c}function o6(e,t,r){return t=+t,e=+e,r=+r,sT(e,t,r)[2]}function i6(e,t,r){t=+t,e=+e,r=+r;const n=t<e,o=n?o6(t,e,r):o6(e,t,r);return(n?-1:1)*(o<0?1/-o:o)}function Ght(e,t,r){e=+e,t=+t,r=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+r;for(var n=-1,o=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(o);++n<o;)i[n]=e+n*r;return i}function I0(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const AW=Symbol("implicit");function yae(){var e=new TW,t=[],r=[],n=AW;function o(i){let a=e.get(i);if(a===void 0){if(n!==AW)return n;e.set(i,a=t.push(i)-1)}return r[a%r.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new TW;for(const a of i)e.has(a)||e.set(a,t.push(a)-1);return o},o.range=function(i){return arguments.length?(r=Array.from(i),o):r.slice()},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return yae(t,r).unknown(n)},I0.apply(o,arguments),o}function lT(){var e=yae().unknown(void 0),t=e.domain,r=e.range,n=0,o=1,i,a,s=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,h=o<n,p=h?o:n,g=h?n:o;i=(g-p)/Math.max(1,d-c+l*2),s&&(i=Math.floor(i)),p+=(g-p-i*(d-c))*u,a=i*(1-c),s&&(p=Math.round(p),a=Math.round(a));var m=Ght(d).map(function(v){return p+i*v});return r(h?m.reverse():m)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,o]=d,n=+n,o=+o,f()):[n,o]},e.rangeRound=function(d){return[n,o]=d,n=+n,o=+o,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return lT(t(),[n,o]).round(s).paddingInner(c).paddingOuter(l).align(u)},I0.apply(f(),arguments)}function bae(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return bae(t())},e}function PW(){return bae(lT.apply(null,arguments).paddingInner(1))}function e9(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function wae(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function wC(){}var Fx=.7,cT=1/Fx,xv="\\s*([+-]?\\d+)\\s*",Nx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ed="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qht=/^#([0-9a-f]{3,8})$/,Kht=new RegExp(`^rgb\\(${xv},${xv},${xv}\\)$`),Yht=new RegExp(`^rgb\\(${ed},${ed},${ed}\\)$`),Xht=new RegExp(`^rgba\\(${xv},${xv},${xv},${Nx}\\)$`),Qht=new RegExp(`^rgba\\(${ed},${ed},${ed},${Nx}\\)$`),Zht=new RegExp(`^hsl\\(${Nx},${ed},${ed}\\)$`),Jht=new RegExp(`^hsla\\(${Nx},${ed},${ed},${Nx}\\)$`),MW={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};e9(wC,_1,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:RW,formatHex:RW,formatHex8:ept,formatHsl:tpt,formatRgb:OW,toString:OW});function RW(){return this.rgb().formatHex()}function ept(){return this.rgb().formatHex8()}function tpt(){return xae(this).formatHsl()}function OW(){return this.rgb().formatRgb()}function _1(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qht.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?DW(t):r===3?new Bs(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?__(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?__(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Kht.exec(e))?new Bs(t[1],t[2],t[3],1):(t=Yht.exec(e))?new Bs(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xht.exec(e))?__(t[1],t[2],t[3],t[4]):(t=Qht.exec(e))?__(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zht.exec(e))?LW(t[1],t[2]/100,t[3]/100,1):(t=Jht.exec(e))?LW(t[1],t[2]/100,t[3]/100,t[4]):MW.hasOwnProperty(e)?DW(MW[e]):e==="transparent"?new Bs(NaN,NaN,NaN,0):null}function DW(e){return new Bs(e>>16&255,e>>8&255,e&255,1)}function __(e,t,r,n){return n<=0&&(e=t=r=NaN),new Bs(e,t,r,n)}function rpt(e){return e instanceof wC||(e=_1(e)),e?(e=e.rgb(),new Bs(e.r,e.g,e.b,e.opacity)):new Bs}function a6(e,t,r,n){return arguments.length===1?rpt(e):new Bs(e,t,r,n??1)}function Bs(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}e9(Bs,a6,wae(wC,{brighter(e){return e=e==null?cT:Math.pow(cT,e),new Bs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Fx:Math.pow(Fx,e),new Bs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Bs(Am(this.r),Am(this.g),Am(this.b),uT(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FW,formatHex:FW,formatHex8:npt,formatRgb:NW,toString:NW}));function FW(){return`#${rm(this.r)}${rm(this.g)}${rm(this.b)}`}function npt(){return`#${rm(this.r)}${rm(this.g)}${rm(this.b)}${rm((isNaN(this.opacity)?1:this.opacity)*255)}`}function NW(){const e=uT(this.opacity);return`${e===1?"rgb(":"rgba("}${Am(this.r)}, ${Am(this.g)}, ${Am(this.b)}${e===1?")":`, ${e})`}`}function uT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Am(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function rm(e){return e=Am(e),(e<16?"0":"")+e.toString(16)}function LW(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qc(e,t,r,n)}function xae(e){if(e instanceof qc)return new qc(e.h,e.s,e.l,e.opacity);if(e instanceof wC||(e=_1(e)),!e)return new qc;if(e instanceof qc)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,c=(i+o)/2;return s?(t===i?a=(r-n)/s+(r<n)*6:r===i?a=(n-t)/s+2:a=(t-r)/s+4,s/=c<.5?i+o:2-i-o,a*=60):s=c>0&&c<1?0:a,new qc(a,s,c,e.opacity)}function opt(e,t,r,n){return arguments.length===1?xae(e):new qc(e,t,r,n??1)}function qc(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}e9(qc,opt,wae(wC,{brighter(e){return e=e==null?cT:Math.pow(cT,e),new qc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Fx:Math.pow(Fx,e),new qc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Bs($P(e>=240?e-240:e+120,o,n),$P(e,o,n),$P(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new qc($W(this.h),k_(this.s),k_(this.l),uT(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=uT(this.opacity);return`${e===1?"hsl(":"hsla("}${$W(this.h)}, ${k_(this.s)*100}%, ${k_(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $W(e){return e=(e||0)%360,e<0?e+360:e}function k_(e){return Math.max(0,Math.min(1,e||0))}function $P(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const t9=e=>()=>e;function ipt(e,t){return function(r){return e+r*t}}function apt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function spt(e){return(e=+e)==1?Cae:function(t,r){return r-t?apt(t,r,e):t9(isNaN(t)?r:t)}}function Cae(e,t){var r=t-e;return r?ipt(e,r):t9(isNaN(e)?t:e)}const BW=function e(t){var r=spt(t);function n(o,i){var a=r((o=a6(o)).r,(i=a6(i)).r),s=r(o.g,i.g),c=r(o.b,i.b),l=Cae(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=c(u),o.opacity=l(u),o+""}}return n.gamma=e,n}(1);function lpt(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),o;return function(i){for(o=0;o<r;++o)n[o]=e[o]*(1-i)+t[o]*i;return n}}function cpt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function upt(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,o=new Array(n),i=new Array(r),a;for(a=0;a<n;++a)o[a]=r9(e[a],t[a]);for(;a<r;++a)i[a]=t[a];return function(s){for(a=0;a<n;++a)i[a]=o[a](s);return i}}function dpt(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function dT(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function fpt(e,t){var r={},n={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?r[o]=r9(e[o],t[o]):n[o]=t[o];return function(i){for(o in r)n[o]=r[o](i);return n}}var s6=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,BP=new RegExp(s6.source,"g");function hpt(e){return function(){return e}}function ppt(e){return function(t){return e(t)+""}}function mpt(e,t){var r=s6.lastIndex=BP.lastIndex=0,n,o,i,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=s6.exec(e))&&(o=BP.exec(t));)(i=o.index)>r&&(i=t.slice(r,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,c.push({i:a,x:dT(n,o)})),r=BP.lastIndex;return r<t.length&&(i=t.slice(r),s[a]?s[a]+=i:s[++a]=i),s.length<2?c[0]?ppt(c[0].x):hpt(t):(t=c.length,function(l){for(var u=0,f;u<t;++u)s[(f=c[u]).i]=f.x(l);return s.join("")})}function r9(e,t){var r=typeof t,n;return t==null||r==="boolean"?t9(t):(r==="number"?dT:r==="string"?(n=_1(t))?(t=n,BW):mpt:t instanceof _1?BW:t instanceof Date?dpt:cpt(t)?lpt:Array.isArray(t)?upt:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?fpt:dT)(e,t)}function gpt(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function vpt(e){return function(){return e}}function ypt(e){return+e}var UW=[0,1];function Vu(e){return e}function l6(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:vpt(isNaN(t)?NaN:.5)}function bpt(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function wpt(e,t,r){var n=e[0],o=e[1],i=t[0],a=t[1];return o<n?(n=l6(o,n),i=r(a,i)):(n=l6(n,o),i=r(i,a)),function(s){return i(n(s))}}function xpt(e,t,r){var n=Math.min(e.length,t.length)-1,o=new Array(n),i=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)o[a]=l6(e[a],e[a+1]),i[a]=r(t[a],t[a+1]);return function(s){var c=Bht(e,s,1,n)-1;return i[c](o[c](s))}}function I4(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function n9(){var e=UW,t=UW,r=r9,n,o,i,a=Vu,s,c,l;function u(){var d=Math.min(e.length,t.length);return a!==Vu&&(a=bpt(e[0],e[d-1])),s=d>2?xpt:wpt,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?i:(c||(c=s(e.map(n),t,r)))(n(a(d)))}return f.invert=function(d){return a(o((l||(l=s(t,e.map(n),dT)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,ypt),u()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=gpt,u()},f.clamp=function(d){return arguments.length?(a=d?!0:Vu,u()):a!==Vu},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(i=d,f):i},function(d,h){return n=d,o=h,u()}}function Sae(){return n9()(Vu,Vu)}function Cpt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function fT(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function k1(e){return e=fT(Math.abs(e)),e?e[1]:NaN}function Spt(e,t){return function(r,n){for(var o=r.length,i=[],a=0,s=e[0],c=0;o>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),i.push(r.substring(o-=s,o+s)),!((c+=s+1)>n));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function _pt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var kpt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lx(e){if(!(t=kpt.exec(e)))throw new Error("invalid format: "+e);var t;return new o9({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Lx.prototype=o9.prototype;function o9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}o9.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Ept(e){e:for(var t=e.length,r=1,n=-1,o;r<t;++r)switch(e[r]){case".":n=o=r;break;case"0":n===0&&(n=r),o=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(o+1):e}var _ae;function Tpt(e,t){var r=fT(e,t);if(!r)return e+"";var n=r[0],o=r[1],i=o-(_ae=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=n.length;return i===a?n:i>a?n+new Array(i-a+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+fT(e,Math.max(0,t+i-1))[0]}function HW(e,t){var r=fT(e,t);if(!r)return e+"";var n=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}const zW={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Cpt,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>HW(e*100,t),r:HW,s:Tpt,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function jW(e){return e}var VW=Array.prototype.map,WW=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ipt(e){var t=e.grouping===void 0||e.thousands===void 0?jW:Spt(VW.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?jW:_pt(VW.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Lx(f);var d=f.fill,h=f.align,p=f.sign,g=f.symbol,m=f.zero,v=f.width,y=f.comma,b=f.precision,w=f.trim,E=f.type;E==="n"?(y=!0,E="g"):zW[E]||(b===void 0&&(b=12),w=!0,E="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var I=g==="$"?r:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",O=g==="$"?n:/[%p]/.test(E)?a:"",D=zW[E],N=/[defgprs%]/.test(E);b=b===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function U(B){var F=I,T=O,P,_,C;if(E==="c")T=D(B)+T,B="";else{B=+B;var S=B<0||1/B<0;if(B=isNaN(B)?c:D(Math.abs(B),b),w&&(B=Ept(B)),S&&+B==0&&p!=="+"&&(S=!1),F=(S?p==="("?p:s:p==="-"||p==="("?"":p)+F,T=(E==="s"?WW[8+_ae/3]:"")+T+(S&&p==="("?")":""),N){for(P=-1,_=B.length;++P<_;)if(C=B.charCodeAt(P),48>C||C>57){T=(C===46?o+B.slice(P+1):B.slice(P))+T,B=B.slice(0,P);break}}}y&&!m&&(B=t(B,1/0));var x=F.length+B.length+T.length,k=x<v?new Array(v-x+1).join(d):"";switch(y&&m&&(B=t(k+B,k.length?v-T.length:1/0),k=""),h){case"<":B=F+B+T+k;break;case"=":B=F+k+B+T;break;case"^":B=k.slice(0,x=k.length>>1)+F+B+T+k.slice(x);break;default:B=k+F+B+T;break}return i(B)}return U.toString=function(){return f+""},U}function u(f,d){var h=l((f=Lx(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(k1(d)/3)))*3,g=Math.pow(10,-p),m=WW[8+p/3];return function(v){return h(g*v)+m}}return{format:l,formatPrefix:u}}var E_,i9,kae;Apt({thousands:",",grouping:[3],currency:["$",""]});function Apt(e){return E_=Ipt(e),i9=E_.format,kae=E_.formatPrefix,E_}function Ppt(e){return Math.max(0,-k1(Math.abs(e)))}function Mpt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k1(t)/3)))*3-k1(Math.abs(e)))}function Rpt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,k1(t)-k1(e))+1}function Opt(e,t,r,n){var o=i6(e,t,r),i;switch(n=Lx(n??",f"),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=Mpt(o,a))&&(n.precision=i),kae(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=Rpt(o,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=Ppt(o))&&(n.precision=i-(n.type==="%")*2);break}}return i9(n)}function Eae(e){var t=e.domain;return e.ticks=function(r){var n=t();return n6(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var o=t();return Opt(o[0],o[o.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),o=0,i=n.length-1,a=n[o],s=n[i],c,l,u=10;for(s<a&&(l=a,a=s,s=l,l=o,o=i,i=l);u-- >0;){if(l=o6(a,s,r),l===c)return n[o]=a,n[i]=s,t(n);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Tae(){var e=Sae();return e.copy=function(){return I4(e,Tae())},I0.apply(e,arguments),Eae(e)}function Iae(e,t){e=e.slice();var r=0,n=e.length-1,o=e[r],i=e[n],a;return i<o&&(a=r,r=n,n=a,a=o,o=i,i=a),e[r]=t.floor(o),e[n]=t.ceil(i),e}function GW(e){return Math.log(e)}function qW(e){return Math.exp(e)}function Dpt(e){return-Math.log(-e)}function Fpt(e){return-Math.exp(-e)}function Npt(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Lpt(e){return e===10?Npt:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $pt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function KW(e){return(t,r)=>-e(-t,r)}function Bpt(e){const t=e(GW,qW),r=t.domain;let n=10,o,i;function a(){return o=$pt(n),i=Lpt(n),r()[0]<0?(o=KW(o),i=KW(i),e(Dpt,Fpt)):e(GW,qW),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=s=>{const c=r();let l=c[0],u=c[c.length-1];const f=u<l;f&&([l,u]=[u,l]);let d=o(l),h=o(u),p,g;const m=s==null?10:+s;let v=[];if(!(n%1)&&h-d<m){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(p=1;p<n;++p)if(g=d<0?p/i(-d):p*i(d),!(g<l)){if(g>u)break;v.push(g)}}else for(;d<=h;++d)for(p=n-1;p>=1;--p)if(g=d>0?p/i(-d):p*i(d),!(g<l)){if(g>u)break;v.push(g)}v.length*2<m&&(v=n6(l,u,m))}else v=n6(d,h,Math.min(h-d,m)).map(i);return f?v.reverse():v},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=n===10?"s":","),typeof c!="function"&&(!(n%1)&&(c=Lx(c)).precision==null&&(c.trim=!0),c=i9(c)),s===1/0)return c;const l=Math.max(1,n*s/t.ticks().length);return u=>{let f=u/i(Math.round(o(u)));return f*n<n-.5&&(f*=n),f<=l?c(u):""}},t.nice=()=>r(Iae(r(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function Aae(){const e=Bpt(n9()).domain([1,10]);return e.copy=()=>I4(e,Aae()).base(e.base()),I0.apply(e,arguments),e}function YW(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Upt(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Hpt(e){return e<0?-e*e:e*e}function zpt(e){var t=e(Vu,Vu),r=1;function n(){return r===1?e(Vu,Vu):r===.5?e(Upt,Hpt):e(YW(r),YW(1/r))}return t.exponent=function(o){return arguments.length?(r=+o,n()):r},Eae(t)}function a9(){var e=zpt(n9());return e.copy=function(){return I4(e,a9()).exponent(e.exponent())},I0.apply(e,arguments),e}function jpt(){return a9.apply(null,arguments).exponent(.5)}const UP=new Date,HP=new Date;function Ki(e,t,r,n){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a<s-i?a:s},o.offset=(i,a)=>(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const c=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i<a)||!(s>0))return c;let l;do c.push(l=new Date(+i)),t(i,s),e(i);while(l<i&&i<a);return c},o.filter=i=>Ki(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),r&&(o.count=(i,a)=>(UP.setTime(+i),HP.setTime(+a),e(UP),e(HP),Math.floor(r(UP,HP))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(n?a=>n(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const hT=Ki(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);hT.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ki(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):hT);hT.range;const Gd=1e3,ac=Gd*60,qd=ac*60,hf=qd*24,s9=hf*7,XW=hf*30,zP=hf*365,nm=Ki(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Gd)},(e,t)=>(t-e)/Gd,e=>e.getUTCSeconds());nm.range;const l9=Ki(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gd)},(e,t)=>{e.setTime(+e+t*ac)},(e,t)=>(t-e)/ac,e=>e.getMinutes());l9.range;const c9=Ki(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ac)},(e,t)=>(t-e)/ac,e=>e.getUTCMinutes());c9.range;const u9=Ki(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gd-e.getMinutes()*ac)},(e,t)=>{e.setTime(+e+t*qd)},(e,t)=>(t-e)/qd,e=>e.getHours());u9.range;const d9=Ki(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qd)},(e,t)=>(t-e)/qd,e=>e.getUTCHours());d9.range;const xC=Ki(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ac)/hf,e=>e.getDate()-1);xC.range;const A4=Ki(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hf,e=>e.getUTCDate()-1);A4.range;const Pae=Ki(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/hf,e=>Math.floor(e/hf));Pae.range;function A0(e){return Ki(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*ac)/s9)}const P4=A0(0),pT=A0(1),Vpt=A0(2),Wpt=A0(3),E1=A0(4),Gpt=A0(5),qpt=A0(6);P4.range;pT.range;Vpt.range;Wpt.range;E1.range;Gpt.range;qpt.range;function P0(e){return Ki(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/s9)}const M4=P0(0),mT=P0(1),Kpt=P0(2),Ypt=P0(3),T1=P0(4),Xpt=P0(5),Qpt=P0(6);M4.range;mT.range;Kpt.range;Ypt.range;T1.range;Xpt.range;Qpt.range;const f9=Ki(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());f9.range;const h9=Ki(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());h9.range;const pf=Ki(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ki(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});pf.range;const mf=Ki(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());mf.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ki(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});mf.range;function Mae(e,t,r,n,o,i){const a=[[nm,1,Gd],[nm,5,5*Gd],[nm,15,15*Gd],[nm,30,30*Gd],[i,1,ac],[i,5,5*ac],[i,15,15*ac],[i,30,30*ac],[o,1,qd],[o,3,3*qd],[o,6,6*qd],[o,12,12*qd],[n,1,hf],[n,2,2*hf],[r,1,s9],[t,1,XW],[t,3,3*XW],[e,1,zP]];function s(l,u,f){const d=u<l;d&&([l,u]=[u,l]);const h=f&&typeof f.range=="function"?f:c(l,u,f),p=h?h.range(l,+u+1):[];return d?p.reverse():p}function c(l,u,f){const d=Math.abs(u-l)/f,h=JN(([,,m])=>m).right(a,d);if(h===a.length)return e.every(i6(l/zP,u/zP,f));if(h===0)return hT.every(Math.max(i6(l,u,f),1));const[p,g]=a[d/a[h-1][2]<a[h][2]/d?h-1:h];return p.every(g)}return[s,c]}const[Zpt,Jpt]=Mae(mf,h9,M4,Pae,d9,c9),[emt,tmt]=Mae(pf,f9,P4,xC,u9,l9);function jP(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function VP(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function gb(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function rmt(e){var t=e.dateTime,r=e.date,n=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,c=e.shortMonths,l=vb(o),u=yb(o),f=vb(i),d=yb(i),h=vb(a),p=yb(a),g=vb(s),m=yb(s),v=vb(c),y=yb(c),b={a:S,A:x,b:k,B:L,c:null,d:rG,e:rG,f:kmt,g:Fmt,G:Lmt,H:Cmt,I:Smt,j:_mt,L:Rae,m:Emt,M:Tmt,p:j,q:z,Q:iG,s:aG,S:Imt,u:Amt,U:Pmt,V:Mmt,w:Rmt,W:Omt,x:null,X:null,y:Dmt,Y:Nmt,Z:$mt,"%":oG},w={a:Y,A:K,b:Q,B:q,c:null,d:nG,e:nG,f:zmt,g:Zmt,G:e0t,H:Bmt,I:Umt,j:Hmt,L:Dae,m:jmt,M:Vmt,p:J,q:G,Q:iG,s:aG,S:Wmt,u:Gmt,U:qmt,V:Kmt,w:Ymt,W:Xmt,x:null,X:null,y:Qmt,Y:Jmt,Z:t0t,"%":oG},E={a:U,A:B,b:F,B:T,c:P,d:eG,e:eG,f:ymt,g:JW,G:ZW,H:tG,I:tG,j:pmt,L:vmt,m:hmt,M:mmt,p:N,q:fmt,Q:wmt,s:xmt,S:gmt,u:smt,U:lmt,V:cmt,w:amt,W:umt,x:_,X:C,y:JW,Y:ZW,Z:dmt,"%":bmt};b.x=I(r,b),b.X=I(n,b),b.c=I(t,b),w.x=I(r,w),w.X=I(n,w),w.c=I(t,w);function I(V,X){return function(te){var ee=[],re=-1,se=0,pe=V.length,ce,ne,he;for(te instanceof Date||(te=new Date(+te));++re<pe;)V.charCodeAt(re)===37&&(ee.push(V.slice(se,re)),(ne=QW[ce=V.charAt(++re)])!=null?ce=V.charAt(++re):ne=ce==="e"?" ":"0",(he=X[ce])&&(ce=he(te,ne)),ee.push(ce),se=re+1);return ee.push(V.slice(se,re)),ee.join("")}}function O(V,X){return function(te){var ee=gb(1900,void 0,1),re=D(ee,V,te+="",0),se,pe;if(re!=te.length)return null;if("Q"in ee)return new Date(ee.Q);if("s"in ee)return new Date(ee.s*1e3+("L"in ee?ee.L:0));if(X&&!("Z"in ee)&&(ee.Z=0),"p"in ee&&(ee.H=ee.H%12+ee.p*12),ee.m===void 0&&(ee.m="q"in ee?ee.q:0),"V"in ee){if(ee.V<1||ee.V>53)return null;"w"in ee||(ee.w=1),"Z"in ee?(se=VP(gb(ee.y,0,1)),pe=se.getUTCDay(),se=pe>4||pe===0?mT.ceil(se):mT(se),se=A4.offset(se,(ee.V-1)*7),ee.y=se.getUTCFullYear(),ee.m=se.getUTCMonth(),ee.d=se.getUTCDate()+(ee.w+6)%7):(se=jP(gb(ee.y,0,1)),pe=se.getDay(),se=pe>4||pe===0?pT.ceil(se):pT(se),se=xC.offset(se,(ee.V-1)*7),ee.y=se.getFullYear(),ee.m=se.getMonth(),ee.d=se.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),pe="Z"in ee?VP(gb(ee.y,0,1)).getUTCDay():jP(gb(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(pe+5)%7:ee.w+ee.U*7-(pe+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,VP(ee)):jP(ee)}}function D(V,X,te,ee){for(var re=0,se=X.length,pe=te.length,ce,ne;re<se;){if(ee>=pe)return-1;if(ce=X.charCodeAt(re++),ce===37){if(ce=X.charAt(re++),ne=E[ce in QW?X.charAt(re++):ce],!ne||(ee=ne(V,te,ee))<0)return-1}else if(ce!=te.charCodeAt(ee++))return-1}return ee}function N(V,X,te){var ee=l.exec(X.slice(te));return ee?(V.p=u.get(ee[0].toLowerCase()),te+ee[0].length):-1}function U(V,X,te){var ee=h.exec(X.slice(te));return ee?(V.w=p.get(ee[0].toLowerCase()),te+ee[0].length):-1}function B(V,X,te){var ee=f.exec(X.slice(te));return ee?(V.w=d.get(ee[0].toLowerCase()),te+ee[0].length):-1}function F(V,X,te){var ee=v.exec(X.slice(te));return ee?(V.m=y.get(ee[0].toLowerCase()),te+ee[0].length):-1}function T(V,X,te){var ee=g.exec(X.slice(te));return ee?(V.m=m.get(ee[0].toLowerCase()),te+ee[0].length):-1}function P(V,X,te){return D(V,t,X,te)}function _(V,X,te){return D(V,r,X,te)}function C(V,X,te){return D(V,n,X,te)}function S(V){return a[V.getDay()]}function x(V){return i[V.getDay()]}function k(V){return c[V.getMonth()]}function L(V){return s[V.getMonth()]}function j(V){return o[+(V.getHours()>=12)]}function z(V){return 1+~~(V.getMonth()/3)}function Y(V){return a[V.getUTCDay()]}function K(V){return i[V.getUTCDay()]}function Q(V){return c[V.getUTCMonth()]}function q(V){return s[V.getUTCMonth()]}function J(V){return o[+(V.getUTCHours()>=12)]}function G(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var X=I(V+="",b);return X.toString=function(){return V},X},parse:function(V){var X=O(V+="",!1);return X.toString=function(){return V},X},utcFormat:function(V){var X=I(V+="",w);return X.toString=function(){return V},X},utcParse:function(V){var X=O(V+="",!0);return X.toString=function(){return V},X}}}var QW={"-":"",_:" ",0:"0"},ha=/^\s*\d+/,nmt=/^%/,omt=/[\\^$*+?|[\]().{}]/g;function Un(e,t,r){var n=e<0?"-":"",o=(n?-e:e)+"",i=o.length;return n+(i<r?new Array(r-i+1).join(t)+o:o)}function imt(e){return e.replace(omt,"\\$&")}function vb(e){return new RegExp("^(?:"+e.map(imt).join("|")+")","i")}function yb(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function amt(e,t,r){var n=ha.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function smt(e,t,r){var n=ha.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function lmt(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function cmt(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function umt(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function ZW(e,t,r){var n=ha.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function JW(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function dmt(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function fmt(e,t,r){var n=ha.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function hmt(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function eG(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function pmt(e,t,r){var n=ha.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function tG(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function mmt(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function gmt(e,t,r){var n=ha.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function vmt(e,t,r){var n=ha.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ymt(e,t,r){var n=ha.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function bmt(e,t,r){var n=nmt.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function wmt(e,t,r){var n=ha.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function xmt(e,t,r){var n=ha.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function rG(e,t){return Un(e.getDate(),t,2)}function Cmt(e,t){return Un(e.getHours(),t,2)}function Smt(e,t){return Un(e.getHours()%12||12,t,2)}function _mt(e,t){return Un(1+xC.count(pf(e),e),t,3)}function Rae(e,t){return Un(e.getMilliseconds(),t,3)}function kmt(e,t){return Rae(e,t)+"000"}function Emt(e,t){return Un(e.getMonth()+1,t,2)}function Tmt(e,t){return Un(e.getMinutes(),t,2)}function Imt(e,t){return Un(e.getSeconds(),t,2)}function Amt(e){var t=e.getDay();return t===0?7:t}function Pmt(e,t){return Un(P4.count(pf(e)-1,e),t,2)}function Oae(e){var t=e.getDay();return t>=4||t===0?E1(e):E1.ceil(e)}function Mmt(e,t){return e=Oae(e),Un(E1.count(pf(e),e)+(pf(e).getDay()===4),t,2)}function Rmt(e){return e.getDay()}function Omt(e,t){return Un(pT.count(pf(e)-1,e),t,2)}function Dmt(e,t){return Un(e.getFullYear()%100,t,2)}function Fmt(e,t){return e=Oae(e),Un(e.getFullYear()%100,t,2)}function Nmt(e,t){return Un(e.getFullYear()%1e4,t,4)}function Lmt(e,t){var r=e.getDay();return e=r>=4||r===0?E1(e):E1.ceil(e),Un(e.getFullYear()%1e4,t,4)}function $mt(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Un(t/60|0,"0",2)+Un(t%60,"0",2)}function nG(e,t){return Un(e.getUTCDate(),t,2)}function Bmt(e,t){return Un(e.getUTCHours(),t,2)}function Umt(e,t){return Un(e.getUTCHours()%12||12,t,2)}function Hmt(e,t){return Un(1+A4.count(mf(e),e),t,3)}function Dae(e,t){return Un(e.getUTCMilliseconds(),t,3)}function zmt(e,t){return Dae(e,t)+"000"}function jmt(e,t){return Un(e.getUTCMonth()+1,t,2)}function Vmt(e,t){return Un(e.getUTCMinutes(),t,2)}function Wmt(e,t){return Un(e.getUTCSeconds(),t,2)}function Gmt(e){var t=e.getUTCDay();return t===0?7:t}function qmt(e,t){return Un(M4.count(mf(e)-1,e),t,2)}function Fae(e){var t=e.getUTCDay();return t>=4||t===0?T1(e):T1.ceil(e)}function Kmt(e,t){return e=Fae(e),Un(T1.count(mf(e),e)+(mf(e).getUTCDay()===4),t,2)}function Ymt(e){return e.getUTCDay()}function Xmt(e,t){return Un(mT.count(mf(e)-1,e),t,2)}function Qmt(e,t){return Un(e.getUTCFullYear()%100,t,2)}function Zmt(e,t){return e=Fae(e),Un(e.getUTCFullYear()%100,t,2)}function Jmt(e,t){return Un(e.getUTCFullYear()%1e4,t,4)}function e0t(e,t){var r=e.getUTCDay();return e=r>=4||r===0?T1(e):T1.ceil(e),Un(e.getUTCFullYear()%1e4,t,4)}function t0t(){return"+0000"}function oG(){return"%"}function iG(e){return+e}function aG(e){return Math.floor(+e/1e3)}var vg,Nae,Lae;r0t({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function r0t(e){return vg=rmt(e),Nae=vg.format,vg.parse,Lae=vg.utcFormat,vg.utcParse,vg}function n0t(e){return new Date(e)}function o0t(e){return e instanceof Date?+e:+new Date(+e)}function p9(e,t,r,n,o,i,a,s,c,l){var u=Sae(),f=u.invert,d=u.domain,h=l(".%L"),p=l(":%S"),g=l("%I:%M"),m=l("%I %p"),v=l("%a %d"),y=l("%b %d"),b=l("%B"),w=l("%Y");function E(I){return(c(I)<I?h:s(I)<I?p:a(I)<I?g:i(I)<I?m:n(I)<I?o(I)<I?v:y:r(I)<I?b:w)(I)}return u.invert=function(I){return new Date(f(I))},u.domain=function(I){return arguments.length?d(Array.from(I,o0t)):d().map(n0t)},u.ticks=function(I){var O=d();return e(O[0],O[O.length-1],I??10)},u.tickFormat=function(I,O){return O==null?E:l(O)},u.nice=function(I){var O=d();return(!I||typeof I.range!="function")&&(I=t(O[0],O[O.length-1],I??10)),I?d(Iae(O,I)):u},u.copy=function(){return I4(u,p9(e,t,r,n,o,i,a,s,c,l))},u}function i0t(){return I0.apply(p9(emt,tmt,pf,f9,P4,xC,u9,l9,nm,Nae).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function a0t(){return I0.apply(p9(Zpt,Jpt,mf,h9,M4,A4,d9,c9,nm,Lae).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const $ae=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]},Bae=e=>{const{series:t,axis:r,isDefaultAxis:n}=e;return Object.keys(t).filter(o=>t[o].yAxisKey===r.id||n&&t[o].yAxisKey===void 0).reduce((o,i)=>{const[a,s]=t[i].stackedData.reduce((c,l)=>[Math.min(...l,...c[0]===null?[]:[c[0]]),Math.max(...l,...c[1]===null?[]:[c[1]])],t[i].stackedData[0]);return[o[0]===null?a:Math.min(a,o[0]),o[1]===null?s:Math.max(s,o[1])]},[null,null])},s0t=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?Bae(e):$ae(e),l0t=e=>Object.keys(e.series).some(r=>e.series[r].layout==="horizontal")?$ae(e):Bae(e),gT=(e,t)=>e[0]===null||e[1]===null?t:t[0]===null||t[1]===null?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])],c0t=e=>{const{series:t,axis:r,isDefaultAxis:n}=e;return Object.keys(t).filter(o=>t[o].xAxisKey===r.id||t[o].xAxisKey===void 0&&n).reduce((o,i)=>{const a=t[i].data.reduce((s,{x:c})=>gT(s,[c,c]),[null,null]);return gT(o,a)},[null,null])},u0t=e=>{const{series:t,axis:r,isDefaultAxis:n}=e;return Object.keys(t).filter(o=>t[o].yAxisKey===r.id||t[o].yAxisKey===void 0&&n).reduce((o,i)=>{const a=t[i].data.reduce((s,{y:c})=>gT(s,[c,c]),[null,null]);return gT(o,a)},[null,null])},d0t=e=>{const{axis:t}=e,r=Math.min(...t.data??[]),n=Math.max(...t.data??[]);return[r,n]};function f0t(e,t){return t.length===0?[null,null]:t.reduce((r,n)=>{const[o,i]=e(n);return r[0]===null?[Math.min(o,i),Math.max(o,i)]:[Math.min(o,i,r[0]),Math.max(o,i,r[1])]},e(t[0]))}const h0t=e=>{const{series:t,axis:r,isDefaultAxis:n}=e;return Object.keys(t).filter(o=>t[o].yAxisKey===r.id||n&&t[o].yAxisKey===void 0).reduce((o,i)=>{const{area:a,stackedData:s}=t[i],u=f0t(a!==void 0?h=>h:h=>[h[1],h[1]],s);if(o[0]===null)return u;if(u[0]===null)return o;const[f,d]=u;return[Math.min(f,o[0]),Math.max(d,o[1])]},[null,null])};function vT(e){return e.scaleType==="band"}function sG(e){return e.scaleType==="point"}function lG(e,t,r){switch(e){case"log":return Aae(t,r);case"pow":return a9(t,r);case"sqrt":return jpt(t,r);case"time":return i0t(t,r);case"utc":return a0t(t,r);default:return Tae(t,r)}}function Hc(e){return function(){return e}}const p0t=Math.PI,WP=2*p0t;function Uae(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function m0t(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function g0t(e){return e}function v0t(){var e=g0t,t=m0t,r=null,n=Hc(0),o=Hc(WP),i=Hc(0);function a(s){var c,l=(s=Uae(s)).length,u,f,d=0,h=new Array(l),p=new Array(l),g=+n.apply(this,arguments),m=Math.min(WP,Math.max(-WP,o.apply(this,arguments)-g)),v,y=Math.min(Math.abs(m)/l,i.apply(this,arguments)),b=y*(m<0?-1:1),w;for(c=0;c<l;++c)(w=p[h[c]=c]=+e(s[c],c,s))>0&&(d+=w);for(t!=null?h.sort(function(E,I){return t(p[E],p[I])}):r!=null&&h.sort(function(E,I){return r(s[E],s[I])}),c=0,f=d?(m-l*b)/d:0;c<l;++c,g=v)u=h[c],w=p[u],v=g+(w>0?w*f:0)+b,p[u]={data:s[u],index:c,value:w,startAngle:g,endAngle:v,padAngle:y};return p}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:Hc(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,r=null,a):t},a.sort=function(s){return arguments.length?(r=s,t=null,a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Hc(+s),a):n},a.endAngle=function(s){return arguments.length?(o=typeof s=="function"?s:Hc(+s),a):o},a.padAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Hc(+s),a):i},a}function I1(e,t){if((a=e.length)>1)for(var r=1,n,o,i=e[t[0]],a,s=i.length;r<a;++r)for(o=i,i=e[t[r]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(o[n][1])?o[n][0]:o[n][1]}function A1(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function y0t(e,t){return e[t]}function b0t(e){const t=[];return t.key=e,t}function Hae(){var e=Hc([]),t=A1,r=I1,n=y0t;function o(i){var a=Array.from(e.apply(this,arguments),b0t),s,c=a.length,l=-1,u;for(const f of i)for(s=0,++l;s<c;++s)(a[s][l]=[0,+n(f,a[s].key,l,i)]).data=f;for(s=0,u=Uae(t(a));s<c;++s)a[u[s]].index=s;return r(a,u),a}return o.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Hc(Array.from(i)),o):e},o.value=function(i){return arguments.length?(n=typeof i=="function"?i:Hc(+i),o):n},o.order=function(i){return arguments.length?(t=i==null?A1:typeof i=="function"?i:Hc(Array.from(i)),o):t},o.offset=function(i){return arguments.length?(r=i??I1,o):r},o}function w0t(e,t){if((n=e.length)>0){for(var r,n,o=0,i=e[0].length,a;o<i;++o){for(a=r=0;r<n;++r)a+=e[r][o][1]||0;if(a)for(r=0;r<n;++r)e[r][o][1]/=a}I1(e,t)}}function x0t(e,t){if((c=e.length)>0)for(var r,n=0,o,i,a,s,c,l=e[t[0]].length;n<l;++n)for(a=s=0,r=0;r<c;++r)(i=(o=e[t[r]][n])[1]-o[0])>0?(o[0]=a,o[1]=a+=i):i<0?(o[1]=s,o[0]=s+=i):(o[0]=0,o[1]=i)}function C0t(e,t){if((o=e.length)>0){for(var r=0,n=e[t[0]],o,i=n.length;r<i;++r){for(var a=0,s=0;a<o;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}I1(e,t)}}function S0t(e,t){if(!(!((a=e.length)>0)||!((i=(o=e[t[0]]).length)>0))){for(var r=0,n=1,o,i,a;n<i;++n){for(var s=0,c=0,l=0;s<a;++s){for(var u=e[t[s]],f=u[n][1]||0,d=u[n-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var g=e[t[p]],m=g[n][1]||0,v=g[n-1][1]||0;h+=m-v}c+=f,l+=h*f}o[n-1][1]+=o[n-1][0]=r,c&&(r-=l/c)}o[n-1][1]+=o[n-1][0]=r,I1(e,t)}}function zae(e){var t=e.map(_0t);return A1(e).sort(function(r,n){return t[r]-t[n]})}function _0t(e){for(var t=-1,r=0,n=e.length,o,i=-1/0;++t<n;)(o=+e[t][1])>i&&(i=o,r=t);return r}function jae(e){var t=e.map(Vae);return A1(e).sort(function(r,n){return t[r]-t[n]})}function Vae(e){for(var t=0,r=-1,n=e.length,o;++r<n;)(o=+e[r][1])&&(t+=o);return t}function k0t(e){return jae(e).reverse()}function E0t(e){var t=e.length,r,n,o=e.map(Vae),i=zae(e),a=0,s=0,c=[],l=[];for(r=0;r<t;++r)n=i[r],a<s?(a+=o[n],c.push(n)):(s+=o[n],l.push(n));return l.reverse().concat(c)}function T0t(e){return A1(e).reverse()}const GP={appearance:zae,ascending:jae,descending:k0t,insideOut:E0t,none:A1,reverse:T0t},qP={expand:w0t,diverging:x0t,none:I1,silhouette:C0t,wiggle:S0t},Wae=e=>{const{series:t,seriesOrder:r,defaultStrategy:n}=e,o=[],i={};return r.forEach(a=>{const{stack:s,stackOrder:c,stackOffset:l}=t[a];s===void 0?o.push({ids:[a],stackingOrder:GP.none,stackingOffset:qP.none}):i[s]===void 0?(i[s]=o.length,o.push({ids:[a],stackingOrder:GP[c??(n==null?void 0:n.stackOrder)??"none"],stackingOffset:qP[l??(n==null?void 0:n.stackOffset)??"diverging"]})):(o[i[s]].ids.push(a),c!==void 0&&(o[i[s]].stackingOrder=GP[c]),l!==void 0&&(o[i[s]].stackingOffset=qP[l]))}),o};function m9(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=W({},e[n],{valueFormatter:e[n].valueFormatter??t})}),r}const I0t=(e,t)=>{const{seriesOrder:r,series:n}=e,o=Wae(e),i=t??[];r.forEach(s=>{const c=n[s].data;if(c!==void 0)c.forEach((l,u)=>{i.length<=u?i.push({[s]:l}):i[u][s]=l});else if(t===void 0)throw new Error([`MUI X Charts: bar series with id='${s}' has no data.`,"Either provide a data property to the series or use the dataset prop."].join(`
`))});const a={};return o.forEach(s=>{const{ids:c,stackingOffset:l,stackingOrder:u}=s,f=Hae().keys(c.map(d=>{const h=n[d].dataKey;return n[d].data===void 0&&h!==void 0?h:d})).value((d,h)=>d[h]??0).order(u).offset(l)(i);c.forEach((d,h)=>{const p=n[d].dataKey;a[d]=W({layout:"vertical"},n[d],{data:p?t.map(g=>{const m=g[p];return typeof m!="number"?0:m}):n[d].data,stackedData:f[h].map(([g,m])=>[g,m])})})}),{seriesOrder:r,stackingGroups:o,series:m9(a,s=>s==null?"":s.toLocaleString())}},A0t=I0t,P0t=({series:e,seriesOrder:t})=>({series:m9(e,r=>`(${r.x}, ${r.y})`),seriesOrder:t}),M0t=P0t,R0t=(e,t)=>{const{seriesOrder:r,series:n}=e,o=Wae(W({},e,{defaultStrategy:{stackOffset:"none"}})),i=t??[];r.forEach(s=>{const c=n[s].data;c!==void 0&&c.forEach((l,u)=>{i.length<=u?i.push({[s]:l}):i[u][s]=l})});const a={};return o.forEach(s=>{const{ids:c,stackingOrder:l,stackingOffset:u}=s,f=Hae().keys(c.map(d=>{const h=n[d].dataKey;return n[d].data===void 0&&h!==void 0?h:d})).value((d,h)=>d[h]??0).order(l).offset(u)(i);c.forEach((d,h)=>{const p=n[d].dataKey;a[d]=W({},n[d],{data:p?t.map(g=>{const m=g[p];return typeof m!="number"?null:m}):n[d].data,stackedData:f[h].map(([g,m])=>[g,m])})})}),{seriesOrder:r,stackingGroups:o,series:m9(a,s=>s==null?"":s.toLocaleString())}},O0t=R0t,D0t=(e="none")=>{if(typeof e=="function")return e;switch(e){case"none":return null;case"desc":return(t,r)=>r-t;case"asc":return(t,r)=>t-r;default:return null}},F0t=e=>{const{seriesOrder:t,series:r}=e,n={};return t.forEach(o=>{const i=v0t().startAngle(2*Math.PI*(r[o].startAngle??0)/360).endAngle(2*Math.PI*(r[o].endAngle??360)/360).padAngle(2*Math.PI*(r[o].paddingAngle??0)/360).sortValues(D0t(r[o].sortingValues??"none"))(r[o].data.map(a=>a.value));n[o]=W({valueFormatter:a=>a.value.toLocaleString()},r[o],{data:r[o].data.map((a,s)=>W({},a,{id:a.id??`auto-generated-pie-id-${o}-${s}`},i[s])).map(a=>{var s,c;return W({},a,{formattedValue:((c=(s=r[o]).valueFormatter)==null?void 0:c.call(s,a))??a.value.toLocaleString()})})})}),{seriesOrder:t,series:n}},N0t=F0t,L0t=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];function $0t(e,t,r=L0t){return e.type==="pie"?W({},e,{data:e.data.map((n,o)=>W({color:r[o%r.length]},n))}):W({color:r[t%r.length]},e)}const B0t=["#02B2AF","#2E96FF","#B800D8","#60009B","#2731C8","#03008D"],U0t=["#02B2AF","#72CCFF","#DA00FF","#9001CB","#2E96FF","#3B48E0"],H0t=e=>e==="dark"?U0t:B0t,M0=A.createContext({}),T_={bar:A0t,scatter:M0t,line:O0t,pie:N0t},z0t=(e,t,r)=>{const n={};e.forEach((i,a)=>{var l;const{id:s=`auto-generated-id-${a}`,type:c}=i;if(n[c]===void 0&&(n[c]={series:{},seriesOrder:[]}),((l=n[c])==null?void 0:l.series[s])!==void 0)throw new Error(`MUI X Charts: series' id "${s}" is not unique.`);n[c].series[s]=W({id:s},$0t(i,a,t)),n[c].seriesOrder.push(s)});const o={};return Object.keys(T_).forEach(i=>{var a;n[i]!==void 0&&(o[i]=((a=T_[i])==null?void 0:a.call(T_,n[i],r))??n[i])}),o};function j0t(e){const{series:t,dataset:r,colors:n=H0t,children:o}=e,i=An(),a=A.useMemo(()=>z0t(t,typeof n=="function"?n(i.palette.mode):n,r),[t,n,i.palette.mode,r]);return R(M0.Provider,{value:a,children:o})}function $x(e){return e.bandwidth!==void 0}function cG(e){const{tickMaxStep:t,tickMinStep:r,tickNumber:n,range:o,domain:i}=e,a=r===void 0?999:Math.floor(Math.abs(i[1]-i[0])/r),s=t===void 0?2:Math.ceil(Math.abs(i[1]-i[0])/t),c=n??Math.floor(Math.abs(o[1]-o[0])/50);return Math.min(a,Math.max(s,c))}const KP={start:0,extremities:0,end:1,middle:.5};function yT(e){const{scale:t,tickNumber:r,valueFormatter:n,tickInterval:o,tickPlacement:i="extremities",tickLabelPlacement:a="middle"}=e;return A.useMemo(()=>{if($x(t)){const c=t.domain();return t.bandwidth()>0?[...c.map(u=>({value:u,formattedValue:(n==null?void 0:n(u,{location:"tick"}))??`${u}`,offset:t(u)-(t.step()-t.bandwidth())/2+KP[i]*t.step(),labelOffset:a==="tick"?0:t.step()*(KP[a]-KP[i])})),...i==="extremities"?[{formattedValue:void 0,offset:t.range()[1],labelOffset:0}]:[]]:(typeof o=="function"&&c.filter(o)||typeof o=="object"&&o||c).map(u=>({value:u,formattedValue:(n==null?void 0:n(u,{location:"tick"}))??`${u}`,offset:t(u),labelOffset:0}))}return(typeof o=="object"?o:t.ticks(r)).map(c=>({value:c,formattedValue:(n==null?void 0:n(c,{location:"tick"}))??t.tickFormat(r)(c),offset:t(c),labelOffset:0}))},[t,o,r,n,i,a])}const uG=.2,V0t=.1,W0t={bar:s0t,scatter:c0t,line:d0t},G0t={bar:l0t,scatter:u0t,line:h0t},gc=A.createContext({xAxis:{},yAxis:{},xAxisIds:[],yAxisIds:[]});function q0t(e){const{xAxis:t,yAxis:r,dataset:n,children:o}=e,i=A.useContext(M0),a=A.useContext(T0),s=A.useMemo(()=>t==null?void 0:t.map(u=>{const f=u.dataKey;if(f===void 0||u.data!==void 0)return u;if(n===void 0)throw Error("MUI X Charts: x-axis uses `dataKey` but no `dataset` is provided.");return W({},u,{data:n.map(d=>d[f])})}),[t,n]),c=A.useMemo(()=>r==null?void 0:r.map(u=>{const f=u.dataKey;if(f===void 0||u.data!==void 0)return u;if(n===void 0)throw Error("MUI X Charts: y-axis uses `dataKey` but no `dataset` is provided.");return W({},u,{data:n.map(d=>d[f])})}),[r,n]),l=A.useMemo(()=>{const u=(m,v,y,b,w)=>{var B;const E=b[v],I=((B=i[v])==null?void 0:B.series)??{},[O,D]=E({series:I,axis:y,isDefaultAxis:w}),[N,U]=m;return N===null||U===null?[O,D]:O===null||D===null?[N,U]:[Math.min(O,N),Math.max(D,U)]},f=(m,v,y)=>Object.keys(v).reduce((w,E)=>u(w,E,m,v,y),[null,null]),d=[...(s==null?void 0:s.map((m,v)=>W({id:`defaultized-x-axis-${v}`},m)))??[],...s===void 0||s.findIndex(({id:m})=>m===Ox)===-1?[{id:Ox,scaleType:"linear"}]:[]],h={};d.forEach((m,v)=>{const y=v===0,[b,w]=f(m,W0t,y),E=m.reverse?[a.left+a.width,a.left]:[a.left,a.left+a.width];if(vT(m)){const F=m.categoryGapRatio??uG,T=m.barGapRatio??V0t;h[m.id]=W({categoryGapRatio:F,barGapRatio:T},m,{scale:lT(m.data,E).paddingInner(F).paddingOuter(F/2),tickNumber:m.data.length})}if(sG(m)&&(h[m.id]=W({},m,{scale:PW(m.data,E),tickNumber:m.data.length})),m.scaleType==="band"||m.scaleType==="point")return;const I=m.scaleType??"linear",O=[m.min??b,m.max??w],D=cG(W({},m,{range:E,domain:O})),N=lG(I,O,E).nice(D),U=N.domain(),B=[m.min??U[0],m.max??U[1]];h[m.id]=W({},m,{scaleType:I,scale:N.domain(B),tickNumber:D})});const p=[...(c==null?void 0:c.map((m,v)=>W({id:`defaultized-y-axis-${v}`},m)))??[],...c===void 0||c.findIndex(({id:m})=>m===Dx)===-1?[{id:Dx,scaleType:"linear"}]:[]],g={};return p.forEach((m,v)=>{const y=v===0,[b,w]=f(m,G0t,y),E=m.reverse?[a.top,a.top+a.height]:[a.top+a.height,a.top];if(vT(m)){const F=m.categoryGapRatio??uG;g[m.id]=W({categoryGapRatio:F,barGapRatio:0},m,{scale:lT(m.data,[E[1],E[0]]).paddingInner(F).paddingOuter(F/2),tickNumber:m.data.length})}if(sG(m)&&(g[m.id]=W({},m,{scale:PW(m.data,[E[1],E[0]]),tickNumber:m.data.length})),m.scaleType==="band"||m.scaleType==="point")return;const I=m.scaleType??"linear",O=[m.min??b,m.max??w],D=cG(W({},m,{range:E,domain:O})),N=lG(I,O,E).nice(D),U=N.domain(),B=[m.min??U[0],m.max??U[1]];g[m.id]=W({},m,{scaleType:I,scale:N.domain(B),tickNumber:D})}),{xAxis:h,yAxis:g,xAxisIds:d.map(({id:m})=>m),yAxisIds:p.map(({id:m})=>m)}},[a.height,a.left,a.top,a.width,i,s,c]);return R(gc.Provider,{value:l,children:o})}function dG(e){return $x(e)?t=>e(t)+e.bandwidth()/2:t=>e(t)}function K0t(e){const{id:t,offset:r}=e,{left:n,top:o,width:i,height:a}=A.useContext(T0),s=W({top:0,right:0,bottom:0,left:0},r);return R("clipPath",{id:t,children:R("rect",{x:n-s.left,y:o-s.top,width:i+s.left+s.right,height:a+s.top+s.bottom})})}function Y0t(){return typeof window>"u"}const Pp={widthCache:{},cacheCount:0},X0t=2e3,Q0t={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Z0t=["minWidth","maxWidth","width","minHeight","maxHeight","height","top","left","fontSize","padding","margin","paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom"],fG="mui_measurement_span";function Gae(e,t){return Z0t.indexOf(e)>=0&&t===+t?`${t}px`:t}function qae(e){return e.split("").reduce((n,o)=>o===o.toUpperCase()?[...n,"-",o.toLowerCase()]:[...n,o],[]).join("")}const J0t=e=>Object.keys(e).sort().reduce((t,r)=>`${t}${qae(r)}:${Gae(r,e[r])};`,""),egt=(e,t={})=>{if(e==null||Y0t())return{width:0,height:0};const r=`${e}`,n=J0t(t),o=`${r}-${n}`;if(Pp.widthCache[o])return Pp.widthCache[o];try{let i=document.getElementById(fG);i===null&&(i=document.createElement("span"),i.setAttribute("id",fG),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));const a=W({},Q0t,t);Object.keys(a).map(l=>(i.style[qae(l)]=Gae(l,a[l]),l)),i.textContent=r;const s=i.getBoundingClientRect(),c={width:s.width,height:s.height};return Pp.widthCache[o]=c,Pp.cacheCount+1>X0t?(Pp.cacheCount=0,Pp.widthCache={}):Pp.cacheCount+=1,c}catch{return{width:0,height:0}}};function g9({style:e,needsComputation:t,text:r}){return r.split(`
`).map(n=>W({text:n},t?egt(n,e):{width:0,height:0}))}const tgt=["x","y","style","text","ownerState"],rgt=["angle","textAnchor","dominantBaseline"];function Bx(e){const{x:t,y:r,style:n,text:o}=e,i=ze(e,tgt),a=n??{},{angle:s,textAnchor:c,dominantBaseline:l}=a,u=ze(a,rgt),f=A.useMemo(()=>g9({style:u,needsComputation:o.includes(`
`),text:o}),[u,o]);let d;switch(l){case"hanging":d=0;break;case"central":d=(f.length-1)/2*-f[0].height;break;default:d=(f.length-1)*-f[0].height;break}const h=[];return s&&h.push(`rotate(${s}, ${t}, ${r})`),h.length&&(i.transform=h.join(" ")),R("text",W({},i,{x:t,y:r,textAnchor:c,dominantBaseline:l,style:u,children:f.map((p,g)=>R("tspan",{x:t,dy:`${g===0?d:f[0].height}px`,dominantBaseline:l,children:p.text},g))}))}function Kae(e){return Gt("MuiChartsAxis",e)}const I_=Vt("MuiChartsAxis",["root","line","tickContainer","tick","tickLabel","label","directionX","directionY","top","bottom","left","right"]),Yae=We("g",{name:"MuiChartsAxis",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`& .${I_.tickLabel}`]:W({},e.typography.caption,{fill:(e.vars||e).palette.text.primary}),[`& .${I_.label}`]:W({},e.typography.body1,{fill:(e.vars||e).palette.text.primary}),[`& .${I_.line}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges",strokeWidth:1},[`& .${I_.tick}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:"crispEdges"}})),hG=5;function ngt(e,t,r=0){const n=Math.min(Math.abs(r)%180,Math.abs(Math.abs(r)%180-180)%180);if(n<hG)return e;if(n>90-hG)return t;const o=n*Math.PI/180,i=Math.atan2(t,e);return o<i?e/Math.cos(o):t/Math.sin(o)}function ogt(e=!1){const[t,r]=A.useState(!1);return en(()=>{e||r(!0)},[e]),A.useEffect(()=>{e&&r(!0)},[e]),t}const igt=["scale","tickNumber","reverse"],agt=e=>{const{classes:t,position:r}=e;return pt({root:["root","directionX",r],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},Kae,t)};function sgt(e,{tickLabelStyle:t,tickLabelInterval:r,reverse:n,isMounted:o}){const i=e.map(l=>{if(!o||l.formattedValue===void 0)return W({},l,{width:0,height:0});const u=g9({style:t,needsComputation:!0,text:l.formattedValue});return W({},l,{width:Math.max(...u.map(f=>f.width)),height:Math.max(u.length*u[0].height)})});if(typeof r=="function")return i.map((l,u)=>W({},l,{skipLabel:!r(l.value,u)}));let a=0,s=0;const c=n?-1:1;return i.map((l,u)=>{const{width:f,offset:d,labelOffset:h,height:p}=l,g=ngt(f,p,t==null?void 0:t.angle),m=d+h,v=1.2;return a=m-c*(v*g)/2,u>0&&c*a<c*s?W({},l,{skipLabel:!0}):(s=m+c*(v*g)/2,l)})}const pG={position:"bottom",disableLine:!1,disableTicks:!1,tickSize:6};function mG(e){const t=Wt({props:W({},pG,e),name:"MuiChartsXAxis"}),{xAxisIds:r}=A.useContext(gc),n=A.useContext(gc),o=t.axisId??r[0],{xAxis:{[o]:{scale:i,tickNumber:a,reverse:s}}}=n,c=ze(n.xAxis[o],igt),l=ogt(),u=W({},pG,c,t),{position:f,disableLine:d,disableTicks:h,tickLabelStyle:p,label:g,labelStyle:m,tickFontSize:v,labelFontSize:y,tickSize:b,valueFormatter:w,slots:E,slotProps:I,tickInterval:O,tickLabelInterval:D,tickPlacement:N,tickLabelPlacement:U}=u,B=An(),F=agt(W({},u,{theme:B})),{left:T,top:P,width:_,height:C}=A.useContext(T0),S=h?4:b,x=f==="bottom"?1:-1,k=(E==null?void 0:E.axisLine)??"line",L=(E==null?void 0:E.axisTick)??"line",j=(E==null?void 0:E.axisTickLabel)??Bx,z=(E==null?void 0:E.axisLabel)??Bx,Y=Cr({elementType:j,externalSlotProps:I==null?void 0:I.axisTickLabel,additionalProps:{style:W({textAnchor:"middle",dominantBaseline:f==="bottom"?"hanging":"auto",fontSize:v??12},p),className:F.tickLabel},className:F.tickLabel,ownerState:{}}),K=yT({scale:i,tickNumber:a,valueFormatter:w,tickInterval:O,tickPlacement:N,tickLabelPlacement:U}),Q=sgt(K,{tickLabelStyle:Y.style,tickLabelInterval:D,reverse:s,isMounted:l}),q={x:T+_/2,y:x*(S+22)},J=Cr({elementType:z,externalSlotProps:I==null?void 0:I.axisLabel,additionalProps:{style:W({fontSize:y??14,textAnchor:"middle",dominantBaseline:f==="bottom"?"hanging":"auto"},m)},ownerState:{}});return xe(Yae,{transform:`translate(0, ${f==="bottom"?P+C:P})`,className:F.root,children:[!d&&R(k,W({x1:i.range()[0],x2:i.range()[1],className:F.line},I==null?void 0:I.axisLine)),Q.map(({formattedValue:G,offset:V,labelOffset:X,skipLabel:te},ee)=>{const re=X??0,se=x*(S+3);return xe("g",{transform:`translate(${V}, 0)`,className:F.tickContainer,children:[!h&&R(L,W({y2:x*S,className:F.tick},I==null?void 0:I.axisTick)),G!==void 0&&!te&&R(j,W({x:re,y:se},Y,{text:G.toString()}))]},ee)}),g&&R("g",{className:F.label,children:R(z,W({},q,J,{text:g}))})]})}const lgt=["scale","tickNumber"],cgt=e=>{const{classes:t,position:r}=e;return pt({root:["root","directionY",r],line:["line"],tickContainer:["tickContainer"],tick:["tick"],tickLabel:["tickLabel"],label:["label"]},Kae,t)},gG={position:"left",disableLine:!1,disableTicks:!1,tickFontSize:12,labelFontSize:14,tickSize:6};function vG(e){const t=Wt({props:W({},gG,e),name:"MuiChartsYAxis"}),{yAxisIds:r}=A.useContext(gc),n=A.useContext(gc),o=t.axisId??r[0],{yAxis:{[o]:{scale:i,tickNumber:a}}}=n,s=ze(n.yAxis[o],lgt),c=W({},gG,s,t),{position:l,disableLine:u,disableTicks:f,tickFontSize:d,label:h,labelFontSize:p,labelStyle:g,tickLabelStyle:m,tickSize:v,valueFormatter:y,slots:b,slotProps:w,tickPlacement:E,tickLabelPlacement:I}=c,O=An(),D=cgt(W({},c,{theme:O})),{left:N,top:U,width:B,height:F}=A.useContext(T0),T=f?4:v,P=yT({scale:i,tickNumber:a,valueFormatter:y,tickPlacement:E,tickLabelPlacement:I}),_=l==="right"?1:-1,C={x:_*(d+T+10),y:U+F/2},S=(b==null?void 0:b.axisLine)??"line",x=(b==null?void 0:b.axisTick)??"line",k=(b==null?void 0:b.axisTickLabel)??Bx,L=(b==null?void 0:b.axisLabel)??Bx,j=Cr({elementType:k,externalSlotProps:w==null?void 0:w.axisTickLabel,additionalProps:{style:W({fontSize:d,textAnchor:l==="right"?"start":"end",dominantBaseline:"central"},m),className:D.tickLabel},ownerState:{}}),z=Cr({elementType:L,externalSlotProps:w==null?void 0:w.axisLabel,additionalProps:{style:W({fontSize:p,angle:_*90,textAnchor:"middle",dominantBaseline:"auto"},g)},ownerState:{}});return xe(Yae,{transform:`translate(${l==="right"?N+B:N}, 0)`,className:D.root,children:[!u&&R(S,W({y1:i.range()[0],y2:i.range()[1],className:D.line},w==null?void 0:w.axisLine)),P.map(({formattedValue:Y,offset:K,labelOffset:Q},q)=>{const J=_*(T+2),G=Q;return xe("g",{transform:`translate(0, ${K})`,className:D.tickContainer,children:[!f&&R(x,W({x2:_*T,className:D.tick},w==null?void 0:w.axisTick)),Y!==void 0&&R(k,W({x:J,y:G,text:Y.toString()},j))]},q)}),h&&R("g",{className:D.label,children:R(L,W({},C,z,{text:h}))})]})}const A_=e=>e==null?null:typeof e=="object"?e.axisId??null:e,P_=(e,t,r)=>typeof e=="object"?W({},e,{slots:W({},t,e==null?void 0:e.slots),slotProps:W({},r,e==null?void 0:e.slotProps)}):{slots:t,slotProps:r};function ugt(e){const{topAxis:t,leftAxis:r,rightAxis:n,bottomAxis:o,slots:i,slotProps:a}=e,{xAxis:s,xAxisIds:c,yAxis:l,yAxisIds:u}=A.useContext(gc),f=A_(r===void 0?u[0]:r),d=A_(o===void 0?c[0]:o),h=A_(t),p=A_(n);if(h!==null&&!s[h])throw Error([`MUI X Charts: id used for top axis "${h}" is not defined.`,`Available ids are: ${c.join(", ")}.`].join(`
`));if(f!==null&&!l[f])throw Error([`MUI X Charts: id used for left axis "${f}" is not defined.`,`Available ids are: ${u.join(", ")}.`].join(`
`));if(p!==null&&!l[p])throw Error([`MUI X Charts: id used for right axis "${p}" is not defined.`,`Available ids are: ${u.join(", ")}.`].join(`
`));if(d!==null&&!s[d])throw Error([`MUI X Charts: id used for bottom axis "${d}" is not defined.`,`Available ids are: ${c.join(", ")}.`].join(`
`));const g=P_(t,i,a),m=P_(o,i,a),v=P_(r,i,a),y=P_(n,i,a);return xe(A.Fragment,{children:[h&&R(mG,W({},g,{position:"top",axisId:h})),d&&R(mG,W({},m,{position:"bottom",axisId:d})),f&&R(vG,W({},v,{position:"left",axisId:f})),p&&R(vG,W({},y,{position:"right",axisId:p}))]})}function dgt(e){return Gt("MuiChartsGrid",e)}const fgt=Vt("MuiChartsGrid",["root","line","horizontalLine","verticalLine"]),hgt=["vertical","horizontal"],pgt=We("g",{name:"MuiChartsGrid",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`& .${fgt.line}`]:{stroke:(e.vars||e).palette.divider,shapeRendering:"crispEdges",strokeWidth:1}})),mgt=({classes:e})=>pt({root:["root"],verticalLine:["line","verticalLine"],horizontalLine:["line","horizontalLine"]},dgt,e);function ggt(e){const{vertical:t,horizontal:r}=e,n=ze(e,hgt),{xAxis:o,xAxisIds:i,yAxis:a,yAxisIds:s}=A.useContext(gc),c=mgt(e),l=s[0],u=i[0],{scale:f,tickNumber:d,tickInterval:h}=o[u],{scale:p,tickNumber:g,tickInterval:m}=a[l],v=yT({scale:f,tickNumber:d,tickInterval:h}),y=yT({scale:p,tickNumber:g,tickInterval:m});return xe(pgt,W({},n,{className:c.root,children:[t&&v.map(({formattedValue:b,offset:w})=>R("line",{y1:p.range()[0],y2:p.range()[1],x1:w,x2:w,className:c.verticalLine},`vertical-${b}`)),r&&y.map(({formattedValue:b,offset:w})=>R("line",{y1:w,y2:w,x1:f.range()[0],x2:f.range()[1],className:c.horizontalLine},`horizontal-${b}`))]}))}const R0=A.createContext({item:null,axis:{x:null,y:null},useVoronoiInteraction:!1,dispatch:()=>null}),vgt=(e,t)=>{switch(t.type){case"enterItem":return W({},e,{item:t.data});case"exitChart":return e.item===null&&e.axis.x===null&&e.axis.y===null?e:W({},e,{axis:{x:null,y:null},item:null});case"updateVoronoiUsage":return W({},e,{useVoronoiInteraction:t.useVoronoiInteraction});case"leaveItem":return e.item===null||Object.keys(t.data).some(r=>t.data[r]!==e.item[r])?e:W({},e,{item:null});case"updateAxis":return t.data.x===e.axis.x&&t.data.y===e.axis.y?e:W({},e,{axis:t.data});default:return e}};function ygt(e){const{children:t}=e,[r,n]=A.useReducer(vgt,{item:null,axis:{x:null,y:null},useVoronoiInteraction:!1}),o=A.useMemo(()=>W({},r,{dispatch:n}),[r]);return R(R0.Provider,{value:o,children:t})}function bgt(e){if(e===null)return{getBoundingClientRect:()=>({width:0,height:0,x:0,y:0,top:0,right:0,bottom:0,left:0,toJSON:()=>""})};const{x:t,y:r}=e;return{getBoundingClientRect:()=>({width:0,height:0,x:t,y:r,top:r,right:t,bottom:r,left:t,toJSON:()=>JSON.stringify({width:0,height:0,x:t,y:r,top:r,right:t,bottom:r,left:t})})}}function wgt(){const e=A.useContext(T4),[t,r]=A.useState(null);return A.useEffect(()=>{const n=e.current;if(n===null)return()=>{};const o=()=>{r(null)},i=a=>{r({x:a.clientX,y:a.clientY})};return n.addEventListener("mouseout",o),n.addEventListener("mousemove",i),()=>{n.removeEventListener("mouseout",o),n.removeEventListener("mousemove",i)}},[e]),t}function xgt(e,t){if(e==="item")return t!==null;const r=t.x!==null,n=t.y!==null;return r||n}function Xae(e){return["bar","line","scatter"].includes(e)}function Cgt(e){return Xae(e.type)}function Sgt(e){return e instanceof Date?e.toUTCString():e.toLocaleString()}function _gt(e){return Gt("MuiChartsTooltip",e)}const yG=Vt("MuiChartsTooltip",["root","table","row","cell","mark","markCell","labelCell","valueCell"]),Qae=We("div",{name:"MuiChartsTooltip",slot:"Container"})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),border:`1px solid ${(e.vars||e).palette.divider}`,borderRadius:e.shape.borderRadius})),Zae=We("table",{name:"MuiChartsTooltip",slot:"Table"})(({theme:e})=>({borderSpacing:0,"& thead td":{borderBottom:`solid ${(e.vars||e).palette.divider} 1px`}})),c6=We("tr",{name:"MuiChartsTooltip",slot:"Row"})(({theme:e})=>({"tr:first-of-type& td":{paddingTop:e.spacing(1)},"tr:last-of-type& td":{paddingBottom:e.spacing(1)}})),om=We("td",{name:"MuiChartsTooltip",slot:"Cell"})(({theme:e})=>({verticalAlign:"middle",color:(e.vars||e).palette.text.secondary,[`&.${yG.labelCell}`]:{paddingLeft:e.spacing(1)},[`&.${yG.valueCell}`]:{paddingLeft:e.spacing(4),color:(e.vars||e).palette.text.primary},"td:first-of-type&":{paddingLeft:e.spacing(2)},"td:last-of-type&":{paddingRight:e.spacing(2)}})),Jae=We(td,{name:"MuiChartsTooltip",slot:"Mark"})(({theme:e,ownerState:t})=>({width:e.spacing(1),height:e.spacing(1),borderRadius:"50%",backgroundColor:t.color,borderColor:(e.vars||e).palette.background.paper,border:`solid ${(e.vars||e).palette.background.paper} ${e.spacing(.25)}`,boxSizing:"content-box"}));function kgt(e){var l;const{series:t,itemData:r,sx:n,classes:o}=e;if(r.dataIndex===void 0||!t.data[r.dataIndex])return null;const{displayedLabel:i,color:a}=t.type==="pie"?{color:t.data[r.dataIndex].color,displayedLabel:t.data[r.dataIndex].label}:{color:t.color,displayedLabel:t.label},s=t.data[r.dataIndex],c=(l=t.valueFormatter)==null?void 0:l.call(t,s);return R(Qae,{sx:n,className:o.root,children:R(Zae,{className:o.table,children:R("tbody",{children:xe(c6,{className:o.row,children:[R(om,{className:it(o.markCell,o.cell),children:R(Jae,{ownerState:{color:a},className:o.mark})}),R(om,{className:it(o.labelCell,o.cell),children:i}),R(om,{className:it(o.valueCell,o.cell),children:c})]})})})})}function Egt(e){const{content:t,itemData:r,sx:n,classes:o,contentProps:i}=e,a=A.useContext(M0)[r.type].series[r.seriesId],s=t??kgt,c=Cr({elementType:s,externalSlotProps:i,additionalProps:{itemData:r,series:a,sx:n,classes:o},ownerState:{}});return R(s,W({},c))}function Tgt(e){const{series:t,axis:r,dataIndex:n,axisValue:o,sx:i,classes:a}=e;if(n==null)return null;const s=r.valueFormatter??(c=>r.scaleType==="utc"?Sgt(c):c.toLocaleString());return R(Qae,{sx:i,className:a.root,children:xe(Zae,{className:a.table,children:[o!=null&&!r.hideTooltip&&R("thead",{children:R(c6,{children:R(om,{colSpan:3,children:R(jt,{children:s(o,{location:"tooltip"})})})})}),R("tbody",{children:t.filter(Cgt).map(({color:c,id:l,label:u,valueFormatter:f,data:d})=>{const h=f(d[n]??null);return h==null?null:xe(c6,{className:a.row,children:[R(om,{className:it(a.markCell,a.cell),children:R(Jae,{ownerState:{color:c},boxShadow:1,className:a.mark})}),R(om,{className:it(a.labelCell,a.cell),children:u?R(jt,{children:u}):null}),R(om,{className:it(a.valueCell,a.cell),children:R(jt,{children:h})})]},l)})})]})})}function Igt(e){const{content:t,contentProps:r,axisData:n,sx:o,classes:i}=e,a=(n.x&&n.x.index)!==void 0,s=a?n.x&&n.x.index:n.y&&n.y.index,c=a?n.x&&n.x.value:n.y&&n.y.value,{xAxisIds:l,xAxis:u,yAxisIds:f,yAxis:d}=A.useContext(gc),h=A.useContext(M0),p=a?l[0]:f[0],g=A.useMemo(()=>{const b=[];return Object.keys(h).filter(Xae).forEach(w=>{h[w].seriesOrder.forEach(E=>{const I=h[w].series[E],O=a?I.xAxisKey:I.yAxisKey;(O===void 0||O===p)&&b.push(h[w].series[E])})}),b},[p,a,h]),m=A.useMemo(()=>a?u[p]:d[p],[p,a,u,d]),v=t??Tgt,y=Cr({elementType:v,externalSlotProps:r,additionalProps:{axisData:n,series:g,axis:m,dataIndex:s,axisValue:c,sx:o,classes:i},ownerState:{}});return R(v,W({},y))}const Agt=e=>{const{classes:t}=e;return pt({root:["root"],table:["table"],row:["row"],cell:["cell"],mark:["mark"],markCell:["markCell"],labelCell:["labelCell"],valueCell:["valueCell"]},_gt,t)},Pgt=We(SQ,{name:"MuiChartsTooltip",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({pointerEvents:"none",zIndex:e.zIndex.modal}));function Mgt(e){const t=Wt({props:e,name:"MuiChartsTooltip"}),{trigger:r="axis",itemContent:n,axisContent:o,slots:i,slotProps:a}=t,s=wgt(),{item:c,axis:l}=A.useContext(R0),u=r==="item"?c:l,f=xgt(r,u),d=s!==null&&f,h=Agt({classes:t.classes}),p=(i==null?void 0:i.popper)??Pgt,g=Cr({elementType:p,externalSlotProps:a==null?void 0:a.popper,additionalProps:{open:d,placement:"right-start",anchorEl:bgt(s)},ownerState:{}});return r==="none"?null:R(fQ,{children:d&&R(p,W({},g,{children:r==="item"?R(Egt,{itemData:u,content:(i==null?void 0:i.itemContent)??n,contentProps:a==null?void 0:a.itemContent,sx:{mx:2},classes:h}):R(Igt,{axisData:u,content:(i==null?void 0:i.axisContent)??o,contentProps:a==null?void 0:a.axisContent,sx:{mx:2},classes:h})}))})}const Rgt=e=>{const{seriesOrder:t,series:r}=e;return t.map(o=>({color:r[o].color,label:r[o].label,id:o})).filter(o=>o.label!==void 0)},Ogt=Rgt,Dgt=e=>{const{seriesOrder:t,series:r}=e;return t.map(o=>({color:r[o].color,label:r[o].label,id:o})).filter(o=>o.label!==void 0)},Fgt=Dgt,Ngt=e=>{const{seriesOrder:t,series:r}=e;return t.map(o=>({color:r[o].color,label:r[o].label,id:o})).filter(o=>o.label!==void 0)},Lgt=Ngt,$gt=e=>{const{seriesOrder:t,series:r}=e;return t.flatMap(n=>r[n].data.map(o=>({color:o.color,label:o.label,id:o.id})).filter(o=>o.label!==void 0))},Bgt=$gt,Ugt={bar:Ogt,scatter:Fgt,line:Lgt,pie:Bgt};function Hgt(e){return Object.keys(e).flatMap(t=>Ugt[t](e[t]))}function zgt(e){return Gt("MuiChartsLegend",e)}Vt("MuiChartsLegend",["root","series","mark","label","column","row"]);const jgt=["rotate","dominantBaseline"],Vgt=["label"],Wgt=We("g",{name:"MuiChartsLegend",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ggt=e=>typeof e=="number"?{left:e,right:e,top:e,bottom:e}:W({left:0,right:0,top:0,bottom:0},e);function qgt(e){const{hidden:t,position:r,direction:n,seriesToDisplay:o,drawingArea:i,classes:a,itemMarkWidth:s=20,itemMarkHeight:c=20,markGap:l=5,itemGap:u=10,padding:f=10,labelStyle:d}=e,h=An(),p=h.direction==="rtl",g=A.useMemo(()=>W({},h.typography.subtitle1,{color:"inherit",dominantBaseline:"central",textAnchor:"start",fill:(h.vars||h).palette.text.primary,lineHeight:1},d),[d,h]),m=A.useMemo(()=>Ggt(f),[f]),v=A.useCallback((B,F={})=>{const T=ze(F,jgt),P=g9({style:T,needsComputation:!0,text:B}),_={innerWidth:s+l+Math.max(...P.map(C=>C.width)),innerHeight:Math.max(c,P.length*P[0].height)};return W({},_,{outerWidth:_.innerWidth+u,outerHeight:_.innerHeight+u})},[u,c,s,l]),y=i.left+i.width+i.right,b=i.top+i.height+i.bottom,w=y-m.left-m.right,E=b-m.top-m.bottom,[I,O,D]=A.useMemo(()=>{let B=0,F=0,T=0,P=0,_=0;const C=[0];return[o.map(x=>{let{label:k}=x,L=ze(x,Vgt);const j=v(k,g),z=W({},L,{label:k,positionX:B,positionY:F,innerHeight:j.innerHeight,innerWidth:j.innerWidth,outerHeight:j.outerHeight,outerWidth:j.outerWidth,rowIndex:_});return n==="row"&&(B+j.innerWidth>w&&(B=0,F+=C[_],_+=1,C.length<=_&&C.push(0),z.positionX=B,z.positionY=F,z.rowIndex=_),T=Math.max(T,B+j.outerWidth),P=Math.max(P,F+j.outerHeight),C[_]=Math.max(C[_],j.outerHeight),B+=j.outerWidth),n==="column"&&(F+j.innerHeight>E&&(B=T+u,F=0,_=0,z.positionX=B,z.positionY=F,z.rowIndex=_),C.length<=_&&C.push(0),T=Math.max(T,B+j.outerWidth),P=Math.max(P,F+j.outerHeight),_+=1,F+=j.outerHeight),z}).map(x=>W({},x,{positionY:x.positionY+(n==="row"?C[x.rowIndex]/2:x.outerHeight/2)})),T,P]},[o,v,g,n,w,E,u]),N=A.useMemo(()=>{switch(r.horizontal){case"left":return m.left;case"right":return y-m.right-O;default:return(y-O)/2}},[r.horizontal,m.left,m.right,y,O]),U=A.useMemo(()=>{switch(r.vertical){case"top":return m.top;case"bottom":return b-m.bottom-D;default:return(b-D)/2}},[r.vertical,m.top,m.bottom,b,D]);return t?null:R(fQ,{children:R(Wgt,{className:a.root,children:I.map(({id:B,label:F,color:T,positionX:P,positionY:_})=>xe("g",{className:a.series,transform:`translate(${N+(p?O-P:P)} ${U+_})`,children:[R("rect",{className:a.mark,x:p?-s:0,y:-c/2,width:s,height:c,fill:T}),R(Bx,{style:g,text:F,x:(p?-1:1)*(s+l),y:0})]},B))})})}const Kgt=e=>{const{classes:t,direction:r}=e;return pt({root:["root",r],mark:["mark"],label:["label"],series:["series"]},zgt,t)},Ygt={position:{horizontal:"middle",vertical:"top"},direction:"row"};function Xgt(e){const t=Wt({props:W({},Ygt,e),name:"MuiChartsLegend"}),{position:r,direction:n,hidden:o,slots:i,slotProps:a}=t,s=An(),c=Kgt(W({},t,{theme:s})),l=A.useContext(T0),u=A.useContext(M0),f=Hgt(u),d=(i==null?void 0:i.legend)??qgt,h=Cr({elementType:d,externalSlotProps:a==null?void 0:a.legend,additionalProps:{position:r,direction:n,classes:c,drawingArea:l,series:u,hidden:o,seriesToDisplay:f},ownerState:{}});return R(d,W({},h))}function Qgt(e){return Gt("MuiChartsAxisHighlight",e)}Vt("MuiChartsAxisHighlight",["root"]);const Zgt=()=>pt({root:["root"]},Qgt),M_=We("path",{name:"MuiChartsAxisHighlight",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e,theme:t})=>W({pointerEvents:"none"},e.axisHighlight==="band"&&{fill:t.palette.mode==="light"?"gray":"white",fillOpacity:.1},e.axisHighlight==="line"&&{strokeDasharray:"5 2",stroke:t.palette.mode==="light"?"#000000":"#ffffff"}));function Jgt(e){const{x:t,y:r}=e,{xAxisIds:n,xAxis:o,yAxisIds:i,yAxis:a}=A.useContext(gc),s=Zgt(),c=n[0],l=i[0],u=o[c].scale,f=a[l].scale,{axis:d}=A.useContext(R0),h=dG(u),p=dG(f);return xe(A.Fragment,{children:[t==="band"&&d.x!==null&&$x(u)&&R(M_,{d:`M ${u(d.x.value)-(u.step()-u.bandwidth())/2} ${f.range()[0]} l ${u.step()} 0 l 0 ${f.range()[1]-f.range()[0]} l ${-u.step()} 0 Z`,className:s.root,ownerState:{axisHighlight:"band"}}),r==="band"&&d.y!==null&&$x(f)&&R(M_,{d:`M ${u.range()[0]} ${f(d.y.value)-(f.step()-f.bandwidth())/2} l 0 ${f.step()} l ${u.range()[1]-u.range()[0]} 0 l 0 ${-f.step()} Z`,className:s.root,ownerState:{axisHighlight:"band"}}),t==="line"&&d.x!==null&&R(M_,{d:`M ${h(d.x.value)} ${f.range()[0]} L ${h(d.x.value)} ${f.range()[1]}`,className:s.root,ownerState:{axisHighlight:"line"}}),r==="line"&&d.y!==null&&R(M_,{d:`M ${u.range()[0]} ${p(d.y.value)} L ${u.range()[1]} ${p(d.y.value)}`,className:s.root,ownerState:{axisHighlight:"line"}})]})}function evt(e,t){const r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r.matrixTransform(e.getScreenCTM().inverse())}function tvt(e){const{onAxisClick:t}=e,r=A.useContext(T4),n=A.useContext(M0),{axis:o}=A.useContext(R0),{xAxisIds:i,xAxis:a,yAxisIds:s,yAxis:c}=A.useContext(gc);return A.useEffect(()=>{const l=r.current;if(l===null||!t)return()=>{};const u=f=>{var v;f.preventDefault();const d=(o.x&&o.x.index)!==void 0,h=d?i[0]:s[0],p=d?o.x&&o.x.index:o.y&&o.y.index;if(p==null)return;const g={};Object.keys(n).filter(y=>["bar","line"].includes(y)).forEach(y=>{var b;(b=n[y])==null||b.seriesOrder.forEach(w=>{const E=n[y].series[w],I=d?E.xAxisKey:E.yAxisKey;(I===void 0||I===h)&&(g[w]=E.data[p])})});const m=(v=(d?a:c)[h].data)==null?void 0:v[p];t(f,{dataIndex:p,axisValue:m,seriesValues:g})};return l.addEventListener("click",u),()=>{l.removeEventListener("click",u)}},[o.x,o.y,t,n,r,a,i,c,s]),R(A.Fragment,{})}var rvt=Object.defineProperty,nvt=(e,t)=>{for(var r in t)rvt(e,r,{get:t[r],enumerable:!0})},vc={};nvt(vc,{assign:()=>avt,colors:()=>Gh,createStringInterpolator:()=>S9,skipAnimation:()=>ase,to:()=>ise,willAdvance:()=>_9});var v9=SC(),Jr=e=>CC(e,v9),y9=SC();Jr.write=e=>CC(e,y9);var R4=SC();Jr.onStart=e=>CC(e,R4);var b9=SC();Jr.onFrame=e=>CC(e,b9);var w9=SC();Jr.onFinish=e=>CC(e,w9);var Cv=[];Jr.setTimeout=(e,t)=>{const r=Jr.now()+t,n=()=>{const i=Cv.findIndex(a=>a.cancel==n);~i&&Cv.splice(i,1),Ph-=~i?1:0},o={time:r,handler:e,cancel:n};return Cv.splice(ese(r),0,o),Ph+=1,tse(),o};var ese=e=>~(~Cv.findIndex(t=>t.time>e)||~Cv.length);Jr.cancel=e=>{R4.delete(e),b9.delete(e),w9.delete(e),v9.delete(e),y9.delete(e)};Jr.sync=e=>{u6=!0,Jr.batchedUpdates(e),u6=!1};Jr.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function n(...o){t=o,Jr.onStart(r)}return n.handler=e,n.cancel=()=>{R4.delete(r),t=null},n};var x9=typeof window<"u"?window.requestAnimationFrame:()=>{};Jr.use=e=>x9=e;Jr.now=typeof performance<"u"?()=>performance.now():Date.now;Jr.batchedUpdates=e=>e();Jr.catch=console.error;Jr.frameLoop="always";Jr.advance=()=>{Jr.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):nse()};var Ah=-1,Ph=0,u6=!1;function CC(e,t){u6?(t.delete(e),e(0)):(t.add(e),tse())}function tse(){Ah<0&&(Ah=0,Jr.frameLoop!=="demand"&&x9(rse))}function ovt(){Ah=-1}function rse(){~Ah&&(x9(rse),Jr.batchedUpdates(nse))}function nse(){const e=Ah;Ah=Jr.now();const t=ese(Ah);if(t&&(ose(Cv.splice(0,t),r=>r.handler()),Ph-=t),!Ph){ovt();return}R4.flush(),v9.flush(e?Math.min(64,Ah-e):16.667),b9.flush(),y9.flush(),w9.flush()}function SC(){let e=new Set,t=e;return{add(r){Ph+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return Ph-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,Ph-=t.size,ose(t,n=>n(r)&&e.add(n)),Ph+=e.size,t=e)}}}function ose(e,t){e.forEach(r=>{try{t(r)}catch(n){Jr.catch(n)}})}function d6(){}var ivt=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),Yt={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Od(e,t){if(Yt.arr(e)){if(!Yt.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var ln=(e,t)=>e.forEach(t);function ad(e,t,r){if(Yt.arr(e)){for(let n=0;n<e.length;n++)t.call(r,e[n],`${n}`);return}for(const n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n)}var gs=e=>Yt.und(e)?[]:Yt.arr(e)?e:[e];function Iw(e,t){if(e.size){const r=Array.from(e);e.clear(),ln(r,t)}}var Hb=(e,...t)=>Iw(e,r=>r(...t)),C9=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),S9,ise,Gh=null,ase=!1,_9=d6,avt=e=>{e.to&&(ise=e.to),e.now&&(Jr.now=e.now),e.colors!==void 0&&(Gh=e.colors),e.skipAnimation!=null&&(ase=e.skipAnimation),e.createStringInterpolator&&(S9=e.createStringInterpolator),e.requestAnimationFrame&&Jr.use(e.requestAnimationFrame),e.batchedUpdates&&(Jr.batchedUpdates=e.batchedUpdates),e.willAdvance&&(_9=e.willAdvance),e.frameLoop&&(Jr.frameLoop=e.frameLoop)},Aw=new Set,rc=[],YP=[],bT=0,O4={get idle(){return!Aw.size&&!rc.length},start(e){bT>e.priority?(Aw.add(e),Jr.onStart(svt)):(sse(e),Jr(f6))},advance:f6,sort(e){if(bT)Jr.onFrame(()=>O4.sort(e));else{const t=rc.indexOf(e);~t&&(rc.splice(t,1),lse(e))}},clear(){rc=[],Aw.clear()}};function svt(){Aw.forEach(sse),Aw.clear(),Jr(f6)}function sse(e){rc.includes(e)||lse(e)}function lse(e){rc.splice(lvt(rc,t=>t.priority>e.priority),0,e)}function f6(e){const t=YP;for(let r=0;r<rc.length;r++){const n=rc[r];bT=n.priority,n.idle||(_9(n),n.advance(e),n.idle||t.push(n))}return bT=0,YP=rc,YP.length=0,rc=t,rc.length>0}function lvt(e,t){const r=e.findIndex(t);return r<0?e.length:r}var cvt=(e,t,r)=>Math.min(Math.max(r,e),t),uvt={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Xc="[-+]?\\d*\\.?\\d+",wT=Xc+"%";function D4(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var dvt=new RegExp("rgb"+D4(Xc,Xc,Xc)),fvt=new RegExp("rgba"+D4(Xc,Xc,Xc,Xc)),hvt=new RegExp("hsl"+D4(Xc,wT,wT)),pvt=new RegExp("hsla"+D4(Xc,wT,wT,Xc)),mvt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,gvt=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,vvt=/^#([0-9a-fA-F]{6})$/,yvt=/^#([0-9a-fA-F]{8})$/;function bvt(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=vvt.exec(e))?parseInt(t[1]+"ff",16)>>>0:Gh&&Gh[e]!==void 0?Gh[e]:(t=dvt.exec(e))?(yg(t[1])<<24|yg(t[2])<<16|yg(t[3])<<8|255)>>>0:(t=fvt.exec(e))?(yg(t[1])<<24|yg(t[2])<<16|yg(t[3])<<8|xG(t[4]))>>>0:(t=mvt.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=yvt.exec(e))?parseInt(t[1],16)>>>0:(t=gvt.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=hvt.exec(e))?(bG(wG(t[1]),R_(t[2]),R_(t[3]))|255)>>>0:(t=pvt.exec(e))?(bG(wG(t[1]),R_(t[2]),R_(t[3]))|xG(t[4]))>>>0:null}function XP(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function bG(e,t,r){const n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=XP(o,n,e+1/3),a=XP(o,n,e),s=XP(o,n,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function yg(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function wG(e){return(parseFloat(e)%360+360)%360/360}function xG(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function R_(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function CG(e){let t=bvt(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,n=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${r}, ${n}, ${o}, ${i})`}var Ux=(e,t,r)=>{if(Yt.fun(e))return e;if(Yt.arr(e))return Ux({range:e,output:t,extrapolate:r});if(Yt.str(e.output[0]))return S9(e);const n=e,o=n.output,i=n.range||[0,1],a=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",c=n.easing||(l=>l);return l=>{const u=xvt(l,i);return wvt(l,i[u],i[u+1],o[u],o[u+1],c,a,s,n.map)}};function wvt(e,t,r,n,o,i,a,s,c){let l=c?c(e):e;if(l<t){if(a==="identity")return l;a==="clamp"&&(l=t)}if(l>r){if(s==="identity")return l;s==="clamp"&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l=l-t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l=l+n:l=l*(o-n)+n,l)}function xvt(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var Cvt=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const n=r*e,o=t==="end"?Math.floor(n):Math.ceil(n);return cvt(0,1,o/e)},xT=1.70158,O_=xT*1.525,SG=xT+1,_G=2*Math.PI/3,kG=2*Math.PI/4.5,D_=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Svt={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>SG*e*e*e-xT*e*e,easeOutBack:e=>1+SG*Math.pow(e-1,3)+xT*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((O_+1)*2*e-O_)/2:(Math.pow(2*e-2,2)*((O_+1)*(e*2-2)+O_)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*_G),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*_G)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*kG))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*kG)/2+1,easeInBounce:e=>1-D_(1-e),easeOutBounce:D_,easeInOutBounce:e=>e<.5?(1-D_(1-2*e))/2:(1+D_(2*e-1))/2,steps:Cvt},Hx=Symbol.for("FluidValue.get"),P1=Symbol.for("FluidValue.observers"),tc=e=>!!(e&&e[Hx]),Fs=e=>e&&e[Hx]?e[Hx]():e,EG=e=>e[P1]||null;function _vt(e,t){e.eventObserved?e.eventObserved(t):e(t)}function zx(e,t){const r=e[P1];r&&r.forEach(n=>{_vt(n,t)})}var cse=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");kvt(this,e)}},kvt=(e,t)=>use(e,Hx,t);function dy(e,t){if(e[Hx]){let r=e[P1];r||use(e,P1,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function jx(e,t){const r=e[P1];if(r&&r.has(t)){const n=r.size-1;n?r.delete(t):e[P1]=null,e.observerRemoved&&e.observerRemoved(n,t)}}var use=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),gk=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Evt=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,TG=new RegExp(`(${gk.source})(%|[a-z]+)`,"i"),Tvt=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,F4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,dse=e=>{const[t,r]=Ivt(e);if(!t||C9())return e;const n=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(n)return n.trim();if(r&&r.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(r);return o||e}else{if(r&&F4.test(r))return dse(r);if(r)return r}return e},Ivt=e=>{const t=F4.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]},QP,Avt=(e,t,r,n,o)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${o})`,fse=e=>{QP||(QP=Gh?new RegExp(`(${Object.keys(Gh).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>Fs(i).replace(F4,dse).replace(Evt,CG).replace(QP,CG)),r=t.map(i=>i.match(gk).map(Number)),o=r[0].map((i,a)=>r.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>Ux({...e,output:i}));return i=>{var c;const a=!TG.test(t[0])&&((c=t.find(l=>TG.test(l)))==null?void 0:c.replace(gk,""));let s=0;return t[0].replace(gk,()=>`${o[s++](i)}${a||""}`).replace(Tvt,Avt)}},k9="react-spring: ",hse=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${k9}once requires a function parameter`);return(...n)=>{r||(t(...n),r=!0)}},Pvt=hse(console.warn);function Mvt(){Pvt(`${k9}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Rvt=hse(console.warn);function Ovt(){Rvt(`${k9}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function N4(e){return Yt.str(e)&&(e[0]=="#"||/\d/.test(e)||!C9()&&F4.test(e)||e in(Gh||{}))}var im=C9()?A.useEffect:A.useLayoutEffect,Dvt=()=>{const e=A.useRef(!1);return im(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function pse(){const e=A.useState()[1],t=Dvt();return()=>{t.current&&e(Math.random())}}function Fvt(e,t){const[r]=A.useState(()=>({inputs:t,result:e()})),n=A.useRef(),o=n.current;let i=o;return i?t&&i.inputs&&Nvt(t,i.inputs)||(i={inputs:t,result:e()}):i=r,A.useEffect(()=>{n.current=i,o==r&&(r.inputs=r.result=void 0)},[i]),i.result}function Nvt(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var mse=e=>A.useEffect(e,Lvt),Lvt=[];function $vt(e){const t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}var Vx=Symbol.for("Animated:node"),Bvt=e=>!!e&&e[Vx]===e,ku=e=>e&&e[Vx],E9=(e,t)=>ivt(e,Vx,t),L4=e=>e&&e[Vx]&&e[Vx].getPayload(),gse=class{constructor(){E9(this,this)}getPayload(){return this.payload||[]}},_C=class extends gse{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Yt.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new _C(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Yt.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Yt.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Wx=class extends _C{constructor(e){super(0),this._string=null,this._toString=Ux({output:[e,e]})}static create(e){return new Wx(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Yt.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Ux({output:[this.getValue(),e]})),this._value=0,super.reset()}},CT={dependencies:null},$4=class extends gse{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return ad(this.source,(r,n)=>{Bvt(r)?t[n]=r.getValue(e):tc(r)?t[n]=Fs(r):e||(t[n]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ln(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return ad(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){CT.dependencies&&tc(e)&&CT.dependencies.add(e);const t=L4(e);t&&ln(t,r=>this.add(r))}},vse=class extends $4{constructor(e){super(e)}static create(e){return new vse(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,n)=>r.setValue(e[n])).some(Boolean):(super.setValue(e.map(Uvt)),!0)}};function Uvt(e){return(N4(e)?Wx:_C).create(e)}function h6(e){const t=ku(e);return t?t.constructor:Yt.arr(e)?vse:N4(e)?Wx:_C}var IG=(e,t)=>{const r=!Yt.fun(e)||e.prototype&&e.prototype.isReactComponent;return A.forwardRef((n,o)=>{const i=A.useRef(null),a=r&&A.useCallback(p=>{i.current=jvt(o,p)},[o]),[s,c]=zvt(n,t),l=pse(),u=()=>{const p=i.current;if(r&&!p)return;(p?t.applyAnimatedValues(p,s.getValue(!0)):!1)===!1&&l()},f=new Hvt(u,c),d=A.useRef();im(()=>(d.current=f,ln(c,p=>dy(p,f)),()=>{d.current&&(ln(d.current.deps,p=>jx(p,d.current)),Jr.cancel(d.current.update))})),A.useEffect(u,[]),mse(()=>()=>{const p=d.current;ln(p.deps,g=>jx(g,p))});const h=t.getComponentProps(s.getValue());return A.createElement(e,{...h,ref:a})})},Hvt=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Jr.write(this.update)}};function zvt(e,t){const r=new Set;return CT.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new $4(e),CT.dependencies=null,[e,r]}function jvt(e,t){return e&&(Yt.fun(e)?e(t):e.current=t),t}var AG=Symbol.for("AnimatedComponent"),Vvt=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=o=>new $4(o),getComponentProps:n=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:n},i=a=>{const s=PG(a)||"Anonymous";return Yt.str(a)?a=i[a]||(i[a]=IG(a,o)):a=a[AG]||(a[AG]=IG(a,o)),a.displayName=`Animated(${s})`,a};return ad(e,(a,s)=>{Yt.arr(e)&&(s=PG(a)),i[s]=i(a)}),{animated:i}},PG=e=>Yt.str(e)?e:e&&Yt.str(e.displayName)?e.displayName:Yt.fun(e)&&e.name||null;function Ns(e,...t){return Yt.fun(e)?e(...t):e}var Pw=(e,t)=>e===!0||!!(t&&e&&(Yt.fun(e)?e(t):gs(e).includes(t))),yse=(e,t)=>Yt.obj(e)?t&&e[t]:e,bse=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Wvt=e=>e,T9=(e,t=Wvt)=>{let r=Gvt;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const n={};for(const o of r){const i=t(e[o],o);Yt.und(i)||(n[o]=i)}return n},Gvt=["config","onProps","onStart","onChange","onPause","onResume","onRest"],qvt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Kvt(e){const t={};let r=0;if(ad(e,(n,o)=>{qvt[o]||(t[o]=n,r++)}),r)return t}function I9(e){const t=Kvt(e);if(t){const r={to:t};return ad(e,(n,o)=>o in t||(r[o]=n)),r}return{...e}}function Gx(e){return e=Fs(e),Yt.arr(e)?e.map(Gx):N4(e)?vc.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Yvt(e){for(const t in e)return!0;return!1}function p6(e){return Yt.fun(e)||Yt.arr(e)&&Yt.obj(e[0])}function MG(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function Xvt(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var Qvt={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},m6={...Qvt.default,mass:1,damping:1,easing:Svt.linear,clamp:!1},Zvt=class{constructor(){this.velocity=0,Object.assign(this,m6)}};function Jvt(e,t,r){r&&(r={...r},RG(r,t),t={...r,...t}),RG(e,t),Object.assign(e,t);for(const a in m6)e[a]==null&&(e[a]=m6[a]);let{frequency:n,damping:o}=e;const{mass:i}=e;return Yt.und(n)||(n<.01&&(n=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/n,2)*i,e.friction=4*Math.PI*o*i/n),e}function RG(e,t){if(!Yt.und(t.decay))e.duration=void 0;else{const r=!Yt.und(t.tension)||!Yt.und(t.friction);(r||!Yt.und(t.frequency)||!Yt.und(t.damping)||!Yt.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var OG=[],e1t=class{constructor(){this.changed=!1,this.values=OG,this.toValues=null,this.fromValues=OG,this.config=new Zvt,this.immediate=!1}};function wse(e,{key:t,props:r,defaultProps:n,state:o,actions:i}){return new Promise((a,s)=>{let c,l,u=Pw(r.cancel??(n==null?void 0:n.cancel),t);if(u)h();else{Yt.und(r.pause)||(o.paused=Pw(r.pause,t));let p=n==null?void 0:n.pause;p!==!0&&(p=o.paused||Pw(p,t)),c=Ns(r.delay||0,t),p?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function f(){o.resumeQueue.add(d),o.timeouts.delete(l),l.cancel(),c=l.time-Jr.now()}function d(){c>0&&!vc.skipAnimation?(o.delayed=!0,l=Jr.setTimeout(h,c),o.pauseQueue.add(f),o.timeouts.add(l)):h()}function h(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(f),o.timeouts.delete(l),e<=(o.cancelId||0)&&(u=!0);try{i.start({...r,callId:e,cancel:u},a)}catch(p){s(p)}}})}var A9=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?Sv(e.get()):t.every(r=>r.noop)?xse(e.get()):Vc(e.get(),t.every(r=>r.finished)),xse=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Vc=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),Sv=e=>({value:e,cancelled:!0,finished:!1});function Cse(e,t,r,n){const{callId:o,parentId:i,onRest:a}=t,{asyncTo:s,promise:c}=r;return!i&&e===s&&!t.reset?c:r.promise=(async()=>{r.asyncId=o,r.asyncTo=e;const l=T9(t,(m,v)=>v==="onRest"?void 0:m);let u,f;const d=new Promise((m,v)=>(u=m,f=v)),h=m=>{const v=o<=(r.cancelId||0)&&Sv(n)||o!==r.asyncId&&Vc(n,!1);if(v)throw m.result=v,f(m),m},p=(m,v)=>{const y=new DG,b=new FG;return(async()=>{if(vc.skipAnimation)throw qx(r),b.result=Vc(n,!1),f(b),b;h(y);const w=Yt.obj(m)?{...m}:{...v,to:m};w.parentId=o,ad(l,(I,O)=>{Yt.und(w[O])&&(w[O]=I)});const E=await n.start(w);return h(y),r.paused&&await new Promise(I=>{r.resumeQueue.add(I)}),E})()};let g;if(vc.skipAnimation)return qx(r),Vc(n,!1);try{let m;Yt.arr(e)?m=(async v=>{for(const y of v)await p(y)})(e):m=Promise.resolve(e(p,n.stop.bind(n))),await Promise.all([m.then(u),d]),g=Vc(n.get(),!0,!1)}catch(m){if(m instanceof DG)g=m.result;else if(m instanceof FG)g=m.result;else throw m}finally{o==r.asyncId&&(r.asyncId=i,r.asyncTo=i?s:void 0,r.promise=i?c:void 0)}return Yt.fun(a)&&Jr.batchedUpdates(()=>{a(g,n,n.item)}),g})()}function qx(e,t){Iw(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var DG=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},FG=class extends Error{constructor(){super("SkipAnimationSignal")}},g6=e=>e instanceof P9,t1t=1,P9=class extends cse{constructor(){super(...arguments),this.id=t1t++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=ku(this);return e&&e.getValue()}to(...e){return vc.to(this,e)}interpolate(...e){return Mvt(),vc.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){zx(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||O4.sort(this),zx(this,{type:"priority",parent:this,priority:e})}},o0=Symbol.for("SpringPhase"),Sse=1,v6=2,y6=4,ZP=e=>(e[o0]&Sse)>0,Kf=e=>(e[o0]&v6)>0,bb=e=>(e[o0]&y6)>0,NG=(e,t)=>t?e[o0]|=v6|Sse:e[o0]&=~v6,LG=(e,t)=>t?e[o0]|=y6:e[o0]&=~y6,r1t=class extends P9{constructor(e,t){if(super(),this.animation=new e1t,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Yt.und(e)||!Yt.und(t)){const r=Yt.obj(e)?{...e}:{...t,from:e};Yt.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Kf(this)||this._state.asyncTo)||bb(this)}get goal(){return Fs(this.animation.to)}get velocity(){const e=ku(this);return e instanceof _C?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ZP(this)}get isAnimating(){return Kf(this)}get isPaused(){return bb(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const n=this.animation;let{toValues:o}=n;const{config:i}=n,a=L4(n.to);!a&&tc(n.to)&&(o=gs(Fs(n.to))),n.values.forEach((l,u)=>{if(l.done)return;const f=l.constructor==Wx?1:a?a[u].lastPosition:o[u];let d=n.immediate,h=f;if(!d){if(h=l.lastPosition,i.tension<=0){l.done=!0;return}let p=l.elapsedTime+=e;const g=n.fromValues[u],m=l.v0!=null?l.v0:l.v0=Yt.arr(i.velocity)?i.velocity[u]:i.velocity;let v;const y=i.precision||(g==f?.005:Math.min(1,Math.abs(f-g)*.001));if(Yt.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,w=Math.exp(-(1-b)*p);h=g+m/(1-b)*(1-w),d=Math.abs(l.lastPosition-h)<=y,v=m*w}else{v=l.lastVelocity==null?m:l.lastVelocity;const b=i.restVelocity||y/10,w=i.clamp?0:i.bounce,E=!Yt.und(w),I=g==f?l.v0>0:g<f;let O,D=!1;const N=1,U=Math.ceil(e/N);for(let B=0;B<U&&(O=Math.abs(v)>b,!(!O&&(d=Math.abs(f-h)<=y,d)));++B){E&&(D=h==f||h>f==I,D&&(v=-v*w,h=f));const F=-i.tension*1e-6*(h-f),T=-i.friction*.001*v,P=(F+T)/i.mass;v=v+P*N,h=h+v*N}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,p=l.elapsedTime+=e)),b=(i.progress||0)+p/this._memoizedDuration,b=b>1?1:b<0?0:b,l.durationProgress=b),h=g+i.easing(b)*(f-g),v=(h-l.lastPosition)/e,d=b==1}l.lastVelocity=v,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[u].done&&(d=!1),d?l.done=!0:t=!1,l.setValue(h,i.round)&&(r=!0)});const s=ku(this),c=s.getValue();if(t){const l=Fs(n.to);(c!==l||r)&&!i.decay?(s.setValue(l),this._onChange(l)):r&&i.decay&&this._onChange(c),this._stop()}else r&&this._onChange(c)}set(e){return Jr.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Kf(this)){const{to:e,config:t}=this.animation;Jr.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return Yt.und(e)?(r=this.queue||[],this.queue=[]):r=[Yt.obj(e)?e:{...t,to:e}],Promise.all(r.map(n=>this._update(n))).then(n=>A9(this,n))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),qx(this._state,e&&this._lastCallId),Jr.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:n}=e;r=Yt.obj(r)?r[t]:r,(r==null||p6(r))&&(r=void 0),n=Yt.obj(n)?n[t]:n,n==null&&(n=void 0);const o={to:r,from:n};return ZP(this)||(e.reverse&&([r,n]=[n,r]),n=Fs(n),Yt.und(n)?ku(this)||this._set(r):this._set(n)),o}_update({...e},t){const{key:r,defaultProps:n}=this;e.default&&Object.assign(n,T9(e,(a,s)=>/^on/.test(s)?yse(a,r):a)),BG(this,e,"onProps"),xb(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return wse(++this._lastCallId,{key:r,props:e,defaultProps:n,state:i,actions:{pause:()=>{bb(this)||(LG(this,!0),Hb(i.pauseQueue),xb(this,"onPause",Vc(this,wb(this,this.animation.to)),this))},resume:()=>{bb(this)&&(LG(this,!1),Kf(this)&&this._resume(),Hb(i.resumeQueue),xb(this,"onResume",Vc(this,wb(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const s=_se(e);if(s)return this._update(s,!0)}return a})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(Sv(this));const n=!Yt.und(e.to),o=!Yt.und(e.from);if(n||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(Sv(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:l}=s;let{to:u=c,from:f=l}=e;o&&!n&&(!t.default||Yt.und(u))&&(u=f),t.reverse&&([u,f]=[f,u]);const d=!Od(f,l);d&&(s.from=f),f=Fs(f);const h=!Od(u,c);h&&this._focus(u);const p=p6(t.to),{config:g}=s,{decay:m,velocity:v}=g;(n||o)&&(g.velocity=0),t.config&&!p&&Jvt(g,Ns(t.config,i),t.config!==a.config?Ns(a.config,i):void 0);let y=ku(this);if(!y||Yt.und(u))return r(Vc(this,!0));const b=Yt.und(t.reset)?o&&!t.default:!Yt.und(f)&&Pw(t.reset,i),w=b?f:this.get(),E=Gx(u),I=Yt.num(E)||Yt.arr(E)||N4(E),O=!p&&(!I||Pw(a.immediate||t.immediate,i));if(h){const B=h6(u);if(B!==y.constructor)if(O)y=this._set(E);else throw Error(`Cannot animate between ${y.constructor.name} and ${B.name}, as the "to" prop suggests`)}const D=y.constructor;let N=tc(u),U=!1;if(!N){const B=b||!ZP(this)&&d;(h||B)&&(U=Od(Gx(w),E),N=!U),(!Od(s.immediate,O)&&!O||!Od(g.decay,m)||!Od(g.velocity,v))&&(N=!0)}if(U&&Kf(this)&&(s.changed&&!b?N=!0:N||this._stop(c)),!p&&((N||tc(c))&&(s.values=y.getPayload(),s.toValues=tc(u)?null:D==Wx?[1]:gs(E)),s.immediate!=O&&(s.immediate=O,!O&&!b&&this._set(c)),N)){const{onRest:B}=s;ln(n1t,T=>BG(this,t,T));const F=Vc(this,wb(this,c));Hb(this._pendingCalls,F),this._pendingCalls.add(r),s.changed&&Jr.batchedUpdates(()=>{var T;s.changed=!b,B==null||B(F,this),b?Ns(a.onRest,F):(T=s.onStart)==null||T.call(s,F,this)})}b&&this._set(w),p?r(Cse(t.to,t,this._state,this)):N?this._start():Kf(this)&&!h?this._pendingCalls.add(r):r(xse(w))}_focus(e){const t=this.animation;e!==t.to&&(EG(this)&&this._detach(),t.to=e,EG(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;tc(t)&&(dy(t,this),g6(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;tc(e)&&jx(e,this)}_set(e,t=!0){const r=Fs(e);if(!Yt.und(r)){const n=ku(this);if(!n||!Od(r,n.getValue())){const o=h6(r);!n||n.constructor!=o?E9(this,o.create(r)):n.setValue(r),n&&Jr.batchedUpdates(()=>{this._onChange(r,t)})}}return ku(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,xb(this,"onStart",Vc(this,wb(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ns(this.animation.onChange,e,this)),Ns(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;ku(this).reset(Fs(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Kf(this)||(NG(this,!0),bb(this)||this._resume())}_resume(){vc.skipAnimation?this.finish():O4.start(this)}_stop(e,t){if(Kf(this)){NG(this,!1);const r=this.animation;ln(r.values,o=>{o.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),zx(this,{type:"idle",parent:this});const n=t?Sv(this.get()):Vc(this.get(),wb(this,e??r.to));Hb(this._pendingCalls,n),r.changed&&(r.changed=!1,xb(this,"onRest",n,this))}}};function wb(e,t){const r=Gx(t),n=Gx(e.get());return Od(n,r)}function _se(e,t=e.loop,r=e.to){const n=Ns(t);if(n){const o=n!==!0&&I9(n),i=(o||e).reverse,a=!o||o.reset;return ST({...e,loop:t,default:!1,pause:void 0,to:!i||p6(r)?r:void 0,from:a?e.from:void 0,reset:a,...o})}}function ST(e){const{to:t,from:r}=e=I9(e),n=new Set;return Yt.obj(t)&&$G(t,n),Yt.obj(r)&&$G(r,n),e.keys=n.size?Array.from(n):null,e}function $G(e,t){ad(e,(r,n)=>r!=null&&t.add(n))}var n1t=["onStart","onRest","onChange","onPause","onResume"];function BG(e,t,r){e.animation[r]=t[r]!==bse(t,r)?yse(t[r],e.key):void 0}function xb(e,t,...r){var n,o,i,a;(o=(n=e.animation)[t])==null||o.call(n,...r),(a=(i=e.defaultProps)[t])==null||a.call(i,...r)}var o1t=["onStart","onChange","onRest"],i1t=1,a1t=class{constructor(e,t){this.id=i1t++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,r)=>e[r]=t.get()),e}set(e){for(const t in e){const r=e[t];Yt.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(ST(e)),this}start(e){let{queue:t}=this;return e?t=gs(e).map(ST):this.queue=[],this._flush?this._flush(this,t):(Ise(this,t),s1t(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;ln(gs(t),n=>r[n].stop(!!e))}else qx(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(Yt.und(e))this.start({pause:!0});else{const t=this.springs;ln(gs(e),r=>t[r].pause())}return this}resume(e){if(Yt.und(e))this.start({pause:!1});else{const t=this.springs;ln(gs(e),r=>t[r].resume())}return this}each(e){ad(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,n=this._active.size>0,o=this._changed.size>0;(n&&!this._started||o&&!this._started)&&(this._started=!0,Iw(e,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const i=!n&&this._started,a=o||i&&r.size?this.get():null;o&&t.size&&Iw(t,([s,c])=>{c.value=a,s(c,this,this._item)}),i&&(this._started=!1,Iw(r,([s,c])=>{c.value=a,s(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Jr.onFrame(this._onFrame)}};function s1t(e,t){return Promise.all(t.map(r=>kse(e,r))).then(r=>A9(e,r))}async function kse(e,t,r){const{keys:n,to:o,from:i,loop:a,onRest:s,onResolve:c}=t,l=Yt.obj(t.default)&&t.default;a&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const u=Yt.arr(o)||Yt.fun(o)?o:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):ln(o1t,g=>{const m=t[g];if(Yt.fun(m)){const v=e._events[g];t[g]=({finished:y,cancelled:b})=>{const w=v.get(m);w?(y||(w.finished=!1),b&&(w.cancelled=!0)):v.set(m,{value:null,finished:y||!1,cancelled:b||!1})},l&&(l[g]=t[g])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,Hb(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const d=(n||Object.keys(e.springs)).map(g=>e.springs[g].start(t)),h=t.cancel===!0||bse(t,"cancel")===!0;(u||h&&f.asyncId)&&d.push(wse(++e._lastAsyncId,{props:t,state:f,actions:{pause:d6,resume:d6,start(g,m){h?(qx(f,e._lastAsyncId),m(Sv(e))):(g.onRest=s,m(Cse(u,g,f,e)))}}})),f.paused&&await new Promise(g=>{f.resumeQueue.add(g)});const p=A9(e,await Promise.all(d));if(a&&p.finished&&!(r&&p.noop)){const g=_se(t,a,o);if(g)return Ise(e,[g]),kse(e,g,!0)}return c&&Jr.batchedUpdates(()=>c(p,e,e.item)),p}function l1t(e,t){const r={...e.springs};return t&&ln(gs(t),n=>{Yt.und(n.keys)&&(n=ST(n)),Yt.obj(n.to)||(n={...n,to:void 0}),Tse(r,n,o=>Ese(o))}),c1t(e,r),r}function c1t(e,t){ad(t,(r,n)=>{e.springs[n]||(e.springs[n]=r,dy(r,e))})}function Ese(e,t){const r=new r1t;return r.key=e,t&&dy(r,t),r}function Tse(e,t,r){t.keys&&ln(t.keys,n=>{(e[n]||(e[n]=r(n)))._prepareNode(t)})}function Ise(e,t){ln(t,r=>{Tse(e.springs,r,n=>Ese(n,e))})}var B4=({children:e,...t})=>{const r=A.useContext(_T),n=t.pause||!!r.pause,o=t.immediate||!!r.immediate;t=Fvt(()=>({pause:n,immediate:o}),[n,o]);const{Provider:i}=_T;return A.createElement(i,{value:t},e)},_T=u1t(B4,{});B4.Provider=_T.Provider;B4.Consumer=_T.Consumer;function u1t(e,t){return Object.assign(e,A.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var d1t=()=>{const e=[],t=function(n){Ovt();const o=[];return ln(e,(i,a)=>{if(Yt.und(n))o.push(i.start());else{const s=r(n,i,a);s&&o.push(i.start(s))}}),o};t.current=e,t.add=function(n){e.includes(n)||e.push(n)},t.delete=function(n){const o=e.indexOf(n);~o&&e.splice(o,1)},t.pause=function(){return ln(e,n=>n.pause(...arguments)),this},t.resume=function(){return ln(e,n=>n.resume(...arguments)),this},t.set=function(n){ln(e,(o,i)=>{const a=Yt.fun(n)?n(i,o):n;a&&o.set(a)})},t.start=function(n){const o=[];return ln(e,(i,a)=>{if(Yt.und(n))o.push(i.start());else{const s=this._getProps(n,i,a);s&&o.push(i.start(s))}}),o},t.stop=function(){return ln(e,n=>n.stop(...arguments)),this},t.update=function(n){return ln(e,(o,i)=>o.update(this._getProps(n,o,i))),this};const r=function(n,o,i){return Yt.fun(n)?n(i,o):n};return t._getProps=r,t};function f1t(e,t,r){const n=Yt.fun(t)&&t,{reset:o,sort:i,trail:a=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:f}=n?n():t,d=A.useMemo(()=>n||arguments.length==3?d1t():void 0,[]),h=gs(e),p=[],g=A.useRef(null),m=o?null:g.current;im(()=>{g.current=p}),mse(()=>(ln(p,P=>{d==null||d.add(P.ctrl),P.ctrl.ref=d}),()=>{ln(g.current,P=>{P.expired&&clearTimeout(P.expirationId),MG(P.ctrl,d),P.ctrl.stop(!0)})}));const v=p1t(h,n?n():t,m),y=o&&g.current||[];im(()=>ln(y,({ctrl:P,item:_,key:C})=>{MG(P,d),Ns(l,_,C)}));const b=[];if(m&&ln(m,(P,_)=>{P.expired?(clearTimeout(P.expirationId),y.push(P)):(_=b[_]=v.indexOf(P.key),~_&&(p[_]=P))}),ln(h,(P,_)=>{p[_]||(p[_]={key:v[_],item:P,phase:"mount",ctrl:new a1t},p[_].ctrl.item=P)}),b.length){let P=-1;const{leave:_}=n?n():t;ln(b,(C,S)=>{const x=m[S];~C?(P=p.indexOf(x),p[P]={...x,item:h[C]}):_&&p.splice(++P,0,x)})}Yt.fun(i)&&p.sort((P,_)=>i(P.item,_.item));let w=-a;const E=pse(),I=T9(t),O=new Map,D=A.useRef(new Map),N=A.useRef(!1);ln(p,(P,_)=>{const C=P.key,S=P.phase,x=n?n():t;let k,L;const j=Ns(x.delay||0,C);if(S=="mount")k=x.enter,L="enter";else{const Q=v.indexOf(C)<0;if(S!="leave")if(Q)k=x.leave,L="leave";else if(k=x.update)L="update";else return;else if(!Q)k=x.enter,L="enter";else return}if(k=Ns(k,P.item,_),k=Yt.obj(k)?I9(k):{to:k},!k.config){const Q=f||I.config;k.config=Ns(Q,P.item,_,L)}w+=a;const z={...I,delay:j+w,ref:u,immediate:x.immediate,reset:!1,...k};if(L=="enter"&&Yt.und(z.from)){const Q=n?n():t,q=Yt.und(Q.initial)||m?Q.from:Q.initial;z.from=Ns(q,P.item,_)}const{onResolve:Y}=z;z.onResolve=Q=>{Ns(Y,Q);const q=g.current,J=q.find(G=>G.key===C);if(J&&!(Q.cancelled&&J.phase!="update")&&J.ctrl.idle){const G=q.every(V=>V.ctrl.idle);if(J.phase=="leave"){const V=Ns(s,J.item);if(V!==!1){const X=V===!0?0:V;if(J.expired=!0,!G&&X>0){X<=2147483647&&(J.expirationId=setTimeout(E,X));return}}}G&&q.some(V=>V.expired)&&(D.current.delete(J),c&&(N.current=!0),E())}};const K=l1t(P.ctrl,z);L==="leave"&&c?D.current.set(P,{phase:L,springs:K,payload:z}):O.set(P,{phase:L,springs:K,payload:z})});const U=A.useContext(B4),B=$vt(U),F=U!==B&&Yvt(U);im(()=>{F&&ln(p,P=>{P.ctrl.start({default:U})})},[U]),ln(O,(P,_)=>{if(D.current.size){const C=p.findIndex(S=>S.key===_.key);p.splice(C,1)}}),im(()=>{ln(D.current.size?D.current:O,({phase:P,payload:_},C)=>{const{ctrl:S}=C;C.phase=P,d==null||d.add(S),F&&P=="enter"&&S.start({default:U}),_&&(Xvt(S,_.ref),(S.ref||d)&&!N.current?S.update(_):(S.start(_),N.current&&(N.current=!1)))})},o?void 0:r);const T=P=>A.createElement(A.Fragment,null,p.map((_,C)=>{const{springs:S}=O.get(_)||_.ctrl,x=P({...S},_.item,_,C);return x&&x.type?A.createElement(x.type,{...x.props,key:Yt.str(_.key)||Yt.num(_.key)?_.key:_.ctrl.id,ref:x.ref}):x}));return d?[T,d]:T}var h1t=1;function p1t(e,{key:t,keys:r=t},n){if(r===null){const o=new Set;return e.map(i=>{const a=n&&n.find(s=>s.item===i&&s.phase!=="leave"&&!o.has(s));return a?(o.add(a),a.key):h1t++})}return Yt.und(r)?e:Yt.fun(r)?e.map(r):gs(r)}var m1t=class extends P9{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ux(...t);const r=this._get(),n=h6(r);E9(this,n.create(r))}advance(e){const t=this._get(),r=this.get();Od(t,r)||(ku(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&UG(this._active)&&JP(this)}_get(){const e=Yt.arr(this.source)?this.source.map(Fs):gs(Fs(this.source));return this.calc(...e)}_start(){this.idle&&!UG(this._active)&&(this.idle=!1,ln(L4(this),e=>{e.done=!1}),vc.skipAnimation?(Jr.batchedUpdates(()=>this.advance()),JP(this)):O4.start(this))}_attach(){let e=1;ln(gs(this.source),t=>{tc(t)&&dy(t,this),g6(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ln(gs(this.source),e=>{tc(e)&&jx(e,this)}),this._active.clear(),JP(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=gs(this.source).reduce((t,r)=>Math.max(t,(g6(r)?r.priority:0)+1),0))}};function g1t(e){return e.idle!==!1}function UG(e){return!e.size||Array.from(e).every(g1t)}function JP(e){e.idle||(e.idle=!0,ln(L4(e),t=>{t.done=!0}),zx(e,{type:"idle",parent:e}))}vc.assign({createStringInterpolator:fse,to:(e,t)=>new m1t(e,t)});var Ase=/^--/;function v1t(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Ase.test(e)&&!(Mw.hasOwnProperty(e)&&Mw[e])?t+"px":(""+t).trim()}var HG={};function y1t(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:n,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=t,l=Object.values(c),u=Object.keys(c).map(f=>r||e.hasAttribute(f)?f:HG[f]||(HG[f]=f.replace(/([A-Z])/g,d=>"-"+d.toLowerCase())));o!==void 0&&(e.textContent=o);for(const f in n)if(n.hasOwnProperty(f)){const d=v1t(f,n[f]);Ase.test(f)?e.style.setProperty(f,d):e.style[f]=d}u.forEach((f,d)=>{e.setAttribute(f,l[d])}),i!==void 0&&(e.scrollTop=i),a!==void 0&&(e.scrollLeft=a),s!==void 0&&e.setAttribute("viewBox",s)}var Mw={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},b1t=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),w1t=["Webkit","Ms","Moz","O"];Mw=Object.keys(Mw).reduce((e,t)=>(w1t.forEach(r=>e[b1t(r,t)]=e[t]),e),Mw);var x1t=/^(matrix|translate|scale|rotate|skew)/,C1t=/^(translate)/,S1t=/^(rotate|skew)/,eM=(e,t)=>Yt.num(e)&&e!==0?e+t:e,vk=(e,t)=>Yt.arr(e)?e.every(r=>vk(r,t)):Yt.num(e)?e===t:parseFloat(e)===t,_1t=class extends $4{constructor({x:e,y:t,z:r,...n}){const o=[],i=[];(e||t||r)&&(o.push([e||0,t||0,r||0]),i.push(a=>[`translate3d(${a.map(s=>eM(s,"px")).join(",")})`,vk(a,0)])),ad(n,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(x1t.test(s)){if(delete n[s],Yt.und(a))return;const c=C1t.test(s)?"px":S1t.test(s)?"deg":"";o.push(gs(a)),i.push(s==="rotate3d"?([l,u,f,d])=>[`rotate3d(${l},${u},${f},${eM(d,c)})`,vk(d,0)]:l=>[`${s}(${l.map(u=>eM(u,c)).join(",")})`,vk(l,s.startsWith("scale")?1:0)])}}),o.length&&(n.transform=new k1t(o,i)),super(n)}},k1t=class extends cse{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ln(this.inputs,(r,n)=>{const o=Fs(r[0]),[i,a]=this.transforms[n](Yt.arr(o)?o:r.map(Fs));e+=" "+i,t=t&&a}),t?"none":e}observerAdded(e){e==1&&ln(this.inputs,t=>ln(t,r=>tc(r)&&dy(r,this)))}observerRemoved(e){e==0&&ln(this.inputs,t=>ln(t,r=>tc(r)&&jx(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),zx(this,e)}},E1t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];vc.assign({batchedUpdates:ip.unstable_batchedUpdates,createStringInterpolator:fse,colors:uvt});var T1t=Vvt(E1t,{applyAnimatedValues:y1t,createAnimatedStyle:e=>new _1t(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),I1t=T1t.animated;const M9={highlighted:"none",faded:"none"},Pse=A.createContext({item:null,scope:M9,dispatch:()=>null}),A1t=(e,t)=>{switch(t.type){case"enterItem":return W({},e,{item:t.item,scope:W({},M9,t.scope)});case"leaveItem":return e.item===null||Object.keys(t.item).some(r=>t.item[r]!==e.item[r])?e:W({},e,{item:null});default:return e}};function P1t(e){const{children:t}=e,[r,n]=A.useReducer(A1t,{item:null,scope:M9}),o=A.useMemo(()=>W({},r,{dispatch:n}),[r]);return R(Pse.Provider,{value:o,children:t})}const M1t=(e,t)=>{const{dispatch:r}=A.useContext(R0),{dispatch:n}=A.useContext(Pse);return t?()=>({}):i=>({onMouseEnter:()=>{r({type:"enterItem",data:i}),n({type:"enterItem",item:i,scope:e})},onMouseLeave:()=>{r({type:"leaveItem",data:i}),n({type:"leaveItem",item:i})}})},R1t=(e,t,r)=>{if(!(r!=null&&r.highlighted)||r.highlighted==="none"||e===null)return!1;const n=e.type===t.type&&e.seriesId===t.seriesId;return n?r.highlighted==="series"?n:e.dataIndex!==void 0&&e.dataIndex===t.dataIndex:!1},O1t=(e,t,r)=>{if(!(r!=null&&r.faded)||r.faded==="none"||e===null)return!1;const n=e.type===t.type&&e.seriesId===t.seriesId;return r.faded==="series"?n&&e.dataIndex!==t.dataIndex:r.faded==="global"?n?e.dataIndex!==void 0&&e.dataIndex!==t.dataIndex:!0:!1},D1t=["id","dataIndex","classes","color","highlightScope","slots","slotProps","style","onClick"];function F1t(e){return Gt("MuiBarElement",e)}Vt("MuiBarElement",["root"]);const N1t=e=>{const{classes:t,id:r}=e,n={root:["root",`series-${r}`]};return pt(n,F1t,t)},L1t=We(I1t.rect,{name:"MuiBarElement",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({stroke:"none",shapeRendering:"crispEdges",fill:e.isHighlighted?_1(e.color).brighter(.5).formatHex():e.color,transition:"opacity 0.2s ease-in, fill 0.2s ease-in",opacity:e.isFaded&&.3||1}));function $1t(e){const{id:t,dataIndex:r,classes:n,color:o,highlightScope:i,slots:a,slotProps:s,style:c,onClick:l}=e,u=ze(e,D1t),f=M1t(i),{item:d}=A.useContext(R0),h=R1t(d,{type:"bar",seriesId:t,dataIndex:r},i),p=!h&&O1t(d,{type:"bar",seriesId:t,dataIndex:r},i),g={id:t,dataIndex:r,classes:n,color:o,isFaded:p,isHighlighted:h},m=N1t(g),v=(a==null?void 0:a.bar)??L1t,y=Cr({elementType:v,externalSlotProps:s==null?void 0:s.bar,additionalProps:W({},u,f({type:"bar",seriesId:t,dataIndex:r}),{style:c,className:m.root,onClick:l,cursor:l?"pointer":"unset"}),ownerState:g});return R(v,W({},y))}const B1t=["skipAnimation","onItemClick"];function U1t({bandWidth:e,numberOfGroups:t,gapRatio:r}){if(r===0)return{barWidth:e/t,offset:0};const n=e/(t+(t-1)*r),o=r*n;return{barWidth:n,offset:o}}const H1t=()=>{const e=A.useContext(M0).bar??{series:{},stackingGroups:[],seriesOrder:[]},t=A.useContext(gc),{series:r,stackingGroups:n}=e,{xAxis:o,yAxis:i,xAxisIds:a,yAxisIds:s}=t,c=a[0],l=s[0];return n.flatMap(({ids:f},d)=>f.flatMap(h=>{const p=r[h].xAxisKey??c,g=r[h].yAxisKey??l,m=o[p],v=i[g],y=r[h].layout==="vertical";let b;if(y){if(!vT(m))throw new Error(`MUI X Charts: ${p===Ox?"The first `xAxis`":`The x-axis with id "${p}"`} shoud be of type "band" to display the bar series of id "${h}".`);if(o[p].data===void 0)throw new Error(`MUI X Charts: ${p===Ox?"The first `xAxis`":`The x-axis with id "${p}"`} shoud have data property.`);b=m}else{if(!vT(v))throw new Error(`MUI X Charts: ${g===Dx?"The first `yAxis`":`The y-axis with id "${g}"`} shoud be of type "band" to display the bar series of id "${h}".`);if(i[g].data===void 0)throw new Error(`MUI X Charts: ${g===Dx?"The first `yAxis`":`The y-axis with id "${g}"`} shoud have data property.`);b=v}const w=m.scale,E=v.scale,I=b.scale.bandwidth(),{barWidth:O,offset:D}=U1t({bandWidth:I,numberOfGroups:n.length,gapRatio:b.barGapRatio}),N=d*(O+D),{stackedData:U,color:B}=r[h];return U.map((F,T)=>{var S,x;const P=F.map(k=>y?E(k):w(k)),_=Math.min(...P),C=Math.max(...P);return{seriesId:h,dataIndex:T,layout:r[h].layout,x:y?w((S=o[p].data)==null?void 0:S[T])+N:_,y:y?_:E((x=i[g].data)==null?void 0:x[T])+N,xOrigin:w(0),yOrigin:E(0),height:y?C-_:O,width:y?O:C-_,color:B,highlightScope:r[h].highlightScope}})}))},zG=({layout:e,yOrigin:t,x:r,width:n,y:o,xOrigin:i,height:a})=>W({},e==="vertical"?{y:t,x:r,height:0,width:n}:{y:o,x:i,height:a,width:0}),jG=({x:e,width:t,y:r,height:n})=>({y:r,x:e,height:n,width:t});function z1t(e){const t=H1t(),{skipAnimation:r,onItemClick:n}=e,o=ze(e,B1t),i=f1t(t,{keys:a=>`${a.seriesId}-${a.dataIndex}`,from:zG,leave:zG,enter:jG,update:jG,immediate:r});return R(A.Fragment,{children:i((a,{seriesId:s,dataIndex:c,color:l,highlightScope:u})=>R($1t,W({id:s,dataIndex:c,highlightScope:u,color:l},o,{onClick:n&&(f=>{n(f,{type:"bar",seriesId:s,dataIndex:c})}),style:a})))})}const j1t=()=>{im(()=>{const e=window.matchMedia("(prefers-reduced-motion)"),t=r=>{vc.assign({skipAnimation:r.matches||void 0})};return t(e),e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[])};function bg(e){return e instanceof Date?e.getTime():e}const V1t=e=>{const t=A.useContext(T4),{width:r,height:n,top:o,left:i}=A.useContext(T0),{xAxis:a,yAxis:s,xAxisIds:c,yAxisIds:l}=A.useContext(gc),{dispatch:u}=A.useContext(R0),f=c[0],d=l[0],h=A.useRef({x:-1,y:-1});A.useEffect(()=>{const p=t.current;if(p===null||e)return()=>{};const g=(y,b)=>{if(f===null)return null;const{scale:w,data:E,reverse:I}=y;if(!$x(w)){const D=w.invert(b);if(E===void 0)return{value:D};const N=bg(D),U=E==null?void 0:E.findIndex((B,F)=>{const T=bg(B);return T>N&&(F===0||Math.abs(N-T)<=Math.abs(N-bg(E[F-1])))||T<=N&&(F===E.length-1||Math.abs(bg(D)-T)<Math.abs(bg(D)-bg(E[F+1])))});return{value:U!==void 0&&U>=0?E[U]:D,index:U}}const O=w.bandwidth()===0?Math.floor((b-Math.min(...w.range())+w.step()/2)/w.step()):Math.floor((b-Math.min(...w.range()))/w.step());if(O<0||O>=E.length)return null;if(I){const D=E.length-1-O;return{index:D,value:E[D]}}return{index:O,value:E[O]}},m=()=>{h.current={x:-1,y:-1},u({type:"exitChart"})},v=y=>{const b=evt(t.current,y);h.current={x:b.x,y:b.y};const w=b.x<i||b.x>i+r,E=b.y<o||b.y>o+n;if(w||E){u({type:"exitChart"});return}const I=g(a[f],b.x),O=g(s[d],b.y);u({type:"updateAxis",data:{x:I,y:O}})};return p.addEventListener("mouseout",m),p.addEventListener("mousemove",v),()=>{p.removeEventListener("mouseout",m),p.removeEventListener("mousemove",v)}},[t,u,i,r,o,n,d,s,f,a,e])},W1t=["children","width","height","viewBox","disableAxisListener","className","title","desc"],G1t=We("svg",{name:"MuiChartsSurface",slot:"Root"})(()=>({})),q1t=A.forwardRef(function(t,r){const{children:n,width:o,height:i,viewBox:a,disableAxisListener:s=!1,title:c,desc:l}=t,u=ze(t,W1t),f=W({width:o,height:i,x:0,y:0},a);return V1t(s),xe(G1t,W({width:o,height:i,viewBox:`${f.x} ${f.y} ${f.width} ${f.height}`,ref:r},u,{children:[R("title",{children:c}),R("desc",{children:l}),n]}))}),K1t=A.forwardRef(function(t,r){const{width:n,height:o,series:i,margin:a,xAxis:s,yAxis:c,colors:l,dataset:u,sx:f,title:d,desc:h,disableAxisListener:p,children:g}=t,m=A.useRef(null),v=Ur(r,m);return j1t(),R(Oht,{width:n,height:o,margin:a,svgRef:m,children:R(j0t,{series:i,colors:l,dataset:u,children:R(q0t,{xAxis:s,yAxis:c,dataset:u,children:R(ygt,{children:R(P1t,{children:R(q1t,{width:n,height:o,ref:v,sx:f,title:d,desc:h,disableAxisListener:p,children:g})})})})})})}),Y1t=(e,t)=>{const r=A.useRef(null),n=A.useRef(!1),[o,i]=A.useState(0),[a,s]=A.useState(0),c=A.useCallback(()=>{const l=r==null?void 0:r.current;if(!l)return;const f=Gs(l).getComputedStyle(l),d=Math.floor(parseFloat(f.height))||0,h=Math.floor(parseFloat(f.width))||0;i(h),s(d)},[]);return A.useEffect(()=>{n.current=!0},[]),en(()=>{if(e!==void 0&&t!==void 0)return()=>{};c();const l=r.current;if(typeof ResizeObserver>"u")return()=>{};let u;const f=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{c()})});return l&&f.observe(l),()=>{u&&window.cancelAnimationFrame(u),l&&f.unobserve(l)}},[c,t,e]),[r,e??o,t??a]},X1t=["width","height"],Q1t=We("div",{name:"MuiResponsiveChart",slot:"Container"})(({ownerState:e})=>({width:e.width??"100%",height:e.height??"100%",display:"flex",position:"relative",flexGrow:1,flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden","&>svg":{width:"100%",height:"100%"}})),Z1t=A.forwardRef(function(t,r){const{width:n,height:o}=t,i=ze(t,X1t),[a,s,c]=Y1t(n,o);return R(Q1t,{ref:a,ownerState:{width:n,height:o},children:s&&c?R(K1t,W({},i,{width:s,height:c,ref:r})):null})}),J1t=A.forwardRef(function(t,r){const{xAxis:n,yAxis:o,series:i,width:a,height:s,margin:c,colors:l,dataset:u,sx:f,layout:d,tooltip:h,axisHighlight:p,legend:g,grid:m,topAxis:v,leftAxis:y,rightAxis:b,bottomAxis:w,skipAnimation:E,onItemClick:I,onAxisClick:O,children:D,slots:N,slotProps:U}=t,F=`${dn()}-clip-path`,T=d==="horizontal"||d===void 0&&i.some(C=>C.layout==="horizontal"),P={scaleType:"band",data:Array.from({length:Math.max(...i.map(C=>(C.data??u??[]).length))},(C,S)=>S)},_=W({},T?{y:"band"}:{x:"band"},p);return xe(Z1t,{ref:r,series:i.map(C=>W({type:"bar"},C,{layout:T?"horizontal":"vertical"})),width:a,height:s,margin:c,xAxis:n??(T?void 0:[W({id:Ox},P)]),yAxis:o??(T?[W({id:Dx},P)]:void 0),colors:l,dataset:u,sx:f,disableAxisListener:(h==null?void 0:h.trigger)!=="axis"&&(p==null?void 0:p.x)==="none"&&(p==null?void 0:p.y)==="none"&&!O,children:[O&&R(tvt,{onAxisClick:O}),m&&R(ggt,{vertical:m.vertical,horizontal:m.horizontal}),R("g",{clipPath:`url(#${F})`,children:R(z1t,{slots:N,slotProps:U,skipAnimation:E,onItemClick:I})}),R(ugt,{topAxis:v,leftAxis:y,rightAxis:b,bottomAxis:w,slots:N,slotProps:U}),R(Xgt,W({},g,{slots:N,slotProps:U})),R(Jgt,W({},_)),R(Mgt,W({},h,{slots:N,slotProps:U})),R(K0t,{id:F}),D]})}),eyt=e=>[{placeholder:"Insight Category",label:"Insight Category",name:"insightCategory",type:"selectInput",required:!1,multiple:!0,values:[...new Set(e.map(r=>r.insightType))].map(r=>({label:r,value:r}))},{placeholder:"Facility Name",label:"Facility Name",name:"facilityName",type:"autocomplete",required:!1,multiple:!0,options:[...new Set(e.map(r=>r.facilityName).sort())].map(r=>({label:r,value:r}))},{placeholder:"Account Number",label:"Account Number",name:"accountNumber",type:"autocomplete",required:!1,multiple:!0,options:[...new Set(e.map(r=>r.accountNumber).sort())].filter(Boolean).map(r=>({label:r,value:r}))},{placeholder:"Meter Name",label:"Meter Name",name:"meterName",type:"autocomplete",required:!1,multiple:!0,options:[...new Set(e.map(r=>r.meterName).sort())].filter(Boolean).map(r=>({label:r,value:r}))},{placeholder:"Insight Date Range",label:"Insight Date Range",name:"insightDate",type:"dateRangePicker",required:!1,slotProps:{field:{clearable:!0}}}],tyt="summaryDataInsights",tM=2e3;function ryt(e){return!e||e.length===0?[{insightCategory:"",count:0}]:e.reduce((t,r)=>{const n=t.find(o=>o.insightCategory===r.insightType);return n?n.count++:t.push({insightCategory:r.insightType,count:1}),t},[])??[{insightCategory:"",count:0}]}function nyt(e){let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return"#"+(t&16777215|8421504).toString(16).slice(-6)}const oyt={label:"inRange",value:"inRange",getApplyFilterFn:e=>!e.value[0]||!e.value[1]?null:({value:t})=>t>=e.value[0]&&t<=e.value[1]},iyt=()=>{const{hasNextPage:e,isError:t,isFetching:r,isFetchingNextPage:n,fetchNextPage:o}=jR({queryKey:["dataInsights"],queryFn:async({pageParam:N=0})=>{const B=(await r6("dashboard_data_insights",{limit:tM,offset:N})).map(F=>({rowId:"data-insight-id-"+Math.random(),...F}));return y(F=>[...F,...B]),B},initialPageParam:0,getNextPageParam:(N,U)=>(N==null?void 0:N.length)===tM?U.length*tM:void 0,initialData:{pages:[],pageParams:[]}}),{control:i,formState:{errors:a},handleSubmit:s,reset:c,setValue:l,watch:u}=Bn({defaultValues:{insightCategory:[],facilityName:[],accountNumber:[],meterName:[],insightDate:[new Date(new Date().getFullYear()-1,0,1),new Date]}}),[f,d]=A.useState({items:[{field:"insightDate",operator:"inRange",value:[new Date(new Date().getFullYear()-1,0,1),new Date]}]}),[h,p]=A.useState([]),[g,m]=A.useState(0),[v,y]=A.useState([]),b=m8(),w=eyt(v);A.useMemo(()=>{e&&!n&&o()},[e,n,o]);const E=[{field:"facilityName",headerName:"Facility Name",flex:1.5},{field:"insightType",headerName:"Insight Category",flex:1,renderCell:({value:N})=>{const U=A.useMemo(()=>nyt(N),[N]);return R(bo,{label:N,style:{backgroundColor:U}})}},{field:"accountNumber",headerName:"Account Number",width:200},{field:"insightDate",headerName:"Insight Date",type:"date",flex:1,valueFormatter:({value:N})=>N?Vo(N,"PPP"):"",valueGetter:({row:N})=>N.insightDate?Hr(N.insightDate):"",filterOperators:[oyt]},{field:"insightMessage",headerName:"Insight Details",flex:2.5},{field:"meterName",headerName:"Meter Name"},{field:"actions",type:"actions",cellClassName:"actions",getActions:({row:{resolutionUrl:N}})=>[R(yr,{icon:R(h9e,{}),label:"Cancel",className:"textPrimary",color:"inherit",onClick:O(N)},"cancel")]}],I=N=>{const{insightCategory:U,insightDate:B,facilityName:F,accountNumber:T,meterName:P}=N,_=[...U.length?[{field:"insightType",id:Math.random(),operator:"isAnyOf",value:U}]:[],...B?[{field:"insightDate",id:Math.random(),operator:"inRange",value:B}]:[],...F.length?[{field:"facilityName",id:Math.random(),operator:"isAnyOf",value:F}]:[],...T.length?[{field:"accountNumber",id:Math.random(),operator:"isAnyOf",value:T}]:[],...P.length?[{field:"meterName",id:Math.random(),operator:"isAnyOf",value:P}]:[]],C=U.length+F.length+T.length+P.length;d({items:_}),m(C)},O=N=>()=>{window.open(`/administration${N}`,"_blank")};A.useEffect(()=>{const N=u(()=>s(I)());return()=>N.unsubscribe()},[u,v]),A.useEffect(()=>{if(b.current){const N=Cf(b).map(U=>U.model);p(N)}},[f,b]),A.useEffect(()=>{p(v),l("insightDate",[new Date(new Date().getFullYear()-1,0,1),new Date])},[v]);const D=A.useMemo(()=>ryt(h),[h]);return xe(Ho,{spacing:2,children:[R(f1,{variant:"outlined",children:xe(dx,{children:[xe(Ho,{direction:"row",justifyContent:"space-between",marginBottom:.5,children:[xe(Ho,{direction:"row",spacing:1,children:[R(jt,{color:"text.secondary",textAlign:"center",marginY:"auto",children:"Filter by"}),R(qI,{badgeContent:g,color:"primary",children:R(f9e,{sx:{color:"text.secondary",width:20}})})]}),R(Ho,{direction:"row",spacing:1,children:R(Ft,{variant:"text",size:"small",onClick:N=>c(N),component:"button",children:"Clear All"})})]}),R(Ot,{container:!0,spacing:2,children:w.map((N,U)=>R(Ot,{item:!0,xs:12,md:3,children:R(Dn,{control:i,fieldConf:N,errors:a})},U))})]})}),R(f1,{variant:"outlined",children:xe(dx,{children:[R(jt,{color:"text.secondary",gutterBottom:!0,children:"Insights by Category"}),R(Ho,{alignItems:"center",justifyContent:"center",height:240,children:v.length===0?R(jt,{color:"text.secondary",children:"No insights available"}):R(J1t,{dataset:D,height:240,margin:{left:175},layout:"horizontal",series:[{dataKey:"count",label:"Number of insights"}],yAxis:[{dataKey:"insightCategory",scaleType:"band"}]})})]})}),R(Yn,{apiRef:b,checkboxSelection:!1,columns:E,contextName:tyt,csvFilename:"Data Insights",dataFetchError:t,filterModel:f,getRowId:N=>N.rowId,initialState:{columns:{columnVisibilityModel:{meterName:!1}},pagination:{paginationModel:{pageSize:25}},sorting:{sortModel:[{field:"insightDate",sort:"desc"}]}},loading:r,onFilterModelChange:N=>d(N),rows:v,showToolbarFilter:!1})]})};function ayt(){const{featureChecker:e}=on(),t=[{component:()=>R(qn,{dashboardSlug:"homepage"}),name:"homepage",subtitle:"A dynamic summary of key portfolio metrics",tabTitle:"Portfolio"},{component:()=>R(qn,{dashboardSlug:"oppengine"}),name:"oppengine",subtitle:"Analytics identified opportunities to save and improve performance",tabTitle:"Savings Opportunities"},{component:()=>e.devFeatureEnabled(xf.Experimental)?R(iyt,{}):R(qn,{dashboardSlug:"datainsights"}),name:"datainsights",subtitle:"Analytics identified insights into data issues and anomalies",tabTitle:"Data Insights"},{component:()=>R(qn,{dashboardSlug:"energystar"}),name:"energystar",subtitle:"ENERGY STAR scores and metrics",tabTitle:"ENERGY STAR"},{component:()=>R(qn,{dashboardSlug:"emissions"}),name:"emissions",subtitle:"Track scope 1 and scope 2 carbon emissions",tabTitle:"Emissions"},{component:()=>R(qn,{dashboardSlug:"datacompleteness"}),name:"datacompleteness",subtitle:"Visualize how complete your data is by service type ",tabTitle:"Data Completeness"}];return R(l4,{defaultGlobalState:ast(),children:R(hd,{tabs:t,heading:"Overview of performance across your portfolio"})})}var Mse=(e=>(e.Question="Question",e.ProductIssue="Product Issue",e.ProductIdea="Product Idea",e.AddDataAutomation="Add Data Automation",e.AddSmartMeter="Add Smart Meter",e.Other="Other",e))(Mse||{});const VG=()=>({requestType:"",name:"",phoneNumber:"",message:""}),syt=()=>[{placeholder:"Request Type",label:"Request Type",name:"requestType",type:"selectInput",required:!0,values:Object.values(Mse).map(t=>({label:t,value:t}))},{placeholder:"Name",label:"Name",name:"name",type:"textInput",required:!0},{placeholder:"Phone Number",label:"Phone Number",name:"phoneNumber",type:"textInput",required:!0},{placeholder:"Message",label:"Message",name:"message",type:"textInput",required:!0,multiline:!0}],lyt=()=>{var p;const{control:e,handleSubmit:t,formState:{errors:r},reset:n}=Bn({defaultValues:VG()}),{getUser:o}=on(),[i,a]=A.useState({}),[s,c]=A.useState(!1),l=(p=o())==null?void 0:p.id;async function u(){try{const g=await noe(l);a(g)}catch{St.error(bt.ERROR)}}async function f(g){try{await fetch("/contactRequest",g),St.success(bt.CONTACT_REQUEST_SUCCESS),n(VG())}catch{St.error(bt.ERROR)}finally{c(!1)}}A.useEffect(()=>{u()},[]);const d=g=>{c(!0);const m={body:JSON.stringify({...g,userEmail:i.email}),method:"post",headers:{"Content-Type":"application/json"}};f(m)},h=syt();return xe(td,{sx:{mx:"24%"},children:[R(jt,{variant:"h4",sx:{fontWeight:"bold",textAlign:"center"},children:"Contact Us"}),R(jt,{variant:"body1",sx:{mb:2,textAlign:"center"},children:"We'd love to hear from you. Send us a message and we'll respond as soon as possible."}),xe("form",{onSubmit:t(g=>d(g)),children:[R(Ot,{container:!0,spacing:2,children:h.map((g,m)=>R(Ot,{item:!0,xs:12,children:R(Dn,{control:e,fieldConf:g,errors:r})},m))}),R(Ft,{disabled:s,type:"submit",variant:"contained",color:"secondary",disableElevation:!0,sx:{mt:2},children:"Send Message"})]})]})},cyt=[{component:()=>R(lyt,{}),name:"contact-us",subtitle:"Send us a message and we'll get right back to you.",tabTitle:"Contact Us"}];function uyt(){return R(hd,{tabs:cyt,heading:"We're here to help"})}const rM={hasRandomAbbreviatedOrgName(e){return/^[a-z]{3,}_/.test(e)},hasRandom8CharacterString(e){return/_[a-z0-9]{8}$/.test(e)},hasUnderscoreBeforeRandom8Chars(e){return/_.{8}$/.test(e)}},dyt=e=>[{constraint:"Lowercase and abbreviated org name of minimum 3 characters at the start",valid:rM.hasRandomAbbreviatedOrgName(e)},{constraint:"Random 8-character, lowercase alphanumeric string at the end",valid:rM.hasRandom8CharacterString(e)},{constraint:"An underscore (_) before the 8 random characters at the end",valid:rM.hasUnderscoreBeforeRandom8Chars(e)}];var Rse=(e=>(e.empower="Empower Platform",e.energyHq="EnergyHQ",e))(Rse||{});const fyt=(e={})=>{const t=new Date;return t.setMonth(e.fiscalYearStartMonth??6),{fiscalYearStartMonth:t,name:e.name??"",id:e.id??"",externalAccountIds:e.externalAccountIds??[],productFeatures:e.productFeatures??[],products:e.products??[]}},hyt=(e=!1)=>[{name:"name",label:"Organization Name",placeholder:"Organization Name",required:!0,type:"textInput"},{name:"id",label:"Organization ID",placeholder:"Organization ID",required:!0,type:"textInput",...e&&{disabled:!0}},{name:"externalAccountIds",label:"External Account ID",placeholder:"External Account ID",required:!1,type:"autocomplete",tags:!0,options:[],autoCompleteProps:({onBlur:r,onChange:n,value:o})=>({multiple:!0,freeSolo:!0,clearOnBlur:!0,renderTags:(i,a)=>o.map((s,c)=>R(bo,{variant:"outlined",label:s,...a({index:c})},c)),onChange:(i,a)=>n(a),onBlur:i=>{const{value:a}=i.target;a&&!o.includes(a)&&(n([...o,a]),r())}})},{name:"productFeatures",label:"Additional Features",placeholder:"Additional Features",multiple:!0,type:"selectInput",required:!1,values:Object.values(Y1).map(r=>({label:r,value:r}))},{name:"products",label:"Products",placeholder:"Products",multiple:!0,type:"selectInput",required:!1,values:Object.values(Rse).map(r=>({label:r,value:r}))},{placeholder:"Fiscal Year Start Month",label:"Fiscal Year Start Month",name:"fiscalYearStartMonth",type:"datePicker",required:!0,other:{views:["month"],slotProps:{calendarHeader:{sx:{display:"none"}}}}}],WG=({doc:e={},onClose:t,onSave:r,open:n})=>{var u;const{control:o,handleSubmit:i,formState:{errors:a}}=Bn({defaultValues:UF(e)}),{userType:s}=(u=on())==null?void 0:u.getUser(),c=f=>{r(f)},l=HF(e.id??"new",s);return R(Cs,{title:Object.keys(e).length?`Edit user ${e.name}`:"Add user",open:n,onClose:t,dialogActions:xe(Jt,{direction:"row",spacing:2,children:[R(Ft,{variant:"outlined",onClick:t,children:"Cancel"}),R(Ft,{variant:"contained",color:"secondary",disableElevation:!0,type:"submit",form:"organization-user-form",children:Object.keys(e).length?"Update user":"Add user"})]}),children:R("form",{onSubmit:i(c),id:"organization-user-form",children:R(Ot,{container:!0,spacing:2,mt:.25,children:l.map((f,d)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:o,fieldConf:f,errors:a})},d))})})})},pyt=({editable:e=!1,onDataChange:t})=>{const[r,n]=A.useState({}),[o,i]=A.useState(!1),[a,s]=A.useState(""),[c,l]=A.useState(!1),[u,f]=A.useState(!1),[d,h]=A.useState([]);A.useEffect(()=>{t==null||t(d)},[d]);const p=B=>()=>{n({...r,[B]:{mode:gn.View}})},g=B=>()=>{n({...r,[B]:{mode:gn.View,ignoreModifications:!0}})},m=B=>(h(d.map((F,T)=>{const{id:P,..._}=B;return(F==null?void 0:F.id)===P||T===P?_:F})),B),v=B=>{e&&n(B)},y=B=>{s(B[0])},b=()=>{l(!0),f(!1)},w=()=>{l(!1),f(!0)},E=()=>{l(!1),f(!1),s("")},I=B=>{h([...d,B]),E()},O=B=>{(a||a.toString()==="0")&&h(F=>F.map((P,_)=>(P==null?void 0:P.id)===a.toString()?{id:P.id,...B}:_.toString()===a.toString()?B:P)),E()},D=()=>{i(!1)},N=()=>{(a||a.toString()==="0")&&h(B=>B.filter((T,P)=>T!=null&&T.id&&(T==null?void 0:T.id)===a?!1:P.toString()!==a.toString())),s(""),i(!1)},U=[{editable:!0,field:"name",headerName:"Name",width:192},{editable:!0,field:"email",headerName:"Email",width:224},{editable:!0,field:"userType",headerName:"User Type",width:144,type:"singleSelect",valueOptions:[Pi.SystemAdministrator,Pi.Administrator,Pi.User]},{editable:!0,field:"title",headerName:"Title",width:144},{editable:!0,field:"phone",headerName:"Phone",width:144},...e?[{field:"actions",type:"actions",headerName:"Actions",width:100,cellClassName:"actions",getActions:({id:B})=>{var T;return((T=r[B])==null?void 0:T.mode)===gn.Edit?[R(yr,{icon:R(g0,{}),label:"Save",sx:{color:"primary.main"},onClick:p(B)},"save"),R(yr,{icon:R(m0,{}),label:"Cancel",className:"textPrimary",onClick:g(B),color:"inherit"},"cancel")]:[R(yr,{icon:R(ud,{}),label:"Edit",className:"textPrimary",onClick:()=>{s(B),w()},color:"inherit"},"edit"),R(yr,{icon:R(oo,{}),label:"Delete",onClick:()=>{s(B),i(!0)},color:"inherit"},"delete")]}}]:[]];return xe(Jt,{direction:"row",children:[R(Yn,{editMode:"row",rowModesModel:r,processRowUpdate:m,checkboxSelection:!1,customToolbarOptions:e&&R(nr,{sx:{ml:"auto"},children:R(Ft,{color:"secondary",startIcon:R(_f,{}),onClick:b,sx:{alignSelf:"flex-end"},children:"Add user"})}),columns:U,csvFilename:"Initial Users",handleSelectionChange:y,isRowNavigation:!1,onRowModesModelChange:v,rows:d.length===0?[]:d.map((B,F)=>({id:F,...B}))}),c&&R(WG,{open:c,onClose:E,onSave:I}),u&&R(WG,{open:u,onClose:E,onSave:O,doc:d.find((B,F)=>B!=null&&B.id&&(B==null?void 0:B.id)===a?!0:F.toString()===a.toString())}),R(Br,{open:o,onClose:D,message:"Are you sure you want to remove this user?",primaryButtonLabel:"Yes",onPrimaryButtonClicked:N,secondaryButtonLabel:"No",onSecondaryButtonClicked:D,renderElement:R(oo,{sx:{color:"error.main"}})})]})},myt=({doc:e={},handleBackAction:t})=>{const{refreshUser:r}=on(),{control:n,formState:{dirtyFields:o,errors:i},handleSubmit:a,watch:s,...c}=Bn({defaultValues:fyt(e)}),[l,u]=A.useState(!1),[f,d]=A.useState(!1),[h]=s(["id"]),[p,g]=A.useState([]),m=!(e.isActive??!0),v=hyt(!!e.id),y=dyt(h),b=E=>{u(!0);const I={externalAccountIds:E.externalAccountIds,isActive:e.isActive!=null?e.isActive:!0,name:E.name,id:e.id?e.id:E.id,productFeatures:E.productFeatures,products:E.products,fiscalYearStartMonth:E.fiscalYearStartMonth.getMonth()??6},O={organization:I,initialUsers:p.map(B=>({...B,organizationId:E.id}))},D=I;async function N(){try{await Hit(O),St.success(bt.CREATE_SUCCESS),t()}catch(B){mi.compatible(B)&&gi(c,B),St.error(bt.ERROR)}finally{u(!1)}}async function U(){try{await jF(e.id,D),St.success(bt.UPDATE_SUCCESS),await r(),t()}catch{St.error(bt.ERROR)}finally{u(!1)}}e.id?U():N()},w=()=>{d(E=>!E)};return xe(nr,{children:[m&&R(dp,{label:"Organization deactivated",labelPlacement:"start",control:R(Tl,{disabled:!0,checked:!0}),style:{display:"flex"}}),R(_o,{title:"Organization information",buttons:xe(zr,{children:[R(Ft,{disabled:l||m,color:"secondary",variant:"contained",onClick:a(E=>b(E)),disableElevation:!0,children:e.id?"Update":"Save"}),R(Ft,{disableElevation:!0,color:"secondary",variant:"outlined",onClick:w,children:"Cancel"})]}),children:R(nr,{children:xe(Ot,{container:!0,spacing:2,children:[R(Ot,{item:!0,xs:12,children:R(yo,{children:"Organization information"})}),R(Ot,{item:!0,xs:12,children:R(v4,{constraints:y,dirtyFields:[{id:o.id??!1}],fieldName:"organization ID"})}),v.map((E,I)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:n,fieldConf:E,errors:i,isViewMode:m})},I)),!e.id&&xe(zr,{children:[R(Ot,{item:!0,xs:12,children:R(yo,{children:"Initial Users"})}),R(Ot,{item:!0,xs:12,children:R(pyt,{editable:!0,onDataChange:g})})]})]})})}),R(Br,{open:f,onClose:w,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:w,renderElement:R(qo,{sx:{color:"red"}})})]})},gyt=e=>[{name:"organizationId",label:"Organization",placeholder:"Organization",type:"selectInput",required:!0,values:e.map(r=>({label:r.name,value:r.id}))}],vyt=({doc:e={},handleBackAction:t})=>{const{data:r}=da({queryKey:["organizations"],queryFn:zF,initialData:{data:[]}}),{control:n,handleSubmit:o,formState:{errors:i},...a}=Bn({defaultValues:UF(e)}),[s,c]=A.useState(!1),[l,u]=A.useState(!1),{getUser:f}=on(),{userType:d}=f(),h=m=>{c(!0);async function v(){try{await roe(m),t(),St.success(bt.CREATE_SUCCESS)}catch(b){mi.compatible(b)&&gi(a,b),St.error(b===400?bt.ALREADY_EMAIL_IN_USE:bt.ERROR)}finally{c(!1)}}async function y(){try{delete m.email,await m4(e.id,m),t(),St.success(bt.UPDATE_SUCCESS)}catch(b){mi.compatible(b)&&gi(a,b),St.error(b===400?bt.ALREADY_EMAIL_IN_USE:bt.ERROR)}finally{c(!1)}}e.id?y():v()},p=()=>{u(!1)},g=()=>{u(!0)};return xe(td,{children:[R(_o,{title:"User information",buttons:xe(zr,{children:[R(Ft,{color:"secondary",disabled:s,variant:"contained",onClick:o(m=>h(m)),disableElevation:!0,children:e.id?"update":"save"}),R(Ft,{color:"secondary",disabled:s,variant:"outlined",onClick:g,children:"Cancel"})]}),children:R(td,{children:xe(Ot,{container:!0,spacing:2,children:[HF(e.id??"new",d).map((m,v)=>R(Ot,{item:!0,xs:12,sm:6,children:R(Dn,{control:n,fieldConf:m,errors:i})},v)),gyt(r.data).map((m,v)=>R(Ot,{item:!0,xs:12,sm:6,children:R(Dn,{control:n,fieldConf:m,errors:i})},v))]})})}),R(Br,{open:l,onClose:p,message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:p,renderElement:R(qo,{sx:{color:"red"}})})]})},yyt=()=>{const{getUser:e}=on(),{organizationId:t}=e(),{setOrganizations:r}=loe(),{data:n,isFetching:o,isError:i,refetch:a}=da({queryKey:["organizations"],queryFn:async()=>{const b=await zF();return r(b.data),b},initialData:{data:[]}}),[s,c]=A.useState(!1),[l,u]=A.useState(!1),[f,d]=A.useState({open:!1,data:{}}),h=ii();async function p(){try{const b=f.data,w={...b,isActive:!b.isActive};await jF(b.id,w),await a(),g(),St.success(w.isActive?bt.REACTIVATE_SUCCESS:bt.DEACTIVATE_SUCCESS)}catch{St.error(bt.ERROR)}}function g(){d({open:!1,data:{}}),c(!1)}const m=b=>()=>h(`/systemadministration/organizations/${b}`),v=[{field:"name",headerName:"Name",flex:2},{field:"id",headerName:"Organization Id",flex:1},{field:"fiscalYearStartMonth",headerName:"Fiscal Year Start Month",flex:1,valueFormatter:({value:b})=>{const w=new Date;return w.setMonth(b),dC(w,{month:"long"})}},{field:"deactivated",headerName:"Deactivated",width:115,valueGetter:b=>b.row.isActive?"No":"Yes",renderCell:({row:b})=>R(bo,{label:b.isActive?"No":"Yes",variant:"outlined",color:b.isActive?"success":"error"})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:b,isActive:w,...E}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:m(b)},"updateBtn"),R(yr,{icon:w?R(oy,{}):R(ny,{}),label:w?"Deactivate":"Reactivate",onClick:()=>{t===b?c(!0):d({open:!0,data:{...E,id:b,isActive:w}})}},"hiddenBtn")]}],y=[{name:"New",icon:R(Qa,{}),handleAction:m("new"),primary:!0}];return xe(Jt,{direction:"column",spacing:2,marginInline:2,justifyContent:"space-between",children:[R(ts,{actions:y}),R(Yn,{columns:v,contextName:"organizations",csvFilename:"Organizations",dataFetchError:i,loading:o,customToolbarOptions:R(oC,{showDeactivatedType:l,setShowDeactivatedType:u,type:"organizations"}),rows:l?n.data:n.data.filter(({isActive:b})=>b)}),R(Br,{open:s,onClose:g,message:"Warning: Switch organizations, you cannot deactivate the current one",primaryButtonLabel:"close",onPrimaryButtonClicked:g,renderElement:R(od,{sx:{color:"yellow"}})}),R(Br,{open:f.open,onClose:g,message:`Are you sure you would like to ${f.data.isActive?"deactivate":"reactivate"} this organization?`,primaryButtonLabel:f.data.isActive?"Deactivate":"Reactivate",onPrimaryButtonClicked:p,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:g,renderElement:f.data.isActive?R(q2,{sx:{color:"error.main"}}):R(G2,{sx:{color:"success.main"}})})]})},byt=()=>{const[{data:e,refetch:t,isFetching:r,isError:n}]=qi({queries:[{queryKey:["users"],queryFn:Oit,initialData:{data:[]}}]}),[o,i]=A.useState({open:!1,data:{}}),a=ii();async function s(){try{const h=o.data,p={...h,isActive:!h.isActive};await m4(h.id,p),await t(),c(),St.success(p.isActive?bt.REACTIVATE_SUCCESS:bt.DEACTIVATE_SUCCESS)}catch{St.error(bt.ERROR)}}function c(){i({open:!1,data:{}})}const l=h=>()=>a(`/systemadministration/users/${h}`),u=h=>async()=>{try{await BF({email:h}),St.success(bt.PASSWORD_RESET_EMAIL_SENT)}catch{St.error(bt.ERROR)}},f=[{field:"name",headerName:"Name",minWidth:144,flex:1},{field:"email",headerName:"Email",width:216},{field:"userType",headerName:"User Type",width:112},{field:"title",headerName:"Title",width:128},{field:"phone",headerName:"Phone",width:96},{field:"organization",headerName:"Organization",width:144,valueGetter:({value:h})=>(h==null?void 0:h.name)??""},{field:"isActive",headerName:"Status",width:96,renderCell:({row:h})=>R(bo,{label:h.isActive===!0?"Enabled":"Disabled",variant:"outlined",color:h.isActive===!0?"success":"warning"})},{field:"actions",headerName:"Options",type:"actions",getActions:({row:{id:h,isActive:p,...g}})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:l(h)},"updateBtn"),R(yr,{icon:p?R(Ix,{}):R(nN,{}),label:p?"Disable":"Enable",showInMenu:!0,onClick:()=>i({open:!0,data:{...g,id:h,isActive:p}})},"hiddenBtn"),R(yr,{icon:R(ZF,{}),label:"Reset Password",onClick:u(g.email),showInMenu:!0},"resetPassBtn")]}],d=[{name:"New",icon:R(Qa,{}),handleAction:l("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:d}),R(Yn,{contextName:"users",columns:f,csvFilename:"Users",dataFetchError:n,loading:r,rows:e.data}),R(Br,{open:o.open,onClose:c,message:`Are you sure you want to ${o.data.isActive?"disable":"enable"} this user?`,primaryButtonLabel:o.data.isActive?"Disable":"Enable",onPrimaryButtonClicked:s,secondaryButtonLabel:"Cancel",onSecondaryButtonClicked:c,renderElement:o.data.isActive?R(Ix,{sx:{color:"warning.main"}}):R(eN,{sx:{color:"warning.main"}})})]})},wyt=async e=>await fa(mr.UTILITY_REGEX,{},e),xyt=async()=>await Ao(mr.UTILITY_REGEX),Cyt=async(e,t)=>await Ys(`${mr.UTILITY_REGEX}/${e}`,{},t),Syt=()=>{const{data:e,isFetching:t}=da({queryKey:["utilitiesRegex"],queryFn:xyt,initialData:{data:[]}}),r=ii(),n=a=>()=>r(`/systemadministration/utility-regex/${a}`),o=[{field:"utility",headerName:"Utility Name",flex:1,valueFormatter:({value:a})=>a.name},{field:"regex",headerName:"Regular Expressions",flex:1,valueFormatter:({value:a})=>a.join(", ")},{field:"actions",headerName:"Options",type:"actions",getActions:({row:a})=>[R(yr,{icon:R(es,{}),label:"Update",onClick:n(a.id)},"updateBtn")]}],i=[{name:"New",icon:R(Qa,{}),handleAction:n("new"),primary:!0}];return xe(Jt,{direction:"column",justifyContent:"space-between",marginInline:2,spacing:2,children:[R(ts,{actions:i}),R(Yn,{columns:o,loading:t,rows:e.data})]})},_yt=e=>({utilityId:e.utilityId??"",regex:e.regex??[]}),kyt=e=>[{name:"utilityId",label:"Utility Name",placeholder:"Utility Name",type:"selectInput",required:!0,values:e.map(t=>({label:t.name,value:t.id}))},{name:"regex",label:"Regular Expressions",placeholder:"Regular Expressions",required:!0,type:"autocomplete",tags:!0,options:[],autoCompleteProps:({onBlur:t,onChange:r,value:n})=>({multiple:!0,freeSolo:!0,clearOnBlur:!0,renderTags:(o,i)=>n.map((a,s)=>R(bo,{variant:"outlined",label:a,...i({index:s})},s)),onChange:(o,i)=>r(i),onBlur:o=>{const{value:i}=o.target;i&&!n.includes(i)&&(r([...n,i]),t())}})}],Eyt=({doc:e={},handleBackAction:t})=>{const{data:r}=da({queryKey:["utilities"],queryFn:async()=>await ry({allOrganizations:!0}),initialData:{data:[]}}),{control:n,formState:{errors:o},handleSubmit:i}=Bn({defaultValues:_yt(e)}),[a,s]=A.useState(!1),[c,l]=A.useState(!1);async function u(f){const d={...f};try{s(!0),e.id?await Cyt(e.id,d):await wyt(d),t(),St.success(bt.CREATE_SUCCESS)}catch{St.error(bt.ERROR)}finally{s(!1)}}return xe(_o,{title:"Utility Regex Mapping Information",buttons:xe(zr,{children:[R(Ft,{disabled:a,color:"secondary",variant:"contained",onClick:i(f=>u(f)),disableElevation:!0,children:e.id?"Update":"Save"}),R(Ft,{disabled:a,color:"secondary",variant:"outlined",onClick:()=>l(!0),disableElevation:!0,children:"Cancel"})]}),children:[R(nr,{children:R(Ot,{container:!0,spacing:2,children:kyt(r.data).map((f,d)=>R(Ot,{item:!0,xs:12,md:6,children:R(Dn,{control:n,fieldConf:f,errors:o})},d))})}),R(Br,{open:c,onClose:()=>l(!1),message:"Are you sure you would like to cancel?",primaryButtonLabel:"Cancel",onPrimaryButtonClicked:t,secondaryButtonLabel:"Save",onSecondaryButtonClicked:()=>l(!1),renderElement:R(qo,{sx:{color:"red"}})})]})};function Tyt(){const{userType:e}=on().getUser(),r=[...[Pi.SystemAdministrator].includes(e)?[{component:yyt,formComponent:myt,name:"organizations",subtitle:"Add, edit, or delete organizations",tabTitle:"Organizations"},{component:byt,formComponent:vyt,name:"users",subtitle:"Add, edit, or delete users",tabTitle:"Users"},{component:Syt,formComponent:Eyt,name:"utility-regex",subtitle:"Add, edit, or delete regex mapping",tabTitle:"Utility Regex"}]:[]];return R(l4,{defaultGlobalState:ost(),children:R(hd,{tabs:r,heading:"System Administration"})})}var kT={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */kT.exports;(function(e,t){(function(){var r,n="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",l=500,u="__lodash_placeholder__",f=1,d=2,h=4,p=1,g=2,m=1,v=2,y=4,b=8,w=16,E=32,I=64,O=128,D=256,N=512,U=30,B="...",F=800,T=16,P=1,_=2,C=3,S=1/0,x=9007199254740991,k=17976931348623157e292,L=0/0,j=4294967295,z=j-1,Y=j>>>1,K=[["ary",O],["bind",m],["bindKey",v],["curry",b],["curryRight",w],["flip",N],["partial",E],["partialRight",I],["rearg",D]],Q="[object Arguments]",q="[object Array]",J="[object AsyncFunction]",G="[object Boolean]",V="[object Date]",X="[object DOMException]",te="[object Error]",ee="[object Function]",re="[object GeneratorFunction]",se="[object Map]",pe="[object Number]",ce="[object Null]",ne="[object Object]",he="[object Promise]",oe="[object Proxy]",le="[object RegExp]",de="[object Set]",ve="[object String]",we="[object Symbol]",ie="[object Undefined]",ge="[object WeakMap]",Pe="[object WeakSet]",Fe="[object ArrayBuffer]",Ie="[object DataView]",Oe="[object Float32Array]",$e="[object Float64Array]",et="[object Int8Array]",Ze="[object Int16Array]",Ne="[object Int32Array]",Qe="[object Uint8Array]",Xe="[object Uint8ClampedArray]",rt="[object Uint16Array]",ht="[object Uint32Array]",At=/\b__p \+= '';/g,Qt=/\b(__p \+=) '' \+/g,Nt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ue=/&(?:amp|lt|gt|quot|#39);/g,Ye=/[&<>"']/g,tt=RegExp(Ue.source),st=RegExp(Ye.source),mt=/<%-([\s\S]+?)%>/g,_t=/<%([\s\S]+?)%>/g,Pt=/<%=([\s\S]+?)%>/g,Ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wt=/^\w*$/,Dt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,Tt=RegExp(qt.source),Me=/^\s+/,Ge=/\s/,nt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,fe=/\{\n\/\* \[wrapped with (.+)\] \*/,ke=/,? & /,be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ce=/[()=,{}\[\]\/\s]/,Ee=/\\(\\)?/g,me=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_e=/\w*$/,Be=/^[-+]0x[0-9a-f]+$/i,De=/^0b[01]+$/i,je=/^\[object .+?Constructor\]$/,Le=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Bt=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,He="\\ud800-\\udfff",ct="\\u0300-\\u036f",xt="\\ufe20-\\ufe2f",Zt="\\u20d0-\\u20ff",Rt=ct+xt+Zt,Ht="\\u2700-\\u27bf",Nr="a-z\\xdf-\\xf6\\xf8-\\xff",kr="\\xac\\xb1\\xd7\\xf7",_r="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",br="\\u2000-\\u206f",qr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xn="A-Z\\xc0-\\xd6\\xd8-\\xde",fn="\\ufe0e\\ufe0f",Zn=kr+_r+br+qr,so="['’]",bi="["+He+"]",Pa="["+Zn+"]",pa="["+Rt+"]",Cc="\\d+",uu="["+Ht+"]",Sc="["+Nr+"]",xn="[^"+He+Zn+Cc+Ht+Nr+Xn+"]",an="\\ud83c[\\udffb-\\udfff]",Al="(?:"+pa+"|"+an+")",Pl="[^"+He+"]",Xs="(?:\\ud83c[\\udde6-\\uddff]){2}",Po="[\\ud800-\\udbff][\\udc00-\\udfff]",Di="["+Xn+"]",Fi="\\u200d",du="(?:"+Sc+"|"+xn+")",Tf="(?:"+Di+"|"+xn+")",_c="(?:"+so+"(?:d|ll|m|re|s|t|ve))?",Qs="(?:"+so+"(?:D|LL|M|RE|S|T|VE))?",mp=Al+"?",pd="["+fn+"]?",If="(?:"+Fi+"(?:"+[Pl,Xs,Po].join("|")+")"+pd+mp+")*",Ts="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Af="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pf=pd+mp+If,Mf="(?:"+[uu,Xs,Po].join("|")+")"+Pf,fu="(?:"+[Pl+pa+"?",pa,Xs,Po,bi].join("|")+")",kC=RegExp(so,"g"),U4=RegExp(pa,"g"),fy=RegExp(an+"(?="+an+")|"+fu+Pf,"g"),EC=RegExp([Di+"?"+Sc+"+"+_c+"(?="+[Pa,Di,"$"].join("|")+")",Tf+"+"+Qs+"(?="+[Pa,Di+du,"$"].join("|")+")",Di+"?"+du+"+"+_c,Di+"+"+Qs,Af,Ts,Cc,Mf].join("|"),"g"),H4=RegExp("["+Fi+He+Rt+fn+"]"),O0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,z4=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],hy=-1,ho={};ho[Oe]=ho[$e]=ho[et]=ho[Ze]=ho[Ne]=ho[Qe]=ho[Xe]=ho[rt]=ho[ht]=!0,ho[Q]=ho[q]=ho[Fe]=ho[G]=ho[Ie]=ho[V]=ho[te]=ho[ee]=ho[se]=ho[pe]=ho[ne]=ho[le]=ho[de]=ho[ve]=ho[ge]=!1;var lo={};lo[Q]=lo[q]=lo[Fe]=lo[Ie]=lo[G]=lo[V]=lo[Oe]=lo[$e]=lo[et]=lo[Ze]=lo[Ne]=lo[se]=lo[pe]=lo[ne]=lo[le]=lo[de]=lo[ve]=lo[we]=lo[Qe]=lo[Xe]=lo[rt]=lo[ht]=!0,lo[te]=lo[ee]=lo[ge]=!1;var Re={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",Ĳ:"IJ",ĳ:"ij",Œ:"Oe",œ:"oe",ŉ:"'n",ſ:"s"},dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},kt={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},vr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wi=parseFloat,ma=parseInt,ns=typeof Er=="object"&&Er&&Er.Object===Object&&Er,Ma=typeof self=="object"&&self&&self.Object===Object&&self,xi=ns||Ma||Function("return this")(),hu=t&&!t.nodeType&&t,pu=hu&&!0&&e&&!e.nodeType&&e,py=pu&&pu.exports===hu,D0=py&&ns.process,Ra=function(){try{var ot=pu&&pu.require&&pu.require("util").types;return ot||D0&&D0.binding&&D0.binding("util")}catch{}}(),gp=Ra&&Ra.isArrayBuffer,R9=Ra&&Ra.isDate,O9=Ra&&Ra.isMap,D9=Ra&&Ra.isRegExp,F9=Ra&&Ra.isSet,N9=Ra&&Ra.isTypedArray;function Zs(ot,Ct,gt){switch(gt.length){case 0:return ot.call(Ct);case 1:return ot.call(Ct,gt[0]);case 2:return ot.call(Ct,gt[0],gt[1]);case 3:return ot.call(Ct,gt[0],gt[1],gt[2])}return ot.apply(Ct,gt)}function Ose(ot,Ct,gt,pr){for(var Kr=-1,zn=ot==null?0:ot.length;++Kr<zn;){var Ni=ot[Kr];Ct(pr,Ni,gt(Ni),ot)}return pr}function Ml(ot,Ct){for(var gt=-1,pr=ot==null?0:ot.length;++gt<pr&&Ct(ot[gt],gt,ot)!==!1;);return ot}function Dse(ot,Ct){for(var gt=ot==null?0:ot.length;gt--&&Ct(ot[gt],gt,ot)!==!1;);return ot}function L9(ot,Ct){for(var gt=-1,pr=ot==null?0:ot.length;++gt<pr;)if(!Ct(ot[gt],gt,ot))return!1;return!0}function Rf(ot,Ct){for(var gt=-1,pr=ot==null?0:ot.length,Kr=0,zn=[];++gt<pr;){var Ni=ot[gt];Ct(Ni,gt,ot)&&(zn[Kr++]=Ni)}return zn}function TC(ot,Ct){var gt=ot==null?0:ot.length;return!!gt&&F0(ot,Ct,0)>-1}function j4(ot,Ct,gt){for(var pr=-1,Kr=ot==null?0:ot.length;++pr<Kr;)if(gt(Ct,ot[pr]))return!0;return!1}function Mo(ot,Ct){for(var gt=-1,pr=ot==null?0:ot.length,Kr=Array(pr);++gt<pr;)Kr[gt]=Ct(ot[gt],gt,ot);return Kr}function Of(ot,Ct){for(var gt=-1,pr=Ct.length,Kr=ot.length;++gt<pr;)ot[Kr+gt]=Ct[gt];return ot}function V4(ot,Ct,gt,pr){var Kr=-1,zn=ot==null?0:ot.length;for(pr&&zn&&(gt=ot[++Kr]);++Kr<zn;)gt=Ct(gt,ot[Kr],Kr,ot);return gt}function Fse(ot,Ct,gt,pr){var Kr=ot==null?0:ot.length;for(pr&&Kr&&(gt=ot[--Kr]);Kr--;)gt=Ct(gt,ot[Kr],Kr,ot);return gt}function W4(ot,Ct){for(var gt=-1,pr=ot==null?0:ot.length;++gt<pr;)if(Ct(ot[gt],gt,ot))return!0;return!1}var Nse=G4("length");function Lse(ot){return ot.split("")}function $se(ot){return ot.match(be)||[]}function $9(ot,Ct,gt){var pr;return gt(ot,function(Kr,zn,Ni){if(Ct(Kr,zn,Ni))return pr=zn,!1}),pr}function IC(ot,Ct,gt,pr){for(var Kr=ot.length,zn=gt+(pr?1:-1);pr?zn--:++zn<Kr;)if(Ct(ot[zn],zn,ot))return zn;return-1}function F0(ot,Ct,gt){return Ct===Ct?Xse(ot,Ct,gt):IC(ot,B9,gt)}function Bse(ot,Ct,gt,pr){for(var Kr=gt-1,zn=ot.length;++Kr<zn;)if(pr(ot[Kr],Ct))return Kr;return-1}function B9(ot){return ot!==ot}function U9(ot,Ct){var gt=ot==null?0:ot.length;return gt?K4(ot,Ct)/gt:L}function G4(ot){return function(Ct){return Ct==null?r:Ct[ot]}}function q4(ot){return function(Ct){return ot==null?r:ot[Ct]}}function H9(ot,Ct,gt,pr,Kr){return Kr(ot,function(zn,Ni,po){gt=pr?(pr=!1,zn):Ct(gt,zn,Ni,po)}),gt}function Use(ot,Ct){var gt=ot.length;for(ot.sort(Ct);gt--;)ot[gt]=ot[gt].value;return ot}function K4(ot,Ct){for(var gt,pr=-1,Kr=ot.length;++pr<Kr;){var zn=Ct(ot[pr]);zn!==r&&(gt=gt===r?zn:gt+zn)}return gt}function Y4(ot,Ct){for(var gt=-1,pr=Array(ot);++gt<ot;)pr[gt]=Ct(gt);return pr}function Hse(ot,Ct){return Mo(Ct,function(gt){return[gt,ot[gt]]})}function z9(ot){return ot&&ot.slice(0,G9(ot)+1).replace(Me,"")}function Js(ot){return function(Ct){return ot(Ct)}}function X4(ot,Ct){return Mo(Ct,function(gt){return ot[gt]})}function my(ot,Ct){return ot.has(Ct)}function j9(ot,Ct){for(var gt=-1,pr=ot.length;++gt<pr&&F0(Ct,ot[gt],0)>-1;);return gt}function V9(ot,Ct){for(var gt=ot.length;gt--&&F0(Ct,ot[gt],0)>-1;);return gt}function zse(ot,Ct){for(var gt=ot.length,pr=0;gt--;)ot[gt]===Ct&&++pr;return pr}var jse=q4(Re),Vse=q4(dt);function Wse(ot){return"\\"+vr[ot]}function Gse(ot,Ct){return ot==null?r:ot[Ct]}function N0(ot){return H4.test(ot)}function qse(ot){return O0.test(ot)}function Kse(ot){for(var Ct,gt=[];!(Ct=ot.next()).done;)gt.push(Ct.value);return gt}function Q4(ot){var Ct=-1,gt=Array(ot.size);return ot.forEach(function(pr,Kr){gt[++Ct]=[Kr,pr]}),gt}function W9(ot,Ct){return function(gt){return ot(Ct(gt))}}function Df(ot,Ct){for(var gt=-1,pr=ot.length,Kr=0,zn=[];++gt<pr;){var Ni=ot[gt];(Ni===Ct||Ni===u)&&(ot[gt]=u,zn[Kr++]=gt)}return zn}function AC(ot){var Ct=-1,gt=Array(ot.size);return ot.forEach(function(pr){gt[++Ct]=pr}),gt}function Yse(ot){var Ct=-1,gt=Array(ot.size);return ot.forEach(function(pr){gt[++Ct]=[pr,pr]}),gt}function Xse(ot,Ct,gt){for(var pr=gt-1,Kr=ot.length;++pr<Kr;)if(ot[pr]===Ct)return pr;return-1}function Qse(ot,Ct,gt){for(var pr=gt+1;pr--;)if(ot[pr]===Ct)return pr;return pr}function L0(ot){return N0(ot)?Jse(ot):Nse(ot)}function kc(ot){return N0(ot)?ele(ot):Lse(ot)}function G9(ot){for(var Ct=ot.length;Ct--&&Ge.test(ot.charAt(Ct)););return Ct}var Zse=q4(kt);function Jse(ot){for(var Ct=fy.lastIndex=0;fy.test(ot);)++Ct;return Ct}function ele(ot){return ot.match(fy)||[]}function tle(ot){return ot.match(EC)||[]}var rle=function ot(Ct){Ct=Ct==null?xi:$0.defaults(xi.Object(),Ct,$0.pick(xi,z4));var gt=Ct.Array,pr=Ct.Date,Kr=Ct.Error,zn=Ct.Function,Ni=Ct.Math,po=Ct.Object,Z4=Ct.RegExp,nle=Ct.String,Rl=Ct.TypeError,PC=gt.prototype,ole=zn.prototype,B0=po.prototype,MC=Ct["__core-js_shared__"],RC=ole.toString,Jn=B0.hasOwnProperty,ile=0,q9=function(){var M=/[^.]+$/.exec(MC&&MC.keys&&MC.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""}(),OC=B0.toString,ale=RC.call(po),sle=xi._,lle=Z4("^"+RC.call(Jn).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),DC=py?Ct.Buffer:r,Ff=Ct.Symbol,FC=Ct.Uint8Array,K9=DC?DC.allocUnsafe:r,NC=W9(po.getPrototypeOf,po),Y9=po.create,X9=B0.propertyIsEnumerable,LC=PC.splice,Q9=Ff?Ff.isConcatSpreadable:r,gy=Ff?Ff.iterator:r,vp=Ff?Ff.toStringTag:r,$C=function(){try{var M=Cp(po,"defineProperty");return M({},"",{}),M}catch{}}(),cle=Ct.clearTimeout!==xi.clearTimeout&&Ct.clearTimeout,ule=pr&&pr.now!==xi.Date.now&&pr.now,dle=Ct.setTimeout!==xi.setTimeout&&Ct.setTimeout,BC=Ni.ceil,UC=Ni.floor,J4=po.getOwnPropertySymbols,fle=DC?DC.isBuffer:r,Z9=Ct.isFinite,hle=PC.join,ple=W9(po.keys,po),Li=Ni.max,Oa=Ni.min,mle=pr.now,gle=Ct.parseInt,J9=Ni.random,vle=PC.reverse,e3=Cp(Ct,"DataView"),vy=Cp(Ct,"Map"),t3=Cp(Ct,"Promise"),U0=Cp(Ct,"Set"),yy=Cp(Ct,"WeakMap"),by=Cp(po,"create"),HC=yy&&new yy,H0={},yle=Sp(e3),ble=Sp(vy),wle=Sp(t3),xle=Sp(U0),Cle=Sp(yy),zC=Ff?Ff.prototype:r,wy=zC?zC.valueOf:r,e7=zC?zC.toString:r;function Te(M){if(Ko(M)&&!Zr(M)&&!(M instanceof bn)){if(M instanceof Ol)return M;if(Jn.call(M,"__wrapped__"))return tL(M)}return new Ol(M)}var z0=function(){function M(){}return function(H){if(!Lo(H))return{};if(Y9)return Y9(H);M.prototype=H;var Z=new M;return M.prototype=r,Z}}();function jC(){}function Ol(M,H){this.__wrapped__=M,this.__actions__=[],this.__chain__=!!H,this.__index__=0,this.__values__=r}Te.templateSettings={escape:mt,evaluate:_t,interpolate:Pt,variable:"",imports:{_:Te}},Te.prototype=jC.prototype,Te.prototype.constructor=Te,Ol.prototype=z0(jC.prototype),Ol.prototype.constructor=Ol;function bn(M){this.__wrapped__=M,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=j,this.__views__=[]}function Sle(){var M=new bn(this.__wrapped__);return M.__actions__=Is(this.__actions__),M.__dir__=this.__dir__,M.__filtered__=this.__filtered__,M.__iteratees__=Is(this.__iteratees__),M.__takeCount__=this.__takeCount__,M.__views__=Is(this.__views__),M}function _le(){if(this.__filtered__){var M=new bn(this);M.__dir__=-1,M.__filtered__=!0}else M=this.clone(),M.__dir__*=-1;return M}function kle(){var M=this.__wrapped__.value(),H=this.__dir__,Z=Zr(M),ae=H<0,ye=Z?M.length:0,Ae=Lce(0,ye,this.__views__),Ve=Ae.start,Je=Ae.end,at=Je-Ve,Et=ae?Je:Ve-1,It=this.__iteratees__,Lt=It.length,ir=0,xr=Oa(at,this.__takeCount__);if(!Z||!ae&&ye==at&&xr==at)return _7(M,this.__actions__);var Or=[];e:for(;at--&&ir<xr;){Et+=H;for(var un=-1,Dr=M[Et];++un<Lt;){var vn=It[un],Cn=vn.iteratee,rl=vn.type,as=Cn(Dr);if(rl==_)Dr=as;else if(!as){if(rl==P)continue e;break e}}Or[ir++]=Dr}return Or}bn.prototype=z0(jC.prototype),bn.prototype.constructor=bn;function yp(M){var H=-1,Z=M==null?0:M.length;for(this.clear();++H<Z;){var ae=M[H];this.set(ae[0],ae[1])}}function Ele(){this.__data__=by?by(null):{},this.size=0}function Tle(M){var H=this.has(M)&&delete this.__data__[M];return this.size-=H?1:0,H}function Ile(M){var H=this.__data__;if(by){var Z=H[M];return Z===c?r:Z}return Jn.call(H,M)?H[M]:r}function Ale(M){var H=this.__data__;return by?H[M]!==r:Jn.call(H,M)}function Ple(M,H){var Z=this.__data__;return this.size+=this.has(M)?0:1,Z[M]=by&&H===r?c:H,this}yp.prototype.clear=Ele,yp.prototype.delete=Tle,yp.prototype.get=Ile,yp.prototype.has=Ale,yp.prototype.set=Ple;function md(M){var H=-1,Z=M==null?0:M.length;for(this.clear();++H<Z;){var ae=M[H];this.set(ae[0],ae[1])}}function Mle(){this.__data__=[],this.size=0}function Rle(M){var H=this.__data__,Z=VC(H,M);if(Z<0)return!1;var ae=H.length-1;return Z==ae?H.pop():LC.call(H,Z,1),--this.size,!0}function Ole(M){var H=this.__data__,Z=VC(H,M);return Z<0?r:H[Z][1]}function Dle(M){return VC(this.__data__,M)>-1}function Fle(M,H){var Z=this.__data__,ae=VC(Z,M);return ae<0?(++this.size,Z.push([M,H])):Z[ae][1]=H,this}md.prototype.clear=Mle,md.prototype.delete=Rle,md.prototype.get=Ole,md.prototype.has=Dle,md.prototype.set=Fle;function gd(M){var H=-1,Z=M==null?0:M.length;for(this.clear();++H<Z;){var ae=M[H];this.set(ae[0],ae[1])}}function Nle(){this.size=0,this.__data__={hash:new yp,map:new(vy||md),string:new yp}}function Lle(M){var H=rS(this,M).delete(M);return this.size-=H?1:0,H}function $le(M){return rS(this,M).get(M)}function Ble(M){return rS(this,M).has(M)}function Ule(M,H){var Z=rS(this,M),ae=Z.size;return Z.set(M,H),this.size+=Z.size==ae?0:1,this}gd.prototype.clear=Nle,gd.prototype.delete=Lle,gd.prototype.get=$le,gd.prototype.has=Ble,gd.prototype.set=Ule;function bp(M){var H=-1,Z=M==null?0:M.length;for(this.__data__=new gd;++H<Z;)this.add(M[H])}function Hle(M){return this.__data__.set(M,c),this}function zle(M){return this.__data__.has(M)}bp.prototype.add=bp.prototype.push=Hle,bp.prototype.has=zle;function Ec(M){var H=this.__data__=new md(M);this.size=H.size}function jle(){this.__data__=new md,this.size=0}function Vle(M){var H=this.__data__,Z=H.delete(M);return this.size=H.size,Z}function Wle(M){return this.__data__.get(M)}function Gle(M){return this.__data__.has(M)}function qle(M,H){var Z=this.__data__;if(Z instanceof md){var ae=Z.__data__;if(!vy||ae.length<o-1)return ae.push([M,H]),this.size=++Z.size,this;Z=this.__data__=new gd(ae)}return Z.set(M,H),this.size=Z.size,this}Ec.prototype.clear=jle,Ec.prototype.delete=Vle,Ec.prototype.get=Wle,Ec.prototype.has=Gle,Ec.prototype.set=qle;function t7(M,H){var Z=Zr(M),ae=!Z&&_p(M),ye=!Z&&!ae&&Uf(M),Ae=!Z&&!ae&&!ye&&G0(M),Ve=Z||ae||ye||Ae,Je=Ve?Y4(M.length,nle):[],at=Je.length;for(var Et in M)(H||Jn.call(M,Et))&&!(Ve&&(Et=="length"||ye&&(Et=="offset"||Et=="parent")||Ae&&(Et=="buffer"||Et=="byteLength"||Et=="byteOffset")||wd(Et,at)))&&Je.push(Et);return Je}function r7(M){var H=M.length;return H?M[f3(0,H-1)]:r}function Kle(M,H){return nS(Is(M),wp(H,0,M.length))}function Yle(M){return nS(Is(M))}function r3(M,H,Z){(Z!==r&&!Tc(M[H],Z)||Z===r&&!(H in M))&&vd(M,H,Z)}function xy(M,H,Z){var ae=M[H];(!(Jn.call(M,H)&&Tc(ae,Z))||Z===r&&!(H in M))&&vd(M,H,Z)}function VC(M,H){for(var Z=M.length;Z--;)if(Tc(M[Z][0],H))return Z;return-1}function Xle(M,H,Z,ae){return Nf(M,function(ye,Ae,Ve){H(ae,ye,Z(ye),Ve)}),ae}function n7(M,H){return M&&gu(H,Yi(H),M)}function Qle(M,H){return M&&gu(H,Ps(H),M)}function vd(M,H,Z){H=="__proto__"&&$C?$C(M,H,{configurable:!0,enumerable:!0,value:Z,writable:!0}):M[H]=Z}function n3(M,H){for(var Z=-1,ae=H.length,ye=gt(ae),Ae=M==null;++Z<ae;)ye[Z]=Ae?r:L3(M,H[Z]);return ye}function wp(M,H,Z){return M===M&&(Z!==r&&(M=M<=Z?M:Z),H!==r&&(M=M>=H?M:H)),M}function Dl(M,H,Z,ae,ye,Ae){var Ve,Je=H&f,at=H&d,Et=H&h;if(Z&&(Ve=ye?Z(M,ae,ye,Ae):Z(M)),Ve!==r)return Ve;if(!Lo(M))return M;var It=Zr(M);if(It){if(Ve=Bce(M),!Je)return Is(M,Ve)}else{var Lt=Da(M),ir=Lt==ee||Lt==re;if(Uf(M))return T7(M,Je);if(Lt==ne||Lt==Q||ir&&!ye){if(Ve=at||ir?{}:G7(M),!Je)return at?Ice(M,Qle(Ve,M)):Tce(M,n7(Ve,M))}else{if(!lo[Lt])return ye?M:{};Ve=Uce(M,Lt,Je)}}Ae||(Ae=new Ec);var xr=Ae.get(M);if(xr)return xr;Ae.set(M,Ve),xL(M)?M.forEach(function(Dr){Ve.add(Dl(Dr,H,Z,Dr,M,Ae))}):bL(M)&&M.forEach(function(Dr,vn){Ve.set(vn,Dl(Dr,H,Z,vn,M,Ae))});var Or=Et?at?S3:C3:at?Ps:Yi,un=It?r:Or(M);return Ml(un||M,function(Dr,vn){un&&(vn=Dr,Dr=M[vn]),xy(Ve,vn,Dl(Dr,H,Z,vn,M,Ae))}),Ve}function Zle(M){var H=Yi(M);return function(Z){return o7(Z,M,H)}}function o7(M,H,Z){var ae=Z.length;if(M==null)return!ae;for(M=po(M);ae--;){var ye=Z[ae],Ae=H[ye],Ve=M[ye];if(Ve===r&&!(ye in M)||!Ae(Ve))return!1}return!0}function i7(M,H,Z){if(typeof M!="function")throw new Rl(a);return Iy(function(){M.apply(r,Z)},H)}function Cy(M,H,Z,ae){var ye=-1,Ae=TC,Ve=!0,Je=M.length,at=[],Et=H.length;if(!Je)return at;Z&&(H=Mo(H,Js(Z))),ae?(Ae=j4,Ve=!1):H.length>=o&&(Ae=my,Ve=!1,H=new bp(H));e:for(;++ye<Je;){var It=M[ye],Lt=Z==null?It:Z(It);if(It=ae||It!==0?It:0,Ve&&Lt===Lt){for(var ir=Et;ir--;)if(H[ir]===Lt)continue e;at.push(It)}else Ae(H,Lt,ae)||at.push(It)}return at}var Nf=R7(mu),a7=R7(i3,!0);function Jle(M,H){var Z=!0;return Nf(M,function(ae,ye,Ae){return Z=!!H(ae,ye,Ae),Z}),Z}function WC(M,H,Z){for(var ae=-1,ye=M.length;++ae<ye;){var Ae=M[ae],Ve=H(Ae);if(Ve!=null&&(Je===r?Ve===Ve&&!tl(Ve):Z(Ve,Je)))var Je=Ve,at=Ae}return at}function ece(M,H,Z,ae){var ye=M.length;for(Z=sn(Z),Z<0&&(Z=-Z>ye?0:ye+Z),ae=ae===r||ae>ye?ye:sn(ae),ae<0&&(ae+=ye),ae=Z>ae?0:SL(ae);Z<ae;)M[Z++]=H;return M}function s7(M,H){var Z=[];return Nf(M,function(ae,ye,Ae){H(ae,ye,Ae)&&Z.push(ae)}),Z}function ga(M,H,Z,ae,ye){var Ae=-1,Ve=M.length;for(Z||(Z=zce),ye||(ye=[]);++Ae<Ve;){var Je=M[Ae];H>0&&Z(Je)?H>1?ga(Je,H-1,Z,ae,ye):Of(ye,Je):ae||(ye[ye.length]=Je)}return ye}var o3=O7(),l7=O7(!0);function mu(M,H){return M&&o3(M,H,Yi)}function i3(M,H){return M&&l7(M,H,Yi)}function GC(M,H){return Rf(H,function(Z){return xd(M[Z])})}function xp(M,H){H=$f(H,M);for(var Z=0,ae=H.length;M!=null&&Z<ae;)M=M[vu(H[Z++])];return Z&&Z==ae?M:r}function c7(M,H,Z){var ae=H(M);return Zr(M)?ae:Of(ae,Z(M))}function os(M){return M==null?M===r?ie:ce:vp&&vp in po(M)?Nce(M):Yce(M)}function a3(M,H){return M>H}function tce(M,H){return M!=null&&Jn.call(M,H)}function rce(M,H){return M!=null&&H in po(M)}function nce(M,H,Z){return M>=Oa(H,Z)&&M<Li(H,Z)}function s3(M,H,Z){for(var ae=Z?j4:TC,ye=M[0].length,Ae=M.length,Ve=Ae,Je=gt(Ae),at=1/0,Et=[];Ve--;){var It=M[Ve];Ve&&H&&(It=Mo(It,Js(H))),at=Oa(It.length,at),Je[Ve]=!Z&&(H||ye>=120&&It.length>=120)?new bp(Ve&&It):r}It=M[0];var Lt=-1,ir=Je[0];e:for(;++Lt<ye&&Et.length<at;){var xr=It[Lt],Or=H?H(xr):xr;if(xr=Z||xr!==0?xr:0,!(ir?my(ir,Or):ae(Et,Or,Z))){for(Ve=Ae;--Ve;){var un=Je[Ve];if(!(un?my(un,Or):ae(M[Ve],Or,Z)))continue e}ir&&ir.push(Or),Et.push(xr)}}return Et}function oce(M,H,Z,ae){return mu(M,function(ye,Ae,Ve){H(ae,Z(ye),Ae,Ve)}),ae}function Sy(M,H,Z){H=$f(H,M),M=X7(M,H);var ae=M==null?M:M[vu(Nl(H))];return ae==null?r:Zs(ae,M,Z)}function u7(M){return Ko(M)&&os(M)==Q}function ice(M){return Ko(M)&&os(M)==Fe}function ace(M){return Ko(M)&&os(M)==V}function _y(M,H,Z,ae,ye){return M===H?!0:M==null||H==null||!Ko(M)&&!Ko(H)?M!==M&&H!==H:sce(M,H,Z,ae,_y,ye)}function sce(M,H,Z,ae,ye,Ae){var Ve=Zr(M),Je=Zr(H),at=Ve?q:Da(M),Et=Je?q:Da(H);at=at==Q?ne:at,Et=Et==Q?ne:Et;var It=at==ne,Lt=Et==ne,ir=at==Et;if(ir&&Uf(M)){if(!Uf(H))return!1;Ve=!0,It=!1}if(ir&&!It)return Ae||(Ae=new Ec),Ve||G0(M)?j7(M,H,Z,ae,ye,Ae):Dce(M,H,at,Z,ae,ye,Ae);if(!(Z&p)){var xr=It&&Jn.call(M,"__wrapped__"),Or=Lt&&Jn.call(H,"__wrapped__");if(xr||Or){var un=xr?M.value():M,Dr=Or?H.value():H;return Ae||(Ae=new Ec),ye(un,Dr,Z,ae,Ae)}}return ir?(Ae||(Ae=new Ec),Fce(M,H,Z,ae,ye,Ae)):!1}function lce(M){return Ko(M)&&Da(M)==se}function l3(M,H,Z,ae){var ye=Z.length,Ae=ye,Ve=!ae;if(M==null)return!Ae;for(M=po(M);ye--;){var Je=Z[ye];if(Ve&&Je[2]?Je[1]!==M[Je[0]]:!(Je[0]in M))return!1}for(;++ye<Ae;){Je=Z[ye];var at=Je[0],Et=M[at],It=Je[1];if(Ve&&Je[2]){if(Et===r&&!(at in M))return!1}else{var Lt=new Ec;if(ae)var ir=ae(Et,It,at,M,H,Lt);if(!(ir===r?_y(It,Et,p|g,ae,Lt):ir))return!1}}return!0}function d7(M){if(!Lo(M)||Vce(M))return!1;var H=xd(M)?lle:je;return H.test(Sp(M))}function cce(M){return Ko(M)&&os(M)==le}function uce(M){return Ko(M)&&Da(M)==de}function dce(M){return Ko(M)&&cS(M.length)&&!!ho[os(M)]}function f7(M){return typeof M=="function"?M:M==null?Ms:typeof M=="object"?Zr(M)?m7(M[0],M[1]):p7(M):DL(M)}function c3(M){if(!Ty(M))return ple(M);var H=[];for(var Z in po(M))Jn.call(M,Z)&&Z!="constructor"&&H.push(Z);return H}function fce(M){if(!Lo(M))return Kce(M);var H=Ty(M),Z=[];for(var ae in M)ae=="constructor"&&(H||!Jn.call(M,ae))||Z.push(ae);return Z}function u3(M,H){return M<H}function h7(M,H){var Z=-1,ae=As(M)?gt(M.length):[];return Nf(M,function(ye,Ae,Ve){ae[++Z]=H(ye,Ae,Ve)}),ae}function p7(M){var H=k3(M);return H.length==1&&H[0][2]?K7(H[0][0],H[0][1]):function(Z){return Z===M||l3(Z,M,H)}}function m7(M,H){return T3(M)&&q7(H)?K7(vu(M),H):function(Z){var ae=L3(Z,M);return ae===r&&ae===H?$3(Z,M):_y(H,ae,p|g)}}function qC(M,H,Z,ae,ye){M!==H&&o3(H,function(Ae,Ve){if(ye||(ye=new Ec),Lo(Ae))hce(M,H,Ve,Z,qC,ae,ye);else{var Je=ae?ae(A3(M,Ve),Ae,Ve+"",M,H,ye):r;Je===r&&(Je=Ae),r3(M,Ve,Je)}},Ps)}function hce(M,H,Z,ae,ye,Ae,Ve){var Je=A3(M,Z),at=A3(H,Z),Et=Ve.get(at);if(Et){r3(M,Z,Et);return}var It=Ae?Ae(Je,at,Z+"",M,H,Ve):r,Lt=It===r;if(Lt){var ir=Zr(at),xr=!ir&&Uf(at),Or=!ir&&!xr&&G0(at);It=at,ir||xr||Or?Zr(Je)?It=Je:ai(Je)?It=Is(Je):xr?(Lt=!1,It=T7(at,!0)):Or?(Lt=!1,It=I7(at,!0)):It=[]:Ay(at)||_p(at)?(It=Je,_p(Je)?It=_L(Je):(!Lo(Je)||xd(Je))&&(It=G7(at))):Lt=!1}Lt&&(Ve.set(at,It),ye(It,at,ae,Ae,Ve),Ve.delete(at)),r3(M,Z,It)}function g7(M,H){var Z=M.length;if(Z)return H+=H<0?Z:0,wd(H,Z)?M[H]:r}function v7(M,H,Z){H.length?H=Mo(H,function(Ae){return Zr(Ae)?function(Ve){return xp(Ve,Ae.length===1?Ae[0]:Ae)}:Ae}):H=[Ms];var ae=-1;H=Mo(H,Js(Ar()));var ye=h7(M,function(Ae,Ve,Je){var at=Mo(H,function(Et){return Et(Ae)});return{criteria:at,index:++ae,value:Ae}});return Use(ye,function(Ae,Ve){return Ece(Ae,Ve,Z)})}function pce(M,H){return y7(M,H,function(Z,ae){return $3(M,ae)})}function y7(M,H,Z){for(var ae=-1,ye=H.length,Ae={};++ae<ye;){var Ve=H[ae],Je=xp(M,Ve);Z(Je,Ve)&&ky(Ae,$f(Ve,M),Je)}return Ae}function mce(M){return function(H){return xp(H,M)}}function d3(M,H,Z,ae){var ye=ae?Bse:F0,Ae=-1,Ve=H.length,Je=M;for(M===H&&(H=Is(H)),Z&&(Je=Mo(M,Js(Z)));++Ae<Ve;)for(var at=0,Et=H[Ae],It=Z?Z(Et):Et;(at=ye(Je,It,at,ae))>-1;)Je!==M&&LC.call(Je,at,1),LC.call(M,at,1);return M}function b7(M,H){for(var Z=M?H.length:0,ae=Z-1;Z--;){var ye=H[Z];if(Z==ae||ye!==Ae){var Ae=ye;wd(ye)?LC.call(M,ye,1):m3(M,ye)}}return M}function f3(M,H){return M+UC(J9()*(H-M+1))}function gce(M,H,Z,ae){for(var ye=-1,Ae=Li(BC((H-M)/(Z||1)),0),Ve=gt(Ae);Ae--;)Ve[ae?Ae:++ye]=M,M+=Z;return Ve}function h3(M,H){var Z="";if(!M||H<1||H>x)return Z;do H%2&&(Z+=M),H=UC(H/2),H&&(M+=M);while(H);return Z}function hn(M,H){return P3(Y7(M,H,Ms),M+"")}function vce(M){return r7(q0(M))}function yce(M,H){var Z=q0(M);return nS(Z,wp(H,0,Z.length))}function ky(M,H,Z,ae){if(!Lo(M))return M;H=$f(H,M);for(var ye=-1,Ae=H.length,Ve=Ae-1,Je=M;Je!=null&&++ye<Ae;){var at=vu(H[ye]),Et=Z;if(at==="__proto__"||at==="constructor"||at==="prototype")return M;if(ye!=Ve){var It=Je[at];Et=ae?ae(It,at,Je):r,Et===r&&(Et=Lo(It)?It:wd(H[ye+1])?[]:{})}xy(Je,at,Et),Je=Je[at]}return M}var w7=HC?function(M,H){return HC.set(M,H),M}:Ms,bce=$C?function(M,H){return $C(M,"toString",{configurable:!0,enumerable:!1,value:U3(H),writable:!0})}:Ms;function wce(M){return nS(q0(M))}function Fl(M,H,Z){var ae=-1,ye=M.length;H<0&&(H=-H>ye?0:ye+H),Z=Z>ye?ye:Z,Z<0&&(Z+=ye),ye=H>Z?0:Z-H>>>0,H>>>=0;for(var Ae=gt(ye);++ae<ye;)Ae[ae]=M[ae+H];return Ae}function xce(M,H){var Z;return Nf(M,function(ae,ye,Ae){return Z=H(ae,ye,Ae),!Z}),!!Z}function KC(M,H,Z){var ae=0,ye=M==null?ae:M.length;if(typeof H=="number"&&H===H&&ye<=Y){for(;ae<ye;){var Ae=ae+ye>>>1,Ve=M[Ae];Ve!==null&&!tl(Ve)&&(Z?Ve<=H:Ve<H)?ae=Ae+1:ye=Ae}return ye}return p3(M,H,Ms,Z)}function p3(M,H,Z,ae){var ye=0,Ae=M==null?0:M.length;if(Ae===0)return 0;H=Z(H);for(var Ve=H!==H,Je=H===null,at=tl(H),Et=H===r;ye<Ae;){var It=UC((ye+Ae)/2),Lt=Z(M[It]),ir=Lt!==r,xr=Lt===null,Or=Lt===Lt,un=tl(Lt);if(Ve)var Dr=ae||Or;else Et?Dr=Or&&(ae||ir):Je?Dr=Or&&ir&&(ae||!xr):at?Dr=Or&&ir&&!xr&&(ae||!un):xr||un?Dr=!1:Dr=ae?Lt<=H:Lt<H;Dr?ye=It+1:Ae=It}return Oa(Ae,z)}function x7(M,H){for(var Z=-1,ae=M.length,ye=0,Ae=[];++Z<ae;){var Ve=M[Z],Je=H?H(Ve):Ve;if(!Z||!Tc(Je,at)){var at=Je;Ae[ye++]=Ve===0?0:Ve}}return Ae}function C7(M){return typeof M=="number"?M:tl(M)?L:+M}function el(M){if(typeof M=="string")return M;if(Zr(M))return Mo(M,el)+"";if(tl(M))return e7?e7.call(M):"";var H=M+"";return H=="0"&&1/M==-S?"-0":H}function Lf(M,H,Z){var ae=-1,ye=TC,Ae=M.length,Ve=!0,Je=[],at=Je;if(Z)Ve=!1,ye=j4;else if(Ae>=o){var Et=H?null:Rce(M);if(Et)return AC(Et);Ve=!1,ye=my,at=new bp}else at=H?[]:Je;e:for(;++ae<Ae;){var It=M[ae],Lt=H?H(It):It;if(It=Z||It!==0?It:0,Ve&&Lt===Lt){for(var ir=at.length;ir--;)if(at[ir]===Lt)continue e;H&&at.push(Lt),Je.push(It)}else ye(at,Lt,Z)||(at!==Je&&at.push(Lt),Je.push(It))}return Je}function m3(M,H){return H=$f(H,M),M=X7(M,H),M==null||delete M[vu(Nl(H))]}function S7(M,H,Z,ae){return ky(M,H,Z(xp(M,H)),ae)}function YC(M,H,Z,ae){for(var ye=M.length,Ae=ae?ye:-1;(ae?Ae--:++Ae<ye)&&H(M[Ae],Ae,M););return Z?Fl(M,ae?0:Ae,ae?Ae+1:ye):Fl(M,ae?Ae+1:0,ae?ye:Ae)}function _7(M,H){var Z=M;return Z instanceof bn&&(Z=Z.value()),V4(H,function(ae,ye){return ye.func.apply(ye.thisArg,Of([ae],ye.args))},Z)}function g3(M,H,Z){var ae=M.length;if(ae<2)return ae?Lf(M[0]):[];for(var ye=-1,Ae=gt(ae);++ye<ae;)for(var Ve=M[ye],Je=-1;++Je<ae;)Je!=ye&&(Ae[ye]=Cy(Ae[ye]||Ve,M[Je],H,Z));return Lf(ga(Ae,1),H,Z)}function k7(M,H,Z){for(var ae=-1,ye=M.length,Ae=H.length,Ve={};++ae<ye;){var Je=ae<Ae?H[ae]:r;Z(Ve,M[ae],Je)}return Ve}function v3(M){return ai(M)?M:[]}function y3(M){return typeof M=="function"?M:Ms}function $f(M,H){return Zr(M)?M:T3(M,H)?[M]:eL(Qn(M))}var Cce=hn;function Bf(M,H,Z){var ae=M.length;return Z=Z===r?ae:Z,!H&&Z>=ae?M:Fl(M,H,Z)}var E7=cle||function(M){return xi.clearTimeout(M)};function T7(M,H){if(H)return M.slice();var Z=M.length,ae=K9?K9(Z):new M.constructor(Z);return M.copy(ae),ae}function b3(M){var H=new M.constructor(M.byteLength);return new FC(H).set(new FC(M)),H}function Sce(M,H){var Z=H?b3(M.buffer):M.buffer;return new M.constructor(Z,M.byteOffset,M.byteLength)}function _ce(M){var H=new M.constructor(M.source,_e.exec(M));return H.lastIndex=M.lastIndex,H}function kce(M){return wy?po(wy.call(M)):{}}function I7(M,H){var Z=H?b3(M.buffer):M.buffer;return new M.constructor(Z,M.byteOffset,M.length)}function A7(M,H){if(M!==H){var Z=M!==r,ae=M===null,ye=M===M,Ae=tl(M),Ve=H!==r,Je=H===null,at=H===H,Et=tl(H);if(!Je&&!Et&&!Ae&&M>H||Ae&&Ve&&at&&!Je&&!Et||ae&&Ve&&at||!Z&&at||!ye)return 1;if(!ae&&!Ae&&!Et&&M<H||Et&&Z&&ye&&!ae&&!Ae||Je&&Z&&ye||!Ve&&ye||!at)return-1}return 0}function Ece(M,H,Z){for(var ae=-1,ye=M.criteria,Ae=H.criteria,Ve=ye.length,Je=Z.length;++ae<Ve;){var at=A7(ye[ae],Ae[ae]);if(at){if(ae>=Je)return at;var Et=Z[ae];return at*(Et=="desc"?-1:1)}}return M.index-H.index}function P7(M,H,Z,ae){for(var ye=-1,Ae=M.length,Ve=Z.length,Je=-1,at=H.length,Et=Li(Ae-Ve,0),It=gt(at+Et),Lt=!ae;++Je<at;)It[Je]=H[Je];for(;++ye<Ve;)(Lt||ye<Ae)&&(It[Z[ye]]=M[ye]);for(;Et--;)It[Je++]=M[ye++];return It}function M7(M,H,Z,ae){for(var ye=-1,Ae=M.length,Ve=-1,Je=Z.length,at=-1,Et=H.length,It=Li(Ae-Je,0),Lt=gt(It+Et),ir=!ae;++ye<It;)Lt[ye]=M[ye];for(var xr=ye;++at<Et;)Lt[xr+at]=H[at];for(;++Ve<Je;)(ir||ye<Ae)&&(Lt[xr+Z[Ve]]=M[ye++]);return Lt}function Is(M,H){var Z=-1,ae=M.length;for(H||(H=gt(ae));++Z<ae;)H[Z]=M[Z];return H}function gu(M,H,Z,ae){var ye=!Z;Z||(Z={});for(var Ae=-1,Ve=H.length;++Ae<Ve;){var Je=H[Ae],at=ae?ae(Z[Je],M[Je],Je,Z,M):r;at===r&&(at=M[Je]),ye?vd(Z,Je,at):xy(Z,Je,at)}return Z}function Tce(M,H){return gu(M,E3(M),H)}function Ice(M,H){return gu(M,V7(M),H)}function XC(M,H){return function(Z,ae){var ye=Zr(Z)?Ose:Xle,Ae=H?H():{};return ye(Z,M,Ar(ae,2),Ae)}}function j0(M){return hn(function(H,Z){var ae=-1,ye=Z.length,Ae=ye>1?Z[ye-1]:r,Ve=ye>2?Z[2]:r;for(Ae=M.length>3&&typeof Ae=="function"?(ye--,Ae):r,Ve&&is(Z[0],Z[1],Ve)&&(Ae=ye<3?r:Ae,ye=1),H=po(H);++ae<ye;){var Je=Z[ae];Je&&M(H,Je,ae,Ae)}return H})}function R7(M,H){return function(Z,ae){if(Z==null)return Z;if(!As(Z))return M(Z,ae);for(var ye=Z.length,Ae=H?ye:-1,Ve=po(Z);(H?Ae--:++Ae<ye)&&ae(Ve[Ae],Ae,Ve)!==!1;);return Z}}function O7(M){return function(H,Z,ae){for(var ye=-1,Ae=po(H),Ve=ae(H),Je=Ve.length;Je--;){var at=Ve[M?Je:++ye];if(Z(Ae[at],at,Ae)===!1)break}return H}}function Ace(M,H,Z){var ae=H&m,ye=Ey(M);function Ae(){var Ve=this&&this!==xi&&this instanceof Ae?ye:M;return Ve.apply(ae?Z:this,arguments)}return Ae}function D7(M){return function(H){H=Qn(H);var Z=N0(H)?kc(H):r,ae=Z?Z[0]:H.charAt(0),ye=Z?Bf(Z,1).join(""):H.slice(1);return ae[M]()+ye}}function V0(M){return function(H){return V4(RL(ML(H).replace(kC,"")),M,"")}}function Ey(M){return function(){var H=arguments;switch(H.length){case 0:return new M;case 1:return new M(H[0]);case 2:return new M(H[0],H[1]);case 3:return new M(H[0],H[1],H[2]);case 4:return new M(H[0],H[1],H[2],H[3]);case 5:return new M(H[0],H[1],H[2],H[3],H[4]);case 6:return new M(H[0],H[1],H[2],H[3],H[4],H[5]);case 7:return new M(H[0],H[1],H[2],H[3],H[4],H[5],H[6])}var Z=z0(M.prototype),ae=M.apply(Z,H);return Lo(ae)?ae:Z}}function Pce(M,H,Z){var ae=Ey(M);function ye(){for(var Ae=arguments.length,Ve=gt(Ae),Je=Ae,at=W0(ye);Je--;)Ve[Je]=arguments[Je];var Et=Ae<3&&Ve[0]!==at&&Ve[Ae-1]!==at?[]:Df(Ve,at);if(Ae-=Et.length,Ae<Z)return B7(M,H,QC,ye.placeholder,r,Ve,Et,r,r,Z-Ae);var It=this&&this!==xi&&this instanceof ye?ae:M;return Zs(It,this,Ve)}return ye}function F7(M){return function(H,Z,ae){var ye=po(H);if(!As(H)){var Ae=Ar(Z,3);H=Yi(H),Z=function(Je){return Ae(ye[Je],Je,ye)}}var Ve=M(H,Z,ae);return Ve>-1?ye[Ae?H[Ve]:Ve]:r}}function N7(M){return bd(function(H){var Z=H.length,ae=Z,ye=Ol.prototype.thru;for(M&&H.reverse();ae--;){var Ae=H[ae];if(typeof Ae!="function")throw new Rl(a);if(ye&&!Ve&&tS(Ae)=="wrapper")var Ve=new Ol([],!0)}for(ae=Ve?ae:Z;++ae<Z;){Ae=H[ae];var Je=tS(Ae),at=Je=="wrapper"?_3(Ae):r;at&&I3(at[0])&&at[1]==(O|b|E|D)&&!at[4].length&&at[9]==1?Ve=Ve[tS(at[0])].apply(Ve,at[3]):Ve=Ae.length==1&&I3(Ae)?Ve[Je]():Ve.thru(Ae)}return function(){var Et=arguments,It=Et[0];if(Ve&&Et.length==1&&Zr(It))return Ve.plant(It).value();for(var Lt=0,ir=Z?H[Lt].apply(this,Et):It;++Lt<Z;)ir=H[Lt].call(this,ir);return ir}})}function QC(M,H,Z,ae,ye,Ae,Ve,Je,at,Et){var It=H&O,Lt=H&m,ir=H&v,xr=H&(b|w),Or=H&N,un=ir?r:Ey(M);function Dr(){for(var vn=arguments.length,Cn=gt(vn),rl=vn;rl--;)Cn[rl]=arguments[rl];if(xr)var as=W0(Dr),nl=zse(Cn,as);if(ae&&(Cn=P7(Cn,ae,ye,xr)),Ae&&(Cn=M7(Cn,Ae,Ve,xr)),vn-=nl,xr&&vn<Et){var si=Df(Cn,as);return B7(M,H,QC,Dr.placeholder,Z,Cn,si,Je,at,Et-vn)}var Ic=Lt?Z:this,Sd=ir?Ic[M]:M;return vn=Cn.length,Je?Cn=Xce(Cn,Je):Or&&vn>1&&Cn.reverse(),It&&at<vn&&(Cn.length=at),this&&this!==xi&&this instanceof Dr&&(Sd=un||Ey(Sd)),Sd.apply(Ic,Cn)}return Dr}function L7(M,H){return function(Z,ae){return oce(Z,M,H(ae),{})}}function ZC(M,H){return function(Z,ae){var ye;if(Z===r&&ae===r)return H;if(Z!==r&&(ye=Z),ae!==r){if(ye===r)return ae;typeof Z=="string"||typeof ae=="string"?(Z=el(Z),ae=el(ae)):(Z=C7(Z),ae=C7(ae)),ye=M(Z,ae)}return ye}}function w3(M){return bd(function(H){return H=Mo(H,Js(Ar())),hn(function(Z){var ae=this;return M(H,function(ye){return Zs(ye,ae,Z)})})})}function JC(M,H){H=H===r?" ":el(H);var Z=H.length;if(Z<2)return Z?h3(H,M):H;var ae=h3(H,BC(M/L0(H)));return N0(H)?Bf(kc(ae),0,M).join(""):ae.slice(0,M)}function Mce(M,H,Z,ae){var ye=H&m,Ae=Ey(M);function Ve(){for(var Je=-1,at=arguments.length,Et=-1,It=ae.length,Lt=gt(It+at),ir=this&&this!==xi&&this instanceof Ve?Ae:M;++Et<It;)Lt[Et]=ae[Et];for(;at--;)Lt[Et++]=arguments[++Je];return Zs(ir,ye?Z:this,Lt)}return Ve}function $7(M){return function(H,Z,ae){return ae&&typeof ae!="number"&&is(H,Z,ae)&&(Z=ae=r),H=Cd(H),Z===r?(Z=H,H=0):Z=Cd(Z),ae=ae===r?H<Z?1:-1:Cd(ae),gce(H,Z,ae,M)}}function eS(M){return function(H,Z){return typeof H=="string"&&typeof Z=="string"||(H=Ll(H),Z=Ll(Z)),M(H,Z)}}function B7(M,H,Z,ae,ye,Ae,Ve,Je,at,Et){var It=H&b,Lt=It?Ve:r,ir=It?r:Ve,xr=It?Ae:r,Or=It?r:Ae;H|=It?E:I,H&=~(It?I:E),H&y||(H&=~(m|v));var un=[M,H,ye,xr,Lt,Or,ir,Je,at,Et],Dr=Z.apply(r,un);return I3(M)&&Q7(Dr,un),Dr.placeholder=ae,Z7(Dr,M,H)}function x3(M){var H=Ni[M];return function(Z,ae){if(Z=Ll(Z),ae=ae==null?0:Oa(sn(ae),292),ae&&Z9(Z)){var ye=(Qn(Z)+"e").split("e"),Ae=H(ye[0]+"e"+(+ye[1]+ae));return ye=(Qn(Ae)+"e").split("e"),+(ye[0]+"e"+(+ye[1]-ae))}return H(Z)}}var Rce=U0&&1/AC(new U0([,-0]))[1]==S?function(M){return new U0(M)}:j3;function U7(M){return function(H){var Z=Da(H);return Z==se?Q4(H):Z==de?Yse(H):Hse(H,M(H))}}function yd(M,H,Z,ae,ye,Ae,Ve,Je){var at=H&v;if(!at&&typeof M!="function")throw new Rl(a);var Et=ae?ae.length:0;if(Et||(H&=~(E|I),ae=ye=r),Ve=Ve===r?Ve:Li(sn(Ve),0),Je=Je===r?Je:sn(Je),Et-=ye?ye.length:0,H&I){var It=ae,Lt=ye;ae=ye=r}var ir=at?r:_3(M),xr=[M,H,Z,ae,ye,It,Lt,Ae,Ve,Je];if(ir&&qce(xr,ir),M=xr[0],H=xr[1],Z=xr[2],ae=xr[3],ye=xr[4],Je=xr[9]=xr[9]===r?at?0:M.length:Li(xr[9]-Et,0),!Je&&H&(b|w)&&(H&=~(b|w)),!H||H==m)var Or=Ace(M,H,Z);else H==b||H==w?Or=Pce(M,H,Je):(H==E||H==(m|E))&&!ye.length?Or=Mce(M,H,Z,ae):Or=QC.apply(r,xr);var un=ir?w7:Q7;return Z7(un(Or,xr),M,H)}function H7(M,H,Z,ae){return M===r||Tc(M,B0[Z])&&!Jn.call(ae,Z)?H:M}function z7(M,H,Z,ae,ye,Ae){return Lo(M)&&Lo(H)&&(Ae.set(H,M),qC(M,H,r,z7,Ae),Ae.delete(H)),M}function Oce(M){return Ay(M)?r:M}function j7(M,H,Z,ae,ye,Ae){var Ve=Z&p,Je=M.length,at=H.length;if(Je!=at&&!(Ve&&at>Je))return!1;var Et=Ae.get(M),It=Ae.get(H);if(Et&&It)return Et==H&&It==M;var Lt=-1,ir=!0,xr=Z&g?new bp:r;for(Ae.set(M,H),Ae.set(H,M);++Lt<Je;){var Or=M[Lt],un=H[Lt];if(ae)var Dr=Ve?ae(un,Or,Lt,H,M,Ae):ae(Or,un,Lt,M,H,Ae);if(Dr!==r){if(Dr)continue;ir=!1;break}if(xr){if(!W4(H,function(vn,Cn){if(!my(xr,Cn)&&(Or===vn||ye(Or,vn,Z,ae,Ae)))return xr.push(Cn)})){ir=!1;break}}else if(!(Or===un||ye(Or,un,Z,ae,Ae))){ir=!1;break}}return Ae.delete(M),Ae.delete(H),ir}function Dce(M,H,Z,ae,ye,Ae,Ve){switch(Z){case Ie:if(M.byteLength!=H.byteLength||M.byteOffset!=H.byteOffset)return!1;M=M.buffer,H=H.buffer;case Fe:return!(M.byteLength!=H.byteLength||!Ae(new FC(M),new FC(H)));case G:case V:case pe:return Tc(+M,+H);case te:return M.name==H.name&&M.message==H.message;case le:case ve:return M==H+"";case se:var Je=Q4;case de:var at=ae&p;if(Je||(Je=AC),M.size!=H.size&&!at)return!1;var Et=Ve.get(M);if(Et)return Et==H;ae|=g,Ve.set(M,H);var It=j7(Je(M),Je(H),ae,ye,Ae,Ve);return Ve.delete(M),It;case we:if(wy)return wy.call(M)==wy.call(H)}return!1}function Fce(M,H,Z,ae,ye,Ae){var Ve=Z&p,Je=C3(M),at=Je.length,Et=C3(H),It=Et.length;if(at!=It&&!Ve)return!1;for(var Lt=at;Lt--;){var ir=Je[Lt];if(!(Ve?ir in H:Jn.call(H,ir)))return!1}var xr=Ae.get(M),Or=Ae.get(H);if(xr&&Or)return xr==H&&Or==M;var un=!0;Ae.set(M,H),Ae.set(H,M);for(var Dr=Ve;++Lt<at;){ir=Je[Lt];var vn=M[ir],Cn=H[ir];if(ae)var rl=Ve?ae(Cn,vn,ir,H,M,Ae):ae(vn,Cn,ir,M,H,Ae);if(!(rl===r?vn===Cn||ye(vn,Cn,Z,ae,Ae):rl)){un=!1;break}Dr||(Dr=ir=="constructor")}if(un&&!Dr){var as=M.constructor,nl=H.constructor;as!=nl&&"constructor"in M&&"constructor"in H&&!(typeof as=="function"&&as instanceof as&&typeof nl=="function"&&nl instanceof nl)&&(un=!1)}return Ae.delete(M),Ae.delete(H),un}function bd(M){return P3(Y7(M,r,oL),M+"")}function C3(M){return c7(M,Yi,E3)}function S3(M){return c7(M,Ps,V7)}var _3=HC?function(M){return HC.get(M)}:j3;function tS(M){for(var H=M.name+"",Z=H0[H],ae=Jn.call(H0,H)?Z.length:0;ae--;){var ye=Z[ae],Ae=ye.func;if(Ae==null||Ae==M)return ye.name}return H}function W0(M){var H=Jn.call(Te,"placeholder")?Te:M;return H.placeholder}function Ar(){var M=Te.iteratee||H3;return M=M===H3?f7:M,arguments.length?M(arguments[0],arguments[1]):M}function rS(M,H){var Z=M.__data__;return jce(H)?Z[typeof H=="string"?"string":"hash"]:Z.map}function k3(M){for(var H=Yi(M),Z=H.length;Z--;){var ae=H[Z],ye=M[ae];H[Z]=[ae,ye,q7(ye)]}return H}function Cp(M,H){var Z=Gse(M,H);return d7(Z)?Z:r}function Nce(M){var H=Jn.call(M,vp),Z=M[vp];try{M[vp]=r;var ae=!0}catch{}var ye=OC.call(M);return ae&&(H?M[vp]=Z:delete M[vp]),ye}var E3=J4?function(M){return M==null?[]:(M=po(M),Rf(J4(M),function(H){return X9.call(M,H)}))}:V3,V7=J4?function(M){for(var H=[];M;)Of(H,E3(M)),M=NC(M);return H}:V3,Da=os;(e3&&Da(new e3(new ArrayBuffer(1)))!=Ie||vy&&Da(new vy)!=se||t3&&Da(t3.resolve())!=he||U0&&Da(new U0)!=de||yy&&Da(new yy)!=ge)&&(Da=function(M){var H=os(M),Z=H==ne?M.constructor:r,ae=Z?Sp(Z):"";if(ae)switch(ae){case yle:return Ie;case ble:return se;case wle:return he;case xle:return de;case Cle:return ge}return H});function Lce(M,H,Z){for(var ae=-1,ye=Z.length;++ae<ye;){var Ae=Z[ae],Ve=Ae.size;switch(Ae.type){case"drop":M+=Ve;break;case"dropRight":H-=Ve;break;case"take":H=Oa(H,M+Ve);break;case"takeRight":M=Li(M,H-Ve);break}}return{start:M,end:H}}function $ce(M){var H=M.match(fe);return H?H[1].split(ke):[]}function W7(M,H,Z){H=$f(H,M);for(var ae=-1,ye=H.length,Ae=!1;++ae<ye;){var Ve=vu(H[ae]);if(!(Ae=M!=null&&Z(M,Ve)))break;M=M[Ve]}return Ae||++ae!=ye?Ae:(ye=M==null?0:M.length,!!ye&&cS(ye)&&wd(Ve,ye)&&(Zr(M)||_p(M)))}function Bce(M){var H=M.length,Z=new M.constructor(H);return H&&typeof M[0]=="string"&&Jn.call(M,"index")&&(Z.index=M.index,Z.input=M.input),Z}function G7(M){return typeof M.constructor=="function"&&!Ty(M)?z0(NC(M)):{}}function Uce(M,H,Z){var ae=M.constructor;switch(H){case Fe:return b3(M);case G:case V:return new ae(+M);case Ie:return Sce(M,Z);case Oe:case $e:case et:case Ze:case Ne:case Qe:case Xe:case rt:case ht:return I7(M,Z);case se:return new ae;case pe:case ve:return new ae(M);case le:return _ce(M);case de:return new ae;case we:return kce(M)}}function Hce(M,H){var Z=H.length;if(!Z)return M;var ae=Z-1;return H[ae]=(Z>1?"& ":"")+H[ae],H=H.join(Z>2?", ":" "),M.replace(nt,`{
/* [wrapped with `+H+`] */
`)}function zce(M){return Zr(M)||_p(M)||!!(Q9&&M&&M[Q9])}function wd(M,H){var Z=typeof M;return H=H??x,!!H&&(Z=="number"||Z!="symbol"&&lt.test(M))&&M>-1&&M%1==0&&M<H}function is(M,H,Z){if(!Lo(Z))return!1;var ae=typeof H;return(ae=="number"?As(Z)&&wd(H,Z.length):ae=="string"&&H in Z)?Tc(Z[H],M):!1}function T3(M,H){if(Zr(M))return!1;var Z=typeof M;return Z=="number"||Z=="symbol"||Z=="boolean"||M==null||tl(M)?!0:wt.test(M)||!Ut.test(M)||H!=null&&M in po(H)}function jce(M){var H=typeof M;return H=="string"||H=="number"||H=="symbol"||H=="boolean"?M!=="__proto__":M===null}function I3(M){var H=tS(M),Z=Te[H];if(typeof Z!="function"||!(H in bn.prototype))return!1;if(M===Z)return!0;var ae=_3(Z);return!!ae&&M===ae[0]}function Vce(M){return!!q9&&q9 in M}var Wce=MC?xd:W3;function Ty(M){var H=M&&M.constructor,Z=typeof H=="function"&&H.prototype||B0;return M===Z}function q7(M){return M===M&&!Lo(M)}function K7(M,H){return function(Z){return Z==null?!1:Z[M]===H&&(H!==r||M in po(Z))}}function Gce(M){var H=sS(M,function(ae){return Z.size===l&&Z.clear(),ae}),Z=H.cache;return H}function qce(M,H){var Z=M[1],ae=H[1],ye=Z|ae,Ae=ye<(m|v|O),Ve=ae==O&&Z==b||ae==O&&Z==D&&M[7].length<=H[8]||ae==(O|D)&&H[7].length<=H[8]&&Z==b;if(!(Ae||Ve))return M;ae&m&&(M[2]=H[2],ye|=Z&m?0:y);var Je=H[3];if(Je){var at=M[3];M[3]=at?P7(at,Je,H[4]):Je,M[4]=at?Df(M[3],u):H[4]}return Je=H[5],Je&&(at=M[5],M[5]=at?M7(at,Je,H[6]):Je,M[6]=at?Df(M[5],u):H[6]),Je=H[7],Je&&(M[7]=Je),ae&O&&(M[8]=M[8]==null?H[8]:Oa(M[8],H[8])),M[9]==null&&(M[9]=H[9]),M[0]=H[0],M[1]=ye,M}function Kce(M){var H=[];if(M!=null)for(var Z in po(M))H.push(Z);return H}function Yce(M){return OC.call(M)}function Y7(M,H,Z){return H=Li(H===r?M.length-1:H,0),function(){for(var ae=arguments,ye=-1,Ae=Li(ae.length-H,0),Ve=gt(Ae);++ye<Ae;)Ve[ye]=ae[H+ye];ye=-1;for(var Je=gt(H+1);++ye<H;)Je[ye]=ae[ye];return Je[H]=Z(Ve),Zs(M,this,Je)}}function X7(M,H){return H.length<2?M:xp(M,Fl(H,0,-1))}function Xce(M,H){for(var Z=M.length,ae=Oa(H.length,Z),ye=Is(M);ae--;){var Ae=H[ae];M[ae]=wd(Ae,Z)?ye[Ae]:r}return M}function A3(M,H){if(!(H==="constructor"&&typeof M[H]=="function")&&H!="__proto__")return M[H]}var Q7=J7(w7),Iy=dle||function(M,H){return xi.setTimeout(M,H)},P3=J7(bce);function Z7(M,H,Z){var ae=H+"";return P3(M,Hce(ae,Qce($ce(ae),Z)))}function J7(M){var H=0,Z=0;return function(){var ae=mle(),ye=T-(ae-Z);if(Z=ae,ye>0){if(++H>=F)return arguments[0]}else H=0;return M.apply(r,arguments)}}function nS(M,H){var Z=-1,ae=M.length,ye=ae-1;for(H=H===r?ae:H;++Z<H;){var Ae=f3(Z,ye),Ve=M[Ae];M[Ae]=M[Z],M[Z]=Ve}return M.length=H,M}var eL=Gce(function(M){var H=[];return M.charCodeAt(0)===46&&H.push(""),M.replace(Dt,function(Z,ae,ye,Ae){H.push(ye?Ae.replace(Ee,"$1"):ae||Z)}),H});function vu(M){if(typeof M=="string"||tl(M))return M;var H=M+"";return H=="0"&&1/M==-S?"-0":H}function Sp(M){if(M!=null){try{return RC.call(M)}catch{}try{return M+""}catch{}}return""}function Qce(M,H){return Ml(K,function(Z){var ae="_."+Z[0];H&Z[1]&&!TC(M,ae)&&M.push(ae)}),M.sort()}function tL(M){if(M instanceof bn)return M.clone();var H=new Ol(M.__wrapped__,M.__chain__);return H.__actions__=Is(M.__actions__),H.__index__=M.__index__,H.__values__=M.__values__,H}function Zce(M,H,Z){(Z?is(M,H,Z):H===r)?H=1:H=Li(sn(H),0);var ae=M==null?0:M.length;if(!ae||H<1)return[];for(var ye=0,Ae=0,Ve=gt(BC(ae/H));ye<ae;)Ve[Ae++]=Fl(M,ye,ye+=H);return Ve}function Jce(M){for(var H=-1,Z=M==null?0:M.length,ae=0,ye=[];++H<Z;){var Ae=M[H];Ae&&(ye[ae++]=Ae)}return ye}function eue(){var M=arguments.length;if(!M)return[];for(var H=gt(M-1),Z=arguments[0],ae=M;ae--;)H[ae-1]=arguments[ae];return Of(Zr(Z)?Is(Z):[Z],ga(H,1))}var tue=hn(function(M,H){return ai(M)?Cy(M,ga(H,1,ai,!0)):[]}),rue=hn(function(M,H){var Z=Nl(H);return ai(Z)&&(Z=r),ai(M)?Cy(M,ga(H,1,ai,!0),Ar(Z,2)):[]}),nue=hn(function(M,H){var Z=Nl(H);return ai(Z)&&(Z=r),ai(M)?Cy(M,ga(H,1,ai,!0),r,Z):[]});function oue(M,H,Z){var ae=M==null?0:M.length;return ae?(H=Z||H===r?1:sn(H),Fl(M,H<0?0:H,ae)):[]}function iue(M,H,Z){var ae=M==null?0:M.length;return ae?(H=Z||H===r?1:sn(H),H=ae-H,Fl(M,0,H<0?0:H)):[]}function aue(M,H){return M&&M.length?YC(M,Ar(H,3),!0,!0):[]}function sue(M,H){return M&&M.length?YC(M,Ar(H,3),!0):[]}function lue(M,H,Z,ae){var ye=M==null?0:M.length;return ye?(Z&&typeof Z!="number"&&is(M,H,Z)&&(Z=0,ae=ye),ece(M,H,Z,ae)):[]}function rL(M,H,Z){var ae=M==null?0:M.length;if(!ae)return-1;var ye=Z==null?0:sn(Z);return ye<0&&(ye=Li(ae+ye,0)),IC(M,Ar(H,3),ye)}function nL(M,H,Z){var ae=M==null?0:M.length;if(!ae)return-1;var ye=ae-1;return Z!==r&&(ye=sn(Z),ye=Z<0?Li(ae+ye,0):Oa(ye,ae-1)),IC(M,Ar(H,3),ye,!0)}function oL(M){var H=M==null?0:M.length;return H?ga(M,1):[]}function cue(M){var H=M==null?0:M.length;return H?ga(M,S):[]}function uue(M,H){var Z=M==null?0:M.length;return Z?(H=H===r?1:sn(H),ga(M,H)):[]}function due(M){for(var H=-1,Z=M==null?0:M.length,ae={};++H<Z;){var ye=M[H];ae[ye[0]]=ye[1]}return ae}function iL(M){return M&&M.length?M[0]:r}function fue(M,H,Z){var ae=M==null?0:M.length;if(!ae)return-1;var ye=Z==null?0:sn(Z);return ye<0&&(ye=Li(ae+ye,0)),F0(M,H,ye)}function hue(M){var H=M==null?0:M.length;return H?Fl(M,0,-1):[]}var pue=hn(function(M){var H=Mo(M,v3);return H.length&&H[0]===M[0]?s3(H):[]}),mue=hn(function(M){var H=Nl(M),Z=Mo(M,v3);return H===Nl(Z)?H=r:Z.pop(),Z.length&&Z[0]===M[0]?s3(Z,Ar(H,2)):[]}),gue=hn(function(M){var H=Nl(M),Z=Mo(M,v3);return H=typeof H=="function"?H:r,H&&Z.pop(),Z.length&&Z[0]===M[0]?s3(Z,r,H):[]});function vue(M,H){return M==null?"":hle.call(M,H)}function Nl(M){var H=M==null?0:M.length;return H?M[H-1]:r}function yue(M,H,Z){var ae=M==null?0:M.length;if(!ae)return-1;var ye=ae;return Z!==r&&(ye=sn(Z),ye=ye<0?Li(ae+ye,0):Oa(ye,ae-1)),H===H?Qse(M,H,ye):IC(M,B9,ye,!0)}function bue(M,H){return M&&M.length?g7(M,sn(H)):r}var wue=hn(aL);function aL(M,H){return M&&M.length&&H&&H.length?d3(M,H):M}function xue(M,H,Z){return M&&M.length&&H&&H.length?d3(M,H,Ar(Z,2)):M}function Cue(M,H,Z){return M&&M.length&&H&&H.length?d3(M,H,r,Z):M}var Sue=bd(function(M,H){var Z=M==null?0:M.length,ae=n3(M,H);return b7(M,Mo(H,function(ye){return wd(ye,Z)?+ye:ye}).sort(A7)),ae});function _ue(M,H){var Z=[];if(!(M&&M.length))return Z;var ae=-1,ye=[],Ae=M.length;for(H=Ar(H,3);++ae<Ae;){var Ve=M[ae];H(Ve,ae,M)&&(Z.push(Ve),ye.push(ae))}return b7(M,ye),Z}function M3(M){return M==null?M:vle.call(M)}function kue(M,H,Z){var ae=M==null?0:M.length;return ae?(Z&&typeof Z!="number"&&is(M,H,Z)?(H=0,Z=ae):(H=H==null?0:sn(H),Z=Z===r?ae:sn(Z)),Fl(M,H,Z)):[]}function Eue(M,H){return KC(M,H)}function Tue(M,H,Z){return p3(M,H,Ar(Z,2))}function Iue(M,H){var Z=M==null?0:M.length;if(Z){var ae=KC(M,H);if(ae<Z&&Tc(M[ae],H))return ae}return-1}function Aue(M,H){return KC(M,H,!0)}function Pue(M,H,Z){return p3(M,H,Ar(Z,2),!0)}function Mue(M,H){var Z=M==null?0:M.length;if(Z){var ae=KC(M,H,!0)-1;if(Tc(M[ae],H))return ae}return-1}function Rue(M){return M&&M.length?x7(M):[]}function Oue(M,H){return M&&M.length?x7(M,Ar(H,2)):[]}function Due(M){var H=M==null?0:M.length;return H?Fl(M,1,H):[]}function Fue(M,H,Z){return M&&M.length?(H=Z||H===r?1:sn(H),Fl(M,0,H<0?0:H)):[]}function Nue(M,H,Z){var ae=M==null?0:M.length;return ae?(H=Z||H===r?1:sn(H),H=ae-H,Fl(M,H<0?0:H,ae)):[]}function Lue(M,H){return M&&M.length?YC(M,Ar(H,3),!1,!0):[]}function $ue(M,H){return M&&M.length?YC(M,Ar(H,3)):[]}var Bue=hn(function(M){return Lf(ga(M,1,ai,!0))}),Uue=hn(function(M){var H=Nl(M);return ai(H)&&(H=r),Lf(ga(M,1,ai,!0),Ar(H,2))}),Hue=hn(function(M){var H=Nl(M);return H=typeof H=="function"?H:r,Lf(ga(M,1,ai,!0),r,H)});function zue(M){return M&&M.length?Lf(M):[]}function jue(M,H){return M&&M.length?Lf(M,Ar(H,2)):[]}function Vue(M,H){return H=typeof H=="function"?H:r,M&&M.length?Lf(M,r,H):[]}function R3(M){if(!(M&&M.length))return[];var H=0;return M=Rf(M,function(Z){if(ai(Z))return H=Li(Z.length,H),!0}),Y4(H,function(Z){return Mo(M,G4(Z))})}function sL(M,H){if(!(M&&M.length))return[];var Z=R3(M);return H==null?Z:Mo(Z,function(ae){return Zs(H,r,ae)})}var Wue=hn(function(M,H){return ai(M)?Cy(M,H):[]}),Gue=hn(function(M){return g3(Rf(M,ai))}),que=hn(function(M){var H=Nl(M);return ai(H)&&(H=r),g3(Rf(M,ai),Ar(H,2))}),Kue=hn(function(M){var H=Nl(M);return H=typeof H=="function"?H:r,g3(Rf(M,ai),r,H)}),Yue=hn(R3);function Xue(M,H){return k7(M||[],H||[],xy)}function Que(M,H){return k7(M||[],H||[],ky)}var Zue=hn(function(M){var H=M.length,Z=H>1?M[H-1]:r;return Z=typeof Z=="function"?(M.pop(),Z):r,sL(M,Z)});function lL(M){var H=Te(M);return H.__chain__=!0,H}function Jue(M,H){return H(M),M}function oS(M,H){return H(M)}var ede=bd(function(M){var H=M.length,Z=H?M[0]:0,ae=this.__wrapped__,ye=function(Ae){return n3(Ae,M)};return H>1||this.__actions__.length||!(ae instanceof bn)||!wd(Z)?this.thru(ye):(ae=ae.slice(Z,+Z+(H?1:0)),ae.__actions__.push({func:oS,args:[ye],thisArg:r}),new Ol(ae,this.__chain__).thru(function(Ae){return H&&!Ae.length&&Ae.push(r),Ae}))});function tde(){return lL(this)}function rde(){return new Ol(this.value(),this.__chain__)}function nde(){this.__values__===r&&(this.__values__=CL(this.value()));var M=this.__index__>=this.__values__.length,H=M?r:this.__values__[this.__index__++];return{done:M,value:H}}function ode(){return this}function ide(M){for(var H,Z=this;Z instanceof jC;){var ae=tL(Z);ae.__index__=0,ae.__values__=r,H?ye.__wrapped__=ae:H=ae;var ye=ae;Z=Z.__wrapped__}return ye.__wrapped__=M,H}function ade(){var M=this.__wrapped__;if(M instanceof bn){var H=M;return this.__actions__.length&&(H=new bn(this)),H=H.reverse(),H.__actions__.push({func:oS,args:[M3],thisArg:r}),new Ol(H,this.__chain__)}return this.thru(M3)}function sde(){return _7(this.__wrapped__,this.__actions__)}var lde=XC(function(M,H,Z){Jn.call(M,Z)?++M[Z]:vd(M,Z,1)});function cde(M,H,Z){var ae=Zr(M)?L9:Jle;return Z&&is(M,H,Z)&&(H=r),ae(M,Ar(H,3))}function ude(M,H){var Z=Zr(M)?Rf:s7;return Z(M,Ar(H,3))}var dde=F7(rL),fde=F7(nL);function hde(M,H){return ga(iS(M,H),1)}function pde(M,H){return ga(iS(M,H),S)}function mde(M,H,Z){return Z=Z===r?1:sn(Z),ga(iS(M,H),Z)}function cL(M,H){var Z=Zr(M)?Ml:Nf;return Z(M,Ar(H,3))}function uL(M,H){var Z=Zr(M)?Dse:a7;return Z(M,Ar(H,3))}var gde=XC(function(M,H,Z){Jn.call(M,Z)?M[Z].push(H):vd(M,Z,[H])});function vde(M,H,Z,ae){M=As(M)?M:q0(M),Z=Z&&!ae?sn(Z):0;var ye=M.length;return Z<0&&(Z=Li(ye+Z,0)),uS(M)?Z<=ye&&M.indexOf(H,Z)>-1:!!ye&&F0(M,H,Z)>-1}var yde=hn(function(M,H,Z){var ae=-1,ye=typeof H=="function",Ae=As(M)?gt(M.length):[];return Nf(M,function(Ve){Ae[++ae]=ye?Zs(H,Ve,Z):Sy(Ve,H,Z)}),Ae}),bde=XC(function(M,H,Z){vd(M,Z,H)});function iS(M,H){var Z=Zr(M)?Mo:h7;return Z(M,Ar(H,3))}function wde(M,H,Z,ae){return M==null?[]:(Zr(H)||(H=H==null?[]:[H]),Z=ae?r:Z,Zr(Z)||(Z=Z==null?[]:[Z]),v7(M,H,Z))}var xde=XC(function(M,H,Z){M[Z?0:1].push(H)},function(){return[[],[]]});function Cde(M,H,Z){var ae=Zr(M)?V4:H9,ye=arguments.length<3;return ae(M,Ar(H,4),Z,ye,Nf)}function Sde(M,H,Z){var ae=Zr(M)?Fse:H9,ye=arguments.length<3;return ae(M,Ar(H,4),Z,ye,a7)}function _de(M,H){var Z=Zr(M)?Rf:s7;return Z(M,lS(Ar(H,3)))}function kde(M){var H=Zr(M)?r7:vce;return H(M)}function Ede(M,H,Z){(Z?is(M,H,Z):H===r)?H=1:H=sn(H);var ae=Zr(M)?Kle:yce;return ae(M,H)}function Tde(M){var H=Zr(M)?Yle:wce;return H(M)}function Ide(M){if(M==null)return 0;if(As(M))return uS(M)?L0(M):M.length;var H=Da(M);return H==se||H==de?M.size:c3(M).length}function Ade(M,H,Z){var ae=Zr(M)?W4:xce;return Z&&is(M,H,Z)&&(H=r),ae(M,Ar(H,3))}var Pde=hn(function(M,H){if(M==null)return[];var Z=H.length;return Z>1&&is(M,H[0],H[1])?H=[]:Z>2&&is(H[0],H[1],H[2])&&(H=[H[0]]),v7(M,ga(H,1),[])}),aS=ule||function(){return xi.Date.now()};function Mde(M,H){if(typeof H!="function")throw new Rl(a);return M=sn(M),function(){if(--M<1)return H.apply(this,arguments)}}function dL(M,H,Z){return H=Z?r:H,H=M&&H==null?M.length:H,yd(M,O,r,r,r,r,H)}function fL(M,H){var Z;if(typeof H!="function")throw new Rl(a);return M=sn(M),function(){return--M>0&&(Z=H.apply(this,arguments)),M<=1&&(H=r),Z}}var O3=hn(function(M,H,Z){var ae=m;if(Z.length){var ye=Df(Z,W0(O3));ae|=E}return yd(M,ae,H,Z,ye)}),hL=hn(function(M,H,Z){var ae=m|v;if(Z.length){var ye=Df(Z,W0(hL));ae|=E}return yd(H,ae,M,Z,ye)});function pL(M,H,Z){H=Z?r:H;var ae=yd(M,b,r,r,r,r,r,H);return ae.placeholder=pL.placeholder,ae}function mL(M,H,Z){H=Z?r:H;var ae=yd(M,w,r,r,r,r,r,H);return ae.placeholder=mL.placeholder,ae}function gL(M,H,Z){var ae,ye,Ae,Ve,Je,at,Et=0,It=!1,Lt=!1,ir=!0;if(typeof M!="function")throw new Rl(a);H=Ll(H)||0,Lo(Z)&&(It=!!Z.leading,Lt="maxWait"in Z,Ae=Lt?Li(Ll(Z.maxWait)||0,H):Ae,ir="trailing"in Z?!!Z.trailing:ir);function xr(si){var Ic=ae,Sd=ye;return ae=ye=r,Et=si,Ve=M.apply(Sd,Ic),Ve}function Or(si){return Et=si,Je=Iy(vn,H),It?xr(si):Ve}function un(si){var Ic=si-at,Sd=si-Et,FL=H-Ic;return Lt?Oa(FL,Ae-Sd):FL}function Dr(si){var Ic=si-at,Sd=si-Et;return at===r||Ic>=H||Ic<0||Lt&&Sd>=Ae}function vn(){var si=aS();if(Dr(si))return Cn(si);Je=Iy(vn,un(si))}function Cn(si){return Je=r,ir&&ae?xr(si):(ae=ye=r,Ve)}function rl(){Je!==r&&E7(Je),Et=0,ae=at=ye=Je=r}function as(){return Je===r?Ve:Cn(aS())}function nl(){var si=aS(),Ic=Dr(si);if(ae=arguments,ye=this,at=si,Ic){if(Je===r)return Or(at);if(Lt)return E7(Je),Je=Iy(vn,H),xr(at)}return Je===r&&(Je=Iy(vn,H)),Ve}return nl.cancel=rl,nl.flush=as,nl}var Rde=hn(function(M,H){return i7(M,1,H)}),Ode=hn(function(M,H,Z){return i7(M,Ll(H)||0,Z)});function Dde(M){return yd(M,N)}function sS(M,H){if(typeof M!="function"||H!=null&&typeof H!="function")throw new Rl(a);var Z=function(){var ae=arguments,ye=H?H.apply(this,ae):ae[0],Ae=Z.cache;if(Ae.has(ye))return Ae.get(ye);var Ve=M.apply(this,ae);return Z.cache=Ae.set(ye,Ve)||Ae,Ve};return Z.cache=new(sS.Cache||gd),Z}sS.Cache=gd;function lS(M){if(typeof M!="function")throw new Rl(a);return function(){var H=arguments;switch(H.length){case 0:return!M.call(this);case 1:return!M.call(this,H[0]);case 2:return!M.call(this,H[0],H[1]);case 3:return!M.call(this,H[0],H[1],H[2])}return!M.apply(this,H)}}function Fde(M){return fL(2,M)}var Nde=Cce(function(M,H){H=H.length==1&&Zr(H[0])?Mo(H[0],Js(Ar())):Mo(ga(H,1),Js(Ar()));var Z=H.length;return hn(function(ae){for(var ye=-1,Ae=Oa(ae.length,Z);++ye<Ae;)ae[ye]=H[ye].call(this,ae[ye]);return Zs(M,this,ae)})}),D3=hn(function(M,H){var Z=Df(H,W0(D3));return yd(M,E,r,H,Z)}),vL=hn(function(M,H){var Z=Df(H,W0(vL));return yd(M,I,r,H,Z)}),Lde=bd(function(M,H){return yd(M,D,r,r,r,H)});function $de(M,H){if(typeof M!="function")throw new Rl(a);return H=H===r?H:sn(H),hn(M,H)}function Bde(M,H){if(typeof M!="function")throw new Rl(a);return H=H==null?0:Li(sn(H),0),hn(function(Z){var ae=Z[H],ye=Bf(Z,0,H);return ae&&Of(ye,ae),Zs(M,this,ye)})}function Ude(M,H,Z){var ae=!0,ye=!0;if(typeof M!="function")throw new Rl(a);return Lo(Z)&&(ae="leading"in Z?!!Z.leading:ae,ye="trailing"in Z?!!Z.trailing:ye),gL(M,H,{leading:ae,maxWait:H,trailing:ye})}function Hde(M){return dL(M,1)}function zde(M,H){return D3(y3(H),M)}function jde(){if(!arguments.length)return[];var M=arguments[0];return Zr(M)?M:[M]}function Vde(M){return Dl(M,h)}function Wde(M,H){return H=typeof H=="function"?H:r,Dl(M,h,H)}function Gde(M){return Dl(M,f|h)}function qde(M,H){return H=typeof H=="function"?H:r,Dl(M,f|h,H)}function Kde(M,H){return H==null||o7(M,H,Yi(H))}function Tc(M,H){return M===H||M!==M&&H!==H}var Yde=eS(a3),Xde=eS(function(M,H){return M>=H}),_p=u7(function(){return arguments}())?u7:function(M){return Ko(M)&&Jn.call(M,"callee")&&!X9.call(M,"callee")},Zr=gt.isArray,Qde=gp?Js(gp):ice;function As(M){return M!=null&&cS(M.length)&&!xd(M)}function ai(M){return Ko(M)&&As(M)}function Zde(M){return M===!0||M===!1||Ko(M)&&os(M)==G}var Uf=fle||W3,Jde=R9?Js(R9):ace;function efe(M){return Ko(M)&&M.nodeType===1&&!Ay(M)}function tfe(M){if(M==null)return!0;if(As(M)&&(Zr(M)||typeof M=="string"||typeof M.splice=="function"||Uf(M)||G0(M)||_p(M)))return!M.length;var H=Da(M);if(H==se||H==de)return!M.size;if(Ty(M))return!c3(M).length;for(var Z in M)if(Jn.call(M,Z))return!1;return!0}function rfe(M,H){return _y(M,H)}function nfe(M,H,Z){Z=typeof Z=="function"?Z:r;var ae=Z?Z(M,H):r;return ae===r?_y(M,H,r,Z):!!ae}function F3(M){if(!Ko(M))return!1;var H=os(M);return H==te||H==X||typeof M.message=="string"&&typeof M.name=="string"&&!Ay(M)}function ofe(M){return typeof M=="number"&&Z9(M)}function xd(M){if(!Lo(M))return!1;var H=os(M);return H==ee||H==re||H==J||H==oe}function yL(M){return typeof M=="number"&&M==sn(M)}function cS(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=x}function Lo(M){var H=typeof M;return M!=null&&(H=="object"||H=="function")}function Ko(M){return M!=null&&typeof M=="object"}var bL=O9?Js(O9):lce;function ife(M,H){return M===H||l3(M,H,k3(H))}function afe(M,H,Z){return Z=typeof Z=="function"?Z:r,l3(M,H,k3(H),Z)}function sfe(M){return wL(M)&&M!=+M}function lfe(M){if(Wce(M))throw new Kr(i);return d7(M)}function cfe(M){return M===null}function ufe(M){return M==null}function wL(M){return typeof M=="number"||Ko(M)&&os(M)==pe}function Ay(M){if(!Ko(M)||os(M)!=ne)return!1;var H=NC(M);if(H===null)return!0;var Z=Jn.call(H,"constructor")&&H.constructor;return typeof Z=="function"&&Z instanceof Z&&RC.call(Z)==ale}var N3=D9?Js(D9):cce;function dfe(M){return yL(M)&&M>=-x&&M<=x}var xL=F9?Js(F9):uce;function uS(M){return typeof M=="string"||!Zr(M)&&Ko(M)&&os(M)==ve}function tl(M){return typeof M=="symbol"||Ko(M)&&os(M)==we}var G0=N9?Js(N9):dce;function ffe(M){return M===r}function hfe(M){return Ko(M)&&Da(M)==ge}function pfe(M){return Ko(M)&&os(M)==Pe}var mfe=eS(u3),gfe=eS(function(M,H){return M<=H});function CL(M){if(!M)return[];if(As(M))return uS(M)?kc(M):Is(M);if(gy&&M[gy])return Kse(M[gy]());var H=Da(M),Z=H==se?Q4:H==de?AC:q0;return Z(M)}function Cd(M){if(!M)return M===0?M:0;if(M=Ll(M),M===S||M===-S){var H=M<0?-1:1;return H*k}return M===M?M:0}function sn(M){var H=Cd(M),Z=H%1;return H===H?Z?H-Z:H:0}function SL(M){return M?wp(sn(M),0,j):0}function Ll(M){if(typeof M=="number")return M;if(tl(M))return L;if(Lo(M)){var H=typeof M.valueOf=="function"?M.valueOf():M;M=Lo(H)?H+"":H}if(typeof M!="string")return M===0?M:+M;M=z9(M);var Z=De.test(M);return Z||Le.test(M)?ma(M.slice(2),Z?2:8):Be.test(M)?L:+M}function _L(M){return gu(M,Ps(M))}function vfe(M){return M?wp(sn(M),-x,x):M===0?M:0}function Qn(M){return M==null?"":el(M)}var yfe=j0(function(M,H){if(Ty(H)||As(H)){gu(H,Yi(H),M);return}for(var Z in H)Jn.call(H,Z)&&xy(M,Z,H[Z])}),kL=j0(function(M,H){gu(H,Ps(H),M)}),dS=j0(function(M,H,Z,ae){gu(H,Ps(H),M,ae)}),bfe=j0(function(M,H,Z,ae){gu(H,Yi(H),M,ae)}),wfe=bd(n3);function xfe(M,H){var Z=z0(M);return H==null?Z:n7(Z,H)}var Cfe=hn(function(M,H){M=po(M);var Z=-1,ae=H.length,ye=ae>2?H[2]:r;for(ye&&is(H[0],H[1],ye)&&(ae=1);++Z<ae;)for(var Ae=H[Z],Ve=Ps(Ae),Je=-1,at=Ve.length;++Je<at;){var Et=Ve[Je],It=M[Et];(It===r||Tc(It,B0[Et])&&!Jn.call(M,Et))&&(M[Et]=Ae[Et])}return M}),Sfe=hn(function(M){return M.push(r,z7),Zs(EL,r,M)});function _fe(M,H){return $9(M,Ar(H,3),mu)}function kfe(M,H){return $9(M,Ar(H,3),i3)}function Efe(M,H){return M==null?M:o3(M,Ar(H,3),Ps)}function Tfe(M,H){return M==null?M:l7(M,Ar(H,3),Ps)}function Ife(M,H){return M&&mu(M,Ar(H,3))}function Afe(M,H){return M&&i3(M,Ar(H,3))}function Pfe(M){return M==null?[]:GC(M,Yi(M))}function Mfe(M){return M==null?[]:GC(M,Ps(M))}function L3(M,H,Z){var ae=M==null?r:xp(M,H);return ae===r?Z:ae}function Rfe(M,H){return M!=null&&W7(M,H,tce)}function $3(M,H){return M!=null&&W7(M,H,rce)}var Ofe=L7(function(M,H,Z){H!=null&&typeof H.toString!="function"&&(H=OC.call(H)),M[H]=Z},U3(Ms)),Dfe=L7(function(M,H,Z){H!=null&&typeof H.toString!="function"&&(H=OC.call(H)),Jn.call(M,H)?M[H].push(Z):M[H]=[Z]},Ar),Ffe=hn(Sy);function Yi(M){return As(M)?t7(M):c3(M)}function Ps(M){return As(M)?t7(M,!0):fce(M)}function Nfe(M,H){var Z={};return H=Ar(H,3),mu(M,function(ae,ye,Ae){vd(Z,H(ae,ye,Ae),ae)}),Z}function Lfe(M,H){var Z={};return H=Ar(H,3),mu(M,function(ae,ye,Ae){vd(Z,ye,H(ae,ye,Ae))}),Z}var $fe=j0(function(M,H,Z){qC(M,H,Z)}),EL=j0(function(M,H,Z,ae){qC(M,H,Z,ae)}),Bfe=bd(function(M,H){var Z={};if(M==null)return Z;var ae=!1;H=Mo(H,function(Ae){return Ae=$f(Ae,M),ae||(ae=Ae.length>1),Ae}),gu(M,S3(M),Z),ae&&(Z=Dl(Z,f|d|h,Oce));for(var ye=H.length;ye--;)m3(Z,H[ye]);return Z});function Ufe(M,H){return TL(M,lS(Ar(H)))}var Hfe=bd(function(M,H){return M==null?{}:pce(M,H)});function TL(M,H){if(M==null)return{};var Z=Mo(S3(M),function(ae){return[ae]});return H=Ar(H),y7(M,Z,function(ae,ye){return H(ae,ye[0])})}function zfe(M,H,Z){H=$f(H,M);var ae=-1,ye=H.length;for(ye||(ye=1,M=r);++ae<ye;){var Ae=M==null?r:M[vu(H[ae])];Ae===r&&(ae=ye,Ae=Z),M=xd(Ae)?Ae.call(M):Ae}return M}function jfe(M,H,Z){return M==null?M:ky(M,H,Z)}function Vfe(M,H,Z,ae){return ae=typeof ae=="function"?ae:r,M==null?M:ky(M,H,Z,ae)}var IL=U7(Yi),AL=U7(Ps);function Wfe(M,H,Z){var ae=Zr(M),ye=ae||Uf(M)||G0(M);if(H=Ar(H,4),Z==null){var Ae=M&&M.constructor;ye?Z=ae?new Ae:[]:Lo(M)?Z=xd(Ae)?z0(NC(M)):{}:Z={}}return(ye?Ml:mu)(M,function(Ve,Je,at){return H(Z,Ve,Je,at)}),Z}function Gfe(M,H){return M==null?!0:m3(M,H)}function qfe(M,H,Z){return M==null?M:S7(M,H,y3(Z))}function Kfe(M,H,Z,ae){return ae=typeof ae=="function"?ae:r,M==null?M:S7(M,H,y3(Z),ae)}function q0(M){return M==null?[]:X4(M,Yi(M))}function Yfe(M){return M==null?[]:X4(M,Ps(M))}function Xfe(M,H,Z){return Z===r&&(Z=H,H=r),Z!==r&&(Z=Ll(Z),Z=Z===Z?Z:0),H!==r&&(H=Ll(H),H=H===H?H:0),wp(Ll(M),H,Z)}function Qfe(M,H,Z){return H=Cd(H),Z===r?(Z=H,H=0):Z=Cd(Z),M=Ll(M),nce(M,H,Z)}function Zfe(M,H,Z){if(Z&&typeof Z!="boolean"&&is(M,H,Z)&&(H=Z=r),Z===r&&(typeof H=="boolean"?(Z=H,H=r):typeof M=="boolean"&&(Z=M,M=r)),M===r&&H===r?(M=0,H=1):(M=Cd(M),H===r?(H=M,M=0):H=Cd(H)),M>H){var ae=M;M=H,H=ae}if(Z||M%1||H%1){var ye=J9();return Oa(M+ye*(H-M+wi("1e-"+((ye+"").length-1))),H)}return f3(M,H)}var Jfe=V0(function(M,H,Z){return H=H.toLowerCase(),M+(Z?PL(H):H)});function PL(M){return B3(Qn(M).toLowerCase())}function ML(M){return M=Qn(M),M&&M.replace(vt,jse).replace(U4,"")}function ehe(M,H,Z){M=Qn(M),H=el(H);var ae=M.length;Z=Z===r?ae:wp(sn(Z),0,ae);var ye=Z;return Z-=H.length,Z>=0&&M.slice(Z,ye)==H}function the(M){return M=Qn(M),M&&st.test(M)?M.replace(Ye,Vse):M}function rhe(M){return M=Qn(M),M&&Tt.test(M)?M.replace(qt,"\\$&"):M}var nhe=V0(function(M,H,Z){return M+(Z?"-":"")+H.toLowerCase()}),ohe=V0(function(M,H,Z){return M+(Z?" ":"")+H.toLowerCase()}),ihe=D7("toLowerCase");function ahe(M,H,Z){M=Qn(M),H=sn(H);var ae=H?L0(M):0;if(!H||ae>=H)return M;var ye=(H-ae)/2;return JC(UC(ye),Z)+M+JC(BC(ye),Z)}function she(M,H,Z){M=Qn(M),H=sn(H);var ae=H?L0(M):0;return H&&ae<H?M+JC(H-ae,Z):M}function lhe(M,H,Z){M=Qn(M),H=sn(H);var ae=H?L0(M):0;return H&&ae<H?JC(H-ae,Z)+M:M}function che(M,H,Z){return Z||H==null?H=0:H&&(H=+H),gle(Qn(M).replace(Me,""),H||0)}function uhe(M,H,Z){return(Z?is(M,H,Z):H===r)?H=1:H=sn(H),h3(Qn(M),H)}function dhe(){var M=arguments,H=Qn(M[0]);return M.length<3?H:H.replace(M[1],M[2])}var fhe=V0(function(M,H,Z){return M+(Z?"_":"")+H.toLowerCase()});function hhe(M,H,Z){return Z&&typeof Z!="number"&&is(M,H,Z)&&(H=Z=r),Z=Z===r?j:Z>>>0,Z?(M=Qn(M),M&&(typeof H=="string"||H!=null&&!N3(H))&&(H=el(H),!H&&N0(M))?Bf(kc(M),0,Z):M.split(H,Z)):[]}var phe=V0(function(M,H,Z){return M+(Z?" ":"")+B3(H)});function mhe(M,H,Z){return M=Qn(M),Z=Z==null?0:wp(sn(Z),0,M.length),H=el(H),M.slice(Z,Z+H.length)==H}function ghe(M,H,Z){var ae=Te.templateSettings;Z&&is(M,H,Z)&&(H=r),M=Qn(M),H=dS({},H,ae,H7);var ye=dS({},H.imports,ae.imports,H7),Ae=Yi(ye),Ve=X4(ye,Ae),Je,at,Et=0,It=H.interpolate||Bt,Lt="__p += '",ir=Z4((H.escape||Bt).source+"|"+It.source+"|"+(It===Pt?me:Bt).source+"|"+(H.evaluate||Bt).source+"|$","g"),xr="//# sourceURL="+(Jn.call(H,"sourceURL")?(H.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hy+"]")+`
`;M.replace(ir,function(Dr,vn,Cn,rl,as,nl){return Cn||(Cn=rl),Lt+=M.slice(Et,nl).replace(Se,Wse),vn&&(Je=!0,Lt+=`' +
__e(`+vn+`) +
'`),as&&(at=!0,Lt+=`';
`+as+`;
__p += '`),Cn&&(Lt+=`' +
((__t = (`+Cn+`)) == null ? '' : __t) +
'`),Et=nl+Dr.length,Dr}),Lt+=`';
`;var Or=Jn.call(H,"variable")&&H.variable;if(!Or)Lt=`with (obj) {
`+Lt+`
}
`;else if(Ce.test(Or))throw new Kr(s);Lt=(at?Lt.replace(At,""):Lt).replace(Qt,"$1").replace(Nt,"$1;"),Lt="function("+(Or||"obj")+`) {
`+(Or?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(Je?", __e = _.escape":"")+(at?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Lt+`return __p
}`;var un=OL(function(){return zn(Ae,xr+"return "+Lt).apply(r,Ve)});if(un.source=Lt,F3(un))throw un;return un}function vhe(M){return Qn(M).toLowerCase()}function yhe(M){return Qn(M).toUpperCase()}function bhe(M,H,Z){if(M=Qn(M),M&&(Z||H===r))return z9(M);if(!M||!(H=el(H)))return M;var ae=kc(M),ye=kc(H),Ae=j9(ae,ye),Ve=V9(ae,ye)+1;return Bf(ae,Ae,Ve).join("")}function whe(M,H,Z){if(M=Qn(M),M&&(Z||H===r))return M.slice(0,G9(M)+1);if(!M||!(H=el(H)))return M;var ae=kc(M),ye=V9(ae,kc(H))+1;return Bf(ae,0,ye).join("")}function xhe(M,H,Z){if(M=Qn(M),M&&(Z||H===r))return M.replace(Me,"");if(!M||!(H=el(H)))return M;var ae=kc(M),ye=j9(ae,kc(H));return Bf(ae,ye).join("")}function Che(M,H){var Z=U,ae=B;if(Lo(H)){var ye="separator"in H?H.separator:ye;Z="length"in H?sn(H.length):Z,ae="omission"in H?el(H.omission):ae}M=Qn(M);var Ae=M.length;if(N0(M)){var Ve=kc(M);Ae=Ve.length}if(Z>=Ae)return M;var Je=Z-L0(ae);if(Je<1)return ae;var at=Ve?Bf(Ve,0,Je).join(""):M.slice(0,Je);if(ye===r)return at+ae;if(Ve&&(Je+=at.length-Je),N3(ye)){if(M.slice(Je).search(ye)){var Et,It=at;for(ye.global||(ye=Z4(ye.source,Qn(_e.exec(ye))+"g")),ye.lastIndex=0;Et=ye.exec(It);)var Lt=Et.index;at=at.slice(0,Lt===r?Je:Lt)}}else if(M.indexOf(el(ye),Je)!=Je){var ir=at.lastIndexOf(ye);ir>-1&&(at=at.slice(0,ir))}return at+ae}function She(M){return M=Qn(M),M&&tt.test(M)?M.replace(Ue,Zse):M}var _he=V0(function(M,H,Z){return M+(Z?" ":"")+H.toUpperCase()}),B3=D7("toUpperCase");function RL(M,H,Z){return M=Qn(M),H=Z?r:H,H===r?qse(M)?tle(M):$se(M):M.match(H)||[]}var OL=hn(function(M,H){try{return Zs(M,r,H)}catch(Z){return F3(Z)?Z:new Kr(Z)}}),khe=bd(function(M,H){return Ml(H,function(Z){Z=vu(Z),vd(M,Z,O3(M[Z],M))}),M});function Ehe(M){var H=M==null?0:M.length,Z=Ar();return M=H?Mo(M,function(ae){if(typeof ae[1]!="function")throw new Rl(a);return[Z(ae[0]),ae[1]]}):[],hn(function(ae){for(var ye=-1;++ye<H;){var Ae=M[ye];if(Zs(Ae[0],this,ae))return Zs(Ae[1],this,ae)}})}function The(M){return Zle(Dl(M,f))}function U3(M){return function(){return M}}function Ihe(M,H){return M==null||M!==M?H:M}var Ahe=N7(),Phe=N7(!0);function Ms(M){return M}function H3(M){return f7(typeof M=="function"?M:Dl(M,f))}function Mhe(M){return p7(Dl(M,f))}function Rhe(M,H){return m7(M,Dl(H,f))}var Ohe=hn(function(M,H){return function(Z){return Sy(Z,M,H)}}),Dhe=hn(function(M,H){return function(Z){return Sy(M,Z,H)}});function z3(M,H,Z){var ae=Yi(H),ye=GC(H,ae);Z==null&&!(Lo(H)&&(ye.length||!ae.length))&&(Z=H,H=M,M=this,ye=GC(H,Yi(H)));var Ae=!(Lo(Z)&&"chain"in Z)||!!Z.chain,Ve=xd(M);return Ml(ye,function(Je){var at=H[Je];M[Je]=at,Ve&&(M.prototype[Je]=function(){var Et=this.__chain__;if(Ae||Et){var It=M(this.__wrapped__),Lt=It.__actions__=Is(this.__actions__);return Lt.push({func:at,args:arguments,thisArg:M}),It.__chain__=Et,It}return at.apply(M,Of([this.value()],arguments))})}),M}function Fhe(){return xi._===this&&(xi._=sle),this}function j3(){}function Nhe(M){return M=sn(M),hn(function(H){return g7(H,M)})}var Lhe=w3(Mo),$he=w3(L9),Bhe=w3(W4);function DL(M){return T3(M)?G4(vu(M)):mce(M)}function Uhe(M){return function(H){return M==null?r:xp(M,H)}}var Hhe=$7(),zhe=$7(!0);function V3(){return[]}function W3(){return!1}function jhe(){return{}}function Vhe(){return""}function Whe(){return!0}function Ghe(M,H){if(M=sn(M),M<1||M>x)return[];var Z=j,ae=Oa(M,j);H=Ar(H),M-=j;for(var ye=Y4(ae,H);++Z<M;)H(Z);return ye}function qhe(M){return Zr(M)?Mo(M,vu):tl(M)?[M]:Is(eL(Qn(M)))}function Khe(M){var H=++ile;return Qn(M)+H}var Yhe=ZC(function(M,H){return M+H},0),Xhe=x3("ceil"),Qhe=ZC(function(M,H){return M/H},1),Zhe=x3("floor");function Jhe(M){return M&&M.length?WC(M,Ms,a3):r}function epe(M,H){return M&&M.length?WC(M,Ar(H,2),a3):r}function tpe(M){return U9(M,Ms)}function rpe(M,H){return U9(M,Ar(H,2))}function npe(M){return M&&M.length?WC(M,Ms,u3):r}function ope(M,H){return M&&M.length?WC(M,Ar(H,2),u3):r}var ipe=ZC(function(M,H){return M*H},1),ape=x3("round"),spe=ZC(function(M,H){return M-H},0);function lpe(M){return M&&M.length?K4(M,Ms):0}function cpe(M,H){return M&&M.length?K4(M,Ar(H,2)):0}return Te.after=Mde,Te.ary=dL,Te.assign=yfe,Te.assignIn=kL,Te.assignInWith=dS,Te.assignWith=bfe,Te.at=wfe,Te.before=fL,Te.bind=O3,Te.bindAll=khe,Te.bindKey=hL,Te.castArray=jde,Te.chain=lL,Te.chunk=Zce,Te.compact=Jce,Te.concat=eue,Te.cond=Ehe,Te.conforms=The,Te.constant=U3,Te.countBy=lde,Te.create=xfe,Te.curry=pL,Te.curryRight=mL,Te.debounce=gL,Te.defaults=Cfe,Te.defaultsDeep=Sfe,Te.defer=Rde,Te.delay=Ode,Te.difference=tue,Te.differenceBy=rue,Te.differenceWith=nue,Te.drop=oue,Te.dropRight=iue,Te.dropRightWhile=aue,Te.dropWhile=sue,Te.fill=lue,Te.filter=ude,Te.flatMap=hde,Te.flatMapDeep=pde,Te.flatMapDepth=mde,Te.flatten=oL,Te.flattenDeep=cue,Te.flattenDepth=uue,Te.flip=Dde,Te.flow=Ahe,Te.flowRight=Phe,Te.fromPairs=due,Te.functions=Pfe,Te.functionsIn=Mfe,Te.groupBy=gde,Te.initial=hue,Te.intersection=pue,Te.intersectionBy=mue,Te.intersectionWith=gue,Te.invert=Ofe,Te.invertBy=Dfe,Te.invokeMap=yde,Te.iteratee=H3,Te.keyBy=bde,Te.keys=Yi,Te.keysIn=Ps,Te.map=iS,Te.mapKeys=Nfe,Te.mapValues=Lfe,Te.matches=Mhe,Te.matchesProperty=Rhe,Te.memoize=sS,Te.merge=$fe,Te.mergeWith=EL,Te.method=Ohe,Te.methodOf=Dhe,Te.mixin=z3,Te.negate=lS,Te.nthArg=Nhe,Te.omit=Bfe,Te.omitBy=Ufe,Te.once=Fde,Te.orderBy=wde,Te.over=Lhe,Te.overArgs=Nde,Te.overEvery=$he,Te.overSome=Bhe,Te.partial=D3,Te.partialRight=vL,Te.partition=xde,Te.pick=Hfe,Te.pickBy=TL,Te.property=DL,Te.propertyOf=Uhe,Te.pull=wue,Te.pullAll=aL,Te.pullAllBy=xue,Te.pullAllWith=Cue,Te.pullAt=Sue,Te.range=Hhe,Te.rangeRight=zhe,Te.rearg=Lde,Te.reject=_de,Te.remove=_ue,Te.rest=$de,Te.reverse=M3,Te.sampleSize=Ede,Te.set=jfe,Te.setWith=Vfe,Te.shuffle=Tde,Te.slice=kue,Te.sortBy=Pde,Te.sortedUniq=Rue,Te.sortedUniqBy=Oue,Te.split=hhe,Te.spread=Bde,Te.tail=Due,Te.take=Fue,Te.takeRight=Nue,Te.takeRightWhile=Lue,Te.takeWhile=$ue,Te.tap=Jue,Te.throttle=Ude,Te.thru=oS,Te.toArray=CL,Te.toPairs=IL,Te.toPairsIn=AL,Te.toPath=qhe,Te.toPlainObject=_L,Te.transform=Wfe,Te.unary=Hde,Te.union=Bue,Te.unionBy=Uue,Te.unionWith=Hue,Te.uniq=zue,Te.uniqBy=jue,Te.uniqWith=Vue,Te.unset=Gfe,Te.unzip=R3,Te.unzipWith=sL,Te.update=qfe,Te.updateWith=Kfe,Te.values=q0,Te.valuesIn=Yfe,Te.without=Wue,Te.words=RL,Te.wrap=zde,Te.xor=Gue,Te.xorBy=que,Te.xorWith=Kue,Te.zip=Yue,Te.zipObject=Xue,Te.zipObjectDeep=Que,Te.zipWith=Zue,Te.entries=IL,Te.entriesIn=AL,Te.extend=kL,Te.extendWith=dS,z3(Te,Te),Te.add=Yhe,Te.attempt=OL,Te.camelCase=Jfe,Te.capitalize=PL,Te.ceil=Xhe,Te.clamp=Xfe,Te.clone=Vde,Te.cloneDeep=Gde,Te.cloneDeepWith=qde,Te.cloneWith=Wde,Te.conformsTo=Kde,Te.deburr=ML,Te.defaultTo=Ihe,Te.divide=Qhe,Te.endsWith=ehe,Te.eq=Tc,Te.escape=the,Te.escapeRegExp=rhe,Te.every=cde,Te.find=dde,Te.findIndex=rL,Te.findKey=_fe,Te.findLast=fde,Te.findLastIndex=nL,Te.findLastKey=kfe,Te.floor=Zhe,Te.forEach=cL,Te.forEachRight=uL,Te.forIn=Efe,Te.forInRight=Tfe,Te.forOwn=Ife,Te.forOwnRight=Afe,Te.get=L3,Te.gt=Yde,Te.gte=Xde,Te.has=Rfe,Te.hasIn=$3,Te.head=iL,Te.identity=Ms,Te.includes=vde,Te.indexOf=fue,Te.inRange=Qfe,Te.invoke=Ffe,Te.isArguments=_p,Te.isArray=Zr,Te.isArrayBuffer=Qde,Te.isArrayLike=As,Te.isArrayLikeObject=ai,Te.isBoolean=Zde,Te.isBuffer=Uf,Te.isDate=Jde,Te.isElement=efe,Te.isEmpty=tfe,Te.isEqual=rfe,Te.isEqualWith=nfe,Te.isError=F3,Te.isFinite=ofe,Te.isFunction=xd,Te.isInteger=yL,Te.isLength=cS,Te.isMap=bL,Te.isMatch=ife,Te.isMatchWith=afe,Te.isNaN=sfe,Te.isNative=lfe,Te.isNil=ufe,Te.isNull=cfe,Te.isNumber=wL,Te.isObject=Lo,Te.isObjectLike=Ko,Te.isPlainObject=Ay,Te.isRegExp=N3,Te.isSafeInteger=dfe,Te.isSet=xL,Te.isString=uS,Te.isSymbol=tl,Te.isTypedArray=G0,Te.isUndefined=ffe,Te.isWeakMap=hfe,Te.isWeakSet=pfe,Te.join=vue,Te.kebabCase=nhe,Te.last=Nl,Te.lastIndexOf=yue,Te.lowerCase=ohe,Te.lowerFirst=ihe,Te.lt=mfe,Te.lte=gfe,Te.max=Jhe,Te.maxBy=epe,Te.mean=tpe,Te.meanBy=rpe,Te.min=npe,Te.minBy=ope,Te.stubArray=V3,Te.stubFalse=W3,Te.stubObject=jhe,Te.stubString=Vhe,Te.stubTrue=Whe,Te.multiply=ipe,Te.nth=bue,Te.noConflict=Fhe,Te.noop=j3,Te.now=aS,Te.pad=ahe,Te.padEnd=she,Te.padStart=lhe,Te.parseInt=che,Te.random=Zfe,Te.reduce=Cde,Te.reduceRight=Sde,Te.repeat=uhe,Te.replace=dhe,Te.result=zfe,Te.round=ape,Te.runInContext=ot,Te.sample=kde,Te.size=Ide,Te.snakeCase=fhe,Te.some=Ade,Te.sortedIndex=Eue,Te.sortedIndexBy=Tue,Te.sortedIndexOf=Iue,Te.sortedLastIndex=Aue,Te.sortedLastIndexBy=Pue,Te.sortedLastIndexOf=Mue,Te.startCase=phe,Te.startsWith=mhe,Te.subtract=spe,Te.sum=lpe,Te.sumBy=cpe,Te.template=ghe,Te.times=Ghe,Te.toFinite=Cd,Te.toInteger=sn,Te.toLength=SL,Te.toLower=vhe,Te.toNumber=Ll,Te.toSafeInteger=vfe,Te.toString=Qn,Te.toUpper=yhe,Te.trim=bhe,Te.trimEnd=whe,Te.trimStart=xhe,Te.truncate=Che,Te.unescape=She,Te.uniqueId=Khe,Te.upperCase=_he,Te.upperFirst=B3,Te.each=cL,Te.eachRight=uL,Te.first=iL,z3(Te,function(){var M={};return mu(Te,function(H,Z){Jn.call(Te.prototype,Z)||(M[Z]=H)}),M}(),{chain:!1}),Te.VERSION=n,Ml(["bind","bindKey","curry","curryRight","partial","partialRight"],function(M){Te[M].placeholder=Te}),Ml(["drop","take"],function(M,H){bn.prototype[M]=function(Z){Z=Z===r?1:Li(sn(Z),0);var ae=this.__filtered__&&!H?new bn(this):this.clone();return ae.__filtered__?ae.__takeCount__=Oa(Z,ae.__takeCount__):ae.__views__.push({size:Oa(Z,j),type:M+(ae.__dir__<0?"Right":"")}),ae},bn.prototype[M+"Right"]=function(Z){return this.reverse()[M](Z).reverse()}}),Ml(["filter","map","takeWhile"],function(M,H){var Z=H+1,ae=Z==P||Z==C;bn.prototype[M]=function(ye){var Ae=this.clone();return Ae.__iteratees__.push({iteratee:Ar(ye,3),type:Z}),Ae.__filtered__=Ae.__filtered__||ae,Ae}}),Ml(["head","last"],function(M,H){var Z="take"+(H?"Right":"");bn.prototype[M]=function(){return this[Z](1).value()[0]}}),Ml(["initial","tail"],function(M,H){var Z="drop"+(H?"":"Right");bn.prototype[M]=function(){return this.__filtered__?new bn(this):this[Z](1)}}),bn.prototype.compact=function(){return this.filter(Ms)},bn.prototype.find=function(M){return this.filter(M).head()},bn.prototype.findLast=function(M){return this.reverse().find(M)},bn.prototype.invokeMap=hn(function(M,H){return typeof M=="function"?new bn(this):this.map(function(Z){return Sy(Z,M,H)})}),bn.prototype.reject=function(M){return this.filter(lS(Ar(M)))},bn.prototype.slice=function(M,H){M=sn(M);var Z=this;return Z.__filtered__&&(M>0||H<0)?new bn(Z):(M<0?Z=Z.takeRight(-M):M&&(Z=Z.drop(M)),H!==r&&(H=sn(H),Z=H<0?Z.dropRight(-H):Z.take(H-M)),Z)},bn.prototype.takeRightWhile=function(M){return this.reverse().takeWhile(M).reverse()},bn.prototype.toArray=function(){return this.take(j)},mu(bn.prototype,function(M,H){var Z=/^(?:filter|find|map|reject)|While$/.test(H),ae=/^(?:head|last)$/.test(H),ye=Te[ae?"take"+(H=="last"?"Right":""):H],Ae=ae||/^find/.test(H);ye&&(Te.prototype[H]=function(){var Ve=this.__wrapped__,Je=ae?[1]:arguments,at=Ve instanceof bn,Et=Je[0],It=at||Zr(Ve),Lt=function(vn){var Cn=ye.apply(Te,Of([vn],Je));return ae&&ir?Cn[0]:Cn};It&&Z&&typeof Et=="function"&&Et.length!=1&&(at=It=!1);var ir=this.__chain__,xr=!!this.__actions__.length,Or=Ae&&!ir,un=at&&!xr;if(!Ae&&It){Ve=un?Ve:new bn(this);var Dr=M.apply(Ve,Je);return Dr.__actions__.push({func:oS,args:[Lt],thisArg:r}),new Ol(Dr,ir)}return Or&&un?M.apply(this,Je):(Dr=this.thru(Lt),Or?ae?Dr.value()[0]:Dr.value():Dr)})}),Ml(["pop","push","shift","sort","splice","unshift"],function(M){var H=PC[M],Z=/^(?:push|sort|unshift)$/.test(M)?"tap":"thru",ae=/^(?:pop|shift)$/.test(M);Te.prototype[M]=function(){var ye=arguments;if(ae&&!this.__chain__){var Ae=this.value();return H.apply(Zr(Ae)?Ae:[],ye)}return this[Z](function(Ve){return H.apply(Zr(Ve)?Ve:[],ye)})}}),mu(bn.prototype,function(M,H){var Z=Te[H];if(Z){var ae=Z.name+"";Jn.call(H0,ae)||(H0[ae]=[]),H0[ae].push({name:H,func:Z})}}),H0[QC(r,v).name]=[{name:"wrapper",func:r}],bn.prototype.clone=Sle,bn.prototype.reverse=_le,bn.prototype.value=kle,Te.prototype.at=ede,Te.prototype.chain=tde,Te.prototype.commit=rde,Te.prototype.next=nde,Te.prototype.plant=ide,Te.prototype.reverse=ade,Te.prototype.toJSON=Te.prototype.valueOf=Te.prototype.value=sde,Te.prototype.first=Te.prototype.head,gy&&(Te.prototype[gy]=ode),Te},$0=rle();pu?((pu.exports=$0)._=$0,hu._=$0):xi._=$0}).call(Er)})(kT,kT.exports);var Iyt=kT.exports;function Ayt(){return{MuiDataGrid:{styleOverrides:{root:{"& .MuiDataGrid-cell:focus":{outline:"none"},"& .MuiDataGrid-row:hover":{cursor:"pointer"}}}}}}function Pyt(){return{MuiDialog:{styleOverrides:{paper:{overflow:"visible"}}}}}function Myt(){return Iyt.merge(Ayt(),Pyt())}const Ryt={lighter:"#bfd2ed",light:"#223854",main:"#0e243c",dark:"#0E243C",darker:"#000",contrastText:"#fff"},Oyt={lighter:"#b4e3db",light:"#29af99",main:"#00A088",dark:"#00937b",darker:"#005641",contrastText:"#fff"},Dyt={main:"#415058"},Fyt={main:"#5DB431"},Nyt={main:"#C91D1D"},Lyt={main:"#E8A530"},GG={common:{black:"#000",white:"#fff"},primary:{...Ryt},secondary:{...Oyt},info:{...Dyt},success:{...Fyt},error:{...Nyt},warning:{...Lyt}},$yt={light:{...GG,text:{primary:"#495058",secondary:"#BBBDC0"},background:{paper:"#fff",default:"#EDF2F5"}},dark:{...GG}},Byt="Karla",Uyt={fontFamily:Byt};function Hyt({children:e}){const r=A.useMemo(()=>({palette:{...$yt.light,mode:"light"},typography:Uyt}),[!0]),n=GO(r);return n.components=Myt(),R(vX,{injectFirst:!0,children:xe(Wbe,{theme:n,children:[R(HDe,{}),e]})})}function zyt(){const{featureChecker:e}=on(),t=A.useMemo(()=>[{component:()=>R(qn,{dashboardSlug:"usageallutilities"}),name:"usageallutilities",subtitle:"Analyze utility usage",tabTitle:"All Utilities"},{component:()=>R(qn,{dashboardSlug:"usageyoy"}),name:"usageyoy",subtitle:"Analyze year-over-year usage",tabTitle:"Year-over-Year"},{component:()=>R(qn,{dashboardSlug:"usageyoybar"}),name:"usageyoybar",subtitle:"Analyze year-over-year usage",tabTitle:"Year-over-Year Bar"},{component:()=>R(qn,{dashboardSlug:"usagetemperature"}),featureEnabled:e.devFeatureEnabled(xf.Experimental),name:"usagetemperature",subtitle:"Examine how temperature impacts usage",tabTitle:"Temperature"},{component:()=>R(qn,{dashboardSlug:"usageweather"}),name:"usageweather",subtitle:"Examine how weather correlates with usage",tabTitle:"Weather"},{component:()=>R(qn,{dashboardSlug:"usageenergykbtu"}),name:"usageenergykbtu",subtitle:"Examine total energy usage in KBTU",tabTitle:"Energy (KBTU)"},{component:()=>R(qn,{dashboardSlug:"weathernormalizedusage"}),name:"weathernormalizedusage",subtitle:"Analyze usage in relation to changes in weather",tabTitle:"Weather Normalized Usage"},{component:()=>R(qn,{dashboardSlug:"demand"}),name:"demand",subtitle:"Analyze billed and actual demand",tabTitle:"Demand"}],[]);return R(hd,{tabs:t,heading:"Explore usage by utility"})}function jyt(){const{uid:e}=j2(),[t,r]=A.useState(!1),[n,o]=A.useState(!0),[i,a]=A.useState(!1),[s,c]=A.useState(""),[l,u]=A.useState(""),[f,d]=A.useState(!1),[h,p]=A.useState(!1),[g,m]=A.useState(!1),{googleLogin:v,isAuthenticated:y,microsoftLogin:b,signup:w}=on(),E=g4(s,l),I=async()=>{try{const F=await fetch(`/user/${e}/public`);if(!F.ok)throw new Error("unable to get user information");const T=await F.json();p(T.exists),d(T.signedUp)}catch{St.error(bt.ERROR)}finally{o(!1)}};A.useEffect(()=>{o(!0),I()},[e]);const O=async F=>{r(!0),await v(F.credential)||m(!0),r(!1)},D=async F=>{r(!0),await b(F.accessToken)||m(!0),r(!1)},N=async F=>{F.preventDefault();const T=async()=>{await w(e,s)?St.success(bt.SIGNUP_SUCCESS):St.error(bt.ERROR),r(!1)};r(!0),T()},U=F=>{a(!0);const T=F.currentTarget.name,P=F.currentTarget.value;T==="password"?c(P):u(P)},B=E.every(({valid:F})=>F);return y()?R(jm,{to:"/",replace:!0}):!n&&!h||f?R(jm,{to:"/",replace:!0}):R(zr,{children:n?R(Yh,{open:n,children:R(Ri,{"aria-label":"Loading"})}):xe(zr,{children:[R(jt,{variant:"h4",textAlign:"center",marginTop:5,children:"Welcome to Nimble Energy"}),R(jt,{variant:"body1",textAlign:"center",children:"Create a password for your account"}),R("br",{}),R("form",{autoComplete:"off",noValidate:!0,onSubmit:N,children:xe(Jt,{spacing:2,alignItems:"center",children:[R(P8e,{container:!0,xs:12,display:"flex",justifyContent:"center",children:xe(Es,{sx:{padding:1,backgroundColor:"inherit",width:350},variant:"outlined",children:[R(jt,{align:"center",variant:"body2",sx:{display:"flex",alignItems:"center"},children:"Please ensure your password valids the following requirements:"}),R(yo,{sx:{marginY:1}}),E.map(({constraint:F,valid:T})=>xe(jt,{variant:"caption",color:i?`${T?"success":"error"}.main`:"",sx:{display:"flex",alignItems:"center"},children:[R(i?T?XF:KF:GF,{sx:{width:15,marginRight:1}}),F]},F))]})}),R(Xa,{label:"Password*",name:"password",value:s,onChange:U,sx:{width:350},type:"password",variant:"outlined"}),R(Xa,{label:"Confirm password*",name:"confirm",value:l,onChange:U,sx:{width:350},type:"password",variant:"outlined"}),R(Ft,{type:"submit",variant:"contained",disabled:!B,children:"Create Password"}),R(nr,{width:"20rem",children:R(yo,{sx:{mt:1},children:"Or"})}),R(Vie,{logo_alignment:"center",text:"continue_with",width:215,onSuccess:O,onError:()=>{m(!0)}}),R(mae,{onSuccess:D,onError:()=>m(!0)}),g&&R(jt,{textAlign:"center",sx:{color:"error.main"},children:"Unable to sign up. We do not recognize that account."})]})}),R(Yh,{open:t,children:R(Ri,{"aria-label":"Loading"})})]})})}const Vyt=L6e(XR(xe(li,{element:R(uht,{}),errorElement:R(fae,{}),children:[R(li,{path:"/login/forgot-password",element:R(tht,{})}),R(li,{path:"/login/reset-password",element:R(Tht,{})}),R(li,{path:"/login",element:R(iht,{})}),R(li,{path:"/sso",element:R(l9e,{})}),R(li,{path:"/welcome/:uid",element:R(jyt,{})}),xe(li,{element:R(Zat,{}),children:[R(li,{path:"/",element:R(jm,{to:"/summary"})}),R(li,{path:"/administration/:tabName?/:id?",element:R(ust,{})}),R(li,{path:"/billautomation/:tabName?/:id?",element:R(zft,{})}),R(li,{path:"/cost/:tabName?",element:R(Gft,{})}),R(li,{path:"/customdashboards",element:R(cht,{})}),R(li,{path:"/reports/:tabName?",element:R(xht,{})}),R(li,{path:"/smartmeters/:tabName?",element:R(Aht,{})}),R(li,{path:"/summary/:tabName?",element:R(ayt,{})}),R(li,{path:"/support/:tabName?",element:R(uyt,{})}),R(li,{path:"/systemadministration/:tabName?/:id?",element:R(Tyt,{})}),R(li,{path:"/usage/:tabName?",element:R(zyt,{})})]}),R(li,{path:"/bill-image/:id",element:R(Wft,{})}),R(li,{path:"/in-process-bill-image/:id",element:R(nht,{})})]})));function Wyt(){const e=new BRe({defaultOptions:{queries:{retry:3,refetchOnWindowFocus:!1}}});return R(Hyt,{children:R(GRe,{client:e,children:R(Gie,{children:xe(_5e,{maxSnack:3,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"right"},Components:d9e,children:[R(A2,{dateAdapter:Kye,children:R(Hat,{children:R(G6e,{router:Vyt})})}),R(c9e,{})]})})})})}Xw.setLicenseKey("df0f1da7090835169647f6dba20694bcTz05ODM1MCxFPTE3NTgyMjA0MTUwMDAsUz1wcm8sTE09c3Vic2NyaXB0aW9uLFBWPVEzLTIwMjQsS1Y9Mg==");nM.createRoot(document.getElementById("root")).render(R(A.StrictMode,{children:R(Wyt,{})}));
