diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..42041d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +node_modules +.env +.env.development +.env.production +packages/contracts/event_manager/target/ +.spr.yml diff --git a/apps/starkitchen/.gitignore b/apps/starkitchen/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/apps/starkitchen/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/apps/starkitchen/.prettierrc.json b/apps/starkitchen/.prettierrc.json new file mode 100644 index 0000000..4984e01 --- /dev/null +++ b/apps/starkitchen/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "arrowParens": "avoid" +} diff --git a/assets/index-BPTDc82P.js b/assets/index-BPTDc82P.js new file mode 100644 index 0000000..e7aaa97 --- /dev/null +++ b/assets/index-BPTDc82P.js @@ -0,0 +1,493 @@ +var w9=Object.defineProperty;var bA=e=>{throw TypeError(e)};var k9=(e,t,n)=>t in e?w9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ae=(e,t,n)=>k9(e,typeof t!="symbol"?t+"":t,n),Gv=(e,t,n)=>t.has(e)||bA("Cannot "+n);var R=(e,t,n)=>(Gv(e,t,"read from private field"),n?n.call(e):t.get(e)),fe=(e,t,n)=>t.has(e)?bA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ie=(e,t,n,r)=>(Gv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ge=(e,t,n)=>(Gv(e,t,"access private method"),n);var Fp=(e,t,n,r)=>({set _(a){ie(e,t,a,n)},get _(){return R(e,t,r)}});function zM(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();var Ka=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x9(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var $M={exports:{}},Jg={},RM={exports:{}},xe={};/** + * @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 pp=Symbol.for("react.element"),j9=Symbol.for("react.portal"),_9=Symbol.for("react.fragment"),S9=Symbol.for("react.strict_mode"),E9=Symbol.for("react.profiler"),A9=Symbol.for("react.provider"),O9=Symbol.for("react.context"),T9=Symbol.for("react.forward_ref"),C9=Symbol.for("react.suspense"),I9=Symbol.for("react.memo"),P9=Symbol.for("react.lazy"),wA=Symbol.iterator;function N9(e){return e===null||typeof e!="object"?null:(e=wA&&e[wA]||e["@@iterator"],typeof e=="function"?e:null)}var LM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},BM=Object.assign,FM={};function ou(e,t,n){this.props=e,this.context=t,this.refs=FM,this.updater=n||LM}ou.prototype.isReactComponent={};ou.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")};ou.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function UM(){}UM.prototype=ou.prototype;function Qx(e,t,n){this.props=e,this.context=t,this.refs=FM,this.updater=n||LM}var Xx=Qx.prototype=new UM;Xx.constructor=Qx;BM(Xx,ou.prototype);Xx.isPureReactComponent=!0;var kA=Array.isArray,HM=Object.prototype.hasOwnProperty,Jx={current:null},VM={key:!0,ref:!0,__self:!0,__source:!0};function WM(e,t,n){var r,a={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)HM.call(t,r)&&!VM.hasOwnProperty(r)&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=n;else if(1>>1,q=P[W];if(0>>1;Wa(H,U))Ga(Q,H)?(P[W]=Q,P[G]=U,W=G):(P[W]=H,P[$]=U,W=$);else if(Ga(Q,U))P[W]=Q,P[G]=U,W=G;else break e}}return D}function a(P,D){var U=P.sortIndex-D.sortIndex;return U!==0?U:P.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var c=[],l=[],u=1,f=null,d=3,h=!1,g=!1,p=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=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(P){for(var D=n(l);D!==null;){if(D.callback===null)r(l);else if(D.startTime<=P)r(l),D.sortIndex=D.expirationTime,t(c,D);else break;D=n(l)}}function k(P){if(p=!1,b(P),!g)if(n(c)!==null)g=!0,I(w);else{var D=n(l);D!==null&&M(k,D.startTime-P)}}function w(P,D){g=!1,p&&(p=!1,y(S),S=-1),h=!0;var U=d;try{for(b(D),f=n(c);f!==null&&(!(f.expirationTime>D)||P&&!O());){var W=f.callback;if(typeof W=="function"){f.callback=null,d=f.priorityLevel;var q=W(f.expirationTime<=D);D=e.unstable_now(),typeof q=="function"?f.callback=q:f===n(c)&&r(c),b(D)}else r(c);f=n(c)}if(f!==null)var ne=!0;else{var $=n(l);$!==null&&M(k,$.startTime-D),ne=!1}return ne}finally{f=null,d=U,h=!1}}var x=!1,j=null,S=-1,A=5,C=-1;function O(){return!(e.unstable_now()-CP||125W?(P.sortIndex=U,t(l,P),n(c)===null&&P===n(l)&&(p?(y(S),S=-1):p=!0,M(k,U-W))):(P.sortIndex=q,t(c,P),g||h||(g=!0,I(w))),P},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(P){var D=d;return function(){var U=d;d=D;try{return P.apply(this,arguments)}finally{d=U}}}})(ZM);YM.exports=ZM;var W9=YM.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 q9=_,Gn=W9;function ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vw=Object.prototype.hasOwnProperty,G9=/^[: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]*$/,jA={},_A={};function K9(e){return vw.call(_A,e)?!0:vw.call(jA,e)?!1:G9.test(e)?_A[e]=!0:(jA[e]=!0,!1)}function Y9(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Z9(e,t,n,r){if(t===null||typeof t>"u"||Y9(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function vn(e,t,n,r,a,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Jt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Jt[e]=new vn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Jt[t]=new vn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Jt[e]=new vn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Jt[e]=new vn(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){Jt[e]=new vn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Jt[e]=new vn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Jt[e]=new vn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Jt[e]=new vn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Jt[e]=new vn(e,5,!1,e.toLowerCase(),null,!1,!1)});var tj=/[\-:]([a-z])/g;function nj(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(tj,nj);Jt[t]=new vn(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(tj,nj);Jt[t]=new vn(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(tj,nj);Jt[t]=new vn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Jt[e]=new vn(e,1,!1,e.toLowerCase(),null,!1,!1)});Jt.xlinkHref=new vn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Jt[e]=new vn(e,1,!1,e.toLowerCase(),null,!0,!0)});function rj(e,t,n,r){var a=Jt.hasOwnProperty(t)?Jt[t]:null;(a!==null?a.type!==0:r||!(2s||a[i]!==o[s]){var c=` +`+a[i].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=i&&0<=s);break}}}finally{Zv=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?af(e):""}function Q9(e){switch(e.tag){case 5:return af(e.type);case 16:return af("Lazy");case 13:return af("Suspense");case 19:return af("SuspenseList");case 0:case 2:case 15:return e=Qv(e.type,!1),e;case 11:return e=Qv(e.type.render,!1),e;case 1:return e=Qv(e.type,!0),e;default:return""}}function xw(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 bc:return"Fragment";case vc:return"Portal";case bw:return"Profiler";case aj:return"StrictMode";case ww:return"Suspense";case kw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case JM:return(e.displayName||"Context")+".Consumer";case XM:return(e._context.displayName||"Context")+".Provider";case oj:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ij:return t=e.displayName||null,t!==null?t:xw(e.type)||"Memo";case Po:t=e._payload,e=e._init;try{return xw(e(t))}catch{}}return null}function X9(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 xw(t);case 8:return t===aj?"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 hi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J9(e){var t=tD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vp(e){e._valueTracker||(e._valueTracker=J9(e))}function nD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ym(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 jw(e,t){var n=t.checked;return lt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function EA(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rD(e,t){t=t.checked,t!=null&&rj(e,"checked",t,!1)}function _w(e,t){rD(e,t);var n=hi(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sw(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sw(e,t.type,hi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function AA(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Sw(e,t,n){(t!=="number"||ym(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var of=Array.isArray;function zc(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Wp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uf(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vf={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},eH=["Webkit","ms","Moz","O"];Object.keys(vf).forEach(function(e){eH.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vf[t]=vf[e]})});function sD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vf.hasOwnProperty(e)&&vf[e]?(""+t).trim():t+"px"}function cD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,a=sD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,a):e[n]=a}}var tH=lt({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 Ow(e,t){if(t){if(tH[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ee(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ee(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ee(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ee(62))}}function Tw(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 Cw=null;function sj(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Iw=null,$c=null,Rc=null;function CA(e){if(e=gp(e)){if(typeof Iw!="function")throw Error(ee(280));var t=e.stateNode;t&&(t=ay(t),Iw(e.stateNode,e.type,t))}}function lD(e){$c?Rc?Rc.push(e):Rc=[e]:$c=e}function uD(){if($c){var e=$c,t=Rc;if(Rc=$c=null,CA(e),t)for(e=0;e>>=0,e===0?32:31-(dH(e)/pH|0)|0}var qp=64,Gp=4194304;function sf(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 km(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,a=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~a;s!==0?r=sf(s):(o&=i,o!==0&&(r=sf(o)))}else i=n&~a,i!==0?r=sf(i):o!==0&&(r=sf(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&a)&&(a=r&-r,o=t&-t,a>=o||a===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function hp(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dr(t),e[t]=n}function yH(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=wf),LA=" ",BA=!1;function CD(e,t){switch(e){case"keyup":return WH.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ID(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wc=!1;function GH(e,t){switch(e){case"compositionend":return ID(t);case"keypress":return t.which!==32?null:(BA=!0,LA);case"textInput":return e=t.data,e===LA&&BA?null:e;default:return null}}function KH(e,t){if(wc)return e==="compositionend"||!mj&&CD(e,t)?(e=OD(),Hh=dj=Ko=null,wc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=VA(n)}}function DD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?DD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zD(){for(var e=window,t=ym();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ym(e.document)}return t}function gj(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 rV(e){var t=zD(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&DD(n.ownerDocument.documentElement,n)){if(r!==null&&gj(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=n.textContent.length,o=Math.min(r.start,a);r=r.end===void 0?o:Math.min(r.end,a),!e.extend&&o>r&&(a=r,r=o,o=a),a=WA(n,o);var i=WA(n,r);a&&i&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,kc=null,$w=null,xf=null,Rw=!1;function qA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rw||kc==null||kc!==ym(r)||(r=kc,"selectionStart"in r&&gj(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xf&&Kf(xf,r)||(xf=r,r=_m($w,"onSelect"),0_c||(e.current=Vw[_c],Vw[_c]=null,_c--)}function Ke(e,t){_c++,Vw[_c]=e.current,e.current=t}var mi={},an=Ei(mi),Tn=Ei(!1),Os=mi;function gl(e,t){var n=e.type.contextTypes;if(!n)return mi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var a={},o;for(o in n)a[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Cn(e){return e=e.childContextTypes,e!=null}function Em(){et(Tn),et(an)}function JA(e,t,n){if(an.current!==mi)throw Error(ee(168));Ke(an,t),Ke(Tn,n)}function WD(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var a in r)if(!(a in t))throw Error(ee(108,X9(e)||"Unknown",a));return lt({},n,r)}function Am(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mi,Os=an.current,Ke(an,e),Ke(Tn,Tn.current),!0}function e2(e,t,n){var r=e.stateNode;if(!r)throw Error(ee(169));n?(e=WD(e,t,Os),r.__reactInternalMemoizedMergedChildContext=e,et(Tn),et(an),Ke(an,e)):et(Tn),Ke(Tn,n)}var Ha=null,oy=!1,fb=!1;function qD(e){Ha===null?Ha=[e]:Ha.push(e)}function mV(e){oy=!0,qD(e)}function Ai(){if(!fb&&Ha!==null){fb=!0;var e=0,t=Fe;try{var n=Ha;for(Fe=1;e>=i,a-=i,Ya=1<<32-Dr(t)+a|n<S?(A=j,j=null):A=j.sibling;var C=d(y,j,b[S],k);if(C===null){j===null&&(j=A);break}e&&j&&C.alternate===null&&t(y,j),v=o(C,v,S),x===null?w=C:x.sibling=C,x=C,j=A}if(S===b.length)return n(y,j),at&&Ui(y,S),w;if(j===null){for(;SS?(A=j,j=null):A=j.sibling;var O=d(y,j,C.value,k);if(O===null){j===null&&(j=A);break}e&&j&&O.alternate===null&&t(y,j),v=o(O,v,S),x===null?w=O:x.sibling=O,x=O,j=A}if(C.done)return n(y,j),at&&Ui(y,S),w;if(j===null){for(;!C.done;S++,C=b.next())C=f(y,C.value,k),C!==null&&(v=o(C,v,S),x===null?w=C:x.sibling=C,x=C);return at&&Ui(y,S),w}for(j=r(y,j);!C.done;S++,C=b.next())C=h(j,y,S,C.value,k),C!==null&&(e&&C.alternate!==null&&j.delete(C.key===null?S:C.key),v=o(C,v,S),x===null?w=C:x.sibling=C,x=C);return e&&j.forEach(function(N){return t(y,N)}),at&&Ui(y,S),w}function m(y,v,b,k){if(typeof b=="object"&&b!==null&&b.type===bc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Hp:e:{for(var w=b.key,x=v;x!==null;){if(x.key===w){if(w=b.type,w===bc){if(x.tag===7){n(y,x.sibling),v=a(x,b.props.children),v.return=y,y=v;break e}}else if(x.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Po&&r2(w)===x.type){n(y,x.sibling),v=a(x,b.props),v.ref=Lu(y,x,b),v.return=y,y=v;break e}n(y,x);break}else t(y,x);x=x.sibling}b.type===bc?(v=ws(b.props.children,y.mode,k,b.key),v.return=y,y=v):(k=Qh(b.type,b.key,b.props,null,y.mode,k),k.ref=Lu(y,v,b),k.return=y,y=k)}return i(y);case vc:e:{for(x=b.key;v!==null;){if(v.key===x)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(y,v.sibling),v=a(v,b.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=bb(b,y.mode,k),v.return=y,y=v}return i(y);case Po:return x=b._init,m(y,v,x(b._payload),k)}if(of(b))return g(y,v,b,k);if(Mu(b))return p(y,v,b,k);eh(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(y,v.sibling),v=a(v,b),v.return=y,y=v):(n(y,v),v=vb(b,y.mode,k),v.return=y,y=v),i(y)):n(y,v)}return m}var vl=ZD(!0),QD=ZD(!1),Cm=Ei(null),Im=null,Ac=null,wj=null;function kj(){wj=Ac=Im=null}function xj(e){var t=Cm.current;et(Cm),e._currentValue=t}function Gw(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bc(e,t){Im=e,wj=Ac=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jn=!0),e.firstContext=null)}function mr(e){var t=e._currentValue;if(wj!==e)if(e={context:e,memoizedValue:t,next:null},Ac===null){if(Im===null)throw Error(ee(308));Ac=e,Im.dependencies={lanes:0,firstContext:e}}else Ac=Ac.next=e;return t}var ts=null;function jj(e){ts===null?ts=[e]:ts.push(e)}function XD(e,t,n,r){var a=t.interleaved;return a===null?(n.next=n,jj(t)):(n.next=a.next,a.next=n),t.interleaved=n,io(e,r)}function io(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var No=!1;function _j(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function JD(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 Ja(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ri(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ce&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,io(e,n)}return a=r.interleaved,a===null?(t.next=t,jj(r)):(t.next=a.next,a.next=t),r.interleaved=t,io(e,n)}function Wh(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lj(e,n)}}function a2(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?a=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?a=o=t:o=o.next=t}else a=o=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Pm(e,t,n,r){var a=e.updateQueue;No=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var c=s,l=c.next;c.next=null,i===null?o=l:i.next=l,i=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==i&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(o!==null){var f=a.baseState;i=0,u=l=c=null,s=o;do{var d=s.lane,h=s.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,p=s;switch(d=t,h=n,p.tag){case 1:if(g=p.payload,typeof g=="function"){f=g.call(h,f,d);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=p.payload,d=typeof g=="function"?g.call(h,f,d):g,d==null)break e;f=lt({},f,d);break e;case 2:No=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=a.effects,d===null?a.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,i|=d;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;d=s,s=d.next,d.next=null,a.lastBaseUpdate=d,a.shared.pending=null}}while(!0);if(u===null&&(c=f),a.baseState=c,a.firstBaseUpdate=l,a.lastBaseUpdate=u,t=a.shared.interleaved,t!==null){a=t;do i|=a.lane,a=a.next;while(a!==t)}else o===null&&(a.shared.lanes=0);Is|=i,e.lanes=i,e.memoizedState=f}}function o2(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=pb.transition;pb.transition={};try{e(!1),t()}finally{Fe=n,pb.transition=r}}function gz(){return gr().memoizedState}function bV(e,t,n){var r=oi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yz(e))vz(t,n);else if(n=XD(e,t,n,r),n!==null){var a=hn();zr(n,e,r,a),bz(n,t,r)}}function wV(e,t,n){var r=oi(e),a={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yz(e))vz(t,a);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,s=o(i,n);if(a.hasEagerState=!0,a.eagerState=s,Lr(s,i)){var c=t.interleaved;c===null?(a.next=a,jj(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}n=XD(e,t,a,r),n!==null&&(a=hn(),zr(n,e,r,a),bz(n,t,r))}}function yz(e){var t=e.alternate;return e===ct||t!==null&&t===ct}function vz(e,t){jf=Mm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bz(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lj(e,n)}}var Dm={readContext:mr,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useInsertionEffect:en,useLayoutEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useMutableSource:en,useSyncExternalStore:en,useId:en,unstable_isNewReconciler:!1},kV={readContext:mr,useCallback:function(e,t){return Xr().memoizedState=[e,t===void 0?null:t],e},useContext:mr,useEffect:s2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gh(4194308,4,fz.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gh(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gh(4,2,e,t)},useMemo:function(e,t){var n=Xr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Xr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bV.bind(null,ct,e),[r.memoizedState,e]},useRef:function(e){var t=Xr();return e={current:e},t.memoizedState=e},useState:i2,useDebugValue:Pj,useDeferredValue:function(e){return Xr().memoizedState=e},useTransition:function(){var e=i2(!1),t=e[0];return e=vV.bind(null,e[1]),Xr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ct,a=Xr();if(at){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=t(),Ft===null)throw Error(ee(349));Cs&30||rz(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,s2(oz.bind(null,r,o,e),[e]),r.flags|=2048,nd(9,az.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Xr(),t=Ft.identifierPrefix;if(at){var n=Za,r=Ya;n=(r&~(1<<32-Dr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ed++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[sa]=t,e[Qf]=r,Tz(e,t,!1,!1),t.stateNode=e;e:{switch(i=Tw(n,r),n){case"dialog":Qe("cancel",e),Qe("close",e),a=r;break;case"iframe":case"object":case"embed":Qe("load",e),a=r;break;case"video":case"audio":for(a=0;akl&&(t.flags|=128,r=!0,Bu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Nm(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!at)return tn(t),null}else 2*mt()-o.renderingStartTime>kl&&n!==1073741824&&(t.flags|=128,r=!0,Bu(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=mt(),t.sibling=null,n=st.current,Ke(st,r?n&1|2:n&1),t):(tn(t),null);case 22:case 23:return Rj(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$n&1073741824&&(tn(t),t.subtreeFlags&6&&(t.flags|=8192)):tn(t),null;case 24:return null;case 25:return null}throw Error(ee(156,t.tag))}function TV(e,t){switch(vj(t),t.tag){case 1:return Cn(t.type)&&Em(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bl(),et(Tn),et(an),Aj(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ej(t),null;case 13:if(et(st),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ee(340));yl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return et(st),null;case 4:return bl(),null;case 10:return xj(t.type._context),null;case 22:case 23:return Rj(),null;case 24:return null;default:return null}}var nh=!1,rn=!1,CV=typeof WeakSet=="function"?WeakSet:Set,le=null;function Oc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){dt(e,t,r)}else n.current=null}function n1(e,t,n){try{n()}catch(r){dt(e,t,r)}}var v2=!1;function IV(e,t){if(Lw=xm,e=zD(),gj(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,s=-1,c=-1,l=0,u=0,f=e,d=null;t:for(;;){for(var h;f!==n||a!==0&&f.nodeType!==3||(s=i+a),f!==o||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++l===a&&(s=i),d===o&&++u===r&&(c=i),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bw={focusedElem:e,selectionRange:n},xm=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var p=g.memoizedProps,m=g.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?p:_r(t.type,p),m);y.__reactInternalSnapshotBeforeUpdate=v}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(ee(163))}}catch(k){dt(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return g=v2,v2=!1,g}function _f(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&e)===e){var o=a.destroy;a.destroy=void 0,o!==void 0&&n1(t,n,o)}a=a.next}while(a!==r)}}function cy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function r1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Pz(e){var t=e.alternate;t!==null&&(e.alternate=null,Pz(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[sa],delete t[Qf],delete t[Hw],delete t[pV],delete t[hV])),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 Nz(e){return e.tag===5||e.tag===3||e.tag===4}function b2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nz(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 a1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Sm));else if(r!==4&&(e=e.child,e!==null))for(a1(e,t,n),e=e.sibling;e!==null;)a1(e,t,n),e=e.sibling}function o1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(o1(e,t,n),e=e.sibling;e!==null;)o1(e,t,n),e=e.sibling}var Gt=null,Ar=!1;function ko(e,t,n){for(n=n.child;n!==null;)Mz(e,t,n),n=n.sibling}function Mz(e,t,n){if(ha&&typeof ha.onCommitFiberUnmount=="function")try{ha.onCommitFiberUnmount(ey,n)}catch{}switch(n.tag){case 5:rn||Oc(n,t);case 6:var r=Gt,a=Ar;Gt=null,ko(e,t,n),Gt=r,Ar=a,Gt!==null&&(Ar?(e=Gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Gt.removeChild(n.stateNode));break;case 18:Gt!==null&&(Ar?(e=Gt,n=n.stateNode,e.nodeType===8?ub(e.parentNode,n):e.nodeType===1&&ub(e,n),qf(e)):ub(Gt,n.stateNode));break;case 4:r=Gt,a=Ar,Gt=n.stateNode.containerInfo,Ar=!0,ko(e,t,n),Gt=r,Ar=a;break;case 0:case 11:case 14:case 15:if(!rn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){a=r=r.next;do{var o=a,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&n1(n,t,i),a=a.next}while(a!==r)}ko(e,t,n);break;case 1:if(!rn&&(Oc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){dt(n,t,s)}ko(e,t,n);break;case 21:ko(e,t,n);break;case 22:n.mode&1?(rn=(r=rn)||n.memoizedState!==null,ko(e,t,n),rn=r):ko(e,t,n);break;default:ko(e,t,n)}}function w2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new CV),t.forEach(function(r){var a=BV.bind(null,e,r);n.has(r)||(n.add(r),r.then(a,a))})}}function kr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ra&&(a=i),r&=~o}if(r=a,r=mt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NV(r/1960))-r,10e?16:e,Yo===null)var r=!1;else{if(e=Yo,Yo=null,Rm=0,Ce&6)throw Error(ee(331));var a=Ce;for(Ce|=4,le=e.current;le!==null;){var o=le,i=o.child;if(le.flags&16){var s=o.deletions;if(s!==null){for(var c=0;cmt()-zj?bs(e,0):Dj|=n),In(e,t)}function Uz(e,t){t===0&&(e.mode&1?(t=Gp,Gp<<=1,!(Gp&130023424)&&(Gp=4194304)):t=1);var n=hn();e=io(e,t),e!==null&&(hp(e,t,n),In(e,n))}function LV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Uz(e,n)}function BV(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ee(314))}r!==null&&r.delete(t),Uz(e,n)}var Hz;Hz=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tn.current)jn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jn=!1,AV(e,t,n);jn=!!(e.flags&131072)}else jn=!1,at&&t.flags&1048576&&GD(t,Tm,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Kh(e,t),e=t.pendingProps;var a=gl(t,an.current);Bc(t,n),a=Tj(null,t,r,e,a,n);var o=Cj();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Cn(r)?(o=!0,Am(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,_j(t),a.updater=sy,t.stateNode=a,a._reactInternals=t,Yw(t,r,e,n),t=Xw(null,t,r,!0,o,n)):(t.tag=0,at&&o&&yj(t),ln(null,t,a,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Kh(e,t),e=t.pendingProps,a=r._init,r=a(r._payload),t.type=r,a=t.tag=UV(r),e=_r(r,e),a){case 0:t=Qw(null,t,r,e,n);break e;case 1:t=m2(null,t,r,e,n);break e;case 11:t=p2(null,t,r,e,n);break e;case 14:t=h2(null,t,r,_r(r.type,e),n);break e}throw Error(ee(306,r,""))}return t;case 0:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:_r(r,a),Qw(e,t,r,a,n);case 1:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:_r(r,a),m2(e,t,r,a,n);case 3:e:{if(Ez(t),e===null)throw Error(ee(387));r=t.pendingProps,o=t.memoizedState,a=o.element,JD(e,t),Pm(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=wl(Error(ee(423)),t),t=g2(e,t,r,n,a);break e}else if(r!==a){a=wl(Error(ee(424)),t),t=g2(e,t,r,n,a);break e}else for(Hn=ni(t.stateNode.containerInfo.firstChild),Wn=t,at=!0,Or=null,n=QD(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yl(),r===a){t=so(e,t,n);break e}ln(e,t,r,n)}t=t.child}return t;case 5:return ez(t),e===null&&qw(t),r=t.type,a=t.pendingProps,o=e!==null?e.memoizedProps:null,i=a.children,Fw(r,a)?i=null:o!==null&&Fw(r,o)&&(t.flags|=32),Sz(e,t),ln(e,t,i,n),t.child;case 6:return e===null&&qw(t),null;case 13:return Az(e,t,n);case 4:return Sj(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vl(t,null,r,n):ln(e,t,r,n),t.child;case 11:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:_r(r,a),p2(e,t,r,a,n);case 7:return ln(e,t,t.pendingProps,n),t.child;case 8:return ln(e,t,t.pendingProps.children,n),t.child;case 12:return ln(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,a=t.pendingProps,o=t.memoizedProps,i=a.value,Ke(Cm,r._currentValue),r._currentValue=i,o!==null)if(Lr(o.value,i)){if(o.children===a.children&&!Tn.current){t=so(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){i=o.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Ja(-1,n&-n),c.tag=2;var l=o.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}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Gw(o.return,n,t),s.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(ee(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Gw(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ln(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,r=t.pendingProps.children,Bc(t,n),a=mr(a),r=r(a),t.flags|=1,ln(e,t,r,n),t.child;case 14:return r=t.type,a=_r(r,t.pendingProps),a=_r(r.type,a),h2(e,t,r,a,n);case 15:return jz(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,a=t.pendingProps,a=t.elementType===r?a:_r(r,a),Kh(e,t),t.tag=1,Cn(r)?(e=!0,Am(t)):e=!1,Bc(t,n),wz(t,r,a),Yw(t,r,a,n),Xw(null,t,r,!0,e,n);case 19:return Oz(e,t,n);case 22:return _z(e,t,n)}throw Error(ee(156,t.tag))};function Vz(e,t){return yD(e,t)}function FV(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(e,t,n,r){return new FV(e,t,n,r)}function Bj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function UV(e){if(typeof e=="function")return Bj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oj)return 11;if(e===ij)return 14}return 2}function ii(e,t){var n=e.alternate;return n===null?(n=fr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Qh(e,t,n,r,a,o){var i=2;if(r=e,typeof e=="function")Bj(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case bc:return ws(n.children,a,o,t);case aj:i=8,a|=8;break;case bw:return e=fr(12,n,t,a|2),e.elementType=bw,e.lanes=o,e;case ww:return e=fr(13,n,t,a),e.elementType=ww,e.lanes=o,e;case kw:return e=fr(19,n,t,a),e.elementType=kw,e.lanes=o,e;case eD:return uy(n,a,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case XM:i=10;break e;case JM:i=9;break e;case oj:i=11;break e;case ij:i=14;break e;case Po:i=16,r=null;break e}throw Error(ee(130,e==null?e:typeof e,""))}return t=fr(i,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ws(e,t,n,r){return e=fr(7,e,r,t),e.lanes=n,e}function uy(e,t,n,r){return e=fr(22,e,r,t),e.elementType=eD,e.lanes=n,e.stateNode={isHidden:!1},e}function vb(e,t,n){return e=fr(6,e,null,t),e.lanes=n,e}function bb(e,t,n){return t=fr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function HV(e,t,n,r,a){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=Jv(0),this.expirationTimes=Jv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jv(0),this.identifierPrefix=r,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Fj(e,t,n,r,a,o,i,s,c){return e=new HV(e,t,n,s,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=fr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},_j(o),e}function VV(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kz)}catch(e){console.error(e)}}Kz(),KM.exports=Kn;var cu=KM.exports;const YV=ze(cu);var Wj,O2=cu;Wj=O2.createRoot,O2.hydrateRoot;/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yz=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var QV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const XV=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...s},c)=>_.createElement("svg",{ref:c,...QV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Yz("lucide",a),...s},[...i.map(([l,u])=>_.createElement(l,u)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ht=(e,t)=>{const n=_.forwardRef(({className:r,...a},o)=>_.createElement(XV,{ref:o,iconNode:t,className:Yz(`lucide-${ZV(e)}`,r),...a}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JV=Ht("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e7=Ht("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zz=Ht("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qz=Ht("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t7=Ht("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n7=Ht("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r7=Ht("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a7=Ht("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xz=Ht("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const o7=Ht("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const i7=Ht("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s7=Ht("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c7=Ht("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jz=Ht("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l7=Ht("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u7=Ht("Utensils",[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f7=Ht("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** + * @license lucide-react v0.456.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d7=Ht("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function p7(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function e3(...e){return t=>e.forEach(n=>p7(n,t))}function it(...e){return _.useCallback(e3(...e),e)}var Ns=_.forwardRef((e,t)=>{const{children:n,...r}=e,a=_.Children.toArray(n),o=a.find(h7);if(o){const i=o.props.children,s=a.map(c=>c===o?_.Children.count(i)>1?_.Children.only(null):_.isValidElement(i)?i.props.children:null:c);return E.jsx(u1,{...r,ref:t,children:_.isValidElement(i)?_.cloneElement(i,void 0,s):null})}return E.jsx(u1,{...r,ref:t,children:n})});Ns.displayName="Slot";var u1=_.forwardRef((e,t)=>{const{children:n,...r}=e;if(_.isValidElement(n)){const a=g7(n);return _.cloneElement(n,{...m7(r,n.props),ref:t?e3(t,a):a})}return _.Children.count(n)>1?_.Children.only(null):null});u1.displayName="SlotClone";var t3=({children:e})=>E.jsx(E.Fragment,{children:e});function h7(e){return _.isValidElement(e)&&e.type===t3}function m7(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...s)=>{o(...s),a(...s)}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function g7(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function n3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,C2=y7,r3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return C2(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,i=Object.keys(a).map(l=>{const u=n==null?void 0:n[l],f=o==null?void 0:o[l];if(u===null)return null;const d=T2(u)||T2(f);return a[l][d]}),s=n&&Object.entries(n).reduce((l,u)=>{let[f,d]=u;return d===void 0||(l[f]=d),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(g=>{let[p,m]=g;return Array.isArray(m)?m.includes({...o,...s}[p]):{...o,...s}[p]===m})?[...l,f,d]:l},[]);return C2(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)};function a3(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t=w7(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(qj);return s[0]===""&&s.length!==1&&s.shift(),o3(s,t)||b7(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},o3=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?o3(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const o=e.join(qj);return(i=t.validators.find(({validator:s})=>s(o)))==null?void 0:i.classGroupId},I2=/^\[(.+)\]$/,b7=e=>{if(I2.test(e)){const t=I2.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},w7=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return x7(Object.entries(e.classGroups),n).forEach(([o,i])=>{f1(i,r,o,t)}),r},f1=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const o=a===""?t:P2(t,a);o.classGroupId=n;return}if(typeof a=="function"){if(k7(a)){f1(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([o,i])=>{f1(i,P2(t,o),n,r)})})},P2=(e,t)=>{let n=e;return t.split(qj).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},k7=e=>e.isThemeGetter,x7=(e,t)=>t?e.map(([n,r])=>{const a=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,s])=>[t+i,s])):o);return[n,a]}):e,j7=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return a(o,i),i},set(o,i){n.has(o)?n.set(o,i):a(o,i)}}},i3="!",_7=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],o=t.length,i=s=>{const c=[];let l=0,u=0,f;for(let m=0;mu?f-u:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:p}};return n?s=>n({className:s,parseClassName:i}):i},S7=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},E7=e=>({cache:j7(e.cacheSize),parseClassName:_7(e),...v7(e)}),A7=/\s+/,O7=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,o=[],i=e.trim().split(A7);let s="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:u,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}=n(l);let g=!!h,p=r(g?d.substring(0,h):d);if(!p){if(!g){s=l+(s.length>0?" "+s:s);continue}if(p=r(d),!p){s=l+(s.length>0?" "+s:s);continue}g=!1}const m=S7(u).join(":"),y=f?m+i3:m,v=y+p;if(o.includes(v))continue;o.push(v);const b=a(p,g);for(let k=0;k0?" "+s:s)}return s};function T7(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(u),e());return n=E7(l),r=n.cache.get,a=n.cache.set,o=s,s(c)}function s(c){const l=r(c);if(l)return l;const u=O7(c,n);return a(c,u),u}return function(){return o(T7.apply(null,arguments))}}const Ze=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},c3=/^\[(?:([a-z-]+):)?(.+)\]$/i,I7=/^\d+\/\d+$/,P7=new Set(["px","full","screen"]),N7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,M7=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,D7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,z7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Na=e=>Uc(e)||P7.has(e)||I7.test(e),xo=e=>lu(e,"length",W7),Uc=e=>!!e&&!Number.isNaN(Number(e)),wb=e=>lu(e,"number",Uc),Uu=e=>!!e&&Number.isInteger(Number(e)),R7=e=>e.endsWith("%")&&Uc(e.slice(0,-1)),he=e=>c3.test(e),jo=e=>N7.test(e),L7=new Set(["length","size","percentage"]),B7=e=>lu(e,L7,l3),F7=e=>lu(e,"position",l3),U7=new Set(["image","url"]),H7=e=>lu(e,U7,G7),V7=e=>lu(e,"",q7),Hu=()=>!0,lu=(e,t,n)=>{const r=c3.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},W7=e=>M7.test(e)&&!D7.test(e),l3=()=>!1,q7=e=>z7.test(e),G7=e=>$7.test(e),K7=()=>{const e=Ze("colors"),t=Ze("spacing"),n=Ze("blur"),r=Ze("brightness"),a=Ze("borderColor"),o=Ze("borderRadius"),i=Ze("borderSpacing"),s=Ze("borderWidth"),c=Ze("contrast"),l=Ze("grayscale"),u=Ze("hueRotate"),f=Ze("invert"),d=Ze("gap"),h=Ze("gradientColorStops"),g=Ze("gradientColorStopPositions"),p=Ze("inset"),m=Ze("margin"),y=Ze("opacity"),v=Ze("padding"),b=Ze("saturate"),k=Ze("scale"),w=Ze("sepia"),x=Ze("skew"),j=Ze("space"),S=Ze("translate"),A=()=>["auto","contain","none"],C=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",he,t],N=()=>[he,t],L=()=>["",Na,xo],z=()=>["auto",Uc,he],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",he],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Uc,he];return{cacheSize:500,separator:":",theme:{colors:[Hu],spacing:[Na,xo],blur:["none","",jo,he],brightness:W(),borderColor:[e],borderRadius:["none","","full",jo,he],borderSpacing:N(),borderWidth:L(),contrast:W(),grayscale:D(),hueRotate:W(),invert:D(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[R7,xo],inset:O(),margin:O(),opacity:W(),padding:N(),saturate:W(),scale:W(),sepia:D(),skew:W(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[jo]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),he]}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Uu,he]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",Uu,he]}],"grid-cols":[{"grid-cols":[Hu]}],"col-start-end":[{col:["auto",{span:["full",Uu,he]},he]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Hu]}],"row-start-end":[{row:["auto",{span:[Uu,he]},he]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[jo]},jo]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",jo,xo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wb]}],"font-family":[{font:[Hu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",Uc,wb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Na,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Na,xo]}],"underline-offset":[{"underline-offset":["auto",Na,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),F7]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",B7]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},H7]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:I()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Na,he]}],"outline-w":[{outline:[Na,xo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[Na,xo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",jo,V7]}],"shadow-color":[{shadow:[Hu]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",jo,he]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Uu,he]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[x]}],"skew-y":[{"skew-y":[x]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Na,xo,wb]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Y7=C7(K7);function be(...e){return Y7(Ie(e))}const Gj=r3("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),si=_.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},o)=>{const i=r?Ns:"button";return E.jsx(i,{className:be(Gj({variant:t,size:n,className:e})),ref:o,...a})});si.displayName="Button";function Z7(e,t){const n=_.createContext(t),r=o=>{const{children:i,...s}=o,c=_.useMemo(()=>s,Object.values(s));return E.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function a(o){const i=_.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,a]}function my(e,t=[]){let n=[];function r(o,i){const s=_.createContext(i),c=n.length;n=[...n,i];const l=f=>{var y;const{scope:d,children:h,...g}=f,p=((y=d==null?void 0:d[e])==null?void 0:y[c])||s,m=_.useMemo(()=>g,Object.values(g));return E.jsx(p.Provider,{value:m,children:h})};l.displayName=o+"Provider";function u(f,d){var p;const h=((p=d==null?void 0:d[e])==null?void 0:p[c])||s,g=_.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,u]}const a=()=>{const o=n.map(i=>_.createContext(i));return function(s){const c=(s==null?void 0:s[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return a.scopeName=e,[r,Q7(a,...t)]}function Q7(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const i=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...s,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var gn=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},X7=R9.useId||(()=>{}),J7=0;function ci(e){const[t,n]=_.useState(X7());return gn(()=>{e||n(r=>r??String(J7++))},[e]),e||(t?`radix-${t}`:"")}function _a(e){const t=_.useRef(e);return _.useEffect(()=>{t.current=e}),_.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function ad({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=eW({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,s=_a(n),c=_.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else a(l)},[o,e,a,s]);return[i,c]}function eW({defaultProp:e,onChange:t}){const n=_.useState(e),[r]=n,a=_.useRef(r),o=_a(t);return _.useEffect(()=>{a.current!==r&&(o(r),a.current=r)},[r,a,o]),n}var tW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$e=tW.reduce((e,t)=>{const n=_.forwardRef((r,a)=>{const{asChild:o,...i}=r,s=o?Ns:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nW(e,t){e&&cu.flushSync(()=>e.dispatchEvent(t))}function rW(e,t=globalThis==null?void 0:globalThis.document){const n=_a(e);_.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var aW="DismissableLayer",d1="dismissableLayer.update",oW="dismissableLayer.pointerDownOutside",iW="dismissableLayer.focusOutside",N2,u3=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Kj=_.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...c}=e,l=_.useContext(u3),[u,f]=_.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=_.useState({}),g=it(t,j=>f(j)),p=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(m),v=u?p.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,k=v>=y,w=lW(j=>{const S=j.target,A=[...l.branches].some(C=>C.contains(S));!k||A||(a==null||a(j),i==null||i(j),j.defaultPrevented||s==null||s())},d),x=uW(j=>{const S=j.target;[...l.branches].some(C=>C.contains(S))||(o==null||o(j),i==null||i(j),j.defaultPrevented||s==null||s())},d);return rW(j=>{v===l.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&s&&(j.preventDefault(),s()))},d),_.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(N2=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),M2(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=N2)}},[u,d,n,l]),_.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),M2())},[u,l]),_.useEffect(()=>{const j=()=>h({});return document.addEventListener(d1,j),()=>document.removeEventListener(d1,j)},[]),E.jsx($e.div,{...c,ref:g,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:Ee(e.onFocusCapture,x.onFocusCapture),onBlurCapture:Ee(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:Ee(e.onPointerDownCapture,w.onPointerDownCapture)})});Kj.displayName=aW;var sW="DismissableLayerBranch",cW=_.forwardRef((e,t)=>{const n=_.useContext(u3),r=_.useRef(null),a=it(t,r);return _.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),E.jsx($e.div,{...e,ref:a})});cW.displayName=sW;function lW(e,t=globalThis==null?void 0:globalThis.document){const n=_a(e),r=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let c=function(){f3(oW,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function uW(e,t=globalThis==null?void 0:globalThis.document){const n=_a(e),r=_.useRef(!1);return _.useEffect(()=>{const a=o=>{o.target&&!r.current&&f3(iW,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function M2(){const e=new CustomEvent(d1);document.dispatchEvent(e)}function f3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?nW(a,o):a.dispatchEvent(o)}var kb="focusScope.autoFocusOnMount",xb="focusScope.autoFocusOnUnmount",D2={bubbles:!1,cancelable:!0},fW="FocusScope",Yj=_.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,c]=_.useState(null),l=_a(a),u=_a(o),f=_.useRef(null),d=it(t,p=>c(p)),h=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let p=function(b){if(h.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:Co(f.current,{select:!0})},m=function(b){if(h.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||Co(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const w of b)w.removedNodes.length>0&&Co(s)};document.addEventListener("focusin",p),document.addEventListener("focusout",m);const v=new MutationObserver(y);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",m),v.disconnect()}}},[r,s,h.paused]),_.useEffect(()=>{if(s){$2.add(h);const p=document.activeElement;if(!s.contains(p)){const y=new CustomEvent(kb,D2);s.addEventListener(kb,l),s.dispatchEvent(y),y.defaultPrevented||(dW(yW(d3(s)),{select:!0}),document.activeElement===p&&Co(s))}return()=>{s.removeEventListener(kb,l),setTimeout(()=>{const y=new CustomEvent(xb,D2);s.addEventListener(xb,u),s.dispatchEvent(y),y.defaultPrevented||Co(p??document.body,{select:!0}),s.removeEventListener(xb,u),$2.remove(h)},0)}}},[s,l,u,h]);const g=_.useCallback(p=>{if(!n&&!r||h.paused)return;const m=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(m&&y){const v=p.currentTarget,[b,k]=pW(v);b&&k?!p.shiftKey&&y===k?(p.preventDefault(),n&&Co(b,{select:!0})):p.shiftKey&&y===b&&(p.preventDefault(),n&&Co(k,{select:!0})):y===v&&p.preventDefault()}},[n,r,h.paused]);return E.jsx($e.div,{tabIndex:-1,...i,ref:d,onKeyDown:g})});Yj.displayName=fW;function dW(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Co(r,{select:t}),document.activeElement!==n)return}function pW(e){const t=d3(e),n=z2(t,e),r=z2(t.reverse(),e);return[n,r]}function d3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function z2(e,t){for(const n of e)if(!hW(n,{upTo:t}))return n}function hW(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mW(e){return e instanceof HTMLInputElement&&"select"in e}function Co(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mW(e)&&t&&e.select()}}var $2=gW();function gW(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=R2(e,t),e.unshift(t)},remove(t){var n;e=R2(e,t),(n=e[0])==null||n.resume()}}}function R2(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yW(e){return e.filter(t=>t.tagName!=="A")}var vW="Portal",Zj=_.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[a,o]=_.useState(!1);gn(()=>o(!0),[]);const i=n||a&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?YV.createPortal(E.jsx($e.div,{...r,ref:t}),i):null});Zj.displayName=vW;function bW(e,t){return _.useReducer((n,r)=>t[n][r]??n,e)}var vp=e=>{const{present:t,children:n}=e,r=wW(t),a=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),o=it(r.ref,kW(a));return typeof n=="function"||r.isPresent?_.cloneElement(a,{ref:o}):null};vp.displayName="Presence";function wW(e){const[t,n]=_.useState(),r=_.useRef({}),a=_.useRef(e),o=_.useRef("none"),i=e?"mounted":"unmounted",[s,c]=bW(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const l=oh(r.current);o.current=s==="mounted"?l:"none"},[s]),gn(()=>{const l=r.current,u=a.current;if(u!==e){const d=o.current,h=oh(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),gn(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=h=>{const p=oh(r.current).includes(h.animationName);if(h.target===t&&p&&(c("ANIMATION_END"),!a.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},d=h=>{h.target===t&&(o.current=oh(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:_.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function oh(e){return(e==null?void 0:e.animationName)||"none"}function kW(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jb=0;function p3(){_.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??L2()),document.body.insertAdjacentElement("beforeend",e[1]??L2()),jb++,()=>{jb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),jb--}},[])}function L2(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ca=function(){return ca=Object.assign||function(t){for(var n,r=1,a=arguments.length;r"u")return RW;var t=LW(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},FW=y3(),Hc="data-scroll-locked",UW=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(jW,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body[`).concat(Hc,`] { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(a,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(i,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(Xh,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Jh,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(Xh," .").concat(Xh,` { + right: 0 `).concat(r,`; + } + + .`).concat(Jh," .").concat(Jh,` { + margin-right: 0 `).concat(r,`; + } + + body[`).concat(Hc,`] { + `).concat(_W,": ").concat(s,`px; + } +`)},F2=function(){var e=parseInt(document.body.getAttribute(Hc)||"0",10);return isFinite(e)?e:0},HW=function(){_.useEffect(function(){return document.body.setAttribute(Hc,(F2()+1).toString()),function(){var e=F2()-1;e<=0?document.body.removeAttribute(Hc):document.body.setAttribute(Hc,e.toString())}},[])},VW=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;HW();var o=_.useMemo(function(){return BW(a)},[a]);return _.createElement(FW,{styles:UW(o,!t,a,n?"":"!important")})},p1=!1;if(typeof window<"u")try{var ih=Object.defineProperty({},"passive",{get:function(){return p1=!0,!0}});window.addEventListener("test",ih,ih),window.removeEventListener("test",ih,ih)}catch{p1=!1}var lc=p1?{passive:!1}:!1,WW=function(e){return e.tagName==="TEXTAREA"},v3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!WW(e)&&n[t]==="visible")},qW=function(e){return v3(e,"overflowY")},GW=function(e){return v3(e,"overflowX")},U2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=b3(e,r);if(a){var o=w3(e,r),i=o[1],s=o[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},KW=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},YW=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},b3=function(e,t){return e==="v"?qW(t):GW(t)},w3=function(e,t){return e==="v"?KW(t):YW(t)},ZW=function(e,t){return e==="h"&&t==="rtl"?-1:1},QW=function(e,t,n,r,a){var o=ZW(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,c=t.contains(s),l=!1,u=i>0,f=0,d=0;do{var h=w3(e,s),g=h[0],p=h[1],m=h[2],y=p-m-o*g;(g||y)&&b3(e,s)&&(f+=y,d+=g),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(Math.abs(f)<1||!a)||!u&&(Math.abs(d)<1||!a))&&(l=!0),l},sh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H2=function(e){return[e.deltaX,e.deltaY]},V2=function(e){return e&&"current"in e?e.current:e},XW=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JW=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},eq=0,uc=[];function tq(e){var t=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),a=_.useState(eq++)[0],o=_.useState(y3)[0],i=_.useRef(e);_.useEffect(function(){i.current=e},[e]),_.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var p=xW([e.lockRef.current],(e.shards||[]).map(V2),!0).filter(Boolean);return p.forEach(function(m){return m.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),p.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=_.useCallback(function(p,m){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var y=sh(p),v=n.current,b="deltaX"in p?p.deltaX:v[0]-y[0],k="deltaY"in p?p.deltaY:v[1]-y[1],w,x=p.target,j=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in p&&j==="h"&&x.type==="range")return!1;var S=U2(j,x);if(!S)return!0;if(S?w=j:(w=j==="v"?"h":"v",S=U2(j,x)),!S)return!1;if(!r.current&&"changedTouches"in p&&(b||k)&&(r.current=w),!w)return!0;var A=r.current||w;return QW(A,m,p,A==="h"?b:k,!0)},[]),c=_.useCallback(function(p){var m=p;if(!(!uc.length||uc[uc.length-1]!==o)){var y="deltaY"in m?H2(m):sh(m),v=t.current.filter(function(w){return w.name===m.type&&(w.target===m.target||m.target===w.shadowParent)&&XW(w.delta,y)})[0];if(v&&v.should){m.cancelable&&m.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(V2).filter(Boolean).filter(function(w){return w.contains(m.target)}),k=b.length>0?s(m,b[0]):!i.current.noIsolation;k&&m.cancelable&&m.preventDefault()}}},[]),l=_.useCallback(function(p,m,y,v){var b={name:p,delta:m,target:y,should:v,shadowParent:nq(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=_.useCallback(function(p){n.current=sh(p),r.current=void 0},[]),f=_.useCallback(function(p){l(p.type,H2(p),p.target,s(p,e.lockRef.current))},[]),d=_.useCallback(function(p){l(p.type,sh(p),p.target,s(p,e.lockRef.current))},[]);_.useEffect(function(){return uc.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,lc),document.addEventListener("touchmove",c,lc),document.addEventListener("touchstart",u,lc),function(){uc=uc.filter(function(p){return p!==o}),document.removeEventListener("wheel",c,lc),document.removeEventListener("touchmove",c,lc),document.removeEventListener("touchstart",u,lc)}},[]);var h=e.removeScrollBar,g=e.inert;return _.createElement(_.Fragment,null,g?_.createElement(o,{styles:JW(a)}):null,h?_.createElement(VW,{gapMode:e.gapMode}):null)}function nq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rq=IW(g3,tq);var Qj=_.forwardRef(function(e,t){return _.createElement(gy,ca({},e,{ref:t,sideCar:rq}))});Qj.classNames=gy.classNames;var aq=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fc=new WeakMap,ch=new WeakMap,lh={},Ab=0,k3=function(e){return e&&(e.host||k3(e.parentNode))},oq=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=k3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},iq=function(e,t,n,r){var a=oq(t,Array.isArray(e)?e:[e]);lh[n]||(lh[n]=new WeakMap);var o=lh[n],i=[],s=new Set,c=new Set(a),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};a.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))u(d);else try{var h=d.getAttribute(r),g=h!==null&&h!=="false",p=(fc.get(d)||0)+1,m=(o.get(d)||0)+1;fc.set(d,p),o.set(d,m),i.push(d),p===1&&g&&ch.set(d,!0),m===1&&d.setAttribute(n,"true"),g||d.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",d,y)}})};return u(t),s.clear(),Ab++,function(){i.forEach(function(f){var d=fc.get(f)-1,h=o.get(f)-1;fc.set(f,d),o.set(f,h),d||(ch.has(f)||f.removeAttribute(r),ch.delete(f)),h||f.removeAttribute(n)}),Ab--,Ab||(fc=new WeakMap,fc=new WeakMap,ch=new WeakMap,lh={})}},x3=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=aq(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),iq(r,a,n,"aria-hidden")):function(){return null}},Xj="Dialog",[j3,_3]=my(Xj),[sq,Ur]=j3(Xj),S3=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=_.useRef(null),c=_.useRef(null),[l=!1,u]=ad({prop:r,defaultProp:a,onChange:o});return E.jsx(sq,{scope:t,triggerRef:s,contentRef:c,contentId:ci(),titleId:ci(),descriptionId:ci(),open:l,onOpenChange:u,onOpenToggle:_.useCallback(()=>u(f=>!f),[u]),modal:i,children:n})};S3.displayName=Xj;var E3="DialogTrigger",A3=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ur(E3,n),o=it(t,a.triggerRef);return E.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":t_(a.open),...r,ref:o,onClick:Ee(e.onClick,a.onOpenToggle)})});A3.displayName=E3;var Jj="DialogPortal",[cq,O3]=j3(Jj,{forceMount:void 0}),T3=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Ur(Jj,t);return E.jsx(cq,{scope:t,forceMount:n,children:_.Children.map(r,i=>E.jsx(vp,{present:n||o.open,children:E.jsx(Zj,{asChild:!0,container:a,children:i})}))})};T3.displayName=Jj;var Fm="DialogOverlay",C3=_.forwardRef((e,t)=>{const n=O3(Fm,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ur(Fm,e.__scopeDialog);return o.modal?E.jsx(vp,{present:r||o.open,children:E.jsx(lq,{...a,ref:t})}):null});C3.displayName=Fm;var lq=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ur(Fm,n);return E.jsx(Qj,{as:Ns,allowPinchZoom:!0,shards:[a.contentRef],children:E.jsx($e.div,{"data-state":t_(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ms="DialogContent",I3=_.forwardRef((e,t)=>{const n=O3(Ms,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Ur(Ms,e.__scopeDialog);return E.jsx(vp,{present:r||o.open,children:o.modal?E.jsx(uq,{...a,ref:t}):E.jsx(fq,{...a,ref:t})})});I3.displayName=Ms;var uq=_.forwardRef((e,t)=>{const n=Ur(Ms,e.__scopeDialog),r=_.useRef(null),a=it(t,n.contentRef,r);return _.useEffect(()=>{const o=r.current;if(o)return x3(o)},[]),E.jsx(P3,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&o.preventDefault()}),onFocusOutside:Ee(e.onFocusOutside,o=>o.preventDefault())})}),fq=_.forwardRef((e,t)=>{const n=Ur(Ms,e.__scopeDialog),r=_.useRef(!1),a=_.useRef(!1);return E.jsx(P3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=o.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),P3=_.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=Ur(Ms,n),c=_.useRef(null),l=it(t,c);return p3(),E.jsxs(E.Fragment,{children:[E.jsx(Yj,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:E.jsx(Kj,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":t_(s.open),...i,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(pq,{titleId:s.titleId}),E.jsx(mq,{contentRef:c,descriptionId:s.descriptionId})]})]})}),e_="DialogTitle",N3=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ur(e_,n);return E.jsx($e.h2,{id:a.titleId,...r,ref:t})});N3.displayName=e_;var M3="DialogDescription",D3=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ur(M3,n);return E.jsx($e.p,{id:a.descriptionId,...r,ref:t})});D3.displayName=M3;var z3="DialogClose",$3=_.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ur(z3,n);return E.jsx($e.button,{type:"button",...r,ref:t,onClick:Ee(e.onClick,()=>a.onOpenChange(!1))})});$3.displayName=z3;function t_(e){return e?"open":"closed"}var R3="DialogTitleWarning",[dq,L3]=Z7(R3,{contentName:Ms,titleName:e_,docsSlug:"dialog"}),pq=({titleId:e})=>{const t=L3(R3),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return _.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},hq="DialogDescriptionWarning",mq=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${L3(hq).contentName}}.`;return _.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},gq=S3,yq=A3,vq=T3,bq=C3,wq=I3,kq=N3,xq=D3,B3=$3,F3="AlertDialog",[jq,gIe]=my(F3,[_3]),mo=_3(),U3=e=>{const{__scopeAlertDialog:t,...n}=e,r=mo(t);return E.jsx(gq,{...r,...n,modal:!0})};U3.displayName=F3;var _q="AlertDialogTrigger",Sq=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=mo(n);return E.jsx(yq,{...a,...r,ref:t})});Sq.displayName=_q;var Eq="AlertDialogPortal",H3=e=>{const{__scopeAlertDialog:t,...n}=e,r=mo(t);return E.jsx(vq,{...r,...n})};H3.displayName=Eq;var Aq="AlertDialogOverlay",V3=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=mo(n);return E.jsx(bq,{...a,...r,ref:t})});V3.displayName=Aq;var Vc="AlertDialogContent",[Oq,Tq]=jq(Vc),W3=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,o=mo(n),i=_.useRef(null),s=it(t,i),c=_.useRef(null);return E.jsx(dq,{contentName:Vc,titleName:q3,docsSlug:"alert-dialog",children:E.jsx(Oq,{scope:n,cancelRef:c,children:E.jsxs(wq,{role:"alertdialog",...o,...a,ref:s,onOpenAutoFocus:Ee(a.onOpenAutoFocus,l=>{var u;l.preventDefault(),(u=c.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[E.jsx(t3,{children:r}),E.jsx(Iq,{contentRef:i})]})})})});W3.displayName=Vc;var q3="AlertDialogTitle",G3=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=mo(n);return E.jsx(kq,{...a,...r,ref:t})});G3.displayName=q3;var K3="AlertDialogDescription",Y3=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=mo(n);return E.jsx(xq,{...a,...r,ref:t})});Y3.displayName=K3;var Cq="AlertDialogAction",Z3=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=mo(n);return E.jsx(B3,{...a,...r,ref:t})});Z3.displayName=Cq;var Q3="AlertDialogCancel",X3=_.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=Tq(Q3,n),o=mo(n),i=it(t,a);return E.jsx(B3,{...o,...r,ref:i})});X3.displayName=Q3;var Iq=({contentRef:e})=>{const t=`\`${Vc}\` requires a description for the component to be accessible for screen reader users. + +You can add a description to the \`${Vc}\` by passing a \`${K3}\` component as a child, which also benefits sighted users by adding visible context to the dialog. + +Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Vc}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. + +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Pq=U3,Nq=H3,J3=V3,e$=W3,t$=Z3,n$=X3,r$=G3,a$=Y3;const o$=Pq,Mq=Nq,i$=_.forwardRef(({className:e,...t},n)=>E.jsx(J3,{className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));i$.displayName=J3.displayName;const n_=_.forwardRef(({className:e,...t},n)=>E.jsxs(Mq,{children:[E.jsx(i$,{}),E.jsx(e$,{ref:n,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));n_.displayName=e$.displayName;const r_=({className:e,...t})=>E.jsx("div",{className:be("flex flex-col space-y-2 text-center sm:text-left",e),...t});r_.displayName="AlertDialogHeader";const a_=({className:e,...t})=>E.jsx("div",{className:be("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});a_.displayName="AlertDialogFooter";const o_=_.forwardRef(({className:e,...t},n)=>E.jsx(r$,{ref:n,className:be("text-lg font-semibold",e),...t}));o_.displayName=r$.displayName;const i_=_.forwardRef(({className:e,...t},n)=>E.jsx(a$,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));i_.displayName=a$.displayName;const s$=_.forwardRef(({className:e,...t},n)=>E.jsx(t$,{ref:n,className:be(Gj(),e),...t}));s$.displayName=t$.displayName;const s_=_.forwardRef(({className:e,...t},n)=>E.jsx(n$,{ref:n,className:be(Gj({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));s_.displayName=n$.displayName;const Dq=({open:e,onDisconnect:t,onClose:n})=>E.jsx(o$,{open:e,onOpenChange:n,children:E.jsxs(n_,{className:"max-w-[300px] sm:max-w-[400px]",children:[E.jsxs(r_,{children:[E.jsx(o_,{children:"Disconnect Wallet"}),E.jsx(i_,{children:"Are you sure you want to disconnect your wallet?"})]}),E.jsxs(a_,{children:[E.jsx(s_,{children:"Cancel"}),E.jsx(s$,{onClick:t,children:"Disconnect"})]})]})}),c$="/catering-app",Ki="0x049c75609bb077a9427bc26a9935472ec75e5508ed216ef7f7ad2693397deebc",Yi=[{name:"RegistrationImpl",type:"impl",interface_name:"event_manager::event_manager::IRegistration"},{name:"event_manager::utils::time::Time",type:"struct",members:[{name:"seconds",type:"core::integer::u64"}]},{name:"core::bool",type:"enum",variants:[{name:"False",type:"()"},{name:"True",type:"()"}]},{name:"event_manager::event_manager::EventUserInfoInner",type:"struct",members:[{name:"time",type:"event_manager::utils::time::Time"},{name:"registered",type:"core::bool"},{name:"canceled",type:"core::bool"}]},{name:"event_manager::event_manager::EventUserInfo",type:"struct",members:[{name:"id",type:"core::integer::u32"},{name:"info",type:"event_manager::event_manager::EventUserInfoInner"}]},{name:"event_manager::event_manager::UserParticipation",type:"struct",members:[{name:"user",type:"core::starknet::contract_address::ContractAddress"},{name:"n_participations",type:"core::integer::u32"}]},{name:"event_manager::event_manager::EventInfoInner",type:"struct",members:[{name:"time",type:"event_manager::utils::time::Time"},{name:"number_of_participants",type:"core::integer::u32"},{name:"canceled",type:"core::bool"},{name:"locked",type:"core::bool"},{name:"description",type:"core::felt252"}]},{name:"event_manager::event_manager::EventInfo",type:"struct",members:[{name:"id",type:"core::integer::u32"},{name:"info",type:"event_manager::event_manager::EventInfoInner"}]},{name:"core::array::Span::",type:"struct",members:[{name:"snapshot",type:"@core::array::Array::"}]},{name:"event_manager::event_manager::IRegistration",type:"interface",items:[{name:"get_user_events_by_time",type:"function",inputs:[{name:"user",type:"core::starknet::contract_address::ContractAddress"},{name:"start",type:"event_manager::utils::time::Time"},{name:"end",type:"event_manager::utils::time::Time"}],outputs:[{type:"core::array::Array::"}],state_mutability:"view"},{name:"n_events",type:"function",inputs:[],outputs:[{type:"core::integer::u32"}],state_mutability:"view"},{name:"get_participation_report_by_time",type:"function",inputs:[{name:"start",type:"event_manager::utils::time::Time"},{name:"end",type:"event_manager::utils::time::Time"}],outputs:[{type:"core::array::Array::"}],state_mutability:"view"},{name:"event_info",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"}],outputs:[{type:"event_manager::event_manager::EventInfoInner"}],state_mutability:"view"},{name:"get_events_infos_by_time",type:"function",inputs:[{name:"start",type:"event_manager::utils::time::Time"},{name:"end",type:"event_manager::utils::time::Time"}],outputs:[{type:"core::array::Array::"}],state_mutability:"view"},{name:"register",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"}],outputs:[],state_mutability:"external"},{name:"unregister",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"}],outputs:[],state_mutability:"external"},{name:"add_event",type:"function",inputs:[{name:"time",type:"core::felt252"},{name:"description",type:"core::felt252"}],outputs:[],state_mutability:"external"},{name:"modify_event_time",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"},{name:"time",type:"core::felt252"}],outputs:[],state_mutability:"external"},{name:"lock_event",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"}],outputs:[],state_mutability:"external"},{name:"unlock_event",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"}],outputs:[],state_mutability:"external"},{name:"set_event_canceled",type:"function",inputs:[{name:"event_id",type:"core::integer::u32"},{name:"canceled",type:"core::bool"}],outputs:[],state_mutability:"external"},{name:"add_allowed_user",type:"function",inputs:[{name:"user",type:"core::starknet::contract_address::ContractAddress"}],outputs:[],state_mutability:"external"},{name:"remove_allowed_user",type:"function",inputs:[{name:"user",type:"core::starknet::contract_address::ContractAddress"}],outputs:[],state_mutability:"external"},{name:"add_allowed_users",type:"function",inputs:[{name:"users",type:"core::array::Span::"}],outputs:[],state_mutability:"external"},{name:"is_allowed_user",type:"function",inputs:[{name:"user",type:"core::starknet::contract_address::ContractAddress"}],outputs:[{type:"core::bool"}],state_mutability:"view"},{name:"is_admin",type:"function",inputs:[{name:"user",type:"core::starknet::contract_address::ContractAddress"}],outputs:[{type:"core::bool"}],state_mutability:"view"},{name:"add_admin",type:"function",inputs:[{name:"user",type:"core::starknet::contract_address::ContractAddress"}],outputs:[],state_mutability:"external"}]},{name:"constructor",type:"constructor",inputs:[{name:"admin",type:"core::starknet::contract_address::ContractAddress"}]},{kind:"struct",name:"event_manager::event_manager::registration::UserRegistration",type:"event",members:[{kind:"key",name:"user",type:"core::starknet::contract_address::ContractAddress"},{kind:"key",name:"event_id",type:"core::integer::u32"},{kind:"data",name:"status",type:"core::bool"}]},{kind:"struct",name:"event_manager::event_manager::registration::EventChanged",type:"event",members:[{kind:"data",name:"event_id",type:"core::integer::u32"},{kind:"data",name:"time",type:"event_manager::utils::time::Time"}]},{kind:"struct",name:"event_manager::event_manager::registration::EventCancellation",type:"event",members:[{kind:"data",name:"event_id",type:"core::integer::u32"},{kind:"data",name:"canceled",type:"core::bool"}]},{kind:"struct",name:"event_manager::event_manager::registration::UserAllowed",type:"event",members:[{kind:"data",name:"user",type:"core::starknet::contract_address::ContractAddress"},{kind:"data",name:"allowed",type:"core::bool"}]},{kind:"enum",name:"event_manager::event_manager::registration::Event",type:"event",variants:[{kind:"nested",name:"UserRegistration",type:"event_manager::event_manager::registration::UserRegistration"},{kind:"nested",name:"EventChanged",type:"event_manager::event_manager::registration::EventChanged"},{kind:"nested",name:"EventCancellation",type:"event_manager::event_manager::registration::EventCancellation"},{kind:"nested",name:"UserAllowed",type:"event_manager::event_manager::registration::UserAllowed"}]}],l$=e=>`${e.slice(0,6)}...${e.slice(-4)}`;var u$={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function o(c,l,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new a(u,f||c,d),g=n?n+l:l;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],h]:c._events[g].push(h):(c._events[g]=h,c._eventsCount++),c}function i(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],u,f;if(this._eventsCount===0)return l;for(f in u=this._events)t.call(u,f)&&l.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},s.prototype.listeners=function(l){var u=n?n+l:l,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,g=new Array(h);do,n=(o,i)=>s=>o(i(s)),r=e.map(o=>o.encode).reduceRight(n,t),a=e.map(o=>o.decode).reduce(n,t);return{encode:r,decode:a}}function Uq(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(n=>{if(n<0||n>=e.length)throw new Error(`Digit index outside alphabet: ${n} (alphabet: ${e.length})`);return e[n]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(n=>{if(typeof n!="string")throw new Error(`alphabet.decode: not string element=${n}`);const r=e.indexOf(n);if(r===-1)throw new Error(`Unknown letter: "${n}". Allowed: ${e}`);return r})}}}function Hq(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let n of t)if(typeof n!="string")throw new Error(`join.encode: non-string input=${n}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function Vq(e,t="="){if(typeof t!="string")throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let r of n)if(typeof r!="string")throw new Error(`padding.encode: non-string input=${r}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&typeof n[0]!="string")throw new Error("padding.encode input should be array of strings");for(let a of n)if(typeof a!="string")throw new Error(`padding.decode: non-string input=${a}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}const w$=(e,t)=>t?w$(t,e%t):e,Um=(e,t)=>e+(t-w$(e,t));function W2(e,t,n,r){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(Um(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${Um(t,n)}`);let a=0,o=0;const i=2**n-1,s=[];for(const c of e){if(c>=2**t)throw new Error(`convertRadix2: invalid data word=${c} from=${t}`);if(a=a<32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)s.push((a>>o-n&i)>>>0);a&=2**o-1}if(a=a<=t)throw new Error("Excess padding");if(!r&&a)throw new Error(`Non-zero padding: ${a}`);return r&&o>0&&s.push(a>>>0),s}function Wq(e,t=!1){if(e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Um(8,e)>32||Um(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!Bq(n))throw new Error("radix2.encode input should be Uint8Array");return W2(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&typeof n[0]!="number")throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(W2(n,e,8,t))}}}const k$=Fq(Wq(6),Uq("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Vq(6),Hq(""));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const x$=BigInt(0),vy=BigInt(1),qq=BigInt(2);function Ds(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function bp(e){if(!Ds(e))throw new Error("Uint8Array expected")}const Gq=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function zs(e){bp(e);let t="";for(let n=0;n=Ma._0&&e<=Ma._9)return e-Ma._0;if(e>=Ma._A&&e<=Ma._F)return e-(Ma._A-10);if(e>=Ma._a&&e<=Ma._f)return e-(Ma._a-10)}function $s(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let a=0,o=0;ax$;e>>=vy,t+=1);return t}function Xq(e,t){return e>>BigInt(t)&vy}function Jq(e,t,n){return e|(n?vy:x$)<(qq<new Uint8Array(e),G2=e=>Uint8Array.from(e);function _$(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Ob(e),a=Ob(e),o=0;const i=()=>{r.fill(1),a.fill(0),o=0},s=(...f)=>n(a,r,...f),c=(f=Ob())=>{a=s(G2([0]),f),r=s(),f.length!==0&&(a=s(G2([1]),f),r=s())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f{i(),c(f);let h;for(;!(h=d(l()));)c();return i(),h}}const eG={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Ds(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function wp(e,t,n={}){const r=(a,o,i)=>{const s=eG[o];if(typeof s!="function")throw new Error(`Invalid validator "${o}", expected function`);const c=e[a];if(!(i&&c===void 0)&&!s(c,e))throw new Error(`Invalid param ${String(a)}=${c} (${typeof c}), expected ${o}`)};for(const[a,o]of Object.entries(t))r(a,o,!1);for(const[a,o]of Object.entries(n))r(a,o,!0);return e}const tG=Object.freeze(Object.defineProperty({__proto__:null,abytes:bp,bitGet:Xq,bitLen:Qq,bitMask:d_,bitSet:Jq,bytesToHex:zs,bytesToNumberBE:ks,bytesToNumberLE:u_,concatBytes:od,createHmacDrbg:_$,ensureBytes:Sr,equalBytes:Yq,hexToBytes:$s,hexToNumber:l_,isBytes:Ds,numberToBytesBE:xl,numberToBytesLE:f_,numberToHexUnpadded:j$,numberToVarBytesBE:Kq,utf8ToBytes:Zq,validateObject:wp},Symbol.toStringTag,{value:"Module"}));function K2(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function nG(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function p_(e,...t){if(!nG(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Y2(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function rG(e,t){p_(e);const n=t.outputLen;if(e.length>Z2&uh)}:{h:Number(e>>Z2&uh)|0,l:Number(e&uh)|0}}function oG(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let a=0;ae<>>32-n,sG=(e,t,n)=>t<>>32-n,cG=(e,t,n)=>t<>>64-n,lG=(e,t,n)=>e<>>64-n;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const uG=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Q2=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,fG=e=>e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;function X2(e){for(let t=0;te().update(S$(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}const E$=[],A$=[],O$=[],mG=BigInt(0),Vu=BigInt(1),gG=BigInt(2),yG=BigInt(7),vG=BigInt(256),bG=BigInt(113);for(let e=0,t=Vu,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],E$.push(2*(5*r+n)),A$.push((e+1)*(e+2)/2%64);let a=mG;for(let o=0;o<7;o++)t=(t<>yG)*bG)%vG,t&gG&&(a^=Vu<<(Vu<n>32?cG(e,t,n):iG(e,t,n),eO=(e,t,n)=>n>32?lG(e,t,n):sG(e,t,n);function xG(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const s=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=J2(l,u,1)^n[s],d=eO(l,u,1)^n[s+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let a=e[2],o=e[3];for(let i=0;i<24;i++){const s=A$[i],c=J2(a,o,s),l=eO(a,o,s),u=E$[i];a=e[u],o=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let s=0;s<10;s++)n[s]=e[i+s];for(let s=0;s<10;s++)e[i+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=wG[r],e[1]^=kG[r]}n.fill(0)}let jG=class T$ extends pG{constructor(t,n,r,a=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=a,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,K2(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=uG(this.state)}keccak(){Q2||X2(this.state32),xG(this.state32,this.rounds),Q2||X2(this.state32),this.posOut=0,this.pos=0}update(t){Y2(this);const{blockLen:n,state:r}=this;t=S$(t);const a=t.length;for(let o=0;o=r&&this.keccak();const i=Math.min(r-this.posOut,o-a);t.set(n.subarray(this.posOut,this.posOut+i),a),this.posOut+=i,a+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return K2(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(rG(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:a,rounds:o,enableXOF:i}=this;return t||(t=new T$(n,r,a,i,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=a,t.enableXOF=i,t.destroyed=this.destroyed,t}};const _G=(e,t,n)=>hG(()=>new jG(t,e,n)),SG=_G(1,136,256/8);function Hm(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function EG(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function h_(e,...t){if(!EG(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function AG(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Hm(e.outputLen),Hm(e.blockLen)}function jl(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function C$(e,t){h_(e);const n=t.outputLen;if(e.length>tO&fh)}:{h:Number(e>>tO&fh)|0,l:Number(e&fh)|0}}function TG(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let a=0;ae<>>32-n,IG=(e,t,n)=>t<>>32-n,PG=(e,t,n)=>t<>>64-n,NG=(e,t,n)=>e<>>64-n,Tb=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const MG=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function I$(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}const Cb=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),qr=(e,t)=>e<<32-t|e>>>t,DG=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!DG)throw new Error("Non little-endian hardware is not supported");function P$(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function by(e){if(typeof e=="string"&&(e=P$(e)),!I$(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function zG(...e){let t=0;for(let r=0;re().update(by(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function $G(e=32){if(Tb&&typeof Tb.getRandomValues=="function")return Tb.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const[M$,D$,z$]=[[],[],[]],RG=BigInt(0),Wu=BigInt(1),LG=BigInt(2),BG=BigInt(7),FG=BigInt(256),UG=BigInt(113);for(let e=0,t=Wu,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],M$.push(2*(5*r+n)),D$.push((e+1)*(e+2)/2%64);let a=RG;for(let o=0;o<7;o++)t=(t<>BG)*UG)%FG,t&LG&&(a^=Wu<<(Wu<n>32?PG(e,t,n):CG(e,t,n),rO=(e,t,n)=>n>32?NG(e,t,n):IG(e,t,n);function WG(e,t=24){const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let i=0;i<10;i++)n[i]=e[i]^e[i+10]^e[i+20]^e[i+30]^e[i+40];for(let i=0;i<10;i+=2){const s=(i+8)%10,c=(i+2)%10,l=n[c],u=n[c+1],f=nO(l,u,1)^n[s],d=rO(l,u,1)^n[s+1];for(let h=0;h<50;h+=10)e[i+h]^=f,e[i+h+1]^=d}let a=e[2],o=e[3];for(let i=0;i<24;i++){const s=D$[i],c=nO(a,o,s),l=rO(a,o,s),u=M$[i];a=e[u],o=e[u+1],e[u]=c,e[u+1]=l}for(let i=0;i<50;i+=10){for(let s=0;s<10;s++)n[s]=e[i+s];for(let s=0;s<10;s++)e[i+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=HG[r],e[1]^=VG[r]}n.fill(0)}class g_ extends m_{constructor(t,n,r,a=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=a,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Hm(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=MG(this.state)}keccak(){WG(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){jl(this);const{blockLen:n,state:r}=this;t=by(t);const a=t.length;for(let o=0;o=r&&this.keccak();const i=Math.min(r-this.posOut,o-a);t.set(n.subarray(this.posOut,this.posOut+i),a),this.posOut+=i,a+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Hm(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(C$(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:n,suffix:r,outputLen:a,rounds:o,enableXOF:i}=this;return t||(t=new g_(n,r,a,i,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=a,t.enableXOF=i,t.destroyed=this.destroyed,t}}const qG=(e,t,n)=>N$(()=>new g_(t,e,n)),GG=qG(1,136,256/8);function KG(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const a=BigInt(32),o=BigInt(4294967295),i=Number(n>>a&o),s=Number(n&o),c=r?4:0,l=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+l,s,r)}class YG extends m_{constructor(t,n,r,a){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Cb(this.buffer)}update(t){jl(this);const{view:n,buffer:r,blockLen:a}=this;t=by(t);const o=t.length;for(let i=0;ia-i&&(this.process(r,0),i=0);for(let f=i;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;fe&t^~e&n,QG=(e,t,n)=>e&t^e&n^t&n,XG=new Uint32Array([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]),_o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),So=new Uint32Array(64);let JG=class extends YG{constructor(){super(64,32,8,!1),this.A=_o[0]|0,this.B=_o[1]|0,this.C=_o[2]|0,this.D=_o[3]|0,this.E=_o[4]|0,this.F=_o[5]|0,this.G=_o[6]|0,this.H=_o[7]|0}get(){const{A:t,B:n,C:r,D:a,E:o,F:i,G:s,H:c}=this;return[t,n,r,a,o,i,s,c]}set(t,n,r,a,o,i,s,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=o|0,this.F=i|0,this.G=s|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)So[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const d=So[f-15],h=So[f-2],g=qr(d,7)^qr(d,18)^d>>>3,p=qr(h,17)^qr(h,19)^h>>>10;So[f]=p+So[f-7]+g+So[f-16]|0}let{A:r,B:a,C:o,D:i,E:s,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=qr(s,6)^qr(s,11)^qr(s,25),h=u+d+ZG(s,c,l)+XG[f]+So[f]|0,p=(qr(r,2)^qr(r,13)^qr(r,22))+QG(r,a,o)|0;u=l,l=c,c=s,s=i+h|0,i=o,o=a,a=r,r=h+p|0}r=r+this.A|0,a=a+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,a,o,i,s,c,l,u)}roundClean(){So.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};const y_=N$(()=>new JG);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const $$=BigInt(0),wy=BigInt(1),eK=BigInt(2);function Sa(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}const tK=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function gi(e){if(!Sa(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=Da._0&&e<=Da._9)return e-Da._0;if(e>=Da._A&&e<=Da._F)return e-(Da._A-10);if(e>=Da._a&&e<=Da._f)return e-(Da._a-10)}function Rs(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let a=0,o=0;a$$;e>>=wy,t+=1);return t}function oK(e,t){return e>>BigInt(t)&wy}const iK=(e,t,n)=>e|(n?wy:$$)<(eK<new Uint8Array(e),oO=e=>Uint8Array.from(e);function L$(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Ib(e),a=Ib(e),o=0;const i=()=>{r.fill(1),a.fill(0),o=0},s=(...f)=>n(a,r,...f),c=(f=Ib())=>{a=s(oO([0]),f),r=s(),f.length!==0&&(a=s(oO([1]),f),r=s())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let f=0;const d=[];for(;f{i(),c(f);let h;for(;!(h=d(l()));)c();return i(),h}}const sK={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Sa(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function kp(e,t,n={}){const r=(a,o,i)=>{const s=sK[o];if(typeof s!="function")throw new Error(`Invalid validator "${o}", expected function`);const c=e[a];if(!(i&&c===void 0)&&!s(c,e))throw new Error(`Invalid param ${String(a)}=${c} (${typeof c}), expected ${o}`)};for(const[a,o]of Object.entries(t))r(a,o,!1);for(const[a,o]of Object.entries(n))r(a,o,!0);return e}const cK=Object.freeze(Object.defineProperty({__proto__:null,bitGet:oK,bitLen:aK,bitMask:xy,bitSet:iK,bytesToHex:gi,bytesToNumberBE:mn,bytesToNumberLE:v_,concatBytes:Sl,createHmacDrbg:L$,ensureBytes:nr,equalBytes:nK,hexToBytes:Rs,hexToNumber:ky,isBytes:Sa,numberToBytesBE:_l,numberToBytesLE:b_,numberToHexUnpadded:R$,numberToVarBytesBE:w_,utf8ToBytes:rK,validateObject:kp},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qt=BigInt(0),gt=BigInt(1),Zi=BigInt(2),lK=BigInt(3),h1=BigInt(4),iO=BigInt(5),sO=BigInt(8);BigInt(9);BigInt(16);function un(e,t){const n=e%t;return n>=Qt?n:t+n}function uK(e,t,n){if(n<=Qt||t 0");if(n===gt)return Qt;let r=gt;for(;t>Qt;)t>&&(r=r*e%n),e=e*e%n,t>>=gt;return r}function Vm(e,t){if(e===Qt||t<=Qt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=un(e,t),r=t,a=Qt,o=gt;for(;n!==Qt;){const s=r/n,c=r%n,l=a-o*s;r=n,n=c,a=o,o=l}if(r!==gt)throw new Error("invert: does not exist");return un(a,t)}function fK(e){const t=(e-gt)/Zi;let n,r,a;for(n=e-gt,r=0;n%Zi===Qt;n/=Zi,r++);for(a=Zi;a(r[a]="function",r),t);return kp(e,n)}function B$(e,t,n){if(n 0");if(n===Qt)return e.ONE;if(n===gt)return t;let r=e.ONE,a=t;for(;n>Qt;)n>&&(r=e.mul(r,a)),a=e.sqr(a),n>>=gt;return r}function hK(e,t){const n=new Array(t.length),r=t.reduce((o,i,s)=>e.is0(i)?o:(n[s]=o,e.mul(o,i)),e.ONE),a=e.inv(r);return t.reduceRight((o,i,s)=>e.is0(i)?o:(n[s]=e.mul(o,n[s]),e.mul(o,i)),a),n}function F$(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function U$(e,t,n=!1,r={}){if(e<=Qt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:o}=F$(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const i=dK(e),s=Object.freeze({ORDER:e,BITS:a,BYTES:o,MASK:xy(a),ZERO:Qt,ONE:gt,create:c=>un(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Qt<=c&&cc===Qt,isOdd:c=>(c>)===gt,neg:c=>un(-c,e),eql:(c,l)=>c===l,sqr:c=>un(c*c,e),add:(c,l)=>un(c+l,e),sub:(c,l)=>un(c-l,e),mul:(c,l)=>un(c*l,e),pow:(c,l)=>B$(s,c,l),div:(c,l)=>un(c*Vm(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Vm(c,e),sqrt:r.sqrt||(c=>i(s,c)),invertBatch:c=>hK(s,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>n?b_(c,o):_l(c,o),fromBytes:c=>{if(c.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${c.length}`);return n?v_(c):mn(c)}});return Object.freeze(s)}function H$(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function V$(e){const t=H$(e);return t+Math.ceil(t/2)}function mK(e,t,n=!1){const r=e.length,a=H$(t),o=V$(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const i=n?mn(e):v_(e),s=un(i,t-gt)+gt;return n?b_(s,a):_l(s,a)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function gK(e){const{Fp:t,mds:n,reversePartialPowIdx:r,roundConstants:a}=e,{roundsFull:o,roundsPartial:i,sboxPower:s,t:c}=e;k_(t);for(const g of["t","roundsFull","roundsPartial"])if(typeof e[g]!="number"||!Number.isSafeInteger(e[g]))throw new Error(`Poseidon: invalid param ${g}=${e[g]} (${typeof e[g]})`);if(!Array.isArray(n)||n.length!==c)throw new Error("Poseidon: wrong MDS matrix");const l=n.map(g=>{if(!Array.isArray(g)||g.length!==c)throw new Error(`Poseidon MDS matrix row: ${g}`);return g.map(p=>{if(typeof p!="bigint")throw new Error(`Poseidon MDS matrix value=${p}`);return t.create(p)})});if(r!==void 0&&typeof r!="boolean")throw new Error(`Poseidon: invalid param reversePartialPowIdx=${r}`);if(o%2!==0)throw new Error(`Poseidon roundsFull is not even: ${o}`);const u=o+i;if(!Array.isArray(a)||a.length!==u)throw new Error("Poseidon: wrong round constants");const f=a.map(g=>{if(!Array.isArray(g)||g.length!==c)throw new Error(`Poseidon wrong round constants: ${g}`);return g.map(p=>{if(typeof p!="bigint"||!t.isValid(p))throw new Error(`Poseidon wrong round constant=${p}`);return t.create(p)})});if(!s||![3,5,7].includes(s))throw new Error(`Poseidon wrong sboxPower=${s}`);const d=BigInt(s);let h=g=>B$(t,g,d);return s===3?h=g=>t.mul(t.sqrN(g),g):s===5&&(h=g=>t.mul(t.sqrN(t.sqrN(g)),g)),Object.freeze({...e,rounds:u,sboxFn:h,roundConstants:f,mds:l})}function yK(e){const t=gK(e),{Fp:n,mds:r,roundConstants:a,rounds:o,roundsPartial:i,sboxFn:s,t:c}=t,l=t.roundsFull/2,u=t.reversePartialPowIdx?c-1:0,f=(h,g,p)=>(h=h.map((m,y)=>n.add(m,a[p][y])),g?h=h.map(m=>s(m)):h[u]=s(h[u]),h=r.map(m=>m.reduce((y,v,b)=>n.add(y,n.mulN(v,h[b])),n.ZERO)),h),d=function(g){if(!Array.isArray(g)||g.length!==c)throw new Error(`Poseidon: wrong values (expected array of bigints with length ${c})`);g=g.map(m=>{if(typeof m!="bigint")throw new Error(`Poseidon: wrong value=${m} (${typeof m})`);return n.create(m)});let p=0;for(let m=0;m{const i=o.negate();return a?i:o},r=a=>{const o=Math.ceil(t/a)+1,i=2**(a-1);return{windows:o,windowSize:i}};return{constTimeNegate:n,unsafeLadder(a,o){let i=e.ZERO,s=a;for(;o>vK;)o&Pb&&(i=i.add(s)),s=s.double(),o>>=Pb;return i},precomputeWindow(a,o){const{windows:i,windowSize:s}=r(o),c=[];let l=a,u=l;for(let f=0;f>=h,m>c&&(m-=d,i+=Pb);const y=p,v=p+Math.abs(m)-1,b=g%2!==0,k=m<0;m===0?u=u.add(n(b,o[y])):l=l.add(n(k,o[v]))}return{p:l,f:u}},wNAFCached(a,o,i,s){const c=a._WINDOW_SIZE||1;let l=o.get(a);return l||(l=this.precomputeWindow(a,c),c!==1&&o.set(a,s(l))),this.wNAF(c,l,i)}}}function W$(e){return k_(e.Fp),kp(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...F$(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function wK(e){const t=W$(e);kp(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a}=t;if(n){if(!r.eql(a,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:kK,hexToBytes:xK}=cK,Zo={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Zo;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:kK(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=Zo,n=typeof e=="string"?xK(e):e;if(!Sa(n))throw new Error("ui8a expected");let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:a,l:o}=Zo._parseInt(n.subarray(2)),{d:i,l:s}=Zo._parseInt(o);if(s.length)throw new t("Invalid signature: left bytes after parsing");return{r:a,s:i}},hexFromSig(e){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=t(n(e.s)),a=t(n(e.r)),o=r.length/2,i=a.length/2,s=n(o),c=n(i);return`30${n(i+o+4)}02${c}${a}02${s}${r}`}},Ga=BigInt(0),rr=BigInt(1);BigInt(2);const cO=BigInt(3);BigInt(4);function jK(e){const t=wK(e),{Fp:n}=t,r=t.toBytes||((g,p,m)=>{const y=p.toAffine();return Sl(Uint8Array.from([4]),n.toBytes(y.x),n.toBytes(y.y))}),a=t.fromBytes||(g=>{const p=g.subarray(1),m=n.fromBytes(p.subarray(0,n.BYTES)),y=n.fromBytes(p.subarray(n.BYTES,2*n.BYTES));return{x:m,y}});function o(g){const{a:p,b:m}=t,y=n.sqr(g),v=n.mul(y,g);return n.add(n.add(v,n.mul(g,p)),m)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function i(g){return typeof g=="bigint"&&Gan.eql(b,n.ZERO);return v(m)&&v(y)?f.ZERO:new f(m,y,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){const m=n.invertBatch(p.map(y=>y.pz));return p.map((y,v)=>y.toAffine(m[v])).map(f.fromAffine)}static fromHex(p){const m=f.fromAffine(a(nr("pointHex",p)));return m.assertValidity(),m}static fromPrivateKey(p){return f.BASE.multiply(c(p))}_setWindowSize(p){this._WINDOW_SIZE=p,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:p,y:m}=this.toAffine();if(!n.isValid(p)||!n.isValid(m))throw new Error("bad point: x or y not FE");const y=n.sqr(m),v=o(p);if(!n.eql(y,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:p}=this.toAffine();if(n.isOdd)return!n.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);const{px:m,py:y,pz:v}=this,{px:b,py:k,pz:w}=p,x=n.eql(n.mul(m,w),n.mul(b,v)),j=n.eql(n.mul(y,w),n.mul(k,v));return x&&j}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:p,b:m}=t,y=n.mul(m,cO),{px:v,py:b,pz:k}=this;let w=n.ZERO,x=n.ZERO,j=n.ZERO,S=n.mul(v,v),A=n.mul(b,b),C=n.mul(k,k),O=n.mul(v,b);return O=n.add(O,O),j=n.mul(v,k),j=n.add(j,j),w=n.mul(p,j),x=n.mul(y,C),x=n.add(w,x),w=n.sub(A,x),x=n.add(A,x),x=n.mul(w,x),w=n.mul(O,w),j=n.mul(y,j),C=n.mul(p,C),O=n.sub(S,C),O=n.mul(p,O),O=n.add(O,j),j=n.add(S,S),S=n.add(j,S),S=n.add(S,C),S=n.mul(S,O),x=n.add(x,S),C=n.mul(b,k),C=n.add(C,C),S=n.mul(C,O),w=n.sub(w,S),j=n.mul(C,A),j=n.add(j,j),j=n.add(j,j),new f(w,x,j)}add(p){u(p);const{px:m,py:y,pz:v}=this,{px:b,py:k,pz:w}=p;let x=n.ZERO,j=n.ZERO,S=n.ZERO;const A=t.a,C=n.mul(t.b,cO);let O=n.mul(m,b),N=n.mul(y,k),L=n.mul(v,w),z=n.add(m,y),T=n.add(b,k);z=n.mul(z,T),T=n.add(O,N),z=n.sub(z,T),T=n.add(m,v);let I=n.add(b,w);return T=n.mul(T,I),I=n.add(O,L),T=n.sub(T,I),I=n.add(y,v),x=n.add(k,w),I=n.mul(I,x),x=n.add(N,L),I=n.sub(I,x),S=n.mul(A,T),x=n.mul(C,L),S=n.add(x,S),x=n.sub(N,S),S=n.add(N,S),j=n.mul(x,S),N=n.add(O,O),N=n.add(N,O),L=n.mul(A,L),T=n.mul(C,T),N=n.add(N,L),L=n.sub(O,L),L=n.mul(A,L),T=n.add(T,L),O=n.mul(N,T),j=n.add(j,O),O=n.mul(I,T),x=n.mul(z,x),x=n.sub(x,O),O=n.mul(z,N),S=n.mul(I,S),S=n.add(S,O),new f(x,j,S)}subtract(p){return this.add(p.negate())}is0(){return this.equals(f.ZERO)}wNAF(p){return h.wNAFCached(this,l,p,m=>{const y=n.invertBatch(m.map(v=>v.pz));return m.map((v,b)=>v.toAffine(y[b])).map(f.fromAffine)})}multiplyUnsafe(p){const m=f.ZERO;if(p===Ga)return m;if(s(p),p===rr)return this;const{endo:y}=t;if(!y)return h.unsafeLadder(this,p);let{k1neg:v,k1:b,k2neg:k,k2:w}=y.splitScalar(p),x=m,j=m,S=this;for(;b>Ga||w>Ga;)b&rr&&(x=x.add(S)),w&rr&&(j=j.add(S)),S=S.double(),b>>=rr,w>>=rr;return v&&(x=x.negate()),k&&(j=j.negate()),j=new f(n.mul(j.px,y.beta),j.py,j.pz),x.add(j)}multiply(p){s(p);let m=p,y,v;const{endo:b}=t;if(b){const{k1neg:k,k1:w,k2neg:x,k2:j}=b.splitScalar(m);let{p:S,f:A}=this.wNAF(w),{p:C,f:O}=this.wNAF(j);S=h.constTimeNegate(k,S),C=h.constTimeNegate(x,C),C=new f(n.mul(C.px,b.beta),C.py,C.pz),y=S.add(C),v=A.add(O)}else{const{p:k,f:w}=this.wNAF(m);y=k,v=w}return f.normalizeZ([y,v])[0]}multiplyAndAddUnsafe(p,m,y){const v=f.BASE,b=(w,x)=>x===Ga||x===rr||!w.equals(v)?w.multiplyUnsafe(x):w.multiply(x),k=b(this,m).add(b(p,y));return k.is0()?void 0:k}toAffine(p){const{px:m,py:y,pz:v}=this,b=this.is0();p==null&&(p=b?n.ONE:n.inv(v));const k=n.mul(m,p),w=n.mul(y,p),x=n.mul(v,p);if(b)return{x:n.ZERO,y:n.ZERO};if(!n.eql(x,n.ONE))throw new Error("invZ was invalid");return{x:k,y:w}}isTorsionFree(){const{h:p,isTorsionFree:m}=t;if(p===rr)return!0;if(m)return m(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:p,clearCofactor:m}=t;return p===rr?this:m?m(f,this):this.multiplyUnsafe(t.h)}toRawBytes(p=!0){return this.assertValidity(),r(f,this,p)}toHex(p=!0){return gi(this.toRawBytes(p))}}f.BASE=new f(t.Gx,t.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const d=t.nBitLength,h=bK(f,t.endo?Math.ceil(d/2):d);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:i}}function _K(e){const t=W$(e);return kp(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function SK(e){const t=_K(e),{Fp:n,n:r}=t,a=n.BYTES+1,o=2*n.BYTES+1;function i(T){return Gagi(_l(T,t.nByteLength));function g(T){const I=r>>rr;return T>I}function p(T){return g(T)?s(-T):T}const m=(T,I,M)=>mn(T.slice(I,M));class y{constructor(I,M,P){this.r=I,this.s=M,this.recovery=P,this.assertValidity()}static fromCompact(I){const M=t.nByteLength;return I=nr("compactSignature",I,M*2),new y(m(I,0,M),m(I,M,2*M))}static fromDER(I){const{r:M,s:P}=Zo.toSig(nr("DER",I));return new y(M,P)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(I){return new y(this.r,this.s,I)}recoverPublicKey(I){const{r:M,s:P,recovery:D}=this,U=j(nr("msgHash",I));if(D==null||![0,1,2,3].includes(D))throw new Error("recovery id invalid");const W=D===2||D===3?M+t.n:M;if(W>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const q=D&1?"03":"02",ne=l.fromHex(q+h(W)),$=c(W),H=s(-U*$),G=s(P*$),Q=l.BASE.multiplyAndAddUnsafe(ne,H,G);if(!Q)throw new Error("point at infinify");return Q.assertValidity(),Q}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return Rs(this.toDERHex())}toDERHex(){return Zo.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Rs(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const v={isValidPrivateKey(T){try{return u(T),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const T=V$(t.n);return mK(t.randomBytes(T),t.n)},precompute(T=8,I=l.BASE){return I._setWindowSize(T),I.multiply(BigInt(3)),I}};function b(T,I=!0){return l.fromPrivateKey(T).toRawBytes(I)}function k(T){const I=Sa(T),M=typeof T=="string",P=(I||M)&&T.length;return I?P===a||P===o:M?P===2*a||P===2*o:T instanceof l}function w(T,I,M=!0){if(k(T))throw new Error("first arg must be private key");if(!k(I))throw new Error("second arg must be public key");return l.fromHex(I).multiply(u(T)).toRawBytes(M)}const x=t.bits2int||function(T){const I=mn(T),M=T.length*8-t.nBitLength;return M>0?I>>BigInt(M):I},j=t.bits2int_modN||function(T){return s(x(T))},S=xy(t.nBitLength);function A(T){if(typeof T!="bigint")throw new Error("bigint expected");if(!(Ga<=T&&TV in M))throw new Error("sign() legacy options not supported");const{hash:P,randomBytes:D}=t;let{lowS:U,prehash:W,extraEntropy:q}=M;U==null&&(U=!0),T=nr("msgHash",T),W&&(T=nr("prehashed msgHash",P(T)));const ne=j(T),$=u(I),H=[A($),A(ne)];if(q!=null){const V=q===!0?D(n.BYTES):q;H.push(nr("extraEntropy",V))}const G=Sl(...H),Q=ne;function te(V){const Z=x(V);if(!d(Z))return;const J=c(Z),F=l.BASE.multiply(Z).toAffine(),re=s(F.x);if(re===Ga)return;const ce=s(J*s(Q+re*$));if(ce===Ga)return;let je=(F.x===re?0:2)|Number(F.y&rr),we=ce;return U&&g(ce)&&(we=p(ce),je^=1),new y(re,we,je)}return{seed:G,k2sig:te}}const O={lowS:t.lowS,prehash:!1},N={lowS:t.lowS,prehash:!1};function L(T,I,M=O){const{seed:P,k2sig:D}=C(T,I,M),U=t;return L$(U.hash.outputLen,U.nByteLength,U.hmac)(P,D)}l.BASE._setWindowSize(8);function z(T,I,M,P=N){var F;const D=T;if(I=nr("msgHash",I),M=nr("publicKey",M),"strict"in P)throw new Error("options.strict was renamed to lowS");const{lowS:U,prehash:W}=P;let q,ne;try{if(typeof D=="string"||Sa(D))try{q=y.fromDER(D)}catch(re){if(!(re instanceof Zo.Err))throw re;q=y.fromCompact(D)}else if(typeof D=="object"&&typeof D.r=="bigint"&&typeof D.s=="bigint"){const{r:re,s:ce}=D;q=new y(re,ce)}else throw new Error("PARSE");ne=l.fromHex(M)}catch(re){if(re.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(U&&q.hasHighS())return!1;W&&(I=t.hash(I));const{r:$,s:H}=q,G=j(I),Q=c(H),te=s(G*Q),V=s($*Q),Z=(F=l.BASE.multiplyAndAddUnsafe(ne,te,V))==null?void 0:F.toAffine();return Z?s(Z.x)===$:!1}return{CURVE:t,getPublicKey:b,getSharedSecret:w,sign:L,verify:z,ProjectivePoint:l,Signature:y,utils:v}}let q$=class extends m_{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,AG(t);const r=by(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const a=this.blockLen,o=new Uint8Array(a);o.set(r.length>a?t.create().update(r).digest():r);for(let i=0;inew q$(e,t).update(n).digest();G$.create=(e,t)=>new q$(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function EK(e){return{hash:e,hmac:(t,...n)=>G$(e,t,zG(...n)),randomBytes:$G}}const id=BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"),rs=BigInt("0x800000000000000000000000000000000000000000000000000000000000000"),K$=252;function lO(e){for(;e[0]===0;)e=e.subarray(1);const t=e.length*8-K$,n=mn(e);return t>0?n>>BigInt(t):n}function Y$(e){return typeof e=="string"&&(e=__(e),e.length&1&&(e="0"+e)),Rs(e)}const ec=SK({a:BigInt(1),b:BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),Fp:U$(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),n:id,nBitLength:K$,Gx:BigInt("874739451078007766457464989774322083649278607533249481151382481072868806602"),Gy:BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),h:BigInt(1),lowS:!1,...EK(y_),bits2int:lO,bits2int_modN:e=>{const t=mn(e).toString(16);return t.length===63&&(e=Y$(t+"0")),un(lO(e),id)}}),AK=ec;function El(e){return nr("",typeof e=="string"?Y$(e):e)}function x_(e){return gi(El(e)).padStart(64,"0")}function Z$(e,t=!1){return ec.getPublicKey(x_(e),t)}function OK(e,t){return ec.getSharedSecret(x_(e),t)}function Q$(e){const{r:t,s:n}=e;if(t<0n||t>=rs)throw new Error(`Signature.r should be [1, ${rs})`);const r=Vm(n,id);if(r<0n||r>=rs)throw new Error(`inv(Signature.s) should be [1, ${rs})`)}function X$(e){const t=El(e);if(mn(t)>=rs)throw new Error(`msgHash should be [0, ${rs})`);return t}function J$(e,t,n){const r=ec.sign(X$(e),x_(t),n);return Q$(r),r}function TK(e,t,n){if(!(e instanceof em)){const r=El(e);try{e=em.fromDER(r)}catch(a){if(!(a instanceof Zo.Err))throw a;e=em.fromCompact(r)}}return Q$(e),ec.verify(e,X$(t),El(n))}const{CURVE:CK,ProjectivePoint:gc,Signature:em,utils:j_}=ec;function eR(e){return`0x${gi(e.subarray(1)).replace(/^0+/gm,"")}`}function __(e){return e.replace(/^0x/i,"")}function tR(e){const t=El(e),n=2n**256n,r=n-un(n,id);for(let a=0;;a++){const o=m1(Sl(t,w_(BigInt(a))));if(oNumber(e&PK);function NK(e,t,n,r){const a=dh(m1(e)),o=dh(m1(t)),i=ky(__(n));return`m/2645'/${a}'/${o}'/${dh(i)}'/${dh(i>>31n)}'/${r}`}const sd=[new gc(2089986280348253421170679821480865132823066470938446095505822317253594081284n,1713931329540660377023406109199410414810705867260802078187082345529207694986n,1n),new gc(996781205833008774514500082376783249102396023663454813447423147977397232763n,1668503676786377725805489344771023921079126552019160156920634619255970485781n,1n),new gc(2251563274489750535117886426533222435294046428347329203627021249169616184184n,1798716007562728905295480679789526322175868328062420237419143593021674992973n,1n),new gc(2138414695194151160943305727036575959195309218611738193261179310511854807447n,113410276730064486255102093846540133784865286929052426931474106396135072156n,1n),new gc(2379962749567351885752724891227938183011949129833673362440656643086021394946n,776496453633298175483985398648758586525933812536653089401905292063708816422n,1n)];function nR(e,t){const n=[];let r=e;for(let a=0;a<248;a++)n.push(r),r=r.double();r=t;for(let a=0;a<4;a++)n.push(r),r=r.double();return n}const MK=nR(sd[1],sd[2]),DK=nR(sd[3],sd[4]);function zK(e){let t;if(typeof e=="bigint")t=e;else if(typeof e=="number"){if(!Number.isSafeInteger(e))throw new Error(`Invalid pedersenArg: ${e}`);t=BigInt(e)}else t=mn(El(e));if(!(0n<=t&&t>=1n}return e}function uu(e,t){let n=sd[0];return n=uO(n,e,MK),n=uO(n,t,DK),eR(n.toRawBytes(!0))}const $K=(e,t=uu)=>[0,...e,e.length].reduce((n,r)=>t(n,r)),RK=xy(250),yi=e=>mn(GG(e))&RK,m1=e=>mn(y_(e)),rR=U$(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));function g1(e,t,n){const r=e.fromBytes(y_(P$(`${t}${n}`)));return e.create(r)}function aR(e,t,n,r=0){const a=[],o=[];for(let i=0;io.map(s=>e.inv(e.sub(i,s))))}const LK=[[3,1,1],[1,-1,1],[1,1,-2]].map(e=>e.map(BigInt));function E_(e,t){if(k_(e.Fp),!Number.isSafeInteger(e.rate)||!Number.isSafeInteger(e.capacity))throw new Error(`Wrong poseidon opts: ${e}`);const n=e.rate+e.capacity,r=e.roundsFull+e.roundsPartial,a=[];for(let i=0;i=Bt?n:t+n}function WK(e,t,n){if(n<=Bt||t 0");if(n===yt)return Bt;let r=yt;for(;t>Bt;)t&yt&&(r=r*e%n),e=e*e%n,t>>=yt;return r}function Qn(e,t,n){let r=e;for(;t-- >Bt;)r*=r,r%=n;return r}function v1(e,t){if(e===Bt||t<=Bt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=kn(e,t),r=t,a=Bt,o=yt;for(;n!==Bt;){const s=r/n,c=r%n,l=a-o*s;r=n,n=c,a=o,o=l}if(r!==yt)throw new Error("invert: does not exist");return kn(a,t)}function qK(e){const t=(e-yt)/Qi;let n,r,a;for(n=e-yt,r=0;n%Qi===Bt;n/=Qi,r++);for(a=Qi;a(r[a]="function",r),t);return wp(e,n)}function oR(e,t,n){if(n 0");if(n===Bt)return e.ONE;if(n===yt)return t;let r=e.ONE,a=t;for(;n>Bt;)n&yt&&(r=e.mul(r,a)),a=e.sqr(a),n>>=yt;return r}function YK(e,t){const n=new Array(t.length),r=t.reduce((o,i,s)=>e.is0(i)?o:(n[s]=o,e.mul(o,i)),e.ONE),a=e.inv(r);return t.reduceRight((o,i,s)=>e.is0(i)?o:(n[s]=e.mul(o,n[s]),e.mul(o,i)),a),n}function iR(e,t){const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function ZK(e,t,n=!1,r={}){if(e<=Bt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:o}=iR(e,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const i=GK(e),s=Object.freeze({ORDER:e,BITS:a,BYTES:o,MASK:d_(a),ZERO:Bt,ONE:yt,create:c=>kn(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return Bt<=c&&cc===Bt,isOdd:c=>(c&yt)===yt,neg:c=>kn(-c,e),eql:(c,l)=>c===l,sqr:c=>kn(c*c,e),add:(c,l)=>kn(c+l,e),sub:(c,l)=>kn(c-l,e),mul:(c,l)=>kn(c*l,e),pow:(c,l)=>oR(s,c,l),div:(c,l)=>kn(c*v1(l,e),e),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>v1(c,e),sqrt:r.sqrt||(c=>i(s,c)),invertBatch:c=>YK(s,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>n?f_(c,o):xl(c,o),fromBytes:c=>{if(c.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${c.length}`);return n?u_(c):ks(c)}});return Object.freeze(s)}function sR(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function cR(e){const t=sR(e);return t+Math.ceil(t/2)}function QK(e,t,n=!1){const r=e.length,a=sR(t),o=cR(t);if(r<16||r1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const i=n?ks(e):u_(e),s=kn(i,t-yt)+yt;return n?f_(s,a):xl(s,a)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function lR(e){const{Fp:t,mds:n,reversePartialPowIdx:r,roundConstants:a}=e,{roundsFull:o,roundsPartial:i,sboxPower:s,t:c}=e;O_(t);for(const g of["t","roundsFull","roundsPartial"])if(typeof e[g]!="number"||!Number.isSafeInteger(e[g]))throw new Error(`Poseidon: invalid param ${g}=${e[g]} (${typeof e[g]})`);if(!Array.isArray(n)||n.length!==c)throw new Error("Poseidon: wrong MDS matrix");const l=n.map(g=>{if(!Array.isArray(g)||g.length!==c)throw new Error(`Poseidon MDS matrix row: ${g}`);return g.map(p=>{if(typeof p!="bigint")throw new Error(`Poseidon MDS matrix value=${p}`);return t.create(p)})});if(r!==void 0&&typeof r!="boolean")throw new Error(`Poseidon: invalid param reversePartialPowIdx=${r}`);if(o%2!==0)throw new Error(`Poseidon roundsFull is not even: ${o}`);const u=o+i;if(!Array.isArray(a)||a.length!==u)throw new Error("Poseidon: wrong round constants");const f=a.map(g=>{if(!Array.isArray(g)||g.length!==c)throw new Error(`Poseidon wrong round constants: ${g}`);return g.map(p=>{if(typeof p!="bigint"||!t.isValid(p))throw new Error(`Poseidon wrong round constant=${p}`);return t.create(p)})});if(!s||![3,5,7].includes(s))throw new Error(`Poseidon wrong sboxPower=${s}`);const d=BigInt(s);let h=g=>oR(t,g,d);return s===3?h=g=>t.mul(t.sqrN(g),g):s===5&&(h=g=>t.mul(t.sqrN(t.sqrN(g)),g)),Object.freeze({...e,rounds:u,sboxFn:h,roundConstants:f,mds:l})}function XK(e,t){if(typeof t!="number")throw new Error("poseidonSplitConstants: wrong t");if(!Array.isArray(e)||e.length%t)throw new Error("poseidonSplitConstants: wrong rc");const n=[];let r=[];for(let a=0;a(h=h.map((m,y)=>n.add(m,a[p][y])),g?h=h.map(m=>s(m)):h[u]=s(h[u]),h=r.map(m=>m.reduce((y,v,b)=>n.add(y,n.mulN(v,h[b])),n.ZERO)),h),d=function(g){if(!Array.isArray(g)||g.length!==c)throw new Error(`Poseidon: wrong values (expected array of bigints with length ${c})`);g=g.map(m=>{if(typeof m!="bigint")throw new Error(`Poseidon: wrong value=${m} (${typeof m})`);return n.create(m)});let p=0;for(let m=0;m{const i=o.negate();return a?i:o},r=a=>{const o=Math.ceil(t/a)+1,i=2**(a-1);return{windows:o,windowSize:i}};return{constTimeNegate:n,unsafeLadder(a,o){let i=e.ZERO,s=a;for(;o>tY;)o&Nb&&(i=i.add(s)),s=s.double(),o>>=Nb;return i},precomputeWindow(a,o){const{windows:i,windowSize:s}=r(o),c=[];let l=a,u=l;for(let f=0;f>=h,m>c&&(m-=d,i+=Nb);const y=p,v=p+Math.abs(m)-1,b=g%2!==0,k=m<0;m===0?u=u.add(n(b,o[y])):l=l.add(n(k,o[v]))}return{p:l,f:u}},wNAFCached(a,o,i,s){const c=a._WINDOW_SIZE||1;let l=o.get(a);return l||(l=this.precomputeWindow(a,c),c!==1&&o.set(a,s(l))),this.wNAF(c,l,i)}}}function uR(e){return O_(e.Fp),wp(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...iR(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function rY(e){const t=uR(e);wp(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:n,Fp:r,a}=t;if(n){if(!r.eql(a,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:aY,hexToBytes:oY}=tG,Qo={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){const{Err:t}=Qo;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");const n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:aY(r),l:e.subarray(n+2)}},toSig(e){const{Err:t}=Qo,n=typeof e=="string"?oY(e):e;bp(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:a,l:o}=Qo._parseInt(n.subarray(2)),{d:i,l:s}=Qo._parseInt(o);if(s.length)throw new t("Invalid signature: left bytes after parsing");return{r:a,s:i}},hexFromSig(e){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,n=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},r=t(n(e.s)),a=t(n(e.r)),o=r.length/2,i=a.length/2,s=n(o),c=n(i);return`30${n(i+o+4)}02${c}${a}02${s}${r}`}},Ir=BigInt(0),ft=BigInt(1),Eo=BigInt(2),Wm=BigInt(3),pO=BigInt(4);function fR(e){const t=rY(e),{Fp:n}=t,r=t.toBytes||((g,p,m)=>{const y=p.toAffine();return od(Uint8Array.from([4]),n.toBytes(y.x),n.toBytes(y.y))}),a=t.fromBytes||(g=>{const p=g.subarray(1),m=n.fromBytes(p.subarray(0,n.BYTES)),y=n.fromBytes(p.subarray(n.BYTES,2*n.BYTES));return{x:m,y}});function o(g){const{a:p,b:m}=t,y=n.sqr(g),v=n.mul(y,g);return n.add(n.add(v,n.mul(g,p)),m)}if(!n.eql(n.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function i(g){return typeof g=="bigint"&&Irn.eql(b,n.ZERO);return v(m)&&v(y)?f.ZERO:new f(m,y,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){const m=n.invertBatch(p.map(y=>y.pz));return p.map((y,v)=>y.toAffine(m[v])).map(f.fromAffine)}static fromHex(p){const m=f.fromAffine(a(Sr("pointHex",p)));return m.assertValidity(),m}static fromPrivateKey(p){return f.BASE.multiply(c(p))}_setWindowSize(p){this._WINDOW_SIZE=p,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:p,y:m}=this.toAffine();if(!n.isValid(p)||!n.isValid(m))throw new Error("bad point: x or y not FE");const y=n.sqr(m),v=o(p);if(!n.eql(y,v))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:p}=this.toAffine();if(n.isOdd)return!n.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);const{px:m,py:y,pz:v}=this,{px:b,py:k,pz:w}=p,x=n.eql(n.mul(m,w),n.mul(b,v)),j=n.eql(n.mul(y,w),n.mul(k,v));return x&&j}negate(){return new f(this.px,n.neg(this.py),this.pz)}double(){const{a:p,b:m}=t,y=n.mul(m,Wm),{px:v,py:b,pz:k}=this;let w=n.ZERO,x=n.ZERO,j=n.ZERO,S=n.mul(v,v),A=n.mul(b,b),C=n.mul(k,k),O=n.mul(v,b);return O=n.add(O,O),j=n.mul(v,k),j=n.add(j,j),w=n.mul(p,j),x=n.mul(y,C),x=n.add(w,x),w=n.sub(A,x),x=n.add(A,x),x=n.mul(w,x),w=n.mul(O,w),j=n.mul(y,j),C=n.mul(p,C),O=n.sub(S,C),O=n.mul(p,O),O=n.add(O,j),j=n.add(S,S),S=n.add(j,S),S=n.add(S,C),S=n.mul(S,O),x=n.add(x,S),C=n.mul(b,k),C=n.add(C,C),S=n.mul(C,O),w=n.sub(w,S),j=n.mul(C,A),j=n.add(j,j),j=n.add(j,j),new f(w,x,j)}add(p){u(p);const{px:m,py:y,pz:v}=this,{px:b,py:k,pz:w}=p;let x=n.ZERO,j=n.ZERO,S=n.ZERO;const A=t.a,C=n.mul(t.b,Wm);let O=n.mul(m,b),N=n.mul(y,k),L=n.mul(v,w),z=n.add(m,y),T=n.add(b,k);z=n.mul(z,T),T=n.add(O,N),z=n.sub(z,T),T=n.add(m,v);let I=n.add(b,w);return T=n.mul(T,I),I=n.add(O,L),T=n.sub(T,I),I=n.add(y,v),x=n.add(k,w),I=n.mul(I,x),x=n.add(N,L),I=n.sub(I,x),S=n.mul(A,T),x=n.mul(C,L),S=n.add(x,S),x=n.sub(N,S),S=n.add(N,S),j=n.mul(x,S),N=n.add(O,O),N=n.add(N,O),L=n.mul(A,L),T=n.mul(C,T),N=n.add(N,L),L=n.sub(O,L),L=n.mul(A,L),T=n.add(T,L),O=n.mul(N,T),j=n.add(j,O),O=n.mul(I,T),x=n.mul(z,x),x=n.sub(x,O),O=n.mul(z,N),S=n.mul(I,S),S=n.add(S,O),new f(x,j,S)}subtract(p){return this.add(p.negate())}is0(){return this.equals(f.ZERO)}wNAF(p){return h.wNAFCached(this,l,p,m=>{const y=n.invertBatch(m.map(v=>v.pz));return m.map((v,b)=>v.toAffine(y[b])).map(f.fromAffine)})}multiplyUnsafe(p){const m=f.ZERO;if(p===Ir)return m;if(s(p),p===ft)return this;const{endo:y}=t;if(!y)return h.unsafeLadder(this,p);let{k1neg:v,k1:b,k2neg:k,k2:w}=y.splitScalar(p),x=m,j=m,S=this;for(;b>Ir||w>Ir;)b&ft&&(x=x.add(S)),w&ft&&(j=j.add(S)),S=S.double(),b>>=ft,w>>=ft;return v&&(x=x.negate()),k&&(j=j.negate()),j=new f(n.mul(j.px,y.beta),j.py,j.pz),x.add(j)}multiply(p){s(p);let m=p,y,v;const{endo:b}=t;if(b){const{k1neg:k,k1:w,k2neg:x,k2:j}=b.splitScalar(m);let{p:S,f:A}=this.wNAF(w),{p:C,f:O}=this.wNAF(j);S=h.constTimeNegate(k,S),C=h.constTimeNegate(x,C),C=new f(n.mul(C.px,b.beta),C.py,C.pz),y=S.add(C),v=A.add(O)}else{const{p:k,f:w}=this.wNAF(m);y=k,v=w}return f.normalizeZ([y,v])[0]}multiplyAndAddUnsafe(p,m,y){const v=f.BASE,b=(w,x)=>x===Ir||x===ft||!w.equals(v)?w.multiplyUnsafe(x):w.multiply(x),k=b(this,m).add(b(p,y));return k.is0()?void 0:k}toAffine(p){const{px:m,py:y,pz:v}=this,b=this.is0();p==null&&(p=b?n.ONE:n.inv(v));const k=n.mul(m,p),w=n.mul(y,p),x=n.mul(v,p);if(b)return{x:n.ZERO,y:n.ZERO};if(!n.eql(x,n.ONE))throw new Error("invZ was invalid");return{x:k,y:w}}isTorsionFree(){const{h:p,isTorsionFree:m}=t;if(p===ft)return!0;if(m)return m(f,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:p,clearCofactor:m}=t;return p===ft?this:m?m(f,this):this.multiplyUnsafe(t.h)}toRawBytes(p=!0){return this.assertValidity(),r(f,this,p)}toHex(p=!0){return zs(this.toRawBytes(p))}}f.BASE=new f(t.Gx,t.Gy,n.ONE),f.ZERO=new f(n.ZERO,n.ONE,n.ZERO);const d=t.nBitLength,h=nY(f,t.endo?Math.ceil(d/2):d);return{CURVE:t,ProjectivePoint:f,normPrivateKeyToScalar:c,weierstrassEquation:o,isWithinCurveOrder:i}}function iY(e){const t=uR(e);return wp(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function dR(e){const t=iY(e),{Fp:n,n:r}=t,a=n.BYTES+1,o=2*n.BYTES+1;function i(T){return Irzs(xl(T,t.nByteLength));function g(T){const I=r>>ft;return T>I}function p(T){return g(T)?s(-T):T}const m=(T,I,M)=>ks(T.slice(I,M));class y{constructor(I,M,P){this.r=I,this.s=M,this.recovery=P,this.assertValidity()}static fromCompact(I){const M=t.nByteLength;return I=Sr("compactSignature",I,M*2),new y(m(I,0,M),m(I,M,2*M))}static fromDER(I){const{r:M,s:P}=Qo.toSig(Sr("DER",I));return new y(M,P)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(I){return new y(this.r,this.s,I)}recoverPublicKey(I){const{r:M,s:P,recovery:D}=this,U=j(Sr("msgHash",I));if(D==null||![0,1,2,3].includes(D))throw new Error("recovery id invalid");const W=D===2||D===3?M+t.n:M;if(W>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");const q=D&1?"03":"02",ne=l.fromHex(q+h(W)),$=c(W),H=s(-U*$),G=s(P*$),Q=l.BASE.multiplyAndAddUnsafe(ne,H,G);if(!Q)throw new Error("point at infinify");return Q.assertValidity(),Q}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return $s(this.toDERHex())}toDERHex(){return Qo.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return $s(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const v={isValidPrivateKey(T){try{return u(T),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const T=cR(t.n);return QK(t.randomBytes(T),t.n)},precompute(T=8,I=l.BASE){return I._setWindowSize(T),I.multiply(BigInt(3)),I}};function b(T,I=!0){return l.fromPrivateKey(T).toRawBytes(I)}function k(T){const I=Ds(T),M=typeof T=="string",P=(I||M)&&T.length;return I?P===a||P===o:M?P===2*a||P===2*o:T instanceof l}function w(T,I,M=!0){if(k(T))throw new Error("first arg must be private key");if(!k(I))throw new Error("second arg must be public key");return l.fromHex(I).multiply(u(T)).toRawBytes(M)}const x=t.bits2int||function(T){const I=ks(T),M=T.length*8-t.nBitLength;return M>0?I>>BigInt(M):I},j=t.bits2int_modN||function(T){return s(x(T))},S=d_(t.nBitLength);function A(T){if(typeof T!="bigint")throw new Error("bigint expected");if(!(Ir<=T&&TV in M))throw new Error("sign() legacy options not supported");const{hash:P,randomBytes:D}=t;let{lowS:U,prehash:W,extraEntropy:q}=M;U==null&&(U=!0),T=Sr("msgHash",T),W&&(T=Sr("prehashed msgHash",P(T)));const ne=j(T),$=u(I),H=[A($),A(ne)];if(q!=null&&q!==!1){const V=q===!0?D(n.BYTES):q;H.push(Sr("extraEntropy",V))}const G=od(...H),Q=ne;function te(V){const Z=x(V);if(!d(Z))return;const J=c(Z),F=l.BASE.multiply(Z).toAffine(),re=s(F.x);if(re===Ir)return;const ce=s(J*s(Q+re*$));if(ce===Ir)return;let je=(F.x===re?0:2)|Number(F.y&ft),we=ce;return U&&g(ce)&&(we=p(ce),je^=1),new y(re,we,je)}return{seed:G,k2sig:te}}const O={lowS:t.lowS,prehash:!1},N={lowS:t.lowS,prehash:!1};function L(T,I,M=O){const{seed:P,k2sig:D}=C(T,I,M),U=t;return _$(U.hash.outputLen,U.nByteLength,U.hmac)(P,D)}l.BASE._setWindowSize(8);function z(T,I,M,P=N){var F;const D=T;if(I=Sr("msgHash",I),M=Sr("publicKey",M),"strict"in P)throw new Error("options.strict was renamed to lowS");const{lowS:U,prehash:W}=P;let q,ne;try{if(typeof D=="string"||Ds(D))try{q=y.fromDER(D)}catch(re){if(!(re instanceof Qo.Err))throw re;q=y.fromCompact(D)}else if(typeof D=="object"&&typeof D.r=="bigint"&&typeof D.s=="bigint"){const{r:re,s:ce}=D;q=new y(re,ce)}else throw new Error("PARSE");ne=l.fromHex(M)}catch(re){if(re.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(U&&q.hasHighS())return!1;W&&(I=t.hash(I));const{r:$,s:H}=q,G=j(I),Q=c(H),te=s(G*Q),V=s($*Q),Z=(F=l.BASE.multiplyAndAddUnsafe(ne,te,V))==null?void 0:F.toAffine();return Z?s(Z.x)===$:!1}return{CURVE:t,getPublicKey:b,getSharedSecret:w,sign:L,verify:z,ProjectivePoint:l,Signature:y,utils:v}}function pR(e,t){const n=e.ORDER;let r=Ir;for(let g=n-ft;g%Eo===Ir;g/=Eo)r+=ft;const a=r,o=Eo<{let m=f,y=e.pow(p,l),v=e.sqr(y);v=e.mul(v,p);let b=e.mul(g,v);b=e.pow(b,c),b=e.mul(b,y),y=e.mul(b,p),v=e.mul(b,g);let k=e.mul(v,y);b=e.pow(k,u);let w=e.eql(b,e.ONE);y=e.mul(v,d),b=e.mul(k,m),v=e.cmov(y,v,w),k=e.cmov(b,k,w);for(let x=a;x>ft;x--){let j=x-Eo;j=Eo<{let v=e.sqr(y);const b=e.mul(m,y);v=e.mul(v,b);let k=e.pow(v,g);k=e.mul(k,b);const w=e.mul(k,p),x=e.mul(e.sqr(k),y),j=e.eql(x,m);let S=e.cmov(w,k,j);return{isValid:j,value:S}}}return h}function sY(e,t){if(O_(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const n=pR(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let a,o,i,s,c,l,u,f;a=e.sqr(r),a=e.mul(a,t.Z),o=e.sqr(a),o=e.add(o,a),i=e.add(o,e.ONE),i=e.mul(i,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(i),l=e.sqr(s),c=e.mul(l,t.A),o=e.add(o,c),o=e.mul(o,i),l=e.mul(l,s),c=e.mul(l,t.B),o=e.add(o,c),u=e.mul(a,i);const{isValid:d,value:h}=n(o,l);f=e.mul(a,r),f=e.mul(f,h),u=e.cmov(u,i,d),f=e.cmov(f,h,d);const g=e.isOdd(r)===e.isOdd(f);return f=e.cmov(e.neg(f),f,g),u=e.div(u,s),{x:u,y:f}}}const cY=Object.freeze(Object.defineProperty({__proto__:null,DER:Qo,SWUFpSqrtRatio:pR,mapToCurveSimpleSWU:sY,weierstrass:dR,weierstrassPoints:fR},Symbol.toStringTag,{value:"Module"}));function jy(e){return lY.test(e)}const lY=/^-?[0-9]+$/;function hR(e){return uY.test(e)}const uY=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function fY(e,t){const n=Number.parseFloat(e),r=String(n),a=hO(e),o=hO(r);return a===o}let lf=function(e){return e.underflow="underflow",e.overflow="overflow",e.truncate_integer="truncate_integer",e.truncate_float="truncate_float",e}({});function dY(e){if(fY(e))return;if(jy(e))return lf.truncate_integer;const t=Number.parseFloat(e);return Number.isFinite(t)?t===0?lf.underflow:lf.truncate_float:lf.overflow}function hO(e){return e.replace(pY,"").replace(mY,"").replace(gY,"").replace(hY,"")}const pY=/[eE][+-]?\d+$/,hY=/^-?(0*)?/,mY=/\./,gY=/0+$/;class yY{constructor(t){ae(this,"isLosslessNumber",!0);if(!hR(t))throw new Error(`Invalid number (value: "${t}")`);this.value=t}valueOf(){const t=dY(this.value);if(t===void 0||t===lf.truncate_float)return Number.parseFloat(this.value);if(jy(this.value))return BigInt(this.value);throw new Error(`Cannot safely convert to number: the value '${this.value}' would ${t} and become ${Number.parseFloat(this.value)}`)}toString(){return this.value}}function vY(e){return e&&typeof e=="object"&&e.isLosslessNumber===!0||!1}function bY(e){return new yY(e)}function wY(e){return jy(e)?BigInt(e):Number.parseFloat(e)}function kY(e,t){return T_({"":e},"",e,t)}function T_(e,t,n,r){return Array.isArray(n)?r.call(e,t,jY(n,r)):n&&typeof n=="object"&&!vY(n)?r.call(e,t,xY(n,r)):r.call(e,t,n)}function xY(e,t){for(const n of Object.keys(e)){const r=T_(e,n,e[n],t);r!==void 0?e[n]=r:delete e[n]}return e}function jY(e,t){for(let n=0;n2&&arguments[2]!==void 0?arguments[2]:bY,r=0;const a=s();return g(a),m(),t?kY(a,t):a;function o(){if(e.charCodeAt(r)===TY){r++,l();const z={};let T=!0;for(;rz)return n(e.slice(z,r))}function d(){if(e.charCodeAt(r)!==$Y)throw new SyntaxError(`Comma ',' expected after value ${L()}`);r++}function h(){if(e.charCodeAt(r)!==LY)throw new SyntaxError(`Colon ':' expected after property name ${L()}`);r++}function g(z){if(z===void 0)throw new SyntaxError(`JSON value expected ${L()}`)}function p(z){if(z===void 0)throw new SyntaxError(`Array item expected ${L()}`)}function m(){if(r=C_&&e<=I_||e>=BY&&e<=VY||e>=FY&&e<=WY}function hh(e){return e>=C_&&e<=I_}function SY(e){return e>=zY&&e<=I_}function EY(e){return e>=32&&e<=1114111}function b1(e,t){return e===t?!0:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>b1(n,t[r])):mO(e)&&mO(t)?[...new Set([...Object.keys(e),...Object.keys(t)])].every(r=>b1(e[r],t[r])):!1}function mO(e){return typeof e=="object"&&e!==null}const AY={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` +`,r:"\r",t:" "},OY=92,TY=123,gO=125,CY=91,yO=93,IY=32,PY=10,NY=9,MY=13,Mb=34,DY=43,vO=45,C_=48,zY=49,I_=57,$Y=44,RY=46,LY=58,BY=65,FY=97,UY=69,HY=101,VY=70,WY=102;function gR(e,t,n,r){const a=qY(n),o=typeof t=="function"?t.call({"":e},"",e):e;return i(o,"");function i(u,f){if(Array.isArray(r)){const d=r.find(h=>h.test(u));if(d){const h=d.stringify(u);if(typeof h!="string"||!hR(h))throw new Error(`Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${h})`);return h}}if(typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u===null||u instanceof Date||u instanceof Boolean||u instanceof Number||u instanceof String)return JSON.stringify(u);if(u!=null&&u.isLosslessNumber||typeof u=="bigint")return u.toString();if(Array.isArray(u))return s(u,f);if(u&&typeof u=="object")return c(u,f)}function s(u,f){if(u.length===0)return"[]";const d=a?f+a:void 0;let h=a?`[ +`:"[";for(let g=0;g=0;)e[t]=0}const YY=0,yR=1,ZY=2,QY=3,XY=258,P_=29,jp=256,cd=jp+1+P_,Wc=30,N_=19,vR=2*cd+1,as=15,Db=16,JY=7,M_=256,bR=16,wR=17,kR=18,w1=new Uint8Array([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]),tm=new Uint8Array([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]),eZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),xR=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tZ=512,Va=new Array((cd+2)*2);fu(Va);const Tf=new Array(Wc*2);fu(Tf);const ld=new Array(tZ);fu(ld);const ud=new Array(XY-QY+1);fu(ud);const D_=new Array(P_);fu(D_);const qm=new Array(Wc);fu(qm);function zb(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let jR,_R,SR;function $b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const ER=e=>e<256?ld[e]:ld[256+(e>>>7)],fd=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},_n=(e,t,n)=>{e.bi_valid>Db-n?(e.bi_buf|=t<>Db-e.bi_valid,e.bi_valid+=n-Db):(e.bi_buf|=t<{_n(e,n[t*2],n[t*2+1])},AR=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},nZ=e=>{e.bi_valid===16?(fd(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},rZ=(e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,f,d,h,g,p=0;for(d=0;d<=as;d++)e.bl_count[d]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;lc&&(d=c,p++),n[u*2+1]=d,!(u>r)&&(e.bl_count[d]++,h=0,u>=s&&(h=i[u-s]),g=n[u*2],e.opt_len+=g*(d+h),o&&(e.static_len+=g*(a[u*2+1]+h)));if(p!==0){do{for(d=c-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[c]--,p-=2}while(p>0);for(d=c;d!==0;d--)for(u=e.bl_count[d];u!==0;)f=e.heap[--l],!(f>r)&&(n[f*2+1]!==d&&(e.opt_len+=(d-n[f*2+1])*n[f*2],n[f*2+1]=d),u--)}},OR=(e,t,n)=>{const r=new Array(as+1);let a=0,o,i;for(o=1;o<=as;o++)a=a+n[o-1]<<1,r[o]=a;for(i=0;i<=t;i++){let s=e[i*2+1];s!==0&&(e[i*2]=AR(r[s]++,s))}},aZ=()=>{let e,t,n,r,a;const o=new Array(as+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?fd(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},kO=(e,t,n,r)=>{const a=t*2,o=n*2;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o=0,i,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,a=e.pending_buf[e.sym_buf+o++],r===0?la(e,a,t):(i=ud[a],la(e,i+jp+1,t),s=w1[i],s!==0&&(a-=D_[i],_n(e,a,s)),r--,i=ER(r),la(e,i,n),s=tm[i],s!==0&&(r-=qm[i],_n(e,r,s)));while(o{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,s,c=-1,l;for(e.heap_len=0,e.heap_max=vR,i=0;i>1;i>=1;i--)Rb(e,n,i);l=o;do i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Rb(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=s,n[l*2]=n[i*2]+n[s*2],e.depth[l]=(e.depth[i]>=e.depth[s]?e.depth[i]:e.depth[s])+1,n[i*2+1]=n[s*2+1]=l,e.heap[1]=l++,Rb(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],rZ(e,t),OR(n,c,e.bl_count)},jO=(e,t,n)=>{let r,a=-1,o,i=t[0*2+1],s=0,c=7,l=4;for(i===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=i,i=t[(r+1)*2+1],!(++s{let r,a=-1,o,i=t[0*2+1],s=0,c=7,l=4;for(i===0&&(c=138,l=3),r=0;r<=n;r++)if(o=i,i=t[(r+1)*2+1],!(++s{let t;for(jO(e,e.dyn_ltree,e.l_desc.max_code),jO(e,e.dyn_dtree,e.d_desc.max_code),k1(e,e.bl_desc),t=N_-1;t>=3&&e.bl_tree[xR[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},iZ=(e,t,n,r)=>{let a;for(_n(e,t-257,5),_n(e,n-1,5),_n(e,r-4,4),a=0;a{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return bO;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return wO;for(n=32;n{SO||(aZ(),SO=!0),e.l_desc=new $b(e.dyn_ltree,jR),e.d_desc=new $b(e.dyn_dtree,_R),e.bl_desc=new $b(e.bl_tree,SR),e.bi_buf=0,e.bi_valid=0,TR(e)},IR=(e,t,n,r)=>{_n(e,(YY<<1)+(r?1:0),3),CR(e),fd(e,n),fd(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},lZ=e=>{_n(e,yR<<1,3),la(e,M_,Va),nZ(e)},uZ=(e,t,n,r)=>{let a,o,i=0;e.level>0?(e.strm.data_type===KY&&(e.strm.data_type=sZ(e)),k1(e,e.l_desc),k1(e,e.d_desc),i=oZ(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&t!==-1?IR(e,t,n,r):e.strategy===GY||o===a?(_n(e,(yR<<1)+(r?1:0),3),xO(e,Va,Tf)):(_n(e,(ZY<<1)+(r?1:0),3),iZ(e,e.l_desc.max_code+1,e.d_desc.max_code+1,i+1),xO(e,e.dyn_ltree,e.dyn_dtree)),TR(e),r&&CR(e)},fZ=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(ud[n]+jp+1)*2]++,e.dyn_dtree[ER(t)*2]++),e.sym_next===e.sym_end);var dZ=cZ,pZ=IR,hZ=uZ,mZ=fZ,gZ=lZ,yZ={_tr_init:dZ,_tr_stored_block:pZ,_tr_flush_block:hZ,_tr_tally:mZ,_tr_align:gZ};const vZ=(e,t,n,r)=>{let a=e&65535|0,o=e>>>16&65535|0,i=0;for(;n!==0;){i=n>2e3?2e3:n,n-=i;do a=a+t[r++]|0,o=o+a|0;while(--i);a%=65521,o%=65521}return a|o<<16|0};var dd=vZ;const bZ=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},wZ=new Uint32Array(bZ()),kZ=(e,t,n,r)=>{const a=wZ,o=r+n;e^=-1;for(let i=r;i>>8^a[(e^t[i])&255];return e^-1};var Dt=kZ,Ls={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"},du={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_MEM_ERROR:-4,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};const{_tr_init:xZ,_tr_stored_block:x1,_tr_flush_block:jZ,_tr_tally:li,_tr_align:_Z}=yZ,{Z_NO_FLUSH:ui,Z_PARTIAL_FLUSH:SZ,Z_FULL_FLUSH:EZ,Z_FINISH:cr,Z_BLOCK:EO,Z_OK:Kt,Z_STREAM_END:AO,Z_STREAM_ERROR:ga,Z_DATA_ERROR:AZ,Z_BUF_ERROR:Lb,Z_DEFAULT_COMPRESSION:OZ,Z_FILTERED:TZ,Z_HUFFMAN_ONLY:mh,Z_RLE:CZ,Z_FIXED:IZ,Z_DEFAULT_STRATEGY:PZ,Z_UNKNOWN:NZ,Z_DEFLATED:_y}=du,MZ=9,DZ=15,zZ=8,$Z=29,RZ=256,j1=RZ+1+$Z,LZ=30,BZ=19,FZ=2*j1+1,UZ=15,Se=3,Xo=258,ya=Xo+Se+1,HZ=32,Al=42,z_=57,_1=69,S1=73,E1=91,A1=103,os=113,uf=666,fn=1,pu=2,Bs=3,hu=4,VZ=3,is=(e,t)=>(e.msg=Ls[t],t),OO=e=>e*2-(e>4?9:0),Ro=e=>{let t=e.length;for(;--t>=0;)e[t]=0},WZ=e=>{let t,n,r,a=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=a?n-a:0;while(--t);t=a,r=t;do n=e.prev[--r],e.prev[r]=n>=a?n-a:0;while(--t)};let qZ=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Vn=(e,t)=>{jZ(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Mn(e.strm)},Me=(e,t)=>{e.pending_buf[e.pending++]=t},qu=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},O1=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),a===0?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),e.state.wrap===1?e.adler=dd(e.adler,t,a,n):e.state.wrap===2&&(e.adler=Dt(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},PR=(e,t)=>{let n=e.max_chain_length,r=e.strstart,a,o,i=e.prev_length,s=e.nice_match;const c=e.strstart>e.w_size-ya?e.strstart-(e.w_size-ya):0,l=e.window,u=e.w_mask,f=e.prev,d=e.strstart+Xo;let h=l[r+i-1],g=l[r+i];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(a=t,!(l[a+i]!==g||l[a+i-1]!==h||l[a]!==l[r]||l[++a]!==l[r+1])){r+=2,a++;do;while(l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&l[++r]===l[++a]&&ri){if(e.match_start=t,i=o,o>=s)break;h=l[r+i-1],g=l[r+i]}}while((t=f[t&u])>c&&--n!==0);return i<=e.lookahead?i:e.lookahead},Ol=e=>{const t=e.w_size;let n,r,a;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ya)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),WZ(e),r+=t),e.strm.avail_in===0)break;if(n=O1(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=Se)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=fi(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=fi(e,e.ins_h,e.window[a+Se-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,a,o,i=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outa+e.strm.avail_in&&(r=a+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Mn(e.strm),a&&(a>r&&(a=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+a),e.strm.next_out),e.strm.next_out+=a,e.strm.avail_out-=a,e.strm.total_out+=a,e.block_start+=a,r-=a),r&&(O1(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(i===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(O1(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,a=e.strstart-e.block_start,(a>=n||(a||t===cr)&&t!==ui&&e.strm.avail_in===0&&a<=o)&&(r=a>o?o:a,i=t===cr&&e.strm.avail_in===0&&r===a?1:0,x1(e,e.block_start,r,i),e.block_start+=r,Mn(e.strm)),i?Bs:fn)},Bb=(e,t)=>{let n,r;for(;;){if(e.lookahead=Se&&(e.ins_h=fi(e,e.ins_h,e.window[e.strstart+Se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-ya&&(e.match_length=PR(e,n)),e.match_length>=Se)if(r=li(e,e.strstart-e.match_start,e.match_length-Se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Se){e.match_length--;do e.strstart++,e.ins_h=fi(e,e.ins_h,e.window[e.strstart+Se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=fi(e,e.ins_h,e.window[e.strstart+1]);else r=li(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Vn(e,!1),e.strm.avail_out===0))return fn}return e.insert=e.strstart{let n,r,a;for(;;){if(e.lookahead=Se&&(e.ins_h=fi(e,e.ins_h,e.window[e.strstart+Se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Se-1,n!==0&&e.prev_length4096)&&(e.match_length=Se-1)),e.prev_length>=Se&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-Se,r=li(e,e.strstart-1-e.prev_match,e.prev_length-Se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=fi(e,e.ins_h,e.window[e.strstart+Se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Se-1,e.strstart++,r&&(Vn(e,!1),e.strm.avail_out===0))return fn}else if(e.match_available){if(r=li(e,0,e.window[e.strstart-1]),r&&Vn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return fn}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=li(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=Xo){if(Ol(e),e.lookahead<=Xo&&t===ui)return fn;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Se&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+Xo;do;while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Se?(n=li(e,1,e.match_length-Se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=li(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Vn(e,!1),e.strm.avail_out===0))return fn}return e.insert=0,t===cr?(Vn(e,!0),e.strm.avail_out===0?Bs:hu):e.sym_next&&(Vn(e,!1),e.strm.avail_out===0)?fn:pu},KZ=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Ol(e),e.lookahead===0)){if(t===ui)return fn;break}if(e.match_length=0,n=li(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Vn(e,!1),e.strm.avail_out===0))return fn}return e.insert=0,t===cr?(Vn(e,!0),e.strm.avail_out===0?Bs:hu):e.sym_next&&(Vn(e,!1),e.strm.avail_out===0)?fn:pu};function Gr(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const ff=[new Gr(0,0,0,0,NR),new Gr(4,4,8,4,Bb),new Gr(4,5,16,8,Bb),new Gr(4,6,32,32,Bb),new Gr(4,4,16,16,dc),new Gr(8,16,32,32,dc),new Gr(8,16,128,128,dc),new Gr(8,32,128,256,dc),new Gr(32,128,258,1024,dc),new Gr(32,258,258,4096,dc)],YZ=e=>{e.window_size=2*e.w_size,Ro(e.head),e.max_lazy_match=ff[e.level].max_lazy,e.good_match=ff[e.level].good_length,e.nice_match=ff[e.level].nice_length,e.max_chain_length=ff[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Se-1,e.match_available=0,e.ins_h=0};function ZZ(){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=_y,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 Uint16Array(FZ*2),this.dyn_dtree=new Uint16Array((2*LZ+1)*2),this.bl_tree=new Uint16Array((2*BZ+1)*2),Ro(this.dyn_ltree),Ro(this.dyn_dtree),Ro(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(UZ+1),this.heap=new Uint16Array(2*j1+1),Ro(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*j1+1),Ro(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const _p=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Al&&t.status!==z_&&t.status!==_1&&t.status!==S1&&t.status!==E1&&t.status!==A1&&t.status!==os&&t.status!==uf?1:0},MR=e=>{if(_p(e))return is(e,ga);e.total_in=e.total_out=0,e.data_type=NZ;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?z_:t.wrap?Al:os,e.adler=t.wrap===2?0:1,t.last_flush=-2,xZ(t),Kt},DR=e=>{const t=MR(e);return t===Kt&&YZ(e.state),t},QZ=(e,t)=>_p(e)||e.state.wrap!==2?ga:(e.state.gzhead=t,Kt),zR=(e,t,n,r,a,o)=>{if(!e)return ga;let i=1;if(t===OZ&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>MZ||n!==_y||r<8||r>15||t<0||t>9||o<0||o>IZ||r===8&&i!==1)return is(e,ga);r===8&&(r=9);const s=new ZZ;return e.state=s,s.strm=e,s.status=Al,s.wrap=i,s.gzhead=null,s.w_bits=r,s.w_size=1<zR(e,t,_y,DZ,zZ,PZ),JZ=(e,t)=>{if(_p(e)||t>EO||t<0)return e?is(e,ga):ga;const n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===uf&&t!==cr)return is(e,e.avail_out===0?Lb:ga);const r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Mn(e),e.avail_out===0)return n.last_flush=-1,Kt}else if(e.avail_in===0&&OO(t)<=OO(r)&&t!==cr)return is(e,Lb);if(n.status===uf&&e.avail_in!==0)return is(e,Lb);if(n.status===Al&&n.wrap===0&&(n.status=os),n.status===Al){let a=_y+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=mh||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,a|=o<<6,n.strstart!==0&&(a|=HZ),a+=31-a%31,qu(n,a),n.strstart!==0&&(qu(n,e.adler>>>16),qu(n,e.adler&65535)),e.adler=1,n.status=os,Mn(e),n.pending!==0)return n.last_flush=-1,Kt}if(n.status===z_){if(e.adler=0,Me(n,31),Me(n,139),Me(n,8),n.gzhead)Me(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Me(n,n.gzhead.time&255),Me(n,n.gzhead.time>>8&255),Me(n,n.gzhead.time>>16&255),Me(n,n.gzhead.time>>24&255),Me(n,n.level===9?2:n.strategy>=mh||n.level<2?4:0),Me(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Me(n,n.gzhead.extra.length&255),Me(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Dt(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=_1;else if(Me(n,0),Me(n,0),Me(n,0),Me(n,0),Me(n,0),Me(n,n.level===9?2:n.strategy>=mh||n.level<2?4:0),Me(n,VZ),n.status=os,Mn(e),n.pending!==0)return n.last_flush=-1,Kt}if(n.status===_1){if(n.gzhead.extra){let a=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>a&&(e.adler=Dt(e.adler,n.pending_buf,n.pending-a,a)),n.gzindex+=s,Mn(e),n.pending!==0)return n.last_flush=-1,Kt;a=0,o-=s}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>a&&(e.adler=Dt(e.adler,n.pending_buf,n.pending-a,a)),n.gzindex=0}n.status=S1}if(n.status===S1){if(n.gzhead.name){let a=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>a&&(e.adler=Dt(e.adler,n.pending_buf,n.pending-a,a)),Mn(e),n.pending!==0)return n.last_flush=-1,Kt;a=0}n.gzindexa&&(e.adler=Dt(e.adler,n.pending_buf,n.pending-a,a)),n.gzindex=0}n.status=E1}if(n.status===E1){if(n.gzhead.comment){let a=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>a&&(e.adler=Dt(e.adler,n.pending_buf,n.pending-a,a)),Mn(e),n.pending!==0)return n.last_flush=-1,Kt;a=0}n.gzindexa&&(e.adler=Dt(e.adler,n.pending_buf,n.pending-a,a))}n.status=A1}if(n.status===A1){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Mn(e),n.pending!==0))return n.last_flush=-1,Kt;Me(n,e.adler&255),Me(n,e.adler>>8&255),e.adler=0}if(n.status=os,Mn(e),n.pending!==0)return n.last_flush=-1,Kt}if(e.avail_in!==0||n.lookahead!==0||t!==ui&&n.status!==uf){let a=n.level===0?NR(n,t):n.strategy===mh?KZ(n,t):n.strategy===CZ?GZ(n,t):ff[n.level].func(n,t);if((a===Bs||a===hu)&&(n.status=uf),a===fn||a===Bs)return e.avail_out===0&&(n.last_flush=-1),Kt;if(a===pu&&(t===SZ?_Z(n):t!==EO&&(x1(n,0,0,!1),t===EZ&&(Ro(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Mn(e),e.avail_out===0))return n.last_flush=-1,Kt}return t!==cr?Kt:n.wrap<=0?AO:(n.wrap===2?(Me(n,e.adler&255),Me(n,e.adler>>8&255),Me(n,e.adler>>16&255),Me(n,e.adler>>24&255),Me(n,e.total_in&255),Me(n,e.total_in>>8&255),Me(n,e.total_in>>16&255),Me(n,e.total_in>>24&255)):(qu(n,e.adler>>>16),qu(n,e.adler&65535)),Mn(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Kt:AO)},eQ=e=>{if(_p(e))return ga;const t=e.state.status;return e.state=null,t===os?is(e,AZ):Kt},tQ=(e,t)=>{let n=t.length;if(_p(e))return ga;const r=e.state,a=r.wrap;if(a===2||a===1&&r.status!==Al||r.lookahead)return ga;if(a===1&&(e.adler=dd(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){a===0&&(Ro(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}const o=e.avail_in,i=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ol(r);r.lookahead>=Se;){let c=r.strstart,l=r.lookahead-(Se-1);do r.ins_h=fi(r,r.ins_h,r.window[c+Se-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--l);r.strstart=c,r.lookahead=Se-1,Ol(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=Se-1,r.match_available=0,e.next_in=i,e.input=s,e.avail_in=o,r.wrap=a,Kt};var nQ=XZ,rQ=zR,aQ=DR,oQ=MR,iQ=QZ,sQ=JZ,cQ=eQ,lQ=tQ,uQ="pako deflate (from Nodeca project)",Cf={deflateInit:nQ,deflateInit2:rQ,deflateReset:aQ,deflateResetKeep:oQ,deflateSetHeader:iQ,deflate:sQ,deflateEnd:cQ,deflateSetDictionary:lQ,deflateInfo:uQ};const fQ=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var dQ=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)fQ(n,r)&&(e[r]=n[r])}}return e},pQ=e=>{let t=0;for(let r=0,a=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;pd[254]=pd[254]=1;var hQ=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,a,o,i=e.length,s=0;for(a=0;a>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const mQ=(e,t)=>{if(t<65534&&e.subarray&&$R)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,a;const o=new Array(n*2);for(a=0,r=0;r4){o[a++]=65533,r+=s-1;continue}for(i&=s===2?31:s===3?15:7;s>1&&r1){o[a++]=65533;continue}i<65536?o[a++]=i:(i-=65536,o[a++]=55296|i>>10&1023,o[a++]=56320|i&1023)}return mQ(o,a)},yQ=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+pd[e[n]]>t?n:t},hd={string2buf:hQ,buf2string:gQ,utf8border:yQ};function vQ(){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}var RR=vQ;const LR=Object.prototype.toString,{Z_NO_FLUSH:bQ,Z_SYNC_FLUSH:wQ,Z_FULL_FLUSH:kQ,Z_FINISH:xQ,Z_OK:Gm,Z_STREAM_END:jQ,Z_DEFAULT_COMPRESSION:_Q,Z_DEFAULT_STRATEGY:SQ,Z_DEFLATED:EQ}=du;function Sp(e){this.options=Sy.assign({level:_Q,method:EQ,chunkSize:16384,windowBits:15,memLevel:8,strategy:SQ},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new RR,this.strm.avail_out=0;let n=Cf.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Gm)throw new Error(Ls[n]);if(t.header&&Cf.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=hd.string2buf(t.dictionary):LR.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Cf.deflateSetDictionary(this.strm,r),n!==Gm)throw new Error(Ls[n]);this._dict_set=!0}}Sp.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?xQ:bQ,typeof e=="string"?n.input=hd.string2buf(e):LR.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===wQ||o===kQ)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(a=Cf.deflate(n,o),a===jQ)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Cf.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Gm;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};Sp.prototype.onData=function(e){this.chunks.push(e)};Sp.prototype.onEnd=function(e){e===Gm&&(this.result=Sy.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function $_(e,t){const n=new Sp(t);if(n.push(e,!0),n.err)throw n.msg||Ls[n.err];return n.result}function AQ(e,t){return t=t||{},t.raw=!0,$_(e,t)}function OQ(e,t){return t=t||{},t.gzip=!0,$_(e,t)}var TQ=Sp,CQ=$_,IQ=AQ,PQ=OQ,NQ=du,MQ={Deflate:TQ,deflate:CQ,deflateRaw:IQ,gzip:PQ,constants:NQ};const gh=16209,DQ=16191;var zQ=function(t,n){let r,a,o,i,s,c,l,u,f,d,h,g,p,m,y,v,b,k,w,x,j,S,A,C;const O=t.state;r=t.next_in,A=t.input,a=r+(t.avail_in-5),o=t.next_out,C=t.output,i=o-(n-t.avail_out),s=o+(t.avail_out-257),c=O.dmax,l=O.wsize,u=O.whave,f=O.wnext,d=O.window,h=O.hold,g=O.bits,p=O.lencode,m=O.distcode,y=(1<>>24,h>>>=k,g-=k,k=b>>>16&255,k===0)C[o++]=b&65535;else if(k&16){w=b&65535,k&=15,k&&(g>>=k,g-=k),g<15&&(h+=A[r++]<>>24,h>>>=k,g-=k,k=b>>>16&255,k&16){if(x=b&65535,k&=15,gc){t.msg="invalid distance too far back",O.mode=gh;break e}if(h>>>=k,g-=k,k=o-i,x>k){if(k=x-k,k>u&&O.sane){t.msg="invalid distance too far back",O.mode=gh;break e}if(j=0,S=d,f===0){if(j+=l-k,k2;)C[o++]=S[j++],C[o++]=S[j++],C[o++]=S[j++],w-=3;w&&(C[o++]=S[j++],w>1&&(C[o++]=S[j++]))}else{j=o-x;do C[o++]=C[j++],C[o++]=C[j++],C[o++]=C[j++],w-=3;while(w>2);w&&(C[o++]=C[j++],w>1&&(C[o++]=C[j++]))}}else if(k&64){t.msg="invalid distance code",O.mode=gh;break e}else{b=m[(b&65535)+(h&(1<>3,r-=w,g-=w<<3,h&=(1<{const c=s.bits;let l=0,u=0,f=0,d=0,h=0,g=0,p=0,m=0,y=0,v=0,b,k,w,x,j,S=null,A;const C=new Uint16Array(pc+1),O=new Uint16Array(pc+1);let N=null,L,z,T;for(l=0;l<=pc;l++)C[l]=0;for(u=0;u=1&&C[d]===0;d--);if(h>d&&(h=d),d===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f0&&(e===IO||d!==1))return-1;for(O[1]=0,l=1;lTO||e===PO&&y>CO)return 1;for(;;){L=l-p,i[u]+1=A?(z=N[i[u]-A],T=S[i[u]-A]):(z=96,T=0),b=1<>p)+k]=L<<24|z<<16|T|0;while(k!==0);for(b=1<>=1;if(b!==0?(v&=b-1,v+=b):v=0,u++,--C[l]===0){if(l===d)break;l=t[n+i[u]]}if(l>h&&(v&x)!==w){for(p===0&&(p=h),j+=f,g=l-p,m=1<TO||e===PO&&y>CO)return 1;w=v&x,a[w]=h<<24|g<<16|j-o|0}}return v!==0&&(a[j+v]=l-p<<24|64<<16|0),s.bits=h,0};var If=FQ;const UQ=0,BR=1,FR=2,{Z_FINISH:NO,Z_BLOCK:HQ,Z_TREES:yh,Z_OK:Fs,Z_STREAM_END:VQ,Z_NEED_DICT:WQ,Z_STREAM_ERROR:yr,Z_DATA_ERROR:UR,Z_MEM_ERROR:HR,Z_BUF_ERROR:qQ,Z_DEFLATED:MO}=du,Ey=16180,DO=16181,zO=16182,$O=16183,RO=16184,LO=16185,BO=16186,FO=16187,UO=16188,HO=16189,Km=16190,za=16191,Ub=16192,VO=16193,Hb=16194,WO=16195,qO=16196,GO=16197,KO=16198,vh=16199,bh=16200,YO=16201,ZO=16202,QO=16203,XO=16204,JO=16205,Vb=16206,eT=16207,tT=16208,nt=16209,VR=16210,WR=16211,GQ=852,KQ=592,YQ=15,ZQ=YQ,nT=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function QQ(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const tc=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.modeWR?1:0},qR=e=>{if(tc(e))return yr;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ey,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(GQ),t.distcode=t.distdyn=new Int32Array(KQ),t.sane=1,t.back=-1,Fs},GR=e=>{if(tc(e))return yr;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,qR(e)},KR=(e,t)=>{let n;if(tc(e))return yr;const r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?yr:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,GR(e))},YR=(e,t)=>{if(!e)return yr;const n=new QQ;e.state=n,n.strm=e,n.window=null,n.mode=Ey;const r=KR(e,t);return r!==Fs&&(e.state=null),r},XQ=e=>YR(e,ZQ);let rT=!0,Wb,qb;const JQ=e=>{if(rT){Wb=new Int32Array(512),qb=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(If(BR,e.lens,0,288,Wb,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;If(FR,e.lens,0,32,qb,0,e.work,{bits:5}),rT=!1}e.lencode=Wb,e.lenbits=9,e.distcode=qb,e.distbits=5},ZR=(e,t,n,r)=>{let a;const o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),r-=a,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,s,c,l,u,f,d,h,g,p,m=0,y,v,b,k,w,x,j,S;const A=new Uint8Array(4);let C,O;const N=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(tc(e)||!e.output||!e.input&&e.avail_in!==0)return yr;n=e.state,n.mode===za&&(n.mode=Ub),i=e.next_out,a=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,f=s,d=c,S=Fs;e:for(;;)switch(n.mode){case Ey:if(n.wrap===0){n.mode=Ub;break}for(;u<16;){if(s===0)break e;s--,l+=r[o++]<>>8&255,n.check=Dt(n.check,A,2,0),l=0,u=0,n.mode=DO;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=nt;break}if((l&15)!==MO){e.msg="unknown compression method",n.mode=nt;break}if(l>>>=4,u-=4,j=(l&15)+8,n.wbits===0&&(n.wbits=j),j>15||j>n.wbits){e.msg="invalid window size",n.mode=nt;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(A[0]=l&255,A[1]=l>>>8&255,n.check=Dt(n.check,A,2,0)),l=0,u=0,n.mode=zO;case zO:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,n.check=Dt(n.check,A,4,0)),l=0,u=0,n.mode=$O;case $O:for(;u<16;){if(s===0)break e;s--,l+=r[o++]<>8),n.flags&512&&n.wrap&4&&(A[0]=l&255,A[1]=l>>>8&255,n.check=Dt(n.check,A,2,0)),l=0,u=0,n.mode=RO;case RO:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,l+=r[o++]<>>8&255,n.check=Dt(n.check,A,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=LO;case LO:if(n.flags&1024&&(h=n.length,h>s&&(h=s),h&&(n.head&&(j=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),j)),n.flags&512&&n.wrap&4&&(n.check=Dt(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=BO;case BO:if(n.flags&2048){if(s===0)break e;h=0;do j=r[o+h++],n.head&&j&&n.length<65536&&(n.head.name+=String.fromCharCode(j));while(j&&h>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=za;break;case HO:for(;u<32;){if(s===0)break e;s--,l+=r[o++]<>>=u&7,u-=u&7,n.mode=Vb;break}for(;u<3;){if(s===0)break e;s--,l+=r[o++]<>>=1,u-=1,l&3){case 0:n.mode=VO;break;case 1:if(JQ(n),n.mode=vh,t===yh){l>>>=2,u-=2;break e}break;case 2:n.mode=qO;break;case 3:e.msg="invalid block type",n.mode=nt}l>>>=2,u-=2;break;case VO:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,l+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=nt;break}if(n.length=l&65535,l=0,u=0,n.mode=Hb,t===yh)break e;case Hb:n.mode=WO;case WO:if(h=n.length,h){if(h>s&&(h=s),h>c&&(h=c),h===0)break e;a.set(r.subarray(o,o+h),i),s-=h,o+=h,c-=h,i+=h,n.length-=h;break}n.mode=za;break;case qO:for(;u<14;){if(s===0)break e;s--,l+=r[o++]<>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=nt;break}n.have=0,n.mode=GO;case GO:for(;n.have>>=3,u-=3}for(;n.have<19;)n.lens[N[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,C={bits:n.lenbits},S=If(UQ,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,S){e.msg="invalid code lengths set",n.mode=nt;break}n.have=0,n.mode=KO;case KO:for(;n.have>>24,v=m>>>16&255,b=m&65535,!(y<=u);){if(s===0)break e;s--,l+=r[o++]<>>=y,u-=y,n.lens[n.have++]=b;else{if(b===16){for(O=y+2;u>>=y,u-=y,n.have===0){e.msg="invalid bit length repeat",n.mode=nt;break}j=n.lens[n.have-1],h=3+(l&3),l>>>=2,u-=2}else if(b===17){for(O=y+3;u>>=y,u-=y,j=0,h=3+(l&7),l>>>=3,u-=3}else{for(O=y+7;u>>=y,u-=y,j=0,h=11+(l&127),l>>>=7,u-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=nt;break}for(;h--;)n.lens[n.have++]=j}}if(n.mode===nt)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=nt;break}if(n.lenbits=9,C={bits:n.lenbits},S=If(BR,n.lens,0,n.nlen,n.lencode,0,n.work,C),n.lenbits=C.bits,S){e.msg="invalid literal/lengths set",n.mode=nt;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},S=If(FR,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,C),n.distbits=C.bits,S){e.msg="invalid distances set",n.mode=nt;break}if(n.mode=vh,t===yh)break e;case vh:n.mode=bh;case bh:if(s>=6&&c>=258){e.next_out=i,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=u,zQ(e,d),i=e.next_out,a=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===za&&(n.back=-1);break}for(n.back=0;m=n.lencode[l&(1<>>24,v=m>>>16&255,b=m&65535,!(y<=u);){if(s===0)break e;s--,l+=r[o++]<>k)],y=m>>>24,v=m>>>16&255,b=m&65535,!(k+y<=u);){if(s===0)break e;s--,l+=r[o++]<>>=k,u-=k,n.back+=k}if(l>>>=y,u-=y,n.back+=y,n.length=b,v===0){n.mode=JO;break}if(v&32){n.back=-1,n.mode=za;break}if(v&64){e.msg="invalid literal/length code",n.mode=nt;break}n.extra=v&15,n.mode=YO;case YO:if(n.extra){for(O=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ZO;case ZO:for(;m=n.distcode[l&(1<>>24,v=m>>>16&255,b=m&65535,!(y<=u);){if(s===0)break e;s--,l+=r[o++]<>k)],y=m>>>24,v=m>>>16&255,b=m&65535,!(k+y<=u);){if(s===0)break e;s--,l+=r[o++]<>>=k,u-=k,n.back+=k}if(l>>>=y,u-=y,n.back+=y,v&64){e.msg="invalid distance code",n.mode=nt;break}n.offset=b,n.extra=v&15,n.mode=QO;case QO:if(n.extra){for(O=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=nt;break}n.mode=XO;case XO:if(c===0)break e;if(h=d-c,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=nt;break}h>n.wnext?(h-=n.wnext,g=n.wsize-h):g=n.wnext-h,h>n.length&&(h=n.length),p=n.window}else p=a,g=i-n.offset,h=n.length;h>c&&(h=c),c-=h,n.length-=h;do a[i++]=p[g++];while(--h);n.length===0&&(n.mode=bh);break;case JO:if(c===0)break e;a[i++]=n.length,c--,n.mode=bh;break;case Vb:if(n.wrap){for(;u<32;){if(s===0)break e;s--,l|=r[o++]<{if(tc(e))return yr;let t=e.state;return t.window&&(t.window=null),e.state=null,Fs},nX=(e,t)=>{if(tc(e))return yr;const n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Fs):yr},rX=(e,t)=>{const n=t.length;let r,a,o;return tc(e)||(r=e.state,r.wrap!==0&&r.mode!==Km)?yr:r.mode===Km&&(a=1,a=dd(a,t,n,0),a!==r.check)?UR:(o=ZR(e,t,n,n),o?(r.mode=VR,HR):(r.havedict=1,Fs))};var aX=GR,oX=KR,iX=qR,sX=XQ,cX=YR,lX=eX,uX=tX,fX=nX,dX=rX,pX="pako inflate (from Nodeca project)",Wa={inflateReset:aX,inflateReset2:oX,inflateResetKeep:iX,inflateInit:sX,inflateInit2:cX,inflate:lX,inflateEnd:uX,inflateGetHeader:fX,inflateSetDictionary:dX,inflateInfo:pX};function hX(){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}var mX=hX;const QR=Object.prototype.toString,{Z_NO_FLUSH:gX,Z_FINISH:yX,Z_OK:md,Z_STREAM_END:Gb,Z_NEED_DICT:Kb,Z_STREAM_ERROR:vX,Z_DATA_ERROR:aT,Z_MEM_ERROR:bX}=du;function Ep(e){this.options=Sy.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new RR,this.strm.avail_out=0;let n=Wa.inflateInit2(this.strm,t.windowBits);if(n!==md)throw new Error(Ls[n]);if(this.header=new mX,Wa.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=hd.string2buf(t.dictionary):QR.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Wa.inflateSetDictionary(this.strm,t.dictionary),n!==md)))throw new Error(Ls[n])}Ep.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,s;if(this.ended)return!1;for(t===~~t?i=t:i=t===!0?yX:gX,QR.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Wa.inflate(n,i),o===Kb&&a&&(o=Wa.inflateSetDictionary(n,a),o===md?o=Wa.inflate(n,i):o===aT&&(o=Kb));n.avail_in>0&&o===Gb&&n.state.wrap>0&&e[n.next_in]!==0;)Wa.inflateReset(n),o=Wa.inflate(n,i);switch(o){case vX:case aT:case Kb:case bX:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===Gb))if(this.options.to==="string"){let c=hd.utf8border(n.output,n.next_out),l=n.next_out-c,u=hd.buf2string(n.output,c);n.next_out=l,n.avail_out=r-l,l&&n.output.set(n.output.subarray(c,c+l),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===md&&s===0)){if(o===Gb)return o=Wa.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};Ep.prototype.onData=function(e){this.chunks.push(e)};Ep.prototype.onEnd=function(e){e===md&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Sy.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function R_(e,t){const n=new Ep(t);if(n.push(e),n.err)throw n.msg||Ls[n.err];return n.result}function wX(e,t){return t=t||{},t.raw=!0,R_(e,t)}var kX=Ep,xX=R_,jX=wX,_X=R_,SX=du,EX={Inflate:kX,inflate:xX,inflateRaw:jX,ungzip:_X,constants:SX};const{Deflate:jIe,deflate:_Ie,deflateRaw:SIe,gzip:AX}=MQ,{Inflate:EIe,inflate:AIe,inflateRaw:OIe,ungzip:OX}=EX;var TX=AX,CX=OX;function oT(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function IX(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Ay(e,...t){if(!IX(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function PX(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");oT(e.outputLen),oT(e.blockLen)}function Ym(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function NX(e,t){Ay(e);const n=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength),Kr=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function MX(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function L_(e){return typeof e=="string"&&(e=MX(e)),Ay(e),e}function DX(...e){let t=0;for(let r=0;re().update(L_(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function $X(e=32){if(Yb&&typeof Yb.getRandomValues=="function")return Yb.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function RX(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const a=BigInt(32),o=BigInt(4294967295),i=Number(n>>a&o),s=Number(n&o),c=r?4:0,l=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+l,s,r)}const LX=(e,t,n)=>e&t^~e&n,BX=(e,t,n)=>e&t^e&n^t&n;class FX extends XR{constructor(t,n,r,a){super(),this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Zb(this.buffer)}update(t){Ym(this);const{view:n,buffer:r,blockLen:a}=this;t=L_(t);const o=t.length;for(let i=0;ia-i&&(this.process(r,0),i=0);for(let f=i;fu.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f>>3,p=Kr(h,17)^Kr(h,19)^h>>>10;Oo[f]=p+Oo[f-7]+g+Oo[f-16]|0}let{A:r,B:a,C:o,D:i,E:s,F:c,G:l,H:u}=this;for(let f=0;f<64;f++){const d=Kr(s,6)^Kr(s,11)^Kr(s,25),h=u+d+LX(s,c,l)+UX[f]+Oo[f]|0,p=(Kr(r,2)^Kr(r,13)^Kr(r,22))+BX(r,a,o)|0;u=l,l=c,c=s,s=i+h|0,i=o,o=a,a=r,r=h+p|0}r=r+this.A|0,a=a+this.B|0,o=o+this.C|0,i=i+this.D|0,s=s+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,a,o,i,s,c,l,u)}roundClean(){Oo.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const VX=zX(()=>new HX);class JR extends XR{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,PX(t);const r=L_(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const a=this.blockLen,o=new Uint8Array(a);o.set(r.length>a?t.create().update(r).digest():r);for(let i=0;inew JR(e,t).update(n).digest();e4.create=(e,t)=>new JR(e,t);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function WX(e){return{hash:e,hmac:(t,...n)=>e4(e,t,DX(...n)),randomBytes:$X}}function qX(e,t){const n=r=>dR({...e,...WX(r)});return Object.freeze({...n(t),create:n})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t4=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),iT=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),GX=BigInt(1),T1=BigInt(2),sT=(e,t)=>(e+t/T1)/t;function KX(e){const t=t4,n=BigInt(3),r=BigInt(6),a=BigInt(11),o=BigInt(22),i=BigInt(23),s=BigInt(44),c=BigInt(88),l=e*e*e%t,u=l*l*e%t,f=Qn(u,n,t)*u%t,d=Qn(f,n,t)*u%t,h=Qn(d,T1,t)*l%t,g=Qn(h,a,t)*h%t,p=Qn(g,o,t)*g%t,m=Qn(p,s,t)*p%t,y=Qn(m,c,t)*m%t,v=Qn(y,s,t)*p%t,b=Qn(v,n,t)*u%t,k=Qn(b,i,t)*g%t,w=Qn(k,r,t)*l%t,x=Qn(w,T1,t);if(!C1.eql(C1.sqr(x),e))throw new Error("Cannot find square root");return x}const C1=ZK(t4,void 0,void 0,{sqrt:KX}),n4=qX({a:BigInt(0),b:BigInt(7),Fp:C1,n:iT,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=iT,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-GX*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),a=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,i=BigInt("0x100000000000000000000000000000000"),s=sT(o*e,t),c=sT(-r*e,t);let l=kn(e-s*n-c*a,t),u=kn(-s*r-c*o,t);const f=l>i,d=u>i;if(f&&(l=t-l),d&&(u=t-u),l>i||u>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:l,k2neg:d,k2:u}}}},VX);BigInt(0);n4.ProjectivePoint;var vt={};const qc=2147483647,ua=36,B_=1,gd=26,YX=38,ZX=700,r4=72,a4=128,o4="-",QX=/^xn--/,XX=/[^\0-\x7F]/,JX=/[\x2E\u3002\uFF0E\uFF61]/g,eJ={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Qb=ua-B_,fa=Math.floor,Xb=String.fromCharCode;function Mo(e){throw new RangeError(eJ[e])}function tJ(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function i4(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(JX,".");const a=e.split("."),o=tJ(a,t).join(".");return r+o}function F_(e){const t=[];let n=0;const r=e.length;for(;n=55296&&a<=56319&&nString.fromCodePoint(...e),nJ=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ua},cT=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},c4=function(e,t,n){let r=0;for(e=n?fa(e/ZX):e>>1,e+=fa(e/t);e>Qb*gd>>1;r+=ua)e=fa(e/Qb);return fa(r+(Qb+1)*e/(e+YX))},U_=function(e){const t=[],n=e.length;let r=0,a=a4,o=r4,i=e.lastIndexOf(o4);i<0&&(i=0);for(let s=0;s=128&&Mo("not-basic"),t.push(e.charCodeAt(s));for(let s=i>0?i+1:0;s=n&&Mo("invalid-input");const d=nJ(e.charCodeAt(s++));d>=ua&&Mo("invalid-input"),d>fa((qc-r)/u)&&Mo("overflow"),r+=d*u;const h=f<=o?B_:f>=o+gd?gd:f-o;if(dfa(qc/g)&&Mo("overflow"),u*=g}const l=t.length+1;o=c4(r-c,l,c==0),fa(r/l)>qc-a&&Mo("overflow"),a+=fa(r/l),r%=l,t.splice(r++,0,a)}return String.fromCodePoint(...t)},H_=function(e){const t=[];e=F_(e);const n=e.length;let r=a4,a=0,o=r4;for(const c of e)c<128&&t.push(Xb(c));const i=t.length;let s=i;for(i&&t.push(o4);s=r&&ufa((qc-a)/l)&&Mo("overflow"),a+=(c-r)*l,r=c;for(const u of e)if(uqc&&Mo("overflow"),u===r){let f=a;for(let d=ua;;d+=ua){const h=d<=o?B_:d>=o+gd?gd:d-o;if(f=2&&(s=s.slice(2)):va(r)?s=n[4]:r?a&&(s=s.slice(2)):i>=2&&va(t.protocol)&&(s=n[4]),{protocol:r,slashes:a||va(r),slashesCount:i,rest:s}}function hJ(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,a=n[r-1],o=!1,i=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),i++):i&&(r===0&&(o=!0),n.splice(r,1),i--);return o&&n.unshift(""),(a==="."||a==="..")&&n.push(""),n.join("/")}function Ea(e,t,n){if(e=W_(e),e=e.replace(p4,""),!(this instanceof Ea))return new Ea(e,t,n);var r,a,o,i,s,c,l=I1.slice(),u=typeof t,f=this,d=0;for(u!=="object"&&u!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=Oy.parse),t=m4(t),a=g4(e||"",t),r=!a.protocol&&!a.slashes,f.slashes=a.slashes||r&&t.slashes,f.protocol=a.protocol||t.protocol||"",e=a.rest,(a.protocol==="file:"&&(a.slashesCount!==2||pJ.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!va(f.protocol)))&&(l[3]=[/(.*)/,"pathname"]);d255)return"DOMAIN_TOO_LONG";for(var o=a.split("."),i,s=0;s63)return"LABEL_TOO_LONG";if(i.charAt(0)==="-")return"LABEL_STARTS_WITH_DASH";if(i.charAt(i.length-1)==="-")return"LABEL_ENDS_WITH_DASH";if(!/^[a-z0-9\-]+$/.test(i))return"LABEL_INVALID_CHARS"}},e.parse=function(r){if(typeof r!="string")throw new TypeError("Domain name must be a string.");var a=r.slice(0).toLowerCase();a.charAt(a.length-1)==="."&&(a=a.slice(0,a.length-1));var o=n.validate(a);if(o)return{input:r,error:{message:e.errorCodes[o],code:o}};var i={input:r,tld:null,sld:null,domain:null,subdomain:null,listed:!1},s=a.split(".");if(s[s.length-1]==="local")return i;var c=function(){return/xn--/.test(a)&&(i.domain&&(i.domain=t.toASCII(i.domain)),i.subdomain&&(i.subdomain=t.toASCII(i.subdomain))),i},l=n.findRule(a);if(!l)return s.length<2?i:(i.tld=s.pop(),i.sld=s.pop(),i.domain=[i.sld,i.tld].join("."),s.length&&(i.subdomain=s.pop()),c());i.listed=!0;var u=l.suffix.split("."),f=s.slice(0,s.length-u.length);return l.exception&&f.push(u.shift()),i.tld=u.join("."),!f.length||(l.wildcard&&(u.unshift(f.pop()),i.tld=u.join(".")),!f.length)||(i.sld=f.pop(),i.domain=[i.sld,i.tld].join("."),f.length&&(i.subdomain=f.join("."))),c()},e.get=function(r){return r&&e.parse(r).domain||null},e.isValid=function(r){var a=e.parse(r);return!!(a.domain&&a.listed)}})(y4);/*! + * Copyright (c) 2018, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */const bJ=y4,dT=["local","example","invalid","localhost","test"],wJ=["localhost","invalid"];function kJ(e,t={}){const n=e.split("."),r=n[n.length-1],a=!!t.allowSpecialUseDomain,o=!!t.ignoreError;if(a&&dT.includes(r)){if(n.length>1)return`${n[n.length-2]}.${r}`;if(wJ.includes(r))return`${r}`}if(!o&&dT.includes(r))throw new Error(`Cookie has domain set to the public suffix "${r}" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain:true, rejectPublicSuffixes: false}.`);return bJ.get(e)}q_.getPublicSuffix=kJ;var G_={};/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */let xJ=class{constructor(){this.synchronous=!1}findCookie(t,n,r,a){throw new Error("findCookie is not implemented")}findCookies(t,n,r,a){throw new Error("findCookies is not implemented")}putCookie(t,n){throw new Error("putCookie is not implemented")}updateCookie(t,n,r){throw new Error("updateCookie is not implemented")}removeCookie(t,n,r,a){throw new Error("removeCookie is not implemented")}removeCookies(t,n,r){throw new Error("removeCookies is not implemented")}removeAllCookies(t){throw new Error("removeAllCookies is not implemented")}getAllCookies(t){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}};G_.Store=xJ;var K_={},Ty={};Ty.fromCallback=function(e){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")e.apply(this,arguments);else return new Promise((t,n)=>{arguments[arguments.length]=(r,a)=>{if(r)return n(r);t(a)},arguments.length++,e.apply(this,arguments)})},"name",{value:e.name})};Ty.fromPromise=function(e){return Object.defineProperty(function(){const t=arguments[arguments.length-1];if(typeof t!="function")return e.apply(this,arguments);delete arguments[arguments.length-1],arguments.length--,e.apply(this,arguments).then(n=>t(null,n),t)},"name",{value:e.name})};var Y_={};/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */const jJ=q_;function _J(e,t){const n=jJ.getPublicSuffix(e,{allowSpecialUseDomain:t});if(!n)return null;if(n==e)return[e];e.slice(-1)=="."&&(e=e.slice(0,-1));const a=e.slice(0,-(n.length+1)).split(".").reverse();let o=n;const i=[o];for(;a.length;)o=`${a.shift()}.${o}`,i.push(o);return i}Y_.permuteDomain=_J;var Z_={};/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */function SJ(e,t){return t===e||e.indexOf(t)===0&&(t.substr(-1)==="/"||e.substr(t.length,1)==="/")}Z_.pathMatch=SJ;var Cy={},Jb={},e0={},t0,pT;function v4(){return pT||(pT=1,t0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var a=42;t[n]=a;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(t,n);if(i.value!==a||i.enumerable!==!0)return!1}return!0}),t0}var n0,hT;function Q_(){if(hT)return n0;hT=1;var e=v4();return n0=function(){return e()&&!!Symbol.toStringTag},n0}var r0,mT;function EJ(){return mT||(mT=1,r0=Error),r0}var a0,gT;function AJ(){return gT||(gT=1,a0=EvalError),a0}var o0,yT;function OJ(){return yT||(yT=1,o0=RangeError),o0}var i0,vT;function TJ(){return vT||(vT=1,i0=ReferenceError),i0}var s0,bT;function b4(){return bT||(bT=1,s0=SyntaxError),s0}var c0,wT;function Iy(){return wT||(wT=1,c0=TypeError),c0}var l0,kT;function CJ(){return kT||(kT=1,l0=URIError),l0}var u0,xT;function IJ(){if(xT)return u0;xT=1;var e=typeof Symbol<"u"&&Symbol,t=v4();return u0=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},u0}var f0,jT;function PJ(){if(jT)return f0;jT=1;var e={__proto__:null,foo:{}},t=Object;return f0=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},f0}var d0,_T;function NJ(){if(_T)return d0;_T=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",a=function(c,l){for(var u=[],f=0;f"u"||!p?e:p(Uint8Array),v={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":h&&p?p([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":c,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&p?p(p([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!h||!p?e:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":r,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!h||!p?e:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&p?p(""[Symbol.iterator]()):e,"%Symbol%":h?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":d,"%TypedArray%":y,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":s,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(p)try{null.error}catch(M){var b=p(p(M));v["%Error.prototype%"]=b}var k=function M(P){var D;if(P==="%AsyncFunction%")D=l("async function () {}");else if(P==="%GeneratorFunction%")D=l("function* () {}");else if(P==="%AsyncGeneratorFunction%")D=l("async function* () {}");else if(P==="%AsyncGenerator%"){var U=M("%AsyncGeneratorFunction%");U&&(D=U.prototype)}else if(P==="%AsyncIteratorPrototype%"){var W=M("%AsyncGenerator%");W&&p&&(D=p(W.prototype))}return v[P]=D,D},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=X_(),j=MJ(),S=x.call(Function.call,Array.prototype.concat),A=x.call(Function.apply,Array.prototype.splice),C=x.call(Function.call,String.prototype.replace),O=x.call(Function.call,String.prototype.slice),N=x.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,T=function(P){var D=O(P,0,1),U=O(P,-1);if(D==="%"&&U!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(U==="%"&&D!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var W=[];return C(P,L,function(q,ne,$,H){W[W.length]=$?C(H,z,"$1"):ne||q}),W},I=function(P,D){var U=P,W;if(j(w,U)&&(W=w[U],U="%"+W[0]+"%"),j(v,U)){var q=v[U];if(q===m&&(q=k(U)),typeof q>"u"&&!D)throw new i("intrinsic "+P+" exists, but is not available. Please file an issue!");return{alias:W,name:U,value:q}}throw new o("intrinsic "+P+" does not exist!")};return m0=function(P,D){if(typeof P!="string"||P.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new i('"allowMissing" argument must be a boolean');if(N(/^%?[^%]*%?$/,P)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=T(P),W=U.length>0?U[0]:"",q=I("%"+W+"%",D),ne=q.name,$=q.value,H=!1,G=q.alias;G&&(W=G[0],A(U,S([0,1],G)));for(var Q=1,te=!0;Q=U.length){var F=u($,V);te=!!F,te&&"get"in F&&!("originalValue"in F.get)?$=F.get:$=$[V]}else te=j($,V),$=$[V];te&&!H&&(v[ne]=$)}}return $},m0}var g0={exports:{}},y0,OT;function J_(){if(OT)return y0;OT=1;var e=Ap(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return y0=t,y0}var v0,TT;function eS(){if(TT)return v0;TT=1;var e=Ap(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return v0=t,v0}var b0,CT;function DJ(){if(CT)return b0;CT=1;var e=J_(),t=b4(),n=Iy(),r=eS();return b0=function(o,i,s){if(!o||typeof o!="object"&&typeof o!="function")throw new n("`obj` must be an object or a function`");if(typeof i!="string"&&typeof i!="symbol")throw new n("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new n("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6?arguments[6]:!1,d=!!r&&r(o,i);if(e)e(o,i,{configurable:u===null&&d?d.configurable:!u,enumerable:c===null&&d?d.enumerable:!c,value:s,writable:l===null&&d?d.writable:!l});else if(f||!c&&!l&&!u)o[i]=s;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},b0}var w0,IT;function zJ(){if(IT)return w0;IT=1;var e=J_(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},w0=t,w0}var k0,PT;function $J(){if(PT)return k0;PT=1;var e=Ap(),t=DJ(),n=zJ()(),r=eS(),a=Iy(),o=e("%Math.floor%");return k0=function(s,c){if(typeof s!="function")throw new a("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||o(c)!==c)throw new a("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],u=!0,f=!0;if("length"in s&&r){var d=r(s,"length");d&&!d.configurable&&(u=!1),d&&!d.writable&&(f=!1)}return(u||f||!l)&&(n?t(s,"length",c,!0,!0):t(s,"length",c)),s},k0}var NT;function w4(){return NT||(NT=1,function(e){var t=X_(),n=Ap(),r=$J(),a=Iy(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(i,o),c=J_(),l=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new a("a function is required");var h=s(t,i,arguments);return r(h,1+l(0,d.length-(arguments.length-1)),!0)};var u=function(){return s(t,o,arguments)};c?c(e.exports,"apply",{value:u}):e.exports.apply=u}(g0)),g0.exports}var x0,MT;function k4(){if(MT)return x0;MT=1;var e=Ap(),t=w4(),n=t(e("String.prototype.indexOf"));return x0=function(a,o){var i=e(a,!!o);return typeof i=="function"&&n(a,".prototype.")>-1?t(i):i},x0}var j0,DT;function RJ(){if(DT)return j0;DT=1;var e=Q_()(),t=k4(),n=t("Object.prototype.toString"),r=function(s){return e&&s&&typeof s=="object"&&Symbol.toStringTag in s?!1:n(s)==="[object Arguments]"},a=function(s){return r(s)?!0:s!==null&&typeof s=="object"&&typeof s.length=="number"&&s.length>=0&&n(s)!=="[object Array]"&&n(s.callee)==="[object Function]"},o=function(){return r(arguments)}();return r.isLegacyArguments=a,j0=o?r:a,j0}var _0,zT;function LJ(){if(zT)return _0;zT=1;var e=Object.prototype.toString,t=Function.prototype.toString,n=/^\s*(?:function)?\*/,r=Q_()(),a=Object.getPrototypeOf,o=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},i;return _0=function(c){if(typeof c!="function")return!1;if(n.test(t.call(c)))return!0;if(!r){var l=e.call(c);return l==="[object GeneratorFunction]"}if(!a)return!1;if(typeof i>"u"){var u=o();i=u?a(u):!1}return a(c)===i},_0}var S0,$T;function BJ(){if($T)return S0;$T=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,n,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,n)}catch(v){v!==r&&(t=null)}else t=null;var a=/^\s*class\b/,o=function(b){try{var k=e.call(b);return a.test(k)}catch{return!1}},i=function(b){try{return o(b)?!1:(e.call(b),!0)}catch{return!1}},s=Object.prototype.toString,c="[object Object]",l="[object Function]",u="[object GeneratorFunction]",f="[object HTMLAllCollection]",d="[object HTML document.all class]",h="[object HTMLCollection]",g=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var y=document.all;s.call(y)===s.call(document.all)&&(m=function(b){if((p||!b)&&(typeof b>"u"||typeof b=="object"))try{var k=s.call(b);return(k===f||k===d||k===h||k===c)&&b("")==null}catch{}return!1})}return S0=t?function(b){if(m(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{t(b,null,n)}catch(k){if(k!==r)return!1}return!o(b)&&i(b)}:function(b){if(m(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(g)return i(b);if(o(b))return!1;var k=s.call(b);return k!==l&&k!==u&&!/^\[object HTML/.test(k)?!1:i(b)},S0}var E0,RT;function FJ(){if(RT)return E0;RT=1;var e=BJ(),t=Object.prototype.toString,n=Object.prototype.hasOwnProperty,r=function(c,l,u){for(var f=0,d=c.length;f=3&&(f=u),t.call(c)==="[object Array]"?r(c,l,f):typeof c=="string"?a(c,l,f):o(c,l,f)};return E0=i,E0}var A0,LT;function UJ(){return LT||(LT=1,A0=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),A0}var O0,BT;function HJ(){if(BT)return O0;BT=1;var e=UJ(),t=typeof globalThis>"u"?Ka:globalThis;return O0=function(){for(var r=[],a=0;a"u"?Ka:globalThis,c=t(),l=r("String.prototype.slice"),u=Object.getPrototypeOf,f=r("Array.prototype.indexOf",!0)||function(m,y){for(var v=0;v-1?y:y!=="Object"?!1:g(m)}return a?h(m):null},T0}var C0,UT;function VJ(){if(UT)return C0;UT=1;var e=x4();return C0=function(n){return!!e(n)},C0}var HT;function WJ(){return HT||(HT=1,function(e){var t=RJ(),n=LJ(),r=x4(),a=VJ();function o(X){return X.call.bind(X)}var i=typeof BigInt<"u",s=typeof Symbol<"u",c=o(Object.prototype.toString),l=o(Number.prototype.valueOf),u=o(String.prototype.valueOf),f=o(Boolean.prototype.valueOf);if(i)var d=o(BigInt.prototype.valueOf);if(s)var h=o(Symbol.prototype.valueOf);function g(X,sc){if(typeof X!="object")return!1;try{return sc(X),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=n,e.isTypedArray=a;function p(X){return typeof Promise<"u"&&X instanceof Promise||X!==null&&typeof X=="object"&&typeof X.then=="function"&&typeof X.catch=="function"}e.isPromise=p;function m(X){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(X):a(X)||ne(X)}e.isArrayBufferView=m;function y(X){return r(X)==="Uint8Array"}e.isUint8Array=y;function v(X){return r(X)==="Uint8ClampedArray"}e.isUint8ClampedArray=v;function b(X){return r(X)==="Uint16Array"}e.isUint16Array=b;function k(X){return r(X)==="Uint32Array"}e.isUint32Array=k;function w(X){return r(X)==="Int8Array"}e.isInt8Array=w;function x(X){return r(X)==="Int16Array"}e.isInt16Array=x;function j(X){return r(X)==="Int32Array"}e.isInt32Array=j;function S(X){return r(X)==="Float32Array"}e.isFloat32Array=S;function A(X){return r(X)==="Float64Array"}e.isFloat64Array=A;function C(X){return r(X)==="BigInt64Array"}e.isBigInt64Array=C;function O(X){return r(X)==="BigUint64Array"}e.isBigUint64Array=O;function N(X){return c(X)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function L(X){return typeof Map>"u"?!1:N.working?N(X):X instanceof Map}e.isMap=L;function z(X){return c(X)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function T(X){return typeof Set>"u"?!1:z.working?z(X):X instanceof Set}e.isSet=T;function I(X){return c(X)==="[object WeakMap]"}I.working=typeof WeakMap<"u"&&I(new WeakMap);function M(X){return typeof WeakMap>"u"?!1:I.working?I(X):X instanceof WeakMap}e.isWeakMap=M;function P(X){return c(X)==="[object WeakSet]"}P.working=typeof WeakSet<"u"&&P(new WeakSet);function D(X){return P(X)}e.isWeakSet=D;function U(X){return c(X)==="[object ArrayBuffer]"}U.working=typeof ArrayBuffer<"u"&&U(new ArrayBuffer);function W(X){return typeof ArrayBuffer>"u"?!1:U.working?U(X):X instanceof ArrayBuffer}e.isArrayBuffer=W;function q(X){return c(X)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function ne(X){return typeof DataView>"u"?!1:q.working?q(X):X instanceof DataView}e.isDataView=ne;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function H(X){return c(X)==="[object SharedArrayBuffer]"}function G(X){return typeof $>"u"?!1:(typeof H.working>"u"&&(H.working=H(new $)),H.working?H(X):X instanceof $)}e.isSharedArrayBuffer=G;function Q(X){return c(X)==="[object AsyncFunction]"}e.isAsyncFunction=Q;function te(X){return c(X)==="[object Map Iterator]"}e.isMapIterator=te;function V(X){return c(X)==="[object Set Iterator]"}e.isSetIterator=V;function Z(X){return c(X)==="[object Generator]"}e.isGeneratorObject=Z;function J(X){return c(X)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=J;function F(X){return g(X,l)}e.isNumberObject=F;function re(X){return g(X,u)}e.isStringObject=re;function ce(X){return g(X,f)}e.isBooleanObject=ce;function je(X){return i&&g(X,d)}e.isBigIntObject=je;function we(X){return s&&g(X,h)}e.isSymbolObject=we;function tt(X){return F(X)||re(X)||ce(X)||je(X)||we(X)}e.isBoxedPrimitive=tt;function Zn(X){return typeof Uint8Array<"u"&&(W(X)||G(X))}e.isAnyArrayBuffer=Zn,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(X){Object.defineProperty(e,X,{enumerable:!1,value:function(){throw new Error(X+" is not supported in userland")}})})}(e0)),e0}var I0,VT;function qJ(){return VT||(VT=1,I0=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),I0}var wh={exports:{}},WT;function GJ(){return WT||(WT=1,typeof Object.create=="function"?wh.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:wh.exports=function(t,n){if(n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t}}),wh.exports}var qT;function KJ(){return qT||(qT=1,function(e){var t={env:{}},n={},r=Object.getOwnPropertyDescriptors||function(H){for(var G=Object.keys(H),Q={},te=0;te=te)return J;switch(J){case"%s":return String(Q[G++]);case"%d":return Number(Q[G++]);case"%j":try{return JSON.stringify(Q[G++])}catch{return"[Circular]"}default:return J}}),Z=Q[G];G"u")return function(){return e.deprecate($,H).apply(this,arguments)};var G=!1;function Q(){if(!G){if(t.throwDeprecation)throw new Error(H);t.traceDeprecation?console.trace(H):console.error(H),G=!0}return $.apply(this,arguments)}return Q};var o={},i=/^$/;if(n.NODE_DEBUG){var s=n.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+s+"$","i")}e.debuglog=function($){if($=$.toUpperCase(),!o[$])if(i.test($)){var H=t.pid;o[$]=function(){var G=e.format.apply(e,arguments);console.error("%s %d: %s",$,H,G)}}else o[$]=function(){};return o[$]};function c($,H){var G={seen:[],stylize:u};return arguments.length>=3&&(G.depth=arguments[2]),arguments.length>=4&&(G.colors=arguments[3]),b(H)?G.showHidden=H:H&&e._extend(G,H),A(G.showHidden)&&(G.showHidden=!1),A(G.depth)&&(G.depth=2),A(G.colors)&&(G.colors=!1),A(G.customInspect)&&(G.customInspect=!0),G.colors&&(G.stylize=l),d(G,$,G.depth)}e.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l($,H){var G=c.styles[H];return G?"\x1B["+c.colors[G][0]+"m"+$+"\x1B["+c.colors[G][1]+"m":$}function u($,H){return $}function f($){var H={};return $.forEach(function(G,Q){H[G]=!0}),H}function d($,H,G){if($.customInspect&&H&&z(H.inspect)&&H.inspect!==e.inspect&&!(H.constructor&&H.constructor.prototype===H)){var Q=H.inspect(G,$);return j(Q)||(Q=d($,Q,G)),Q}var te=h($,H);if(te)return te;var V=Object.keys(H),Z=f(V);if($.showHidden&&(V=Object.getOwnPropertyNames(H)),L(H)&&(V.indexOf("message")>=0||V.indexOf("description")>=0))return g(H);if(V.length===0){if(z(H)){var J=H.name?": "+H.name:"";return $.stylize("[Function"+J+"]","special")}if(C(H))return $.stylize(RegExp.prototype.toString.call(H),"regexp");if(N(H))return $.stylize(Date.prototype.toString.call(H),"date");if(L(H))return g(H)}var F="",re=!1,ce=["{","}"];if(v(H)&&(re=!0,ce=["[","]"]),z(H)){var je=H.name?": "+H.name:"";F=" [Function"+je+"]"}if(C(H)&&(F=" "+RegExp.prototype.toString.call(H)),N(H)&&(F=" "+Date.prototype.toUTCString.call(H)),L(H)&&(F=" "+g(H)),V.length===0&&(!re||H.length==0))return ce[0]+F+ce[1];if(G<0)return C(H)?$.stylize(RegExp.prototype.toString.call(H),"regexp"):$.stylize("[Object]","special");$.seen.push(H);var we;return re?we=p($,H,G,Z,V):we=V.map(function(tt){return m($,H,G,Z,tt,re)}),$.seen.pop(),y(we,F,ce)}function h($,H){if(A(H))return $.stylize("undefined","undefined");if(j(H)){var G="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return $.stylize(G,"string")}if(x(H))return $.stylize(""+H,"number");if(b(H))return $.stylize(""+H,"boolean");if(k(H))return $.stylize("null","null")}function g($){return"["+Error.prototype.toString.call($)+"]"}function p($,H,G,Q,te){for(var V=[],Z=0,J=H.length;Z-1&&(V?J=J.split(` +`).map(function(re){return" "+re}).join(` +`).slice(2):J=` +`+J.split(` +`).map(function(re){return" "+re}).join(` +`))):J=$.stylize("[Circular]","special")),A(Z)){if(V&&te.match(/^\d+$/))return J;Z=JSON.stringify(""+te),Z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Z=Z.slice(1,-1),Z=$.stylize(Z,"name")):(Z=Z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Z=$.stylize(Z,"string"))}return Z+": "+J}function y($,H,G){var Q=$.reduce(function(te,V){return V.indexOf(` +`)>=0,te+V.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Q>60?G[0]+(H===""?"":H+` + `)+" "+$.join(`, + `)+" "+G[1]:G[0]+H+" "+$.join(", ")+" "+G[1]}e.types=WJ();function v($){return Array.isArray($)}e.isArray=v;function b($){return typeof $=="boolean"}e.isBoolean=b;function k($){return $===null}e.isNull=k;function w($){return $==null}e.isNullOrUndefined=w;function x($){return typeof $=="number"}e.isNumber=x;function j($){return typeof $=="string"}e.isString=j;function S($){return typeof $=="symbol"}e.isSymbol=S;function A($){return $===void 0}e.isUndefined=A;function C($){return O($)&&I($)==="[object RegExp]"}e.isRegExp=C,e.types.isRegExp=C;function O($){return typeof $=="object"&&$!==null}e.isObject=O;function N($){return O($)&&I($)==="[object Date]"}e.isDate=N,e.types.isDate=N;function L($){return O($)&&(I($)==="[object Error]"||$ instanceof Error)}e.isError=L,e.types.isNativeError=L;function z($){return typeof $=="function"}e.isFunction=z;function T($){return $===null||typeof $=="boolean"||typeof $=="number"||typeof $=="string"||typeof $=="symbol"||typeof $>"u"}e.isPrimitive=T,e.isBuffer=qJ();function I($){return Object.prototype.toString.call($)}function M($){return $<10?"0"+$.toString(10):$.toString(10)}var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var $=new Date,H=[M($.getHours()),M($.getMinutes()),M($.getSeconds())].join(":");return[$.getDate(),P[$.getMonth()],H].join(" ")}e.log=function(){console.log("%s - %s",D(),e.format.apply(e,arguments))},e.inherits=GJ(),e._extend=function($,H){if(!H||!O(H))return $;for(var G=Object.keys(H),Q=G.length;Q--;)$[G[Q]]=H[G[Q]];return $};function U($,H){return Object.prototype.hasOwnProperty.call($,H)}var W=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(H){if(typeof H!="function")throw new TypeError('The "original" argument must be of type Function');if(W&&H[W]){var G=H[W];if(typeof G!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(G,W,{value:G,enumerable:!1,writable:!1,configurable:!0}),G}function G(){for(var Q,te,V=new Promise(function(F,re){Q=F,te=re}),Z=[],J=0;J{if(eee(n,f)){const d=u[f];for(const h in d)o.push(d[h])}})}:i=function(u){for(const f in u){const d=u[f];for(const h in d)o.push(d[h])}};const s=JJ(t,r)||[t],c=this.idx;s.forEach(l=>{const u=c[l];u&&i(u)}),a(null,o)}putCookie(t,n){this.idx[t.domain]||(this.idx[t.domain]=Object.create(null)),this.idx[t.domain][t.path]||(this.idx[t.domain][t.path]=Object.create(null)),this.idx[t.domain][t.path][t.key]=t,n(null)}updateCookie(t,n,r){this.putCookie(n,r)}removeCookie(t,n,r,a){this.idx[t]&&this.idx[t][n]&&this.idx[t][n][r]&&delete this.idx[t][n][r],a(null)}removeCookies(t,n,r){return this.idx[t]&&(n?delete this.idx[t][n]:delete this.idx[t]),r(null)}removeAllCookies(t){return this.idx=Object.create(null),t(null)}getAllCookies(t){const n=[],r=this.idx;Object.keys(r).forEach(o=>{Object.keys(r[o]).forEach(s=>{Object.keys(r[o][s]).forEach(l=>{l!==null&&n.push(r[o][s][l])})})}),n.sort((o,i)=>(o.creationIndex||0)-(i.creationIndex||0)),t(null,n)}};["findCookie","findCookies","putCookie","updateCookie","removeCookie","removeCookies","removeAllCookies","getAllCookies"].forEach(e=>{P1.prototype[e]=QJ(P1.prototype[e])});K_.MemoryCookieStore=P1;function _4(e){const t=Object.keys(e);if(t.length===0)return"[Object: null prototype] {}";let n=`[Object: null prototype] { +`;return Object.keys(e).forEach((r,a)=>{n+=ree(r,e[r]),a{r+=aee(a,t[a]),o{const s=t[a];r+=` ${a}: ${s.inspect()}`,o=58)break;a++}return an||!r&&a!=e.length?null:parseInt(e.substr(0,a),10)}function kee(e){const t=e.split(":"),n=[0,0,0];if(t.length!==3)return null;for(let r=0;r<3;r++){const a=r==2,o=D1(t[r],1,2,a);if(o===null)return null;n[r]=o}return n}function xee(e){e=String(e).substr(0,3).toLowerCase();const t=yee[e];return t>=0?t:null}function Pf(e){if(!e)return;const t=e.split(gee);if(!t)return;let n=null,r=null,a=null,o=null,i=null,s=null;for(let c=0;c=70&&s<=99?s+=1900:s>=0&&s<=69&&(s+=2e3)))}if(!(o===null||i===null||s===null||a===null||o<1||o>31||s<1601||n>23||r>59||a>59))return new Date(Date.UTC(s,i,o,n,r,a))}function D4(e){return de.validate(de.isDate(e),e),e.toUTCString()}function Tl(e){return e==null?null:(e=e.trim().replace(/^\./,""),M4.test(e)&&(e=e.replace("[","").replace("]","")),GT&&/[^\u0001-\u007f]/.test(e)&&(e=GT.toASCII(e)),e.toLowerCase())}function z1(e,t,n){if(e==null||t==null)return null;if(n!==!1&&(e=Tl(e),t=Tl(t)),e==t)return!0;const r=e.lastIndexOf(t);return!(r<=0||e.length!==t.length+r||e.substr(r-1,1)!=="."||bee.test(e))}function z4(e){if(!e||e.substr(0,1)!=="/")return"/";if(e==="/")return e;const t=e.lastIndexOf("/");return t===0?"/":e.slice(0,t)}function jee(e){if(de.isEmptyString(e))return e;for(let t=0;t1;){const n=e.lastIndexOf("/");if(n===0)break;e=e.substr(0,n),t.push(e)}return t.push("/"),t}function XT(e){if(e instanceof Object)return e;try{e=decodeURI(e)}catch{}return dee(e)}const Nf={key:"",value:"",expires:"Infinity",maxAge:null,domain:null,path:null,secure:!1,httpOnly:!1,extensions:null,hostOnly:null,pathIsDefault:null,creation:null,lastAccessed:null,sameSite:void 0};class kt{constructor(t={}){const n=pee();n&&(this[n]=this.inspect),Object.assign(this,Nf,t),this.creation=this.creation||new Date,Object.defineProperty(this,"creationIndex",{configurable:!1,enumerable:!1,writable:!0,value:++kt.cookiesCreated})}inspect(){const t=Date.now(),n=this.hostOnly!=null?this.hostOnly:"?",r=this.creation?`${t-this.creation.getTime()}ms`:"?",a=this.lastAccessed?`${t-this.lastAccessed.getTime()}ms`:"?";return`Cookie="${this.toString()}; hostOnly=${n}; aAge=${a}; cAge=${r}"`}toJSON(){const t={};for(const n of kt.serializableProperties)this[n]!==Nf[n]&&(n==="expires"||n==="creation"||n==="lastAccessed"?this[n]===null?t[n]=null:t[n]=this[n]=="Infinity"?"Infinity":this[n].toISOString():n==="maxAge"?this[n]!==null&&(t[n]=this[n]==1/0||this[n]==-1/0?this[n].toString():this[n]):this[n]!==Nf[n]&&(t[n]=this[n]));return t}clone(){return Py(this.toJSON())}validate(){if(!hee.test(this.value)||this.expires!=1/0&&!(this.expires instanceof Date)&&!Pf(this.expires)||this.maxAge!=null&&this.maxAge<=0||this.path!=null&&!mee.test(this.path))return!1;const t=this.cdomain();return!(t&&(t.match(/\.$/)||nS.getPublicSuffix(t)==null))}setExpires(t){t instanceof Date?this.expires=t:this.expires=Pf(t)||"Infinity"}setMaxAge(t){t===1/0||t===-1/0?this.maxAge=t.toString():this.maxAge=t}cookieString(){let t=this.value;return t==null&&(t=""),this.key===""?t:`${this.key}=${t}`}toString(){let t=this.cookieString();if(this.expires!=1/0&&(this.expires instanceof Date?t+=`; Expires=${D4(this.expires)}`:t+=`; Expires=${this.expires}`),this.maxAge!=null&&this.maxAge!=1/0&&(t+=`; Max-Age=${this.maxAge}`),this.domain&&!this.hostOnly&&(t+=`; Domain=${this.domain}`),this.path&&(t+=`; Path=${this.path}`),this.secure&&(t+="; Secure"),this.httpOnly&&(t+="; HttpOnly"),this.sameSite&&this.sameSite!=="none"){const n=kt.sameSiteCanonical[this.sameSite.toLowerCase()];t+=`; SameSite=${n||this.sameSite}`}return this.extensions&&this.extensions.forEach(n=>{t+=`; ${n}`}),t}TTL(t){if(this.maxAge!=null)return this.maxAge<=0?0:this.maxAge*1e3;let n=this.expires;return n!=1/0?(n instanceof Date||(n=Pf(n)||1/0),n==1/0?1/0:n.getTime()-(t||Date.now())):1/0}expiryTime(t){if(this.maxAge!=null){const n=t||this.creation||new Date,r=this.maxAge<=0?-1/0:this.maxAge*1e3;return n.getTime()+r}return this.expires==1/0?1/0:this.expires.getTime()}expiryDate(t){const n=this.expiryTime(t);return n==1/0?new Date(M1):n==-1/0?new Date(vee):new Date(n)}isPersistent(){return this.maxAge!=null||this.expires!=1/0}canonicalizedDomain(){return this.domain==null?null:Tl(this.domain)}cdomain(){return this.canonicalizedDomain()}}kt.cookiesCreated=0;kt.parse=$4;kt.fromJSON=Py;kt.serializableProperties=Object.keys(Nf);kt.sameSiteLevel={strict:3,lax:2,none:1};kt.sameSiteCanonical={strict:"Strict",lax:"Lax"};function JT(e){if(e!=null){const t=e.toLowerCase();switch(t){case ss.STRICT:case ss.SILENT:case ss.DISABLED:return t}}return ss.SILENT}class $r{constructor(t,n={rejectPublicSuffixes:!0}){typeof n=="boolean"&&(n={rejectPublicSuffixes:n}),de.validate(de.isObject(n),n),this.rejectPublicSuffixes=n.rejectPublicSuffixes,this.enableLooseMode=!!n.looseMode,this.allowSpecialUseDomain=typeof n.allowSpecialUseDomain=="boolean"?n.allowSpecialUseDomain:!0,this.store=t||new C4,this.prefixSecurity=JT(n.prefixSecurity),this._cloneSync=To("clone"),this._importCookiesSync=To("_importCookies"),this.getCookiesSync=To("getCookies"),this.getCookieStringSync=To("getCookieString"),this.getSetCookieStringsSync=To("getSetCookieStrings"),this.removeAllCookiesSync=To("removeAllCookies"),this.setCookieSync=To("setCookie"),this.serializeSync=To("serialize")}setCookie(t,n,r,a){de.validate(de.isUrlStringOrObject(n),a,r);let o;if(de.isFunction(n))return a=n,a(new Error("No URL was specified"));const i=XT(n);if(de.isFunction(r)&&(a=r,r={}),de.validate(de.isFunction(a),a),!de.isNonEmptyString(t)&&!de.isObject(t)&&t instanceof String&&t.length==0)return a(null);const s=Tl(i.hostname),c=r.loose||this.enableLooseMode;let l=null;if(r.sameSiteContext&&(l=QT(r.sameSiteContext),!l))return a(new Error(ZT));if(typeof t=="string"||t instanceof String){if(t=kt.parse(t,{loose:c}),!t)return o=new Error("Cookie failed to parse"),a(r.ignoreError?null:o)}else if(!(t instanceof kt))return o=new Error("First argument to setCookie must be a Cookie object or string"),a(r.ignoreError?null:o);const u=r.now||new Date;if(this.rejectPublicSuffixes&&t.domain&&nS.getPublicSuffix(t.cdomain(),{allowSpecialUseDomain:this.allowSpecialUseDomain,ignoreError:r.ignoreError})==null&&!M4.test(t.domain))return o=new Error("Cookie has domain set to a public suffix"),a(r.ignoreError?null:o);if(t.domain){if(!z1(s,t.cdomain(),!1))return o=new Error(`Cookie not in this host's domain. Cookie:${t.cdomain()} Request:${s}`),a(r.ignoreError?null:o);t.hostOnly==null&&(t.hostOnly=!1)}else t.hostOnly=!0,t.domain=s;if((!t.path||t.path[0]!=="/")&&(t.path=z4(i.pathname),t.pathIsDefault=!0),r.http===!1&&t.httpOnly)return o=new Error("Cookie is HttpOnly and this isn't an HTTP API"),a(r.ignoreError?null:o);if(t.sameSite!=="none"&&t.sameSite!==void 0&&l&&l==="none")return o=new Error("Cookie is SameSite but this is a cross-origin request"),a(r.ignoreError?null:o);const f=this.prefixSecurity===ss.SILENT;if(!(this.prefixSecurity===ss.DISABLED)){let p=!1,m;if(See(t)?Eee(t)||(p=!0,m="Cookie has __Host prefix but either Secure or HostOnly attribute is not set or Path is not '/'"):(p=!0,m="Cookie has __Secure prefix but Secure attribute is not set"),p)return a(r.ignoreError||f?null:new Error(m))}const h=this.store;h.updateCookie||(h.updateCookie=function(p,m,y){this.putCookie(m,y)});function g(p,m){if(p)return a(p);const y=function(v){if(v)return a(v);a(null,t)};if(m){if(r.http===!1&&m.httpOnly)return p=new Error("old Cookie is HttpOnly and this isn't an HTTP API"),a(r.ignoreError?null:p);t.creation=m.creation,t.creationIndex=m.creationIndex,t.lastAccessed=u,h.updateCookie(m,t,y)}else t.creation=t.lastAccessed=u,h.putCookie(t,y)}h.findCookie(t.domain,t.path,t.key,g)}getCookies(t,n,r){de.validate(de.isUrlStringOrObject(t),r,t);const a=XT(t);de.isFunction(n)&&(r=n,n={}),de.validate(de.isObject(n),r,n),de.validate(de.isFunction(r),r);const o=Tl(a.hostname),i=a.pathname||"/";let s=n.secure;s==null&&a.protocol&&(a.protocol=="https:"||a.protocol=="wss:")&&(s=!0);let c=0;if(n.sameSiteContext){const p=QT(n.sameSiteContext);if(c=kt.sameSiteLevel[p],!c)return r(new Error(ZT))}let l=n.http;l==null&&(l=!0);const u=n.now||Date.now(),f=n.expire!==!1,d=!!n.allPaths,h=this.store;function g(p){if(p.hostOnly){if(p.domain!=o)return!1}else if(!z1(o,p.domain,!1))return!1;return!d&&!I4(i,p.path)||p.secure&&!s||p.httpOnly&&!l||c&&kt.sameSiteLevel[p.sameSite||"none"]>c?!1:f&&p.expiryTime()<=u?(h.removeCookie(p.domain,p.path,p.key,()=>{}),!1):!0}h.findCookies(o,d?null:i,this.allowSpecialUseDomain,(p,m)=>{if(p)return r(p);m=m.filter(g),n.sort!==!1&&(m=m.sort($1));const y=new Date;for(const v of m)v.lastAccessed=y;r(null,m)})}getCookieString(...t){const n=t.pop();de.validate(de.isFunction(n),n);const r=function(a,o){a?n(a):n(null,o.sort($1).map(i=>i.cookieString()).join("; "))};t.push(r),this.getCookies.apply(this,t)}getSetCookieStrings(...t){const n=t.pop();de.validate(de.isFunction(n),n);const r=function(a,o){a?n(a):n(null,o.map(i=>i.toString()))};t.push(r),this.getCookies.apply(this,t)}serialize(t){de.validate(de.isFunction(t),t);let n=this.store.constructor.name;de.isObject(n)&&(n=null);const r={version:`tough-cookie@${P4}`,storeType:n,rejectPublicSuffixes:!!this.rejectPublicSuffixes,enableLooseMode:!!this.enableLooseMode,allowSpecialUseDomain:!!this.allowSpecialUseDomain,prefixSecurity:JT(this.prefixSecurity),cookies:[]};if(!(this.store.getAllCookies&&typeof this.store.getAllCookies=="function"))return t(new Error("store does not support getAllCookies and cannot be serialized"));this.store.getAllCookies((a,o)=>a?t(a):(r.cookies=o.map(i=>(i=i instanceof kt?i.toJSON():i,delete i.creationIndex,i)),t(null,r)))}toJSON(){return this.serializeSync()}_importCookies(t,n){let r=t.cookies;if(!r||!Array.isArray(r))return n(new Error("serialized jar has no cookies array"));r=r.slice();const a=o=>{if(o)return n(o);if(!r.length)return n(o,this);let i;try{i=Py(r.shift())}catch(s){return n(s)}if(i===null)return a(null);this.store.putCookie(i,a)};a()}clone(t,n){arguments.length===1&&(n=t,t=null),this.serialize((r,a)=>{if(r)return n(r);$r.deserialize(a,t,n)})}cloneSync(t){if(arguments.length===0)return this._cloneSync();if(!t.synchronous)throw new Error("CookieJar clone destination store is not synchronous; use async API instead.");return this._cloneSync(t)}removeAllCookies(t){de.validate(de.isFunction(t),t);const n=this.store;if(typeof n.removeAllCookies=="function"&&n.removeAllCookies!==T4.prototype.removeAllCookies)return n.removeAllCookies(t);n.getAllCookies((r,a)=>{if(r)return t(r);if(a.length===0)return t(null);let o=0;const i=[];function s(c){if(c&&i.push(c),o++,o===a.length)return t(i.length?i[0]:null)}a.forEach(c=>{n.removeCookie(c.domain,c.path,c.key,s)})})}static deserialize(t,n,r){arguments.length!==3&&(r=n,n=null),de.validate(de.isFunction(r),r);let a;if(typeof t=="string"){if(a=R4(t),a instanceof Error)return r(a)}else a=t;const o=new $r(n,{rejectPublicSuffixes:a.rejectPublicSuffixes,looseMode:a.enableLooseMode,allowSpecialUseDomain:a.allowSpecialUseDomain,prefixSecurity:a.prefixSecurity});o._importCookies(a,i=>{if(i)return r(i);r(null,o)})}static deserializeSync(t,n){const r=typeof t=="string"?JSON.parse(t):t,a=new $r(n,{rejectPublicSuffixes:r.rejectPublicSuffixes,looseMode:r.enableLooseMode});if(!a.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");return a._importCookiesSync(r),a}}$r.fromJSON=$r.deserializeSync;["_importCookies","clone","getCookies","getCookieString","getSetCookieStrings","removeAllCookies","serialize","setCookie"].forEach(e=>{$r.prototype[e]=N4($r.prototype[e])});$r.deserialize=N4($r.deserialize);function To(e){return function(...t){if(!this.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");let n,r;if(this[e](...t,(a,o)=>{n=a,r=o}),n)throw n;return r}}var Oee=vt.version=P4,L4=vt.CookieJar=$r,Tee=vt.Cookie=kt,Cee=vt.Store=T4,Iee=vt.MemoryCookieStore=C4,Pee=vt.parseDate=Pf,Nee=vt.formatDate=D4,Mee=vt.parse=$4,Dee=vt.fromJSON=Py,zee=vt.domainMatch=z1,$ee=vt.defaultPath=z4,Ree=vt.pathMatch=I4,Lee=vt.getPublicSuffix=nS.getPublicSuffix,Bee=vt.cookieCompare=$1,Fee=vt.permuteDomain=Y_.permuteDomain,Uee=vt.permutePath=Aee,Hee=vt.canonicalDomain=Tl,Vee=vt.PrefixSecurityEnum=ss,Wee=vt.ParameterError=de.ParameterError;const B4=zM({__proto__:null,Cookie:Tee,CookieJar:L4,MemoryCookieStore:Iee,ParameterError:Wee,PrefixSecurityEnum:Vee,Store:Cee,canonicalDomain:Hee,cookieCompare:Bee,default:vt,defaultPath:$ee,domainMatch:zee,formatDate:Nee,fromJSON:Dee,getPublicSuffix:Lee,parse:Mee,parseDate:Pee,pathMatch:Ree,permuteDomain:Fee,permutePath:Uee,version:Oee},[vt]);var Ny={exports:{}},Zm={decodeValues:!0,map:!1,silent:!1};function R1(e){return typeof e=="string"&&!!e.trim()}function L1(e,t){var n=e.split(";").filter(R1),r=n.shift(),a=qee(r),o=a.name,i=a.value;t=t?Object.assign({},Zm,t):Zm;try{i=t.decodeValues?decodeURIComponent(i):i}catch(c){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",c)}var s={name:o,value:i};return n.forEach(function(c){var l=c.split("="),u=l.shift().trimLeft().toLowerCase(),f=l.join("=");u==="expires"?s.expires=new Date(f):u==="max-age"?s.maxAge=parseInt(f,10):u==="secure"?s.secure=!0:u==="httponly"?s.httpOnly=!0:u==="samesite"?s.sameSite=f:u==="partitioned"?s.partitioned=!0:s[u]=f}),s}function qee(e){var t="",n="",r=e.split("=");return r.length>1?(t=r.shift(),n=r.join("=")):n=e,{name:t,value:n}}function F4(e,t){if(t=t?Object.assign({},Zm,t):Zm,!e)return t.map?{}:[];if(e.headers)if(typeof e.headers.getSetCookie=="function")e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var n=e.headers[Object.keys(e.headers).find(function(a){return a.toLowerCase()==="set-cookie"})];!n&&e.headers.cookie&&!t.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=n}if(Array.isArray(e)||(e=[e]),t.map){var r={};return e.filter(R1).reduce(function(a,o){var i=L1(o,t);return a[i.name]=i,a},r)}else return e.filter(R1).map(function(a){return L1(a,t)})}function Gee(e){if(Array.isArray(e))return e;if(typeof e!="string")return[];var t=[],n=0,r,a,o,i,s;function c(){for(;n=e.length)&&t.push(e.substring(r,e.length))}return t}Ny.exports=F4;Ny.exports.parse=F4;Ny.exports.parseString=L1;var Kee=Ny.exports.splitCookiesString=Gee;function Yee(e,t){const n=new URL(t).hostname,r=new URL(e).hostname;return n===r||n.endsWith(`.${r}`)}const Zee=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]);function Qee(e){const t=e.split(/[,\s]+/);let n="";for(const r of t)r!==""&&Zee.has(r)&&(n=r);return n}function Xee(e,t){}function Jee(e,t){e.headers.delete(t)}function ete(e,t){const n=e.headers;for(const r of Object.keys(n))r.toLowerCase()===t&&delete n[r]}function tte(e){return e.headers==null?Xee:typeof e.headers.delete=="function"?Jee:ete}const nte=new Set([301,302,303,307,308]);function rte(e){return nte.has(e)}async function ate(e,t,n){switch(t.redirect??"follow"){case"error":throw new TypeError(`URI requested responded with a redirect and redirect mode is set to error: ${n.url}`);case"manual":return n;case"follow":break;default:throw new TypeError(`Invalid redirect option: ${t.redirect}`)}const r=n.headers.get("location");if(r===null)return n;const a=n.url,o=new URL(r,a).toString(),i=t.redirectCount??0,s=t.maxRedirect??20;if(i>=s)throw new TypeError(`Reached maximum redirect of ${s} for URL: ${a}`);t={...t,redirectCount:i+1};const c=tte(t);if(!Yee(a,o))for(const f of["authorization","www-authenticate","cookie","cookie2"])c(t,f);const l=t.body,u=t.body;if(n.status!==303&&t.body!=null&&(typeof l.pipe=="function"||typeof u.pipeTo=="function"))throw new TypeError("Cannot follow redirect with body being a readable stream");return(n.status===303||(n.status===301||n.status===302)&&t.method==="POST")&&(t.method="GET",t.body=void 0,c(t,"content-length")),n.headers.has("referrer-policy")&&(t.referrerPolicy=Qee(n.headers.get("referrer-policy"))),await e(o,t)}function ote(e,t,n){if(n==="")return t;const r=e,a=t.headers;return r.headers&&typeof r.headers.append=="function"?r.headers.append("cookie",n):a&&typeof a.append=="function"?a.append("cookie",n):t={...t,headers:{...t.headers,cookie:n}},t}function ite(e){const t=e.headers;if(typeof t.getAll=="function")return t.getAll("set-cookie");if(typeof t.raw=="function"){const r=t.raw();return Array.isArray(r["set-cookie"])?r["set-cookie"]:[]}const n=e.headers.get("set-cookie");return n!==null?Kee(n):[]}function U4(e,t,n=!0){const r=e,a=t??new L4;async function o(i,s){const c=s??{};s={...s,redirect:"manual"};const l=typeof i=="string"?i:i.url??i.href,u=await a.getCookieString(l);s=ote(i,s,u);const f=await r(i,s),d=ite(f);return await Promise.all(d.map(async h=>await a.setCookie(h,f.url,{ignoreError:n}))),(s.redirectCount??0)>0&&Object.defineProperty(f,"redirected",{value:!0}),rte(f.status)?await ate(o,c,f):f}return o.toughCookie=B4,o}U4.toughCookie=B4;var Yt=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},cn={searchParams:"URLSearchParams"in Yt,iterable:"Symbol"in Yt&&"iterator"in Symbol,blob:"FileReader"in Yt&&"Blob"in Yt&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Yt,arrayBuffer:"ArrayBuffer"in Yt};function ste(e){return e&&DataView.prototype.isPrototypeOf(e)}if(cn.arrayBuffer)var cte=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lte=ArrayBuffer.isView||function(e){return e&&cte.indexOf(Object.prototype.toString.call(e))>-1};function mu(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function rS(e){return typeof e!="string"&&(e=String(e)),e}function aS(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return cn.iterable&&(t[Symbol.iterator]=function(){return t}),t}function Nt(e){this.map={},e instanceof Nt?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}Nt.prototype.append=function(e,t){e=mu(e),t=rS(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};Nt.prototype.delete=function(e){delete this.map[mu(e)]};Nt.prototype.get=function(e){return e=mu(e),this.has(e)?this.map[e]:null};Nt.prototype.has=function(e){return this.map.hasOwnProperty(mu(e))};Nt.prototype.set=function(e,t){this.map[mu(e)]=rS(t)};Nt.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};Nt.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),aS(e)};Nt.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),aS(e)};Nt.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),aS(e)};cn.iterable&&(Nt.prototype[Symbol.iterator]=Nt.prototype.entries);function P0(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function H4(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function ute(e){var t=new FileReader,n=H4(t);return t.readAsArrayBuffer(e),n}function fte(e){var t=new FileReader,n=H4(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),a=r?r[1]:"utf-8";return t.readAsText(e,a),n}function dte(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}function Us(e,t){if(!(this instanceof Us))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof Us){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Nt(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new Nt(t.headers)),this.method=hte(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Yt){var o=new AbortController;return o.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var a=/\?/;this.url+=(a.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Us.prototype.clone=function(){return new Us(this,{body:this._bodyInit})};function mte(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),a=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(o))}}),t}function gte(e){var t=new Nt,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(` +`)===0?r.substr(1,r.length):r}).forEach(function(r){var a=r.split(":"),o=a.shift().trim();if(o){var i=a.join(":").trim();try{t.append(o,i)}catch(s){console.warn("Response "+s.message)}}}),t}V4.call(Us.prototype);function Aa(e,t){if(!(this instanceof Aa))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new Nt(t.headers),this.url=t.url||"",this._initBody(e)}V4.call(Aa.prototype);Aa.prototype.clone=function(){return new Aa(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Nt(this.headers),url:this.url})};Aa.error=function(){var e=new Aa(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var yte=[301,302,303,307,308];Aa.redirect=function(e,t){if(yte.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Aa(null,{status:t,headers:{location:e}})};var Xi=Yt.DOMException;try{new Xi}catch{Xi=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},Xi.prototype=Object.create(Error.prototype),Xi.prototype.constructor=Xi}function W4(e,t){return new Promise(function(n,r){var a=new Us(e,t);if(a.signal&&a.signal.aborted)return r(new Xi("Aborted","AbortError"));var o=new XMLHttpRequest;function i(){o.abort()}o.onload=function(){var l={statusText:o.statusText,headers:gte(o.getAllResponseHeaders()||"")};a.url.indexOf("file://")===0&&(o.status<200||o.status>599)?l.status=200:l.status=o.status,l.url="responseURL"in o?o.responseURL:l.headers.get("X-Request-URL");var u="response"in o?o.response:o.responseText;setTimeout(function(){n(new Aa(u,l))},0)},o.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){r(new Xi("Aborted","AbortError"))},0)};function s(l){try{return l===""&&Yt.location.href?Yt.location.href:l}catch{return l}}if(o.open(a.method,s(a.url),!0),a.credentials==="include"?o.withCredentials=!0:a.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(cn.blob?o.responseType="blob":cn.arrayBuffer&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof Nt||Yt.Headers&&t.headers instanceof Yt.Headers)){var c=[];Object.getOwnPropertyNames(t.headers).forEach(function(l){c.push(mu(l)),o.setRequestHeader(l,rS(t.headers[l]))}),a.headers.forEach(function(l,u){c.indexOf(u)===-1&&o.setRequestHeader(u,l)})}else a.headers.forEach(function(l,u){o.setRequestHeader(u,l)});a.signal&&(a.signal.addEventListener("abort",i),o.onreadystatechange=function(){o.readyState===4&&a.signal.removeEventListener("abort",i)}),o.send(typeof a._bodyInit>"u"?null:a._bodyInit)})}W4.polyfill=!0;Yt.fetch||(Yt.fetch=W4,Yt.Headers=Nt,Yt.Request=Us,Yt.Response=Aa);var vte=self.fetch.bind(self);const bte=ze(vte),q4=(e,t,n=[])=>{const r=Object.getOwnPropertyDescriptors(t);for(let a of n)delete r[a];Object.defineProperties(e,r)},yd=(e,t=[e])=>{const n=Object.getPrototypeOf(e);return n===null?t:yd(n,[...t,n])},wte=(...e)=>{if(e.length===0)return;let t;const n=e.map(r=>yd(r));for(;n.every(r=>r.length>0);){const r=n.map(o=>o.pop()),a=r[0];if(r.every(o=>o===a))t=a;else break}return t},tC=(e,t,n=[])=>{var r;const a=(r=wte(...e))!==null&&r!==void 0?r:Object.prototype,o=Object.create(a),i=yd(a);for(let s of e){let c=yd(s);for(let l=c.length-1;l>=0;l--){let u=c[l];i.indexOf(u)===-1&&(q4(o,u,["constructor",...n]),i.push(u))}}return o.constructor=t,o},B1=e=>e.filter((t,n)=>e.indexOf(t)==n),G4=new WeakMap,kte=e=>G4.get(e),xte=(e,t)=>G4.set(e,t),nC=(e,t)=>{var n,r;const a=B1([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),o={};for(let i of a)o[i]=B1([...(n=e==null?void 0:e[i])!==null&&n!==void 0?n:[],...(r=t==null?void 0:t[i])!==null&&r!==void 0?r:[]]);return o},rC=(e,t)=>{var n,r,a,o;return{property:nC((n=e==null?void 0:e.property)!==null&&n!==void 0?n:{},(r=t==null?void 0:t.property)!==null&&r!==void 0?r:{}),method:nC((a=e==null?void 0:e.method)!==null&&a!==void 0?a:{},(o=t==null?void 0:t.method)!==null&&o!==void 0?o:{})}},jte=(e,t)=>{var n,r,a,o,i,s;return{class:B1([...(n=e==null?void 0:e.class)!==null&&n!==void 0?n:[],...(r=t==null?void 0:t.class)!==null&&r!==void 0?r:[]]),static:rC((a=e==null?void 0:e.static)!==null&&a!==void 0?a:{},(o=t==null?void 0:t.static)!==null&&o!==void 0?o:{}),instance:rC((i=e==null?void 0:e.instance)!==null&&i!==void 0?i:{},(s=t==null?void 0:t.instance)!==null&&s!==void 0?s:{})}},_te=new Map,Ste=(...e)=>{var t;const n=new Set,r=new Set([...e]);for(;r.size>0;)for(let a of r){const o=yd(a.prototype).map(l=>l.constructor),i=(t=kte(a))!==null&&t!==void 0?t:[],c=[...o,...i].filter(l=>!n.has(l));for(let l of c)r.add(l);n.add(a),r.delete(a)}return[...n]},Ete=(...e)=>{const t=Ste(...e).map(n=>_te.get(n)).filter(n=>!!n);return t.length==0?{}:t.length==1?t[0]:t.reduce((n,r)=>jte(n,r))};function Ate(...e){var t,n,r;const a=e.map(s=>s.prototype);function o(...s){for(const c of e)q4(this,new c(...s))}o.prototype=tC(a,o),Object.setPrototypeOf(o,tC(e,null,["prototype"]));let i=o;{const s=Ete(...e);for(let c of(t=s==null?void 0:s.class)!==null&&t!==void 0?t:[]){const l=c(i);l&&(i=l)}aC((n=s==null?void 0:s.static)!==null&&n!==void 0?n:{},i),aC((r=s==null?void 0:s.instance)!==null&&r!==void 0?r:{},i.prototype)}return xte(i,e),i}const aC=(e,t)=>{const n=e.property,r=e.method;if(n)for(let a in n)for(let o of n[a])o(t,a);if(r)for(let a in r)for(let o of r[a])o(t,a,Object.getOwnPropertyDescriptor(t,a))};var Ote={exports:{}};(function(e){(function(t,n,r){e.exports?e.exports=r():n[t]=r()})("urljoin",Ka,function(){function t(n){var r=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var a=n.shift();n[0]=a+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o0&&(i=i.replace(/^[\/]+/,"")),o0?"?":"")+c.join("&"),s}return function(){var n;return typeof arguments[0]=="object"?n=arguments[0]:n=[].slice.call(arguments),t(n)}})})(Ote);var K4=Object.defineProperty,Tte=Object.getOwnPropertyDescriptor,Cte=Object.getOwnPropertyNames,Ite=Object.prototype.hasOwnProperty,We=(e,t)=>{for(var n in t)K4(e,n,{get:t[n],enumerable:!0})},Pte=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Cte(t))!Ite.call(e,a)&&a!==n&&K4(e,a,{get:()=>t[a],enumerable:!(r=Tte(t,a))||r.enumerable});return e},Nte=(e,t,n)=>(Pte(e,t,"default"),n),F1={};We(F1,{ADDR_BOUND:()=>lS,API_VERSION:()=>mL,BaseUrl:()=>bL,FeeMarginPercentage:()=>xL,IS_BROWSER:()=>iL,MASK_250:()=>hL,MAX_STORAGE_ITEM_SIZE:()=>gL,NetworkName:()=>My,PRIME:()=>cS,RANGE_FELT:()=>U1,RANGE_I128:()=>yL,RANGE_U128:()=>vL,RPC_DEFAULT_VERSION:()=>df,RPC_NODES:()=>jL,StarknetChainId:()=>wL,TEXT_TO_FELT_MAX_LEN:()=>sS,TRANSACTION_VERSION:()=>oe.ETransactionVersion,TransactionHashPrefix:()=>kL,UDC:()=>xs,ZERO:()=>bt});var oe={};We(oe,{JRPC:()=>Mte,RPCSPEC06:()=>rt,RPCSPEC07:()=>b$});var Mte={},rt={};We(rt,{EBlockTag:()=>eL,EDAMode:()=>nL,EDataAvailabilityMode:()=>tL,ESimulationFlag:()=>Z4,ETransactionExecutionStatus:()=>J4,ETransactionFinalityStatus:()=>X4,ETransactionStatus:()=>Q4,ETransactionType:()=>Y4,ETransactionVersion:()=>rL,ETransactionVersion2:()=>aL,ETransactionVersion3:()=>oL,Errors:()=>Dte,SPEC:()=>zte});var Dte={},zte={},Y4=(e=>(e.DECLARE="DECLARE",e.DEPLOY="DEPLOY",e.DEPLOY_ACCOUNT="DEPLOY_ACCOUNT",e.INVOKE="INVOKE",e.L1_HANDLER="L1_HANDLER",e))(Y4||{}),Z4=(e=>(e.SKIP_VALIDATE="SKIP_VALIDATE",e.SKIP_FEE_CHARGE="SKIP_FEE_CHARGE",e))(Z4||{}),Q4=(e=>(e.RECEIVED="RECEIVED",e.REJECTED="REJECTED",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e))(Q4||{}),X4=(e=>(e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e))(X4||{}),J4=(e=>(e.SUCCEEDED="SUCCEEDED",e.REVERTED="REVERTED",e))(J4||{}),eL=(e=>(e.PENDING="pending",e.LATEST="latest",e))(eL||{}),tL=(e=>(e.L1="L1",e.L2="L2",e))(tL||{}),nL=(e=>(e[e.L1=0]="L1",e[e.L2=1]="L2",e))(nL||{}),rL=(e=>(e.V0="0x0",e.V1="0x1",e.V2="0x2",e.V3="0x3",e.F0="0x100000000000000000000000000000000",e.F1="0x100000000000000000000000000000001",e.F2="0x100000000000000000000000000000002",e.F3="0x100000000000000000000000000000003",e))(rL||{}),aL=(e=>(e.V0="0x0",e.V1="0x1",e.V2="0x2",e.F0="0x100000000000000000000000000000000",e.F1="0x100000000000000000000000000000001",e.F2="0x100000000000000000000000000000002",e))(aL||{}),oL=(e=>(e.V3="0x3",e.F3="0x100000000000000000000000000000003",e))(oL||{});Nte(oe,b$);var $te={};We($te,{IS_BROWSER:()=>iL,addHexPrefix:()=>Be,arrayBufferToString:()=>sL,atobUniversal:()=>cL,btoaUniversal:()=>lL,buf2hex:()=>iS,calcByteLength:()=>fL,padLeft:()=>uL,pascalToSnake:()=>Bte,removeHexPrefix:()=>Sn,sanitizeBytes:()=>dL,sanitizeHex:()=>pL,stringToArrayBuffer:()=>Rte,utf8ToArray:()=>vi});var iL=typeof window<"u",oS="0";function sL(e){return new Uint8Array(e).reduce((t,n)=>t+String.fromCharCode(n),"")}function vi(e){return new TextEncoder().encode(e)}function Rte(e){return vi(e)}function cL(e){return k$.decode(e)}function lL(e){return k$.encode(new Uint8Array(e))}function iS(e){return e.reduce((t,n)=>t+n.toString(16).padStart(2,"0"),"")}function Sn(e){return e.replace(/^0x/i,"")}function Be(e){return`0x${Sn(e)}`}function Lte(e,t,n,r=oS){const a=t-e.length;let o=e;return a>0&&(o=r.repeat(a)+e),o}function uL(e,t,n=oS){return Lte(e,t,!0,n)}function fL(e,t=8){const{length:n}=e,r=n%t;return r?(n-r)/t*t+t:n}function dL(e,t=8,n=oS){return uL(e,fL(e,t),n)}function pL(e){return e=Sn(e),e=dL(e,2),e&&(e=Be(e)),e}var Bte=e=>/[a-z]/.test(e)?e.split(/(?=[A-Z])/).join("_").toUpperCase():e,sS=31,bt=0n,hL=2n**250n-1n,mL=bt,cS=2n**251n+17n*2n**192n+1n,gL=256n,lS=2n**251n-gL,uS=(e,t)=>({min:e,max:t}),U1=uS(bt,cS-1n),yL=uS(-(2n**127n),2n**127n-1n),vL=uS(bt,2n**128n-1n),bL=(e=>(e.SN_MAIN="https://alpha-mainnet.starknet.io",e.SN_SEPOLIA="https://alpha-sepolia.starknet.io",e))(bL||{}),My=(e=>(e.SN_MAIN="SN_MAIN",e.SN_SEPOLIA="SN_SEPOLIA",e))(My||{}),wL=(e=>(e.SN_MAIN="0x534e5f4d41494e",e.SN_SEPOLIA="0x534e5f5345504f4c4941",e))(wL||{}),kL=(e=>(e.DECLARE="0x6465636c617265",e.DEPLOY="0x6465706c6f79",e.DEPLOY_ACCOUNT="0x6465706c6f795f6163636f756e74",e.INVOKE="0x696e766f6b65",e.L1_HANDLER="0x6c315f68616e646c6572",e))(kL||{}),xL=(e=>(e[e.L1_BOUND_MAX_AMOUNT=50]="L1_BOUND_MAX_AMOUNT",e[e.L1_BOUND_MAX_PRICE_PER_UNIT=50]="L1_BOUND_MAX_PRICE_PER_UNIT",e[e.MAX_FEE=50]="MAX_FEE",e))(xL||{}),xs={ADDRESS:"0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf",ENTRYPOINT:"deployContract"},df="v0_7",jL={SN_MAIN:[`https://starknet-mainnet.public.blastapi.io/rpc/${df}`,`https://free-rpc.nethermind.io/mainnet-juno/${df}`],SN_SEPOLIA:[`https://starknet-sepolia.public.blastapi.io/rpc/${df}`,`https://free-rpc.nethermind.io/sepolia-juno/${df}`]},_L={};We(_L,{RpcChannel:()=>ere});function Fte(e,t=e.constructor){const{captureStackTrace:n}=Error;n&&n(e,t)}function Ute(e,t){const{setPrototypeOf:n}=Object;n?n(e,t):e.__proto__=t}var Hte=class extends Error{constructor(t){super(t);ae(this,"name");Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0}),Ute(this,new.target.prototype),Fte(this)}},vd=class extends Hte{},Vte={};We(Vte,{BlockStatus:()=>IL,BlockTag:()=>Cl,EntryPointType:()=>EL,Literal:()=>dS,RPC:()=>oe,TransactionExecutionStatus:()=>CL,TransactionFinalityStatus:()=>TL,TransactionStatus:()=>OL,TransactionType:()=>AL,TypedDataRevision:()=>Re,Uint:()=>fS,ValidateType:()=>SL});var SL=(e=>(e.DEPLOY="DEPLOY",e.CALL="CALL",e.INVOKE="INVOKE",e))(SL||{}),fS=(e=>(e.u8="core::integer::u8",e.u16="core::integer::u16",e.u32="core::integer::u32",e.u64="core::integer::u64",e.u128="core::integer::u128",e.u256="core::integer::u256",e.u512="core::integer::u512",e))(fS||{}),dS=(e=>(e.ClassHash="core::starknet::class_hash::ClassHash",e.ContractAddress="core::starknet::contract_address::ContractAddress",e.Secp256k1Point="core::starknet::secp256k1::Secp256k1Point",e))(dS||{}),EL=(e=>(e.EXTERNAL="EXTERNAL",e.L1_HANDLER="L1_HANDLER",e.CONSTRUCTOR="CONSTRUCTOR",e))(EL||{}),AL=(e=>(e.DECLARE="DECLARE",e.DEPLOY="DEPLOY",e.DEPLOY_ACCOUNT="DEPLOY_ACCOUNT",e.INVOKE="INVOKE_FUNCTION",e))(AL||{}),OL=(e=>(e.NOT_RECEIVED="NOT_RECEIVED",e.RECEIVED="RECEIVED",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e.REJECTED="REJECTED",e.REVERTED="REVERTED",e))(OL||{}),TL=(e=>(e.NOT_RECEIVED="NOT_RECEIVED",e.RECEIVED="RECEIVED",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e))(TL||{}),CL=(e=>(e.REJECTED="REJECTED",e.REVERTED="REVERTED",e.SUCCEEDED="SUCCEEDED",e))(CL||{}),IL=(e=>(e.PENDING="PENDING",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.REJECTED="REJECTED",e))(IL||{}),Cl=(e=>(e.PENDING="pending",e.LATEST="latest",e))(Cl||{});function ve(e,t){if(!e)throw new Error(t||"Assertion failure")}var Wte={};We(Wte,{addPercent:()=>Mf,assertInRange:()=>mS,bigNumberishArrayToDecimalStringArray:()=>NL,bigNumberishArrayToHexadecimalStringArray:()=>ML,cleanHex:()=>bd,getDecimalString:()=>qte,getHexString:()=>DL,getHexStringArray:()=>gS,hexToBytes:()=>vS,hexToDecimalString:()=>PL,isBigInt:()=>Oi,isBoolean:()=>bS,isHex:()=>Hr,isNumber:()=>Il,isStringWholeNumber:()=>gu,toBigInt:()=>De,toCairoBool:()=>yS,toHex:()=>K,toHexString:()=>pS,toStorageKey:()=>hS});function Hr(e){return/^0x[0-9a-f]*$/i.test(e)}function De(e){return BigInt(e)}function Oi(e){return typeof e=="bigint"}function K(e){return Be(De(e).toString(16))}var pS=K;function hS(e){return Be(De(e).toString(16).padStart(64,"0"))}function PL(e){return BigInt(Be(e)).toString(10)}function bd(e){return e.toLowerCase().replace(/^(0x)0+/,"$1")}function mS(e,t,n,r=""){const a=r===""?"invalid length":`invalid ${r} length`,o=BigInt(e),i=BigInt(t),s=BigInt(n);ve(o>=i&&o<=s,`Message not signable, ${a}.`)}function NL(e){return e.map(t=>De(t).toString(10))}function ML(e){return e.map(t=>K(t))}function gu(e){return/^\d+$/.test(e)}function qte(e){if(Hr(e))return PL(e);if(gu(e))return e;throw new Error(`${e} needs to be a hex-string or whole-number-string`)}function DL(e){if(Hr(e))return e;if(gu(e))return pS(e);throw new Error(`${e} needs to be a hex-string or whole-number-string`)}function gS(e){return e.map(DL)}function yS(e){return(+e).toString()}function vS(e){if(!Hr(e))throw new Error(`${e} needs to be a hex-string`);let t=Sn(e);return t.length%2!==0&&(t=`0${t}`),$s(t)}function Mf(e,t){const n=BigInt(e);return n+n*BigInt(t)/100n}function Il(e){return typeof e=="number"}function bS(e){return typeof e=="boolean"}var Gte={};We(Gte,{getSelector:()=>Dy,getSelectorFromName:()=>At,keccakBn:()=>zL,starknetKeccak:()=>wS});function zL(e){const t=Sn(K(BigInt(e))),n=t.length%2===0?t:`0${t}`;return Be(yi(vS(Be(n))).toString(16))}function Kte(e){return Be(yi(vi(e)).toString(16))}function wS(e){return BigInt(Kte(e))&hL}function At(e){return K(wS(e))}function Dy(e){return Hr(e)?e:gu(e)?pS(e):At(e)}var $L={};We($L,{decodeShortString:()=>Hs,encodeShortString:()=>Lt,isASCII:()=>kS,isDecimalString:()=>xS,isLongText:()=>jS,isShortString:()=>Op,isShortText:()=>Yte,isString:()=>_t,isText:()=>Tp,splitLongString:()=>_S});function kS(e){return/^[\x00-\x7F]*$/.test(e)}function Op(e){return e.length<=sS}function xS(e){return/^[0-9]*$/i.test(e)}function _t(e){return typeof e=="string"}function Tp(e){return _t(e)&&!Hr(e)&&!gu(e)}var Yte=e=>Tp(e)&&Op(e),jS=e=>Tp(e)&&!Op(e);function _S(e){const t=RegExp(`[^]{1,${sS}}`,"g");return e.match(t)||[]}function Lt(e){if(!kS(e))throw new Error(`${e} is not an ASCII string`);if(!Op(e))throw new Error(`${e} is too long`);return Be(e.replace(/./g,t=>t.charCodeAt(0).toString(16)))}function Hs(e){if(!kS(e))throw new Error(`${e} is not an ASCII string`);if(Hr(e))return Sn(e).replace(/.{2}/g,t=>String.fromCharCode(parseInt(t,16)));if(xS(e))return Hs("0X".concat(BigInt(e).toString(16)));throw new Error(`${e} is not Hex or decimal`)}var Zte={};We(Zte,{byteArrayFromString:()=>zy,stringFromByteArray:()=>RL});function RL(e){const t=BigInt(e.pending_word)===0n?"":Hs(K(e.pending_word));return e.data.reduce((n,r)=>{const a=BigInt(r)===0n?"":Hs(K(r));return n+a},"")+t}function zy(e){const t=_S(e),n=t[t.length-1],r=t.map(Lt),[a,o]=n===void 0||n.length===31?["0x00",0]:[r.pop(),n.length];return{data:r.length===0?[]:r,pending_word:a,pending_word_len:o}}var LL={};We(LL,{felt:()=>lr,getAbiContractVersion:()=>OS,getArrayType:()=>ba,isCairo1Abi:()=>AS,isCairo1Type:()=>wi,isLen:()=>Vs,isTypeArray:()=>bi,isTypeBool:()=>Ly,isTypeByteArray:()=>By,isTypeBytes31:()=>ES,isTypeContractAddress:()=>ine,isTypeEnum:()=>nc,isTypeEthAddress:()=>UL,isTypeFelt:()=>Pl,isTypeLiteral:()=>SS,isTypeNamedTuple:()=>FL,isTypeNonZero:()=>rc,isTypeOption:()=>$y,isTypeResult:()=>Ry,isTypeSecp256k1Point:()=>Fy,isTypeStruct:()=>Cp,isTypeTuple:()=>Ti,isTypeUint:()=>wd,isTypeUint256:()=>one,tuple:()=>Nl,uint256:()=>H1,uint512:()=>sne});function cs(e){if(Oi(e)||Number.isInteger(e))return e.toString();if(_t(e)){if(Hr(e))return BigInt(e).toString();if(Tp(e)){if(!Op(e))throw new Error(`${e} is a long string > 31 chars. Please split it into an array of short strings.`);return BigInt(Lt(e)).toString()}if(gu(e))return e}if(bS(e))return`${+e}`;throw new Error(`${e} can't be computed by felt()`)}var Cc=(1n<<128n)-1n,BL=(1n<<256n)-1n,Qte=0n,Xte=340282366920938463463374607431768211455n,Jte=340282366920938463463374607431768211455n,ene=0n,tne=0n,Nr,xt=(Nr=class{constructor(...t){ae(this,"low");ae(this,"high");if(typeof t[0]=="object"&&t.length===1&&"low"in t[0]&&"high"in t[0]){const n=Nr.validateProps(t[0].low,t[0].high);this.low=n.low,this.high=n.high}else if(t.length===1){const n=Nr.validate(t[0]);this.low=n&Cc,this.high=n>>128n}else if(t.length===2){const n=Nr.validateProps(t[0],t[1]);this.low=n.low,this.high=n.high}else throw Error("Incorrect constructor parameters")}static validate(t){const n=BigInt(t);if(nBL)throw new Error("bigNumberish is bigger than UINT_256_MAX");return n}static validateProps(t,n){const r=BigInt(t),a=BigInt(n);if(rXte)throw new Error("low is out of range UINT_256_LOW_MIN - UINT_256_LOW_MAX");if(aJte)throw new Error("high is out of range UINT_256_HIGH_MIN - UINT_256_HIGH_MAX");return{low:r,high:a}}static is(t){try{Nr.validate(t)}catch{return!1}return!0}static isAbiType(t){return t===Nr.abiSelector}toBigInt(){return(this.high<<128n)+this.low}toUint256HexString(){return{low:Be(this.low.toString(16)),high:Be(this.high.toString(16))}}toUint256DecimalString(){return{low:this.low.toString(10),high:this.high.toString(10)}}toApiRequest(){return[cs(this.low),cs(this.high)]}},ae(Nr,"abiSelector","core::integer::u256"),Nr),nne=(1n<<512n)-1n,rne=0n,ane=0n,Mr,dn=(Mr=class{constructor(...t){ae(this,"limb0");ae(this,"limb1");ae(this,"limb2");ae(this,"limb3");if(typeof t[0]=="object"&&t.length===1&&"limb0"in t[0]&&"limb1"in t[0]&&"limb2"in t[0]&&"limb3"in t[0]){const n=Mr.validateProps(t[0].limb0,t[0].limb1,t[0].limb2,t[0].limb3);this.limb0=n.limb0,this.limb1=n.limb1,this.limb2=n.limb2,this.limb3=n.limb3}else if(t.length===1){const n=Mr.validate(t[0]);this.limb0=n&Cc,this.limb1=(n&Cc<<128n)>>128n,this.limb2=(n&Cc<<256n)>>256n,this.limb3=n>>384n}else if(t.length===4){const n=Mr.validateProps(t[0],t[1],t[2],t[3]);this.limb0=n.limb0,this.limb1=n.limb1,this.limb2=n.limb2,this.limb3=n.limb3}else throw Error("Incorrect Uint512 constructor parameters")}static validate(t){const n=BigInt(t);if(nnne)throw Error("bigNumberish is bigger than UINT_512_MAX.");return n}static validateProps(t,n,r,a){const o=BigInt(t),i=BigInt(n),s=BigInt(r),c=BigInt(a);return[o,i,s,c].forEach((l,u)=>{if(lCc)throw Error(`limb${u} is not in the range of a u128 number`)}),{limb0:o,limb1:i,limb2:s,limb3:c}}static is(t){try{Mr.validate(t)}catch{return!1}return!0}static isAbiType(t){return t===Mr.abiSelector}toBigInt(){return(this.limb3<<384n)+(this.limb2<<256n)+(this.limb1<<128n)+this.limb0}toUint512HexString(){return{limb0:Be(this.limb0.toString(16)),limb1:Be(this.limb1.toString(16)),limb2:Be(this.limb2.toString(16)),limb3:Be(this.limb3.toString(16))}}toUint512DecimalString(){return{limb0:this.limb0.toString(10),limb1:this.limb1.toString(10),limb2:this.limb2.toString(10),limb3:this.limb3.toString(10)}}toApiRequest(){return[cs(this.limb0),cs(this.limb1),cs(this.limb2),cs(this.limb3)]}},ae(Mr,"abiSelector","core::integer::u512"),Mr),Vs=e=>/_len$/.test(e),Pl=e=>e==="felt"||e==="core::felt252",bi=e=>/\*/.test(e)||e.startsWith("core::array::Array::")||e.startsWith("core::array::Span::"),Ti=e=>/^\(.*\)$/i.test(e),FL=e=>/\(.*\)/i.test(e)&&e.includes(":"),Cp=(e,t)=>e in t,nc=(e,t)=>e in t,$y=e=>e.startsWith("core::option::Option::"),Ry=e=>e.startsWith("core::result::Result::"),wd=e=>Object.values(fS).includes(e),one=e=>xt.isAbiType(e),SS=e=>Object.values(dS).includes(e),Ly=e=>e==="core::bool",ine=e=>e==="core::starknet::contract_address::ContractAddress",UL=e=>e==="core::starknet::eth_address::EthAddress",ES=e=>e==="core::bytes_31::bytes31",By=e=>e==="core::byte_array::ByteArray",Fy=e=>e==="core::starknet::secp256k1::Secp256k1Point",wi=e=>e.includes("::"),ba=e=>wi(e)?e.substring(e.indexOf("<")+1,e.lastIndexOf(">")):e.replace("*","");function AS(e){const{cairo:t}=OS(e);if(t===void 0)throw Error("Unable to determine Cairo version");return t==="1"}function rc(e){return e.startsWith("core::zeroable::NonZero::")}function OS(e){if(e.find(r=>r.type==="interface"))return{cairo:"1",compiler:"2"};const t=e.find(r=>r.type==="function"&&(r.inputs.length||r.outputs.length));if(!t)return{cairo:void 0,compiler:void 0};const n=t.inputs.length?t.inputs:t.outputs;return wi(n[0].type)?{cairo:"1",compiler:"1"}:{cairo:"0",compiler:"0"}}var H1=e=>new xt(e).toUint256DecimalString(),sne=e=>new dn(e).toUint512DecimalString(),Nl=(...e)=>({...e});function lr(e){return cs(e)}var Ip=class{constructor(e){ae(this,"variant");const t=Object.values(e);if(t.length===0)throw new Error("This Enum must have at least 1 variant");if(t.filter(r=>typeof r<"u").length!==1)throw new Error("This Enum must have exactly one active variant");this.variant=e}unwrap(){const t=Object.entries(this.variant).find(n=>typeof n[1]<"u");if(!(typeof t>"u"))return t[1]}activeVariant(){const t=Object.entries(this.variant).find(n=>typeof n[1]<"u");return typeof t>"u"?"":t[0]}},HL=(e=>(e[e.Some=0]="Some",e[e.None=1]="None",e))(HL||{}),V1=class{constructor(e,t){ae(this,"Some");ae(this,"None");if(!(e in HL))throw new Error("Wrong variant : should be CairoOptionVariant.Some or .None.");if(e===0){if(typeof t>"u")throw new Error('The creation of a Cairo Option with "Some" variant needs a content as input.');this.Some=t,this.None=void 0}else this.Some=void 0,this.None=!0}unwrap(){if(!this.None)return this.Some}isSome(){return!(typeof this.Some>"u")}isNone(){return this.None===!0}},VL=(e=>(e[e.Ok=0]="Ok",e[e.Err=1]="Err",e))(VL||{}),W1=class{constructor(e,t){ae(this,"Ok");ae(this,"Err");if(!(e in VL))throw new Error("Wrong variant : should be CairoResultVariant.Ok or .Err.");e===0?(this.Ok=t,this.Err=void 0):(this.Ok=void 0,this.Err=t)}unwrap(){if(typeof this.Ok<"u")return this.Ok;if(typeof this.Err<"u")return this.Err;throw new Error("Both Result.Ok and .Err are undefined. Not authorized.")}isOk(){return!(typeof this.Ok>"u")}isErr(){return!(typeof this.Err>"u")}},N0={isBN:(e,t,n)=>{if(!Oi(e[n]))throw new Error(`Data and formatter mismatch on ${n}:${t[n]}, expected response data ${n}:${e[n]} to be BN instead it is ${typeof e[n]}`)},unknown:(e,t,n)=>{throw new Error(`Unhandled formatter type on ${n}:${t[n]} for data ${n}:${e[n]}`)}};function nm(e,t,n){return Object.entries(e).reduce((r,[a,o])=>{const i=n??t[a];if(!(a in t)&&!n)return r[a]=o,r;if(i==="string"){if(Array.isArray(e[a])){const s=nm(e[a],e[a].map(c=>i));return r[a]=Object.values(s).join(""),r}return N0.isBN(e,t,a),r[a]=Hs(o),r}if(i==="number")return N0.isBN(e,t,a),r[a]=Number(o),r;if(typeof i=="function")return r[a]=i(o),r;if(Array.isArray(i)){const s=nm(e[a],i,i[0]);return r[a]=Object.values(s),r}return typeof i=="object"?(r[a]=nm(e[a],i),r):(N0.unknown(e,t,a),r)},{})}var cne=class{constructor(e){ae(this,"abi");this.abi=e}methodInputsLength(e){return e.inputs.reduce((t,n)=>Vs(n.name)?t:t+1,0)}getMethod(e){return this.abi.find(t=>t.name===e)}getLegacyFormat(){return this.abi}},lne=class{constructor(e){ae(this,"abi");this.abi=e}methodInputsLength(e){return e.inputs.length}getMethod(e){return this.abi.find(n=>n.type==="interface").items.find(n=>n.name===e)}getLegacyFormat(){return this.abi.flatMap(e=>e.type==="interface"?e.items:e)}};function WL(e){const t=une(e);if(t===0||t===1)return new cne(e);if(t===2)return new lne(e);throw Error(`Unsupported ABI version ${t}`)}function une(e){return e.find(t=>t.type==="interface")?2:AS(e)?1:0}function oC(e,t,n){return e==="constructor"&&!n&&!t.length}function fne(e){const t=e.substring(0,e.indexOf(":")),n=e.substring(t.length+1);return{name:t,type:n}}function dne(e){if(!e.includes("("))return{subTuple:[],result:e};const t=[];let n="",r=0;for(;rn.length?o.replace(" ",n.shift()):o);return FL(e)&&(a=a.reduce((o,i)=>o.concat(fne(i)),[])),a}function iC(e,t,n){for(let r=0,a=0;r")+1;break}default:{const o=t.indexOf(",",r);a=o!==-1?o:Number.POSITIVE_INFINITY}}n.push(t.slice(r,a)),r=a+2}return n}function TS(e){return wi(e)?hne(e):pne(e)}function mne(e){return Error(`Your object includes the property : ${e}, containing an Uint256 object without the 'low' and 'high' keys.`)}function gne(e){return Error(`Your object includes the property : ${e}, containing an Uint512 object without the 'limb0' to 'limb3' keys.`)}function yne(e,t,n,r){const a=(u,f)=>{if(bi(f))return i(u,f);if(nc(f,r)){const d=r[f];return c(u,d)}if(Ti(f))return s(u,f);if(UL(f)||rc(f)||By(f)||Fy(f))return u;if(xt.isAbiType(f)){const d=u;if(typeof d!="object")return d;if(!("low"in d&&"high"in d))throw mne(f);return{low:d.low,high:d.high}}if(dn.isAbiType(f)){const d=u;if(typeof d!="object")return d;if(!["limb0","limb1","limb2","limb3"].every(h=>h in d))throw gne(f);return{limb0:d.limb0,limb1:d.limb1,limb2:d.limb2,limb3:d.limb3}}if(Cp(f,n)){const d=n[f].members;return o(u,d)}return u},o=(u,f)=>f.reduce((h,g)=>{const p=m=>Object.defineProperty(h,g.name,{enumerable:!0,value:m??u[g.name]});if(u[g.name]==="undefined"&&(wi(g.type)||!Vs(g.name)))throw Error(`Your object needs a property with key : ${g.name} .`);return p(a(u[g.name],g.type)),h},{});function i(u,f){const d=ba(f);return _t(u)?u:u.map(h=>a(h,d))}function s(u,f){return TS(f).reduce((g,p,m)=>{const y=Object.keys(u),v=k=>Object.defineProperty(g,m.toString(),{enumerable:!0,value:k??u[y[m]]}),b=p!=null&&p.type?p.type:p;return v(a(u[y[m]],b)),g},{})}const c=(u,f)=>{if(Ry(f.name)){const p=u,m=f.name.substring(f.name.indexOf("<")+1,f.name.lastIndexOf(",")),y=f.name.substring(f.name.indexOf(",")+1,f.name.lastIndexOf(">"));return p.isOk()?new W1(0,a(u.unwrap(),m)):new W1(1,a(u.unwrap(),y))}if($y(f.name)){const p=u,m=f.name.substring(f.name.indexOf("<")+1,f.name.lastIndexOf(">"));return p.isSome()?new V1(0,a(p.unwrap(),m)):new V1(1,{})}const d=u,g=Object.entries(d.variant).map(p=>{if(typeof p[1]>"u")return p;const m=f.type.substring(f.type.lastIndexOf("<")+1,f.type.lastIndexOf(">"));return m==="()"?p:[p[0],a(d.unwrap(),m)]});return new Ip(Object.fromEntries(g))};return t.reduce((u,f)=>{const d=h=>Object.defineProperty(u,f.name,{enumerable:!0,value:h});return Vs(f.name)&&!wi(f.type)||d(a(e[f.name],f.type)),u},{})}function Gc(e,t){switch(!0){case xt.isAbiType(e):return new xt(t).toApiRequest();case dn.isAbiType(e):return new dn(t).toApiRequest();case ES(e):return Lt(t.toString());case Fy(e):{const n=Sn(K(t)).padStart(128,"0"),r=H1(Be(n.slice(-64))),a=H1(Be(n.slice(0,-64)));return[lr(a.low),lr(a.high),lr(r.low),lr(r.high)]}default:return lr(t)}}function vne(e,t){const n=TS(t),r=Object.values(e);if(r.length!==n.length)throw Error(`ParseTuple: provided and expected abi tuple size do not match. + provided: ${r} + expected: ${n}`);return n.map((a,o)=>({element:r[o],type:a.type??a}))}function bne(e){const t=zy(e);return[t.data.length.toString(),...t.data.map(n=>n.toString()),t.pending_word.toString(),t.pending_word_len.toString()]}function ea(e,t,n,r){if(e===void 0)throw Error(`Missing parameter for type ${t}`);if(Array.isArray(e)){const a=[];a.push(lr(e.length));const o=ba(t);return e.reduce((i,s)=>i.concat(ea(s,o,n,r)),a)}if(n[t]&&n[t].members.length){if(xt.isAbiType(t))return new xt(e).toApiRequest();if(dn.isAbiType(t))return new dn(e).toApiRequest();if(t==="core::starknet::eth_address::EthAddress")return Gc(t,e);if(t==="core::byte_array::ByteArray")return bne(e);const{members:a}=n[t],o=e;return a.reduce((i,s)=>i.concat(ea(o[s.name],s.type,n,r)),[])}if(Ti(t))return vne(e,t).reduce((o,i)=>{const s=ea(i.element,i.type,n,r);return o.concat(s)},[]);if(xt.isAbiType(t))return new xt(e).toApiRequest();if(dn.isAbiType(t))return new dn(e).toApiRequest();if(nc(t,r)){const{variants:a}=r[t];if($y(t)){const f=e;if(f.isSome()){const d=a.find(p=>p.name==="Some");if(typeof d>"u")throw Error("Error in abi : Option has no 'Some' variant.");const h=d.type;if(h==="()")return"0";const g=ea(f.unwrap(),h,n,r);return Array.isArray(g)?["0",...g]:["0",g]}return"1"}if(Ry(t)){const f=e;if(f.isOk()){const p=a.find(v=>v.name==="Ok");if(typeof p>"u")throw Error("Error in abi : Result has no 'Ok' variant.");const m=p.type;if(m==="()")return"0";const y=ea(f.unwrap(),m,n,r);return Array.isArray(y)?["0",...y]:["0",y]}const d=a.find(p=>p.name==="Err");if(typeof d>"u")throw Error("Error in abi : Result has no 'Err' variant.");const h=d.type;if(h==="()")return"1";const g=ea(f.unwrap(),h,n,r);return Array.isArray(g)?["1",...g]:["1",g]}const o=e,i=o.activeVariant(),s=a.find(f=>f.name===i);if(typeof s>"u")throw Error(`Not find in abi : Enum has no '${i}' variant.`);const c=s.type,l=a.findIndex(f=>f.name===i);if(c==="()")return l.toString();const u=ea(o.unwrap(),c,n,r);return Array.isArray(u)?[l.toString(),...u]:[l.toString(),u]}if(rc(t))return Gc(ba(t),e);if(typeof e=="object")throw Error(`Parameter ${e} do not align with abi parameter ${t}`);return Gc(t,e)}function wne(e,t,n,r){const{name:a,type:o}=t;let{value:i}=e.next();switch(!0){case bi(o):if(!Array.isArray(i)&&!Tp(i))throw Error(`ABI expected parameter ${a} to be array or long string, got ${i}`);return _t(i)&&(i=_S(i)),ea(i,t.type,n,r);case rc(o):return Gc(ba(o),i);case o==="core::starknet::eth_address::EthAddress":return Gc(o,i);case(Cp(o,n)||Ti(o)||xt.isAbiType(o)||xt.isAbiType(o)):return ea(i,o,n,r);case nc(o,r):return ea(i,o,n,r);default:return Gc(o,i)}}function q1(e,t){let n;switch(!0){case Ly(e):return n=t.next().value,!!BigInt(n);case xt.isAbiType(e):const r=t.next().value,a=t.next().value;return new xt(r,a).toBigInt();case dn.isAbiType(e):const o=t.next().value,i=t.next().value,s=t.next().value,c=t.next().value;return new dn(o,i,s,c).toBigInt();case e==="core::starknet::eth_address::EthAddress":return n=t.next().value,BigInt(n);case e==="core::bytes_31::bytes31":return n=t.next().value,Hs(n);case Fy(e):const l=Sn(t.next().value).padStart(32,"0"),u=Sn(t.next().value).padStart(32,"0"),f=Sn(t.next().value).padStart(32,"0"),d=Sn(t.next().value).padStart(32,"0");return BigInt(Be(u+l+d+f));default:return n=t.next().value,BigInt(n)}}function Tr(e,t,n,r){if(t.type==="()")return{};if(xt.isAbiType(t.type)){const a=e.next().value,o=e.next().value;return new xt(a,o).toBigInt()}if(dn.isAbiType(t.type)){const a=e.next().value,o=e.next().value,i=e.next().value,s=e.next().value;return new dn(a,o,i,s).toBigInt()}if(By(t.type)){const a=[],o=BigInt(e.next().value);for(;a.length(a[o.name]=Tr(e,o,n,r),a),{});if(r&&t.type in r&&r[t.type]){const a=Number(e.next().value),o=r[t.type].variants.reduce((s,c,l)=>l===a?(s[c.name]=Tr(e,{name:"",type:c.type},n,r),s):(s[c.name]=void 0,s),{});if(t.type.startsWith("core::option::Option")){const s=a===0?o.Some:void 0;return new V1(a,s)}if(t.type.startsWith("core::result::Result")){let s;return a===0?s=o.Ok:s=o.Err,new W1(a,s)}return new Ip(o)}if(Ti(t.type))return TS(t.type).reduce((o,i,s)=>{const c=i!=null&&i.name?i.name:s,l=i!=null&&i.type?i.type:i,u={name:c,type:l};return o[c]=Tr(e,u,n,r),o},{});if(bi(t.type)){const a=[],o={name:"",type:ba(t.type)},i=BigInt(e.next().value);for(;a.length{if(ve(_t(e)||Il(e)||Oi(e),`Validate: arg ${t.name} should be a felt typed as (String, Number or BigInt)`),_t(e)&&!Hr(e))return;const n=BigInt(e.toString(10));ve(n>=0n&&n<=2n**252n-1n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 2^252-1]`)},kne=(e,t)=>{ve(_t(e),`Validate: arg ${t.name} should be a string.`),ve(e.length<32,`Validate: arg ${t.name} cairo typed ${t.type} should be a string of less than 32 characters.`)},xne=(e,t)=>{ve(_t(e),`Validate: arg ${t.name} should be a string.`)},Uy=(e,t)=>{Il(e)&&ve(e<=Number.MAX_SAFE_INTEGER,"Validation: Parameter is to large to be typed as Number use (BigInt or String)"),ve(_t(e)||Il(e)||Oi(e)||typeof e=="object"&&"low"in e&&"high"in e||typeof e=="object"&&["limb0","limb1","limb2","limb3"].every(r=>r in e),`Validate: arg ${t.name} of cairo type ${t.type} should be type (String, Number or BigInt), but is ${typeof e} ${e}.`);let n;switch(t.type){case"core::integer::u256":n=new xt(e).toBigInt();break;case"core::integer::u512":n=new dn(e).toBigInt();break;default:n=De(e)}switch(t.type){case"core::integer::u8":ve(n>=0n&&n<=255n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0 - 255]`);break;case"core::integer::u16":ve(n>=0n&&n<=65535n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 65535]`);break;case"core::integer::u32":ve(n>=0n&&n<=4294967295n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 4294967295]`);break;case"core::integer::u64":ve(n>=0n&&n<=2n**64n-1n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 2^64-1]`);break;case"core::integer::u128":ve(n>=0n&&n<=2n**128n-1n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 2^128-1]`);break;case"core::integer::u256":ve(n>=0n&&n<=2n**256n-1n,`Validate: arg ${t.name} is ${t.type} 0 - 2^256-1`);break;case"core::integer::u512":ve(dn.is(n),`Validate: arg ${t.name} is ${t.type} 0 - 2^512-1`);break;case"core::starknet::class_hash::ClassHash":ve(n>=0n&&n<=2n**252n-1n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 2^252-1]`);break;case"core::starknet::contract_address::ContractAddress":ve(n>=0n&&n<=2n**252n-1n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 2^252-1]`);break;case"core::starknet::secp256k1::Secp256k1Point":{ve(n>=0n&&n<=2n**512n-1n,`Validate: arg ${t.name} must be ${t.type} : a 512 bits number.`);break}}},qL=(e,t)=>{ve(bS(e),`Validate: arg ${t.name} of cairo type ${t.type} should be type (Boolean)`)},GL=(e,t,n)=>{if(t.type==="core::integer::u256"||t.type==="core::integer::u512"){Uy(e,t);return}if(t.type==="core::starknet::eth_address::EthAddress"){ve(typeof e!="object",`EthAddress type is waiting a BigNumberish. Got ${e}`);const r=BigInt(e.toString(10));ve(r>=0n&&r<=2n**160n-1n,`Validate: arg ${t.name} cairo typed ${t.type} should be in range [0, 2^160-1]`);return}ve(typeof e=="object"&&!Array.isArray(e),`Validate: arg ${t.name} is cairo type struct (${t.type}), and should be defined as js object (not array)`),n[t.type].members.forEach(({name:r})=>{ve(Object.keys(e).includes(r),`Validate: arg ${t.name} should have a property ${r}`)})},KL=(e,t)=>{ve(typeof e=="object"&&!Array.isArray(e),`Validate: arg ${t.name} is cairo type Enum (${t.type}), and should be defined as js object (not array)`);const n=Object.getOwnPropertyNames(Object.getPrototypeOf(e)),r=[...Object.getOwnPropertyNames(e),...n];if(!($y(t.type)&&r.includes("isSome")&&r.includes("isNone"))&&!(Ry(t.type)&&r.includes("isOk")&&r.includes("isErr"))&&!(r.includes("variant")&&r.includes("activeVariant")))throw new Error(`Validate Enum: argument ${t.name}, type ${t.type}, value received ${e}, is not an Enum.`)},YL=(e,t)=>{ve(typeof e=="object"&&!Array.isArray(e),`Validate: arg ${t.name} should be a tuple (defined as object)`)},ZL=(e,t,n,r)=>{const a=ba(t.type);if(!(Pl(a)&&jS(e)))switch(ve(Array.isArray(e),`Validate: arg ${t.name} should be an Array`),!0){case Pl(a):e.forEach(o=>CS(o,t));break;case Ti(a):e.forEach(o=>YL(o,{name:t.name,type:a}));break;case bi(a):e.forEach(o=>ZL(o,{name:"",type:a},n,r));break;case Cp(a,n):e.forEach(o=>GL(o,{name:t.name,type:a},n));break;case nc(a,r):e.forEach(o=>KL(o,{name:t.name,type:a}));break;case(wd(a)||SS(a)):e.forEach(o=>Uy(o,{name:"",type:a}));break;case Ly(a):e.forEach(o=>qL(o,t));break;default:throw new Error(`Validate Unhandled: argument ${t.name}, type ${t.type}, value ${e}`)}},jne=(e,t)=>{const n=ba(t.type);switch(ve(wd(n)&&n!==dn.abiSelector||Pl(n),`Validate: ${t.name} type is not authorized for NonZero type.`),!0){case Pl(n):CS(e,t),ve(BigInt(e.toString(10))>0,"Validate: value 0 is not authorized in NonZero felt252 type.");break;case wd(n):switch(Uy(e,{name:"",type:n}),t.type){case"core::integer::u256":ve(new xt(e).toBigInt()>0,"Validate: value 0 is not authorized in NonZero uint256 type.");break;default:ve(De(e)>0,"Validate: value 0 is not authorized in NonZero uint type.")}break;default:throw new Error(`Validate Unhandled: argument ${t.name}, type ${t.type}, value ${e}`)}};function sC(e,t,n,r){e.inputs.reduce((a,o)=>{const i=t[a];switch(!0){case Vs(o.name):return a;case Pl(o.type):CS(i,o);break;case ES(o.type):kne(i,o);break;case(wd(o.type)||SS(o.type)):Uy(i,o);break;case Ly(o.type):qL(i,o);break;case By(o.type):xne(i,o);break;case bi(o.type):ZL(i,o,n,r);break;case Cp(o.type,n):GL(i,o,n);break;case nc(o.type,r):KL(i,o);break;case Ti(o.type):YL(i,o);break;case rc(o.type):jne(i,o);break;default:throw new Error(`Validate Unhandled: argument ${o.name}, type ${o.type}, value ${i}`)}return a+1},0)}var Te=class pf{constructor(t){ae(this,"abi");ae(this,"parser");ae(this,"structs");ae(this,"enums");this.structs=pf.getAbiStruct(t),this.enums=pf.getAbiEnum(t),this.parser=WL(t),this.abi=this.parser.getLegacyFormat()}validate(t,n,r=[]){if(t!=="DEPLOY"){const i=this.abi.filter(s=>{if(s.type!=="function")return!1;const c=s.stateMutability==="view"||s.state_mutability==="view";return t==="INVOKE"?!c:c}).map(s=>s.name);ve(i.includes(n),`${t==="INVOKE"?"invocable":"viewable"} method not found in abi`)}const a=this.abi.find(i=>t==="DEPLOY"?i.name===n&&i.type==="constructor":i.name===n&&i.type==="function");if(oC(n,r,a))return;const o=this.parser.methodInputsLength(a);if(r.length!==o)throw Error(`Invalid number of arguments, expected ${o} arguments, but got ${r.length}`);sC(a,r,this.structs,this.enums)}compile(t,n){const r=this.abi.find(s=>s.name===t);if(oC(t,n,r))return[];let a;if(Array.isArray(n))a=n;else{const s=yne(n,r.inputs,this.structs,this.enums);a=Object.values(s),sC(r,a,this.structs,this.enums)}const o=a[Symbol.iterator](),i=r.inputs.reduce((s,c)=>Vs(c.name)&&!wi(c.type)?s:s.concat(wne(o,c,this.structs,this.enums)),[]);return Object.defineProperty(i,"__compiled__",{enumerable:!1,writable:!1,value:!0}),i}static compile(t){const n=a=>{const o=(s,c=".")=>{const l=Array.isArray(s)?[s.length.toString(),...s]:s;return Object.entries(l).flatMap(([u,f])=>{let d=f;u==="entrypoint"?d=At(d):jS(d)&&(d=zy(d));const h=Array.isArray(l)&&u==="0"?"$$len":u;if(Oi(d))return[[`${c}${h}`,lr(d)]];if(Object(d)===d){const g=Object.getOwnPropertyNames(Object.getPrototypeOf(d)),p=[...Object.getOwnPropertyNames(d),...g];if(p.includes("isSome")&&p.includes("isNone")){const m=d,y=m.isSome()?0:1;return m.isSome()?o({0:y,1:m.unwrap()},`${c}${h}.`):[[`${c}${h}`,lr(y)]]}if(p.includes("isOk")&&p.includes("isErr")){const m=d,y=m.isOk()?0:1;return o({0:y,1:m.unwrap()},`${c}${h}.`)}if(p.includes("variant")&&p.includes("activeVariant")){const m=d,y=m.activeVariant(),b=Object.keys(m.variant).findIndex(k=>k===y);return typeof m.unwrap()=="object"&&Object.keys(m.unwrap()).length===0?[[`${c}${h}`,lr(b)]]:o({0:b,1:m.unwrap()},`${c}${h}.`)}return o(d,`${c}${h}.`)}return[[`${c}${h}`,lr(d)]]})};return Object.fromEntries(o(a))};let r;if(Array.isArray(t)){const a={...t},o=n(a);r=Object.values(o)}else{const a=n(t);r=Object.values(a)}return Object.defineProperty(r,"__compiled__",{enumerable:!1,writable:!1,value:!0}),r}parse(t,n){const{outputs:r}=this.abi.find(i=>i.name===t),a=n.flat()[Symbol.iterator](),o=r.flat().reduce((i,s,c)=>{const l=s.name??c;return i[l]=Qm(a,s,this.structs,this.enums,i),i[l]&&i[`${l}_len`]&&delete i[`${l}_len`],i},{});return Object.keys(o).length===1&&0 in o?o[0]:o}format(t,n,r){const a=this.parse(t,n);return nm(a,r)}static getAbiStruct(t){return t.filter(n=>n.type==="struct").reduce((n,r)=>({...n,[r.name]:r}),{})}static getAbiEnum(t){const n=t.filter(r=>r.type==="enum").reduce((r,a)=>({...r,[a.name]:a}),{});return delete n["core::bool"],n}static toCalldata(t=[]){return pf.compile(t)}static toHex(t=[]){return pf.compile(t).map(r=>K(r))}decodeParameters(t,n){const r=Array.isArray(t)?t:[t],a=n.flat()[Symbol.iterator](),o=r.map(i=>Qm(a,{name:"",type:i},this.structs,this.enums));return o.length===1?o[0]:o}},_ne={};We(_ne,{calculateContractAddressFromHash:()=>Xm,calculateDeclareTransactionHash:()=>Z1,calculateDeployAccountTransactionHash:()=>Q1,calculateInvokeTransactionHash:()=>Y1,computeCompiledClassHash:()=>f5,computeContractClassHash:()=>p5,computeHashOnElements:()=>ia,computeHintedClassHash:()=>c5,computeLegacyContractClassHash:()=>l5,computePedersenHash:()=>kd,computePedersenHashOnElements:()=>i5,computePoseidonHash:()=>o5,computePoseidonHashOnElements:()=>s5,computeSierraContractClassHash:()=>d5,formatSpaces:()=>xd,getSelector:()=>Dy,getSelectorFromName:()=>At,hashByteCodeSegments:()=>u5,keccakBn:()=>zL,poseidon:()=>eY,starknetKeccak:()=>wS});var Sne={};We(Sne,{calculateDeclareTransactionHash:()=>QL,calculateDeployAccountTransactionHash:()=>XL,calculateTransactionHash:()=>JL,calculateTransactionHashCommon:()=>Hy,computeHashOnElements:()=>G1});var Ene={};We(Ene,{starkCurve:()=>HK,weierstrass:()=>cY});function G1(e){return[...e,e.length].reduce((t,n)=>uu(De(t),De(n)),0).toString()}function Hy(e,t,n,r,a,o,i,s=[]){const c=G1(a),l=[e,t,n,r,c,o,i,...s];return G1(l)}function QL(e,t,n,r,a,o,i){return Hy("0x6465636c617265",n,t,0,[e],r,a,[o,...i?[i]:[]])}function XL(e,t,n,r,a,o,i,s){const c=[t,r,...n];return Hy("0x6465706c6f795f6163636f756e74",a,e,0,c,o,i,[s])}function JL(e,t,n,r,a,o){return Hy("0x696e766f6b65",t,e,0,n,r,a,[o])}var Ane={};We(Ane,{calculateDeclareTransactionHash:()=>r5,calculateDeployAccountTransactionHash:()=>n5,calculateInvokeTransactionHash:()=>a5,calculateTransactionHashCommon:()=>Vy,hashDAMode:()=>e5,hashFeeField:()=>t5});var di=e=>e.map(t=>BigInt(t)),One=32n,Tne=64n,K1=128n,cC=Tne+K1,Cne=BigInt(Lt("L1_GAS")),Ine=BigInt(Lt("L2_GAS"));function e5(e,t){return(BigInt(e)<yu,parseAlwaysAsBig:()=>$ne,stringify:()=>Pn,stringifyAlwaysAsBig:()=>Rne});var zne=e=>{if(!jy(e))return parseFloat(e);const t=parseInt(e,10);return Number.isSafeInteger(t)?t:BigInt(e)},yu=e=>mR(String(e),void 0,zne),$ne=e=>mR(String(e),void 0,wY),Pn=(e,t,n,r)=>gR(e,t,n,r),Rne=Pn;function kd(e,t){return uu(BigInt(e),BigInt(t))}function o5(e,t){return K(A_(BigInt(e),BigInt(t)))}function ia(e){return[...e,e.length].reduce((t,n)=>uu(BigInt(t),BigInt(n)),0).toString()}var i5=ia;function s5(e){return K(Ut(e.map(t=>BigInt(t))))}function Xm(e,t,n,r){const a=Te.compile(n),o=ia(a),i=lr("0x535441524b4e45545f434f4e54524143545f41444452455353"),s=ia([i,r,e,t,o]);return K(BigInt(s)%lS)}function Lne(e,t){return e==="attributes"||e==="accessible_scopes"?Array.isArray(t)&&t.length===0?void 0:t:e==="debug_info"?null:t===null?void 0:t}function xd(e){let t=!1;const n=[];for(const r of e)r==='"'&&!(n.length>0&&n.slice(-1)[0]==="\\")&&(t=!t),t?n.push(r):n.push(r===":"?": ":r===","?", ":r);return n.join("")}function c5(e){const{abi:t,program:n}=e,a=xd(Pn({abi:t,program:n},Lne));return Be(yi(vi(a)).toString(16))}function l5(e){const t=_t(e)?yu(e):e,n=K(mL),r=ia(t.entry_points_by_type.EXTERNAL.flatMap(l=>[l.selector,l.offset])),a=ia(t.entry_points_by_type.L1_HANDLER.flatMap(l=>[l.selector,l.offset])),o=ia(t.entry_points_by_type.CONSTRUCTOR.flatMap(l=>[l.selector,l.offset])),i=ia(t.program.builtins.map(l=>Lt(l))),s=c5(t),c=ia(t.program.data);return ia([n,r,a,o,i,s,c])}function Bne(e){return Ut(e.flatMap(t=>BigInt(Lt(t))))}function M0(e){const t=e.flatMap(n=>[BigInt(n.selector),BigInt(n.offset),Bne(n.builtins)]);return Ut(t)}function u5(e){const t=e.bytecode.map(o=>BigInt(o)),n=e.bytecode_segment_lengths??[];let r=0;const a=n.flatMap(o=>{const i=t.slice(r,r+=o);return[BigInt(o),Ut(i)]});return 1n+Ut(a)}function f5(e){const n=BigInt(Lt("COMPILED_CLASS_V1")),r=M0(e.entry_points_by_type.EXTERNAL),a=M0(e.entry_points_by_type.L1_HANDLER),o=M0(e.entry_points_by_type.CONSTRUCTOR),i=e.bytecode_segment_lengths?u5(e):Ut(e.bytecode.map(s=>BigInt(s)));return K(Ut([n,r,a,o,i]))}function D0(e){const t=e.flatMap(n=>[BigInt(n.selector),BigInt(n.function_idx)]);return Ut(t)}function Fne(e){const t=xd(Pn(e.abi,null));return BigInt(Be(yi(vi(t)).toString(16)))}function d5(e){const n=BigInt(Lt("CONTRACT_CLASS_V0.1.0")),r=D0(e.entry_points_by_type.EXTERNAL),a=D0(e.entry_points_by_type.L1_HANDLER),o=D0(e.entry_points_by_type.CONSTRUCTOR),i=Fne(e),s=Ut(e.sierra_program.map(c=>BigInt(c)));return K(Ut([n,r,a,o,i,s]))}function p5(e){const t=_t(e)?yu(e):e;return"sierra_program"in t?d5(t):l5(t)}var Une={};We(Une,{compressProgram:()=>IS,decompressProgram:()=>js,estimateFeeToBounds:()=>jd,estimatedFeeToMaxFee:()=>m5,formatSignature:()=>Wy,intDAM:()=>Vi,makeAddress:()=>Hne,randomAddress:()=>h5,reduceV2:()=>am,signatureToDecimalArray:()=>Vne,signatureToHexArray:()=>Ot,toFeeVersion:()=>rm,toTransactionVersion:()=>Zr,v3Details:()=>St});function IS(e){const t=_t(e)?e:Pn(e),n=TX(t);return lL(n)}function js(e){if(Array.isArray(e))return e;const t=sL(CX(cL(e)));return yu(t)}function h5(){const e=j_.randomPrivateKey();return S_(e)}function Hne(e){return Be(e).toLowerCase()}function Wy(e){if(!e)throw Error("formatSignature: provided signature is undefined");if(Array.isArray(e))return e.map(t=>K(t));try{const{r:t,s:n}=e;return[K(t),K(n)]}catch{throw new Error("Signature need to be weierstrass.SignatureType or an array for custom")}}function Vne(e){return NL(Wy(e))}function Ot(e){return ML(Wy(e))}function m5(e,t=50){return Mf(e,t)}function jd(e,t=50,n=50){if(Oi(e))return{l2_gas:{max_amount:"0x0",max_price_per_unit:"0x0"},l1_gas:{max_amount:"0x0",max_price_per_unit:"0x0"}};if(typeof e.gas_consumed>"u"||typeof e.gas_price>"u")throw Error("estimateFeeToBounds: estimate is undefined");const r=e.data_gas_consumed!==void 0&&e.data_gas_price!==void 0?K(Mf(BigInt(e.overall_fee)/BigInt(e.gas_price),t)):K(Mf(e.gas_consumed,t)),a=K(Mf(e.gas_price,n));return{l2_gas:{max_amount:"0x0",max_price_per_unit:"0x0"},l1_gas:{max_amount:r,max_price_per_unit:a}}}function Vi(e){if(e===oe.EDataAvailabilityMode.L1)return oe.EDAMode.L1;if(e===oe.EDataAvailabilityMode.L2)return oe.EDAMode.L2;throw Error("EDAM conversion")}function Zr(e,t){const n=t?K(t):void 0,r=K(e);if(t&&!Object.values(oe.ETransactionVersion).includes(n))throw Error(`providedVersion ${t} is not ETransactionVersion`);if(!Object.values(oe.ETransactionVersion).includes(r))throw Error(`defaultVersion ${e} is not ETransactionVersion`);return t?n:r}function rm(e){if(!e)return;const t=K(e);if(t===oe.ETransactionVersion.V0)return oe.ETransactionVersion.F0;if(t===oe.ETransactionVersion.V1)return oe.ETransactionVersion.F1;if(t===oe.ETransactionVersion.V2)return oe.ETransactionVersion.F2;if(t===oe.ETransactionVersion.V3)return oe.ETransactionVersion.F3;throw Error(`toFeeVersion: ${t} is not supported`)}function St(e){return{tip:e.tip||0,paymasterData:e.paymasterData||[],accountDeploymentData:e.accountDeploymentData||[],nonceDataAvailabilityMode:e.nonceDataAvailabilityMode||oe.EDataAvailabilityMode.L1,feeDataAvailabilityMode:e.feeDataAvailabilityMode||oe.EDataAvailabilityMode.L1,resourceBounds:e.resourceBounds??jd(bt)}}function am(e){return e===oe.ETransactionVersion.F2?oe.ETransactionVersion.F1:e===oe.ETransactionVersion.V2?oe.ETransactionVersion.V1:e}function En(e){return"sierra_program"in(_t(e)?yu(e):e)}function om(e){const t={...e};if(En(e.contract)&&(!e.compiledClassHash&&e.casm&&(t.compiledClassHash=f5(e.casm)),!t.compiledClassHash))throw new Error("Extract compiledClassHash failed, provide (CairoAssembly).casm file or compiledClassHash");if(t.classHash=e.classHash??p5(e.contract),!t.classHash)throw new Error("Extract classHash failed, provide (CompiledContract).json file or classHash");return t}var Wne={};We(Wne,{ethRandomPrivateKey:()=>qne,validateAndParseEthAddress:()=>PS});function qne(){return pL(iS(n4.utils.randomPrivateKey()))}function PS(e){mS(e,bt,2n**160n-1n,"Ethereum Address ");const t=Be(Sn(K(e)).padStart(40,"0"));return ve(!!t.match(/^(0x)?[0-9a-f]{40}$/),"Invalid Ethereum Address Format"),t}var g5=typeof window<"u"&&window.fetch||typeof global<"u"&&U4(global.fetch)||bte,Gne={};We(Gne,{Block:()=>Pe,createSierraContractClass:()=>y5,getDefaultNodeUrl:()=>_d,isPendingBlock:()=>Kne,isPendingStateUpdate:()=>Zne,isPendingTransaction:()=>Yne,isV3Tx:()=>Rn,isVersion:()=>NS,parseContract:()=>v5,validBlockTags:()=>b5,wait:()=>Ml});function Ml(e){return new Promise(t=>{setTimeout(t,e)})}function y5(e){const t={...e};return delete t.sierra_program_debug_info,t.abi=xd(Pn(e.abi)),t.sierra_program=xd(Pn(e.sierra_program)),t.sierra_program=IS(t.sierra_program),t}function v5(e){const t=_t(e)?yu(e):e;return En(e)?y5(t):{...t,..."program"in t&&{program:IS(t.program)}}}var _d=(e,t=!1)=>{t||console.warn("Using default public node url, please provide nodeUrl in provider options!");const n=jL[e??"SN_SEPOLIA"],r=Math.floor(Math.random()*n.length);return n[r]},b5=Object.values(Cl),Pe=class{constructor(e){ae(this,"hash",null);ae(this,"number",null);ae(this,"tag",null);ae(this,"valueOf",()=>this.number);ae(this,"toString",()=>this.hash);this.setIdentifier(e)}setIdentifier(e){if(_t(e))if(xS(e))this.number=parseInt(e,10);else if(Hr(e))this.hash=e;else if(b5.includes(e))this.tag=e;else throw TypeError(`Block identifier unmanaged: ${e}`);else Oi(e)?this.hash=K(e):Il(e)?this.number=e:this.tag="pending";if(Il(this.number)&&this.number<0)throw TypeError(`Block number (${this.number}) can't be negative`)}get queryIdentifier(){return this.number!==null?`blockNumber=${this.number}`:this.hash!==null?`blockHash=${this.hash}`:`blockNumber=${this.tag}`}get identifier(){return this.number!==null?{block_number:this.number}:this.hash!==null?{block_hash:this.hash}:this.tag}set identifier(e){this.setIdentifier(e)}};function Rn(e){const t=e.version?K(e.version):oe.ETransactionVersion.V3;return t===oe.ETransactionVersion.V3||t===oe.ETransactionVersion.F3}function NS(e,t){const[n,r]=e.split("."),[a,o]=t.split(".");return n===a&&r===o}function Kne(e){return e.status==="PENDING"}function Yne(e){return!("block_hash"in e)}function Zne(e){return!("block_hash"in e)}var Qne={};We(Qne,{buildUDCCall:()=>DS,fromCallsToExecuteCalldata:()=>MS,fromCallsToExecuteCalldataWithNonce:()=>Xne,fromCallsToExecuteCalldata_cairo1:()=>k5,getExecuteCalldata:()=>Jm,getVersionsByType:()=>zS,transformCallsToMulticallArrays:()=>w5,transformCallsToMulticallArrays_cairo1:()=>Jne});var w5=e=>{const t=[],n=[];return e.forEach(r=>{const a=Te.compile(r.calldata||[]);t.push({to:De(r.contractAddress).toString(10),selector:De(At(r.entrypoint)).toString(10),data_offset:n.length.toString(),data_len:a.length.toString()}),n.push(...a)}),{callArray:t,calldata:Te.compile({calldata:n})}},MS=e=>{const{callArray:t,calldata:n}=w5(e);return[...Te.compile({callArray:t}),...n]},Xne=(e,t)=>[...MS(e),De(t).toString()],Jne=e=>e.map(n=>({to:De(n.contractAddress).toString(10),selector:De(At(n.entrypoint)).toString(10),calldata:Te.compile(n.calldata||[])})),k5=e=>{const t=e.map(n=>({contractAddress:n.contractAddress,entrypoint:n.entrypoint,calldata:Array.isArray(n.calldata)&&"__compiled__"in n.calldata?n.calldata:Te.compile(n.calldata)}));return Te.compile({orderCalls:t})},Jm=(e,t="0")=>t==="1"?k5(e):MS(e);function DS(e,t){const n=[].concat(e).map(r=>{const{classHash:a,salt:o,unique:i=!0,constructorCalldata:s=[]}=r,c=Te.compile(s),l=o??h5();return{call:{contractAddress:xs.ADDRESS,entrypoint:xs.ENTRYPOINT,calldata:[a,l,yS(i),c.length,...c]},address:Xm(i?uu(t,l):l,a,c,i?xs.ADDRESS:0)}});return{calls:n.map(r=>r.call),addresses:n.map(r=>r.address)}}function zS(e){return e==="fee"?{v1:oe.ETransactionVersion.F1,v2:oe.ETransactionVersion.F2,v3:oe.ETransactionVersion.F3}:{v1:oe.ETransactionVersion.V1,v2:oe.ETransactionVersion.V2,v3:oe.ETransactionVersion.V3}}var z0={headers:{"Content-Type":"application/json"},blockIdentifier:"pending",retries:200},ere=class{constructor(e){ae(this,"nodeUrl");ae(this,"headers");ae(this,"retries");ae(this,"requestId");ae(this,"blockIdentifier");ae(this,"chainId");ae(this,"specVersion");ae(this,"waitMode");const{nodeUrl:t,retries:n,headers:r,blockIdentifier:a,chainId:o,specVersion:i,waitMode:s}=e||{};Object.values(My).includes(t)?this.nodeUrl=_d(t,e==null?void 0:e.default):t?this.nodeUrl=t:this.nodeUrl=_d(void 0,e==null?void 0:e.default),this.retries=n||z0.retries,this.headers={...z0.headers,...r},this.blockIdentifier=a||z0.blockIdentifier,this.chainId=o,this.specVersion=i,this.waitMode=s||!1,this.requestId=0}setChainId(e){this.chainId=e}fetch(e,t,n=0){const r={id:n,jsonrpc:"2.0",method:e,...t&&{params:t}};return g5(this.nodeUrl,{method:"POST",body:Pn(r),headers:this.headers})}errorHandler(e,t,n,r){if(n){const{code:a,message:o,data:i}=n;throw new vd(`RPC: ${e} with params ${Pn(t,null,2)} + + ${a}: ${o}: ${Pn(i)}`)}if(r instanceof vd)throw r;if(r)throw Error(r.message)}async fetchEndpoint(e,t){var n;try{const r=await this.fetch(e,t,this.requestId+=1),{error:a,result:o}=await r.json();return this.errorHandler(e,t,a),o}catch(r){throw this.errorHandler(e,t,(n=r==null?void 0:r.response)==null?void 0:n.data,r),r}}async getChainId(){return this.chainId??(this.chainId=await this.fetchEndpoint("starknet_chainId")),this.chainId}async getSpecVersion(){return this.specVersion??(this.specVersion=await this.fetchEndpoint("starknet_specVersion")),this.specVersion}getNonceForAddress(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getNonce",{contract_address:n,block_id:r})}getBlockLatestAccepted(){return this.fetchEndpoint("starknet_blockHashAndNumber")}getBlockNumber(){return this.fetchEndpoint("starknet_blockNumber")}getBlockWithTxHashes(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockWithTxHashes",{block_id:t})}getBlockWithTxs(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockWithTxs",{block_id:t})}getBlockStateUpdate(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getStateUpdate",{block_id:t})}getBlockTransactionsTraces(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_traceBlockTransactions",{block_id:t})}getBlockTransactionCount(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockTransactionCount",{block_id:t})}getTransactionByHash(e){const t=K(e);return this.fetchEndpoint("starknet_getTransactionByHash",{transaction_hash:t})}getTransactionByBlockIdAndIndex(e,t){const n=new Pe(e).identifier;return this.fetchEndpoint("starknet_getTransactionByBlockIdAndIndex",{block_id:n,index:t})}getTransactionReceipt(e){const t=K(e);return this.fetchEndpoint("starknet_getTransactionReceipt",{transaction_hash:t})}getTransactionTrace(e){const t=K(e);return this.fetchEndpoint("starknet_traceTransaction",{transaction_hash:t})}getTransactionStatus(e){const t=K(e);return this.fetchEndpoint("starknet_getTransactionStatus",{transaction_hash:t})}simulateTransaction(e,t={}){const{blockIdentifier:n=this.blockIdentifier,skipValidate:r=!0,skipFeeCharge:a=!0}=t,o=new Pe(n).identifier,i=[];return r&&i.push(rt.ESimulationFlag.SKIP_VALIDATE),a&&i.push(rt.ESimulationFlag.SKIP_FEE_CHARGE),this.fetchEndpoint("starknet_simulateTransactions",{block_id:o,transactions:e.map(s=>this.buildTransaction(s)),simulation_flags:i})}async waitForTransaction(e,t){const n=K(e);let{retries:r}=this,a=!1,o=!1;const i=(t==null?void 0:t.retryInterval)??5e3,s=(t==null?void 0:t.errorStates)??[rt.ETransactionStatus.REJECTED],c=(t==null?void 0:t.successStates)??[rt.ETransactionExecutionStatus.SUCCEEDED,rt.ETransactionStatus.ACCEPTED_ON_L2,rt.ETransactionStatus.ACCEPTED_ON_L1];let l;for(;!a;){await Ml(i);try{l=await this.getTransactionStatus(n);const f=l.execution_status,d=l.finality_status;if(!d)throw new Error("waiting for transaction status");if(s.includes(f)||s.includes(d)){const h=`${f}: ${d}`,g=new Error(h);throw g.response=l,o=!0,g}else(c.includes(f)||c.includes(d))&&(a=!0)}catch(f){if(f instanceof Error&&o)throw f;if(r<=0)throw new Error(`waitForTransaction timed-out with retries ${this.retries}`)}r-=1}let u=null;for(;u===null;){try{u=await this.getTransactionReceipt(n)}catch{if(r<=0)throw new Error(`waitForTransaction timed-out with retries ${this.retries}`)}r-=1,await Ml(i)}return u}getStorageAt(e,t,n=this.blockIdentifier){const r=K(e),a=hS(t),o=new Pe(n).identifier;return this.fetchEndpoint("starknet_getStorageAt",{contract_address:r,key:a,block_id:o})}getClassHashAt(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getClassHashAt",{block_id:r,contract_address:n})}getClass(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getClass",{class_hash:n,block_id:r})}getClassAt(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getClassAt",{block_id:r,contract_address:n})}async getEstimateFee(e,{blockIdentifier:t=this.blockIdentifier,skipValidate:n=!0}){const r=new Pe(t).identifier;let a={};return NS("0.5",await this.getSpecVersion())||(a={simulation_flags:n?[rt.ESimulationFlag.SKIP_VALIDATE]:[]}),this.fetchEndpoint("starknet_estimateFee",{request:e.map(o=>this.buildTransaction(o,"fee")),block_id:r,...a})}async invoke(e,t){let n;return Rn(t)?n=this.fetchEndpoint("starknet_addInvokeTransaction",{invoke_transaction:{type:rt.ETransactionType.INVOKE,sender_address:e.contractAddress,calldata:Te.toHex(e.calldata),version:rt.ETransactionVersion.V3,signature:Ot(e.signature),nonce:K(t.nonce),resource_bounds:t.resourceBounds,tip:K(t.tip),paymaster_data:t.paymasterData.map(r=>K(r)),account_deployment_data:t.accountDeploymentData.map(r=>K(r)),nonce_data_availability_mode:t.nonceDataAvailabilityMode,fee_data_availability_mode:t.feeDataAvailabilityMode}}):n=this.fetchEndpoint("starknet_addInvokeTransaction",{invoke_transaction:{sender_address:e.contractAddress,calldata:Te.toHex(e.calldata),type:rt.ETransactionType.INVOKE,max_fee:K(t.maxFee||0),version:rt.ETransactionVersion.V1,signature:Ot(e.signature),nonce:K(t.nonce)}}),this.waitMode?this.waitForTransaction((await n).transaction_hash):n}async declare({contract:e,signature:t,senderAddress:n,compiledClassHash:r},a){let o;if(!En(e)&&!Rn(a))o=this.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:rt.ETransactionType.DECLARE,contract_class:{program:e.program,entry_points_by_type:e.entry_points_by_type,abi:e.abi},version:rt.ETransactionVersion.V1,max_fee:K(a.maxFee||0),signature:Ot(t),sender_address:n,nonce:K(a.nonce)}});else if(En(e)&&!Rn(a))o=this.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:rt.ETransactionType.DECLARE,contract_class:{sierra_program:js(e.sierra_program),contract_class_version:e.contract_class_version,entry_points_by_type:e.entry_points_by_type,abi:e.abi},compiled_class_hash:r||"",version:rt.ETransactionVersion.V2,max_fee:K(a.maxFee||0),signature:Ot(t),sender_address:n,nonce:K(a.nonce)}});else if(En(e)&&Rn(a))o=this.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:rt.ETransactionType.DECLARE,sender_address:n,compiled_class_hash:r||"",version:rt.ETransactionVersion.V3,signature:Ot(t),nonce:K(a.nonce),contract_class:{sierra_program:js(e.sierra_program),contract_class_version:e.contract_class_version,entry_points_by_type:e.entry_points_by_type,abi:e.abi},resource_bounds:a.resourceBounds,tip:K(a.tip),paymaster_data:a.paymasterData.map(i=>K(i)),account_deployment_data:a.accountDeploymentData.map(i=>K(i)),nonce_data_availability_mode:a.nonceDataAvailabilityMode,fee_data_availability_mode:a.feeDataAvailabilityMode}});else throw Error("declare unspotted parameters");return this.waitMode?this.waitForTransaction((await o).transaction_hash):o}async deployAccount({classHash:e,constructorCalldata:t,addressSalt:n,signature:r},a){let o;return Rn(a)?o=this.fetchEndpoint("starknet_addDeployAccountTransaction",{deploy_account_transaction:{type:rt.ETransactionType.DEPLOY_ACCOUNT,version:rt.ETransactionVersion.V3,signature:Ot(r),nonce:K(a.nonce),contract_address_salt:K(n||0),constructor_calldata:Te.toHex(t||[]),class_hash:K(e),resource_bounds:a.resourceBounds,tip:K(a.tip),paymaster_data:a.paymasterData.map(i=>K(i)),nonce_data_availability_mode:a.nonceDataAvailabilityMode,fee_data_availability_mode:a.feeDataAvailabilityMode}}):o=this.fetchEndpoint("starknet_addDeployAccountTransaction",{deploy_account_transaction:{constructor_calldata:Te.toHex(t||[]),class_hash:K(e),contract_address_salt:K(n||0),type:rt.ETransactionType.DEPLOY_ACCOUNT,max_fee:K(a.maxFee||0),version:rt.ETransactionVersion.V1,signature:Ot(r),nonce:K(a.nonce)}}),this.waitMode?this.waitForTransaction((await o).transaction_hash):o}callContract(e,t=this.blockIdentifier){const n=new Pe(t).identifier;return this.fetchEndpoint("starknet_call",{request:{contract_address:e.contractAddress,entry_point_selector:At(e.entrypoint),calldata:Te.toHex(e.calldata)},block_id:n})}estimateMessageFee(e,t=this.blockIdentifier){const{from_address:n,to_address:r,entry_point_selector:a,payload:o}=e,i={from_address:PS(n),to_address:K(r),entry_point_selector:Dy(a),payload:gS(o)},s=new Pe(t).identifier;return this.fetchEndpoint("starknet_estimateMessageFee",{message:i,block_id:s})}getSyncingStats(){return this.fetchEndpoint("starknet_syncing")}getEvents(e){return this.fetchEndpoint("starknet_getEvents",{filter:e})}buildTransaction(e,t){const n=zS(t);let r;if(Rn(e)?r={signature:Ot(e.signature),nonce:K(e.nonce),resource_bounds:e.resourceBounds,tip:K(e.tip),paymaster_data:e.paymasterData.map(a=>K(a)),nonce_data_availability_mode:e.nonceDataAvailabilityMode,fee_data_availability_mode:e.feeDataAvailabilityMode,account_deployment_data:e.accountDeploymentData.map(a=>K(a))}:r={signature:Ot(e.signature),nonce:K(e.nonce),max_fee:K(e.maxFee||0)},e.type==="INVOKE_FUNCTION")return{type:rt.ETransactionType.INVOKE,sender_address:e.contractAddress,calldata:Te.toHex(e.calldata),version:K(e.version||n.v3),...r};if(e.type==="DECLARE")return En(e.contract)?{type:e.type,contract_class:{...e.contract,sierra_program:js(e.contract.sierra_program)},compiled_class_hash:e.compiledClassHash||"",sender_address:e.senderAddress,version:K(e.version||n.v3),...r}:{type:e.type,contract_class:e.contract,sender_address:e.senderAddress,version:K(e.version||n.v1),...r};if(e.type==="DEPLOY_ACCOUNT"){const{account_deployment_data:a,...o}=r;return{type:e.type,constructor_calldata:Te.toHex(e.constructorCalldata||[]),class_hash:K(e.classHash),contract_address_salt:K(e.addressSalt||0),version:K(e.version||n.v3),...o}}throw Error("RPC buildTransaction received unknown TransactionType")}},tre={};We(tre,{RpcChannel:()=>x5});var $0={headers:{"Content-Type":"application/json"},blockIdentifier:"pending",retries:200},x5=class{constructor(e){ae(this,"nodeUrl");ae(this,"headers");ae(this,"retries");ae(this,"requestId");ae(this,"blockIdentifier");ae(this,"chainId");ae(this,"specVersion");ae(this,"transactionRetryIntervalFallback");ae(this,"waitMode");const{nodeUrl:t,retries:n,headers:r,blockIdentifier:a,chainId:o,specVersion:i,waitMode:s,transactionRetryIntervalFallback:c}=e||{};Object.values(My).includes(t)?this.nodeUrl=_d(t,e==null?void 0:e.default):t?this.nodeUrl=t:this.nodeUrl=_d(void 0,e==null?void 0:e.default),this.retries=n||$0.retries,this.headers={...$0.headers,...r},this.blockIdentifier=a||$0.blockIdentifier,this.chainId=o,this.specVersion=i,this.waitMode=s||!1,this.requestId=0,this.transactionRetryIntervalFallback=c}get transactionRetryIntervalDefault(){return this.transactionRetryIntervalFallback??5e3}setChainId(e){this.chainId=e}fetch(e,t,n=0){const r={id:n,jsonrpc:"2.0",method:e,...t&&{params:t}};return g5(this.nodeUrl,{method:"POST",body:Pn(r),headers:this.headers})}errorHandler(e,t,n,r){if(n){const{code:a,message:o,data:i}=n;throw new vd(`RPC: ${e} with params ${Pn(t,null,2)} + + ${a}: ${o}: ${Pn(i)}`)}if(r instanceof vd)throw r;if(r)throw Error(r.message)}async fetchEndpoint(e,t){var n;try{const r=await this.fetch(e,t,this.requestId+=1),{error:a,result:o}=await r.json();return this.errorHandler(e,t,a),o}catch(r){throw this.errorHandler(e,t,(n=r==null?void 0:r.response)==null?void 0:n.data,r),r}}async getChainId(){return this.chainId??(this.chainId=await this.fetchEndpoint("starknet_chainId")),this.chainId}async getSpecVersion(){return this.specVersion??(this.specVersion=await this.fetchEndpoint("starknet_specVersion")),this.specVersion}getNonceForAddress(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getNonce",{contract_address:n,block_id:r})}getBlockLatestAccepted(){return this.fetchEndpoint("starknet_blockHashAndNumber")}getBlockNumber(){return this.fetchEndpoint("starknet_blockNumber")}getBlockWithTxHashes(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockWithTxHashes",{block_id:t})}getBlockWithTxs(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockWithTxs",{block_id:t})}getBlockWithReceipts(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockWithReceipts",{block_id:t})}getBlockStateUpdate(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getStateUpdate",{block_id:t})}getBlockTransactionsTraces(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_traceBlockTransactions",{block_id:t})}getBlockTransactionCount(e=this.blockIdentifier){const t=new Pe(e).identifier;return this.fetchEndpoint("starknet_getBlockTransactionCount",{block_id:t})}getTransactionByHash(e){const t=K(e);return this.fetchEndpoint("starknet_getTransactionByHash",{transaction_hash:t})}getTransactionByBlockIdAndIndex(e,t){const n=new Pe(e).identifier;return this.fetchEndpoint("starknet_getTransactionByBlockIdAndIndex",{block_id:n,index:t})}getTransactionReceipt(e){const t=K(e);return this.fetchEndpoint("starknet_getTransactionReceipt",{transaction_hash:t})}getTransactionTrace(e){const t=K(e);return this.fetchEndpoint("starknet_traceTransaction",{transaction_hash:t})}getTransactionStatus(e){const t=K(e);return this.fetchEndpoint("starknet_getTransactionStatus",{transaction_hash:t})}simulateTransaction(e,t={}){const{blockIdentifier:n=this.blockIdentifier,skipValidate:r=!0,skipFeeCharge:a=!0}=t,o=new Pe(n).identifier,i=[];return r&&i.push(Af.SKIP_VALIDATE),a&&i.push(Af.SKIP_FEE_CHARGE),this.fetchEndpoint("starknet_simulateTransactions",{block_id:o,transactions:e.map(s=>this.buildTransaction(s)),simulation_flags:i})}async waitForTransaction(e,t){const n=K(e);let{retries:r}=this,a=!1,o=!1;const i=(t==null?void 0:t.retryInterval)??this.transactionRetryIntervalDefault,s=(t==null?void 0:t.errorStates)??[Of.REJECTED],c=(t==null?void 0:t.successStates)??[c_.SUCCEEDED,Of.ACCEPTED_ON_L2,Of.ACCEPTED_ON_L1];let l;for(;!a;){await Ml(i);try{l=await this.getTransactionStatus(n);const f=l.execution_status,d=l.finality_status;if(!d)throw new Error("waiting for transaction status");if(s.includes(f)||s.includes(d)){const h=`${f}: ${d}`,g=new Error(h);throw g.response=l,o=!0,g}else(c.includes(f)||c.includes(d))&&(a=!0)}catch(f){if(f instanceof Error&&o)throw f;if(r<=0)throw new Error(`waitForTransaction timed-out with retries ${this.retries}`)}r-=1}let u=null;for(;u===null;){try{u=await this.getTransactionReceipt(n)}catch{if(r<=0)throw new Error(`waitForTransaction timed-out with retries ${this.retries}`)}r-=1,await Ml(i)}return u}getStorageAt(e,t,n=this.blockIdentifier){const r=K(e),a=hS(t),o=new Pe(n).identifier;return this.fetchEndpoint("starknet_getStorageAt",{contract_address:r,key:a,block_id:o})}getClassHashAt(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getClassHashAt",{block_id:r,contract_address:n})}getClass(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getClass",{class_hash:n,block_id:r})}getClassAt(e,t=this.blockIdentifier){const n=K(e),r=new Pe(t).identifier;return this.fetchEndpoint("starknet_getClassAt",{block_id:r,contract_address:n})}async getEstimateFee(e,{blockIdentifier:t=this.blockIdentifier,skipValidate:n=!0}){const r=new Pe(t).identifier;let a={};return NS("0.5",await this.getSpecVersion())||(a={simulation_flags:n?[Af.SKIP_VALIDATE]:[]}),this.fetchEndpoint("starknet_estimateFee",{request:e.map(o=>this.buildTransaction(o,"fee")),block_id:r,...a})}async invoke(e,t){let n;return Rn(t)?n=this.fetchEndpoint("starknet_addInvokeTransaction",{invoke_transaction:{type:Jr.INVOKE,sender_address:e.contractAddress,calldata:Te.toHex(e.calldata),version:Ba.V3,signature:Ot(e.signature),nonce:K(t.nonce),resource_bounds:t.resourceBounds,tip:K(t.tip),paymaster_data:t.paymasterData.map(r=>K(r)),account_deployment_data:t.accountDeploymentData.map(r=>K(r)),nonce_data_availability_mode:t.nonceDataAvailabilityMode,fee_data_availability_mode:t.feeDataAvailabilityMode}}):n=this.fetchEndpoint("starknet_addInvokeTransaction",{invoke_transaction:{sender_address:e.contractAddress,calldata:Te.toHex(e.calldata),type:Jr.INVOKE,max_fee:K(t.maxFee||0),version:Ba.V1,signature:Ot(e.signature),nonce:K(t.nonce)}}),this.waitMode?this.waitForTransaction((await n).transaction_hash):n}async declare({contract:e,signature:t,senderAddress:n,compiledClassHash:r},a){let o;if(!En(e)&&!Rn(a))o=this.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:Jr.DECLARE,contract_class:{program:e.program,entry_points_by_type:e.entry_points_by_type,abi:e.abi},version:Ba.V1,max_fee:K(a.maxFee||0),signature:Ot(t),sender_address:n,nonce:K(a.nonce)}});else if(En(e)&&!Rn(a))o=this.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:Jr.DECLARE,contract_class:{sierra_program:js(e.sierra_program),contract_class_version:e.contract_class_version,entry_points_by_type:e.entry_points_by_type,abi:e.abi},compiled_class_hash:r||"",version:Ba.V2,max_fee:K(a.maxFee||0),signature:Ot(t),sender_address:n,nonce:K(a.nonce)}});else if(En(e)&&Rn(a))o=this.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:Jr.DECLARE,sender_address:n,compiled_class_hash:r||"",version:Ba.V3,signature:Ot(t),nonce:K(a.nonce),contract_class:{sierra_program:js(e.sierra_program),contract_class_version:e.contract_class_version,entry_points_by_type:e.entry_points_by_type,abi:e.abi},resource_bounds:a.resourceBounds,tip:K(a.tip),paymaster_data:a.paymasterData.map(i=>K(i)),account_deployment_data:a.accountDeploymentData.map(i=>K(i)),nonce_data_availability_mode:a.nonceDataAvailabilityMode,fee_data_availability_mode:a.feeDataAvailabilityMode}});else throw Error("declare unspotted parameters");return this.waitMode?this.waitForTransaction((await o).transaction_hash):o}async deployAccount({classHash:e,constructorCalldata:t,addressSalt:n,signature:r},a){let o;return Rn(a)?o=this.fetchEndpoint("starknet_addDeployAccountTransaction",{deploy_account_transaction:{type:Jr.DEPLOY_ACCOUNT,version:Ba.V3,signature:Ot(r),nonce:K(a.nonce),contract_address_salt:K(n||0),constructor_calldata:Te.toHex(t||[]),class_hash:K(e),resource_bounds:a.resourceBounds,tip:K(a.tip),paymaster_data:a.paymasterData.map(i=>K(i)),nonce_data_availability_mode:a.nonceDataAvailabilityMode,fee_data_availability_mode:a.feeDataAvailabilityMode}}):o=this.fetchEndpoint("starknet_addDeployAccountTransaction",{deploy_account_transaction:{constructor_calldata:Te.toHex(t||[]),class_hash:K(e),contract_address_salt:K(n||0),type:Jr.DEPLOY_ACCOUNT,max_fee:K(a.maxFee||0),version:Ba.V1,signature:Ot(r),nonce:K(a.nonce)}}),this.waitMode?this.waitForTransaction((await o).transaction_hash):o}callContract(e,t=this.blockIdentifier){const n=new Pe(t).identifier;return this.fetchEndpoint("starknet_call",{request:{contract_address:e.contractAddress,entry_point_selector:At(e.entrypoint),calldata:Te.toHex(e.calldata)},block_id:n})}estimateMessageFee(e,t=this.blockIdentifier){const{from_address:n,to_address:r,entry_point_selector:a,payload:o}=e,i={from_address:PS(n),to_address:K(r),entry_point_selector:Dy(a),payload:gS(o)},s=new Pe(t).identifier;return this.fetchEndpoint("starknet_estimateMessageFee",{message:i,block_id:s})}getSyncingStats(){return this.fetchEndpoint("starknet_syncing")}getEvents(e){return this.fetchEndpoint("starknet_getEvents",{filter:e})}buildTransaction(e,t){const n=zS(t);let r;if(Rn(e)?r={signature:Ot(e.signature),nonce:K(e.nonce),resource_bounds:e.resourceBounds,tip:K(e.tip),paymaster_data:e.paymasterData.map(a=>K(a)),nonce_data_availability_mode:e.nonceDataAvailabilityMode,fee_data_availability_mode:e.feeDataAvailabilityMode,account_deployment_data:e.accountDeploymentData.map(a=>K(a))}:r={signature:Ot(e.signature),nonce:K(e.nonce),max_fee:K(e.maxFee||0)},e.type==="INVOKE_FUNCTION")return{type:Jr.INVOKE,sender_address:e.contractAddress,calldata:Te.toHex(e.calldata),version:K(e.version||n.v3),...r};if(e.type==="DECLARE")return En(e.contract)?{type:e.type,contract_class:{...e.contract,sierra_program:js(e.contract.sierra_program)},compiled_class_hash:e.compiledClassHash||"",sender_address:e.senderAddress,version:K(e.version||n.v3),...r}:{type:e.type,contract_class:e.contract,sender_address:e.senderAddress,version:K(e.version||n.v1),...r};if(e.type==="DEPLOY_ACCOUNT"){const{account_deployment_data:a,...o}=r;return{type:e.type,constructor_calldata:Te.toHex(e.constructorCalldata||[]),class_hash:K(e.classHash),contract_address_salt:K(e.addressSalt||0),version:K(e.version||n.v3),...o}}throw Error("RPC buildTransaction received unknown TransactionType")}},lC=class{constructor(e){ae(this,"margin");this.margin=e}estimatedFeeToMaxFee(e){var t;return m5(e,(t=this.margin)==null?void 0:t.maxFee)}estimateFeeToBounds(e){var t,n;return jd(e,(t=this.margin)==null?void 0:t.l1BoundMaxAmount,(n=this.margin)==null?void 0:n.l1BoundMaxPricePerUnit)}parseGetBlockResponse(e){return{status:"PENDING",...e}}parseTransactionReceipt(e){return"actual_fee"in e&&_t(e.actual_fee)?{...e,actual_fee:{amount:e.actual_fee,unit:"FRI"}}:e}parseFeeEstimateResponse(e){const t=e[0];return{overall_fee:De(t.overall_fee),gas_consumed:De(t.gas_consumed),gas_price:De(t.gas_price),unit:t.unit,suggestedMaxFee:this.estimatedFeeToMaxFee(t.overall_fee),resourceBounds:this.estimateFeeToBounds(t),data_gas_consumed:t.data_gas_consumed?De(t.data_gas_consumed):0n,data_gas_price:t.data_gas_price?De(t.data_gas_price):0n}}parseFeeEstimateBulkResponse(e){return e.map(t=>({overall_fee:De(t.overall_fee),gas_consumed:De(t.gas_consumed),gas_price:De(t.gas_price),unit:t.unit,suggestedMaxFee:this.estimatedFeeToMaxFee(t.overall_fee),resourceBounds:this.estimateFeeToBounds(t),data_gas_consumed:t.data_gas_consumed?De(t.data_gas_consumed):0n,data_gas_price:t.data_gas_price?De(t.data_gas_price):0n}))}parseSimulateTransactionResponse(e){return e.map(t=>({...t,suggestedMaxFee:this.estimatedFeeToMaxFee(t.fee_estimation.overall_fee),resourceBounds:this.estimateFeeToBounds(t.fee_estimation)}))}parseContractClassResponse(e){return{...e,abi:_t(e.abi)?JSON.parse(e.abi):e.abi}}parseL1GasPriceResponse(e){return e.l1_gas_price.price_in_wei}},uC=class im{constructor(t){ae(this,"statusReceipt");ae(this,"value");[this.statusReceipt,this.value]=im.isSuccess(t)?["success",t]:im.isReverted(t)?["reverted",t]:im.isRejected(t)?["rejected",t]:["error",new Error("Unknown response type")];for(const[n]of Object.entries(this))Object.defineProperty(this,n,{enumerable:!1});for(const[n,r]of Object.entries(t))Object.defineProperty(this,n,{enumerable:!0,writable:!1,value:r})}match(t){return this.statusReceipt in t?t[this.statusReceipt](this.value):t._()}isSuccess(){return this.statusReceipt==="success"}isReverted(){return this.statusReceipt==="reverted"}isRejected(){return this.statusReceipt==="rejected"}isError(){return this.statusReceipt==="error"}static isSuccess(t){return t.execution_status==="SUCCEEDED"}static isReverted(t){return t.execution_status==="REVERTED"}static isRejected(t){return t.status==="REJECTED"}},j5=class{constructor(e){ae(this,"responseParser");ae(this,"channel");ae(this,"getStateUpdate",this.getBlockStateUpdate);e&&"channel"in e?(this.channel=e.channel,this.responseParser="responseParser"in e?e.responseParser:new lC):(this.channel=new x5({...e,waitMode:!1}),this.responseParser=new lC(e==null?void 0:e.feeMarginPercentage))}fetch(e,t,n=0){return this.channel.fetch(e,t,n)}async getChainId(){return this.channel.getChainId()}async getSpecVersion(){return this.channel.getSpecVersion()}async getNonceForAddress(e,t){return this.channel.getNonceForAddress(e,t)}async getBlock(e){return this.channel.getBlockWithTxHashes(e).then(this.responseParser.parseGetBlockResponse)}async getBlockLatestAccepted(){return this.channel.getBlockLatestAccepted()}async getBlockNumber(){return this.channel.getBlockNumber()}async getBlockWithTxHashes(e){return this.channel.getBlockWithTxHashes(e)}async getBlockWithTxs(e){return this.channel.getBlockWithTxs(e)}async waitForBlock(e="pending",t=5e3){if(e==="latest")return;const n=await this.getBlockNumber(),r=e==="pending"?n+1:Number(K(e));if(r<=n)return;const{retries:a}=this.channel;let o=a,i=!1;for(;!i;)if(await this.getBlockNumber()===r?i=!0:await Ml(t),o-=1,o<=0)throw new Error(`waitForBlock() timed-out after ${a} tries.`)}async getL1GasPrice(e){return this.channel.getBlockWithTxHashes(e).then(this.responseParser.parseL1GasPriceResponse)}async getL1MessageHash(e){const t=await this.channel.getTransactionByHash(e);ve(t.type==="L1_HANDLER","This L2 transaction is not a L1 message.");const{calldata:n,contract_address:r,entry_point_selector:a,nonce:o}=t,i=[n[0],r,o,a,n.length-1,...n.slice(1)],s=Be(i.reduce((c,l)=>c+Sn(K(l)).padStart(64,"0"),""));return Be(zs(SG(vS(s))))}async getBlockWithReceipts(e){if(this.channel instanceof _L.RpcChannel)throw new vd("Unsupported method for RPC version");return this.channel.getBlockWithReceipts(e)}async getBlockStateUpdate(e){return this.channel.getBlockStateUpdate(e)}async getBlockTransactionsTraces(e){return this.channel.getBlockTransactionsTraces(e)}async getBlockTransactionCount(e){return this.channel.getBlockTransactionCount(e)}async getPendingTransactions(){const{transactions:e}=await this.getBlockWithTxHashes("pending").then(this.responseParser.parseGetBlockResponse);return Promise.all(e.map(t=>this.getTransactionByHash(t)))}async getTransaction(e){return this.channel.getTransactionByHash(e)}async getTransactionByHash(e){return this.channel.getTransactionByHash(e)}async getTransactionByBlockIdAndIndex(e,t){return this.channel.getTransactionByBlockIdAndIndex(e,t)}async getTransactionReceipt(e){const t=await this.channel.getTransactionReceipt(e),n=this.responseParser.parseTransactionReceipt(t);return new uC(n)}async getTransactionTrace(e){return this.channel.getTransactionTrace(e)}async getTransactionStatus(e){return this.channel.getTransactionStatus(e)}async getSimulateTransaction(e,t){return this.channel.simulateTransaction(e,t).then(n=>this.responseParser.parseSimulateTransactionResponse(n))}async waitForTransaction(e,t){const n=await this.channel.waitForTransaction(e,t);return new uC(n)}async getStorageAt(e,t,n){return this.channel.getStorageAt(e,t,n)}async getClassHashAt(e,t){return this.channel.getClassHashAt(e,t)}async getClassByHash(e){return this.getClass(e)}async getClass(e,t){return this.channel.getClass(e,t).then(this.responseParser.parseContractClassResponse)}async getClassAt(e,t){return this.channel.getClassAt(e,t).then(this.responseParser.parseContractClassResponse)}async getContractVersion(e,t,{blockIdentifier:n=this.channel.blockIdentifier,compiler:r=!0}={}){let a;if(e)a=await this.getClassAt(e,n);else if(t)a=await this.getClass(t,n);else throw Error("getContractVersion require contractAddress or classHash");return En(a)?r?{cairo:"1",compiler:OS(a.abi).compiler}:{cairo:"1",compiler:void 0}:{cairo:"0",compiler:"0"}}async getEstimateFee(e,t,n,r){return this.getInvokeEstimateFee(e,t,n,r)}async getInvokeEstimateFee(e,t,n,r){return this.channel.getEstimateFee([{type:"INVOKE_FUNCTION",...e,...t}],{blockIdentifier:n,skipValidate:r}).then(a=>this.responseParser.parseFeeEstimateResponse(a))}async getDeclareEstimateFee(e,t,n,r){return this.channel.getEstimateFee([{type:"DECLARE",...e,...t}],{blockIdentifier:n,skipValidate:r}).then(a=>this.responseParser.parseFeeEstimateResponse(a))}async getDeployAccountEstimateFee(e,t,n,r){return this.channel.getEstimateFee([{type:"DEPLOY_ACCOUNT",...e,...t}],{blockIdentifier:n,skipValidate:r}).then(a=>this.responseParser.parseFeeEstimateResponse(a))}async getEstimateFeeBulk(e,t){return this.channel.getEstimateFee(e,t).then(n=>this.responseParser.parseFeeEstimateBulkResponse(n))}async invokeFunction(e,t){return this.channel.invoke(e,t)}async declareContract(e,t){return this.channel.declare(e,t)}async deployAccountContract(e,t){return this.channel.deployAccount(e,t)}async callContract(e,t){return this.channel.callContract(e,t)}async estimateMessageFee(e,t){return this.channel.estimateMessageFee(e,t)}async getSyncingStats(){return this.channel.getSyncingStats()}async getEvents(e){return this.channel.getEvents(e)}},nre={};We(nre,{StarknetIdContract:()=>S5,StarknetIdIdentityContract:()=>E5,StarknetIdMulticallContract:()=>tk,StarknetIdPfpContract:()=>I5,StarknetIdPopContract:()=>N5,StarknetIdVerifierContract:()=>T5,dynamicCallData:()=>Oe,dynamicFelt:()=>Wt,execution:()=>Qr,getStarknetIdContract:()=>sm,getStarknetIdIdentityContract:()=>A5,getStarknetIdMulticallContract:()=>O5,getStarknetIdPfpContract:()=>P5,getStarknetIdPopContract:()=>M5,getStarknetIdVerifierContract:()=>C5,useDecoded:()=>ek,useEncoded:()=>_5});var da="abcdefghijklmnopqrstuvwxyz0123456789-",Ic=BigInt(da.length+1),Rt="这来",fC=BigInt(da.length),X1=BigInt(Rt.length),dC=BigInt(Rt.length+1);function J1(e){let t=0;for(;e.endsWith(Rt[Rt.length-1]);)e=e.substring(0,e.length-1),t+=1;return[e,t]}function ek(e){let t="";return e.forEach(n=>{for(;n!==bt;){const o=n%Ic;if(n/=Ic,o===BigInt(da.length)){const i=n/dC;if(i===bt){const s=n%dC;n=i,s===bt?t+=da[0]:t+=Rt[Number(s)-1]}else{const s=n%X1;t+=Rt[Number(s)],n/=X1}}else t+=da[Number(o)]}const[r,a]=J1(t);a&&(t=r+(a%2===0?Rt[Rt.length-1].repeat(a/2-1)+Rt[0]+da[1]:Rt[Rt.length-1].repeat((a-1)/2+1))),t+="."}),t&&t.concat("stark")}function _5(e){let t=BigInt(0),n=BigInt(1);if(e.endsWith(Rt[0]+da[1])){const[r,a]=J1(e.substring(0,e.length-2));e=r+Rt[Rt.length-1].repeat(2*(a+1))}else{const[r,a]=J1(e);a&&(e=r+Rt[Rt.length-1].repeat(1+2*(a-1)))}for(let r=0;r(e.MAINNET="0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678",e.TESTNET_SEPOLIA="0x154bc2e1af9260b9e66af0e9c46fc757ff893b3ff6a85718a810baf1474",e))(S5||{});function sm(e){switch(e){case"0x534e5f4d41494e":return"0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678";case"0x534e5f5345504f4c4941":return"0x154bc2e1af9260b9e66af0e9c46fc757ff893b3ff6a85718a810baf1474";default:throw new Error("Starknet.id is not yet deployed on this network")}}var E5=(e=>(e.MAINNET="0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",e.TESTNET_SEPOLIA="0x3697660a0981d734780731949ecb2b4a38d6a58fc41629ed611e8defda",e))(E5||{});function A5(e){switch(e){case"0x534e5f4d41494e":return"0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af";case"0x534e5f5345504f4c4941":return"0x3697660a0981d734780731949ecb2b4a38d6a58fc41629ed611e8defda";default:throw new Error("Starknet.id verifier contract is not yet deployed on this network")}}var tk="0x034ffb8f4452df7a613a0210824d6414dbadcddce6c6e19bf4ddc9e22ce5f970";function O5(e){switch(e){case"0x534e5f4d41494e":return tk;case"0x534e5f5345504f4c4941":return tk;default:throw new Error("Starknet.id multicall contract is not yet deployed on this network")}}var T5=(e=>(e.MAINNET="0x07d14dfd8ee95b41fce179170d88ba1f0d5a512e13aeb232f19cfeec0a88f8bf",e.TESTNET_SEPOLIA="0x60B94fEDe525f815AE5E8377A463e121C787cCCf3a36358Aa9B18c12c4D566",e))(T5||{});function C5(e){switch(e){case"0x534e5f4d41494e":return"0x07d14dfd8ee95b41fce179170d88ba1f0d5a512e13aeb232f19cfeec0a88f8bf";case"0x534e5f5345504f4c4941":return"0x60B94fEDe525f815AE5E8377A463e121C787cCCf3a36358Aa9B18c12c4D566";default:throw new Error("Starknet.id verifier contract is not yet deployed on this network")}}var I5=(e=>(e.MAINNET="0x070aaa20ec4a46da57c932d9fd89ca5e6bb9ca3188d3df361a32306aff7d59c7",e.TESTNET_SEPOLIA="0x9e7bdb8dabd02ea8cfc23b1d1c5278e46490f193f87516ed5ff2dfec02",e))(I5||{});function P5(e){switch(e){case"0x534e5f4d41494e":return"0x070aaa20ec4a46da57c932d9fd89ca5e6bb9ca3188d3df361a32306aff7d59c7";case"0x534e5f5345504f4c4941":return"0x9e7bdb8dabd02ea8cfc23b1d1c5278e46490f193f87516ed5ff2dfec02";default:throw new Error("Starknet.id profile picture verifier contract is not yet deployed on this network")}}var N5=(e=>(e.MAINNET="0x0293eb2ba9862f762bd3036586d5755a782bd22e6f5028320f1d0405fd47bff4",e.TESTNET_SEPOLIA="0x15ae88ae054caa74090b89025c1595683f12edf7a4ed2ad0274de3e1d4a",e))(N5||{});function M5(e){switch(e){case"0x534e5f4d41494e":return"0x0293eb2ba9862f762bd3036586d5755a782bd22e6f5028320f1d0405fd47bff4";case"0x534e5f5345504f4c4941":return"0x15ae88ae054caa74090b89025c1595683f12edf7a4ed2ad0274de3e1d4a";default:throw new Error("Starknet.id proof of personhood verifier contract is not yet deployed on this network")}}function Qr(e,t=void 0,n=void 0){return new Ip({Static:e,IfEqual:t?Nl(t[0],t[1],t[2]):void 0,IfNotEqual:n?Nl(n[0],n[1],n[2]):void 0})}function Wt(e,t=void 0){return new Ip({Hardcoded:e,Reference:t?Nl(t[0],t[1]):void 0})}function Oe(e,t=void 0,n=void 0){return new Ip({Hardcoded:e,Reference:t?Nl(t[0],t[1]):void 0,ArrayReference:n?Nl(n[0],n[1]):void 0})}var rre=class cm{async getStarkName(t,n){return cm.getStarkName(this,t,n)}async getAddressFromStarkName(t,n){return cm.getAddressFromStarkName(this,t,n)}async getStarkProfile(t,n,r,a,o,i,s){return cm.getStarkProfile(this,t,n,r,a,o,i,s)}static async getStarkName(t,n,r){const a=await t.getChainId(),o=r??sm(a);try{const s=(await t.callContract({contractAddress:o,entrypoint:"address_to_domain",calldata:Te.compile({address:n,hint:[]})})).map(l=>BigInt(l)).slice(1),c=ek(s);if(!c)throw Error("Starkname not found");return c}catch(i){throw i instanceof Error&&i.message==="Starkname not found"?i:Error("Could not get stark name")}}static async getAddressFromStarkName(t,n,r){const a=await t.getChainId(),o=r??sm(a);try{const i=n.replace(".stark","").split(".").map(c=>_5(c).toString(10));return(await t.callContract({contractAddress:o,entrypoint:"domain_to_address",calldata:Te.compile({domain:i,hint:[]})}))[0]}catch{throw Error("Could not get address from stark name")}}static async getStarkProfile(t,n,r,a,o,i,s,c){const l=await t.getChainId(),u=r??sm(l),f=a??A5(l),d=o??C5(l),h=i??P5(l),g=s??M5(l),p=c??O5(l);try{const m=[{execution:Qr({}),to:Oe(u),selector:Oe(At("address_to_domain")),calldata:[Oe(n),Oe("0")]},{execution:Qr({}),to:Wt(u),selector:Wt(At("domain_to_id")),calldata:[Oe(void 0,void 0,[0,0])]},{execution:Qr({}),to:Wt(f),selector:Wt(At("get_verifier_data")),calldata:[Oe(void 0,[1,0]),Oe(Lt("twitter")),Oe(d),Oe("0")]},{execution:Qr({}),to:Wt(f),selector:Wt(At("get_verifier_data")),calldata:[Oe(void 0,[1,0]),Oe(Lt("github")),Oe(d),Oe("0")]},{execution:Qr({}),to:Wt(f),selector:Wt(At("get_verifier_data")),calldata:[Oe(void 0,[1,0]),Oe(Lt("discord")),Oe(d),Oe("0")]},{execution:Qr({}),to:Wt(f),selector:Wt(At("get_verifier_data")),calldata:[Oe(void 0,[1,0]),Oe(Lt("proof_of_personhood")),Oe(g),Oe("0")]},{execution:Qr({}),to:Wt(f),selector:Wt(At("get_verifier_data")),calldata:[Oe(void 0,[1,0]),Oe(Lt("nft_pp_contract")),Oe(h),Oe("0")]},{execution:Qr({}),to:Wt(f),selector:Wt(At("get_extended_verifier_data")),calldata:[Oe(void 0,[1,0]),Oe(Lt("nft_pp_id")),Oe("2"),Oe(h),Oe("0")]},{execution:Qr(void 0,void 0,[6,0,0]),to:Wt(void 0,[6,0]),selector:Wt(At("tokenURI")),calldata:[Oe(void 0,[7,1]),Oe(void 0,[7,2])]}],y=await t.callContract({contractAddress:p,entrypoint:"aggregate",calldata:Te.compile({calls:m})});if(Array.isArray(y)){const v=parseInt(y[0],16),b=[];let k=1;for(let N=0;NBigInt(N))),x=b[2][0]!=="0x0"?BigInt(b[2][0]).toString():void 0,j=b[3][0]!=="0x0"?BigInt(b[3][0]).toString():void 0,S=b[4][0]!=="0x0"?BigInt(b[4][0]).toString():void 0,A=b[5][0]==="0x1",O=(y[0]==="0x9"?b[8].slice(1).map(N=>Hs(N)).join(""):void 0)||`https://starknet.id/api/identicons/${BigInt(b[1][0]).toString()}`;return{name:w,twitter:x,github:j,discord:S,proofOfPersonhood:A,profilePicture:O}}throw Error("Error while calling aggregate function")}catch(m){throw m instanceof Error?m:Error("Could not get user stark profile data from address")}}},D5=class extends Ate(j5,rre){},are=new j5({default:!0}),ore={};We(ore,{TypedDataRevision:()=>Re,encodeData:()=>U5,encodeType:()=>B5,encodeValue:()=>Df,getDependencies:()=>RS,getMessageHash:()=>LS,getStructHash:()=>Sd,getTypeHash:()=>F5,isMerkleTreeType:()=>L5,prepareSelector:()=>R5});var ire={};We(ire,{MerkleTree:()=>$S,proofMerklePath:()=>z5});var $S=class lm{constructor(t,n=kd){ae(this,"leaves");ae(this,"branches",[]);ae(this,"root");ae(this,"hashMethod");this.hashMethod=n,this.leaves=t,this.root=this.build(t)}build(t){if(t.length===1)return t[0];t.length!==this.leaves.length&&this.branches.push(t);const n=[];for(let r=0;ri>=s?1:-1);return r(a,o)}getProof(t,n=this.leaves,r=[]){const a=n.indexOf(t);if(a===-1)throw new Error("leaf not found");if(n.length===1)return r;const o=a%2===0,i=(o?n[a+1]:n[a-1])??"0x0",s=[...r,i],c=this.leaves.length===n.length?-1:this.branches.findIndex(u=>u.length===n.length),l=this.branches[c+1]??[this.root];return this.getProof(lm.hash(o?t:i,o?i:t,this.hashMethod),l,s)}};function z5(e,t,n,r=kd){if(n.length===0)return e===t;const[a,...o]=n;return z5(e,$S.hash(t,a,r),o,r)}var sre={u256:JSON.parse('[{ "name": "low", "type": "u128" }, { "name": "high", "type": "u128" }]'),TokenAmount:JSON.parse('[{ "name": "token_address", "type": "ContractAddress" }, { "name": "amount", "type": "u256" }]'),NftId:JSON.parse('[{ "name": "collection_address", "type": "ContractAddress" }, { "name": "token_id", "type": "u256" }]')},Ln={[Re.ACTIVE]:{domain:"StarknetDomain",hashMethod:s5,hashMerkleMethod:o5,escapeTypeString:e=>`"${e}"`,presetTypes:sre},[Re.LEGACY]:{domain:"StarkNetDomain",hashMethod:i5,hashMerkleMethod:kd,escapeTypeString:e=>e,presetTypes:{}}};function kh(e,t,{min:n,max:r}){const a=BigInt(e);ve(a>=n&&a<=r,`${a} (${t}) is out of bounds [${n}, ${r}]`)}function $5({types:e,domain:t}){if(Ln[Re.ACTIVE].domain in e&&t.revision===Re.ACTIVE)return Re.ACTIVE;if(Ln[Re.LEGACY].domain in e&&(t.revision??Re.LEGACY)===Re.LEGACY)return Re.LEGACY}function Yr(e){try{return K(e)}catch{if(_t(e))return K(Lt(e));throw new Error(`Invalid BigNumberish: ${e}`)}}function cre(e){const t=e;return!!(t.message&&t.primaryType&&t.types&&$5(t))}function R5(e){return Hr(e)?e:At(e)}function L5(e){return e.type==="merkletree"}function RS(e,t,n=[],r="",a=Re.LEGACY){return t[t.length-1]==="*"?t=t.slice(0,-1):a===Re.ACTIVE&&(t==="enum"?t=r:t.match(/^\(.*\)$/)&&(t=t.slice(1,-1))),n.includes(t)||!e[t]?n:[t,...e[t].reduce((o,i)=>[...o,...RS(e,i.type,o,i.contains,a).filter(s=>!o.includes(s))],[])]}function lre(e,t){if(t.parent&&t.key){const r=e[t.parent].find(o=>o.name===t.key);if(!L5(r))throw new Error(`${t.key} is not a merkle tree`);if(r.contains.endsWith("*"))throw new Error(`Merkle tree contain property must not be an array but was given ${t.key}`);return r.contains}return"raw"}function B5(e,t,n=Re.LEGACY){const r=n===Re.ACTIVE?{...e,...Ln[n].presetTypes}:e,[a,...o]=RS(r,t,void 0,void 0,n),i=a?[a,...o.sort()]:[],s=Ln[n].escapeTypeString;return i.map(c=>{const l=r[c].map(u=>{const f=u.type==="enum"&&n===Re.ACTIVE?u.contains:u.type,d=f.match(/^\(.*\)$/)?`(${f.slice(1,-1).split(",").map(h=>h&&s(h)).join(",")})`:s(f);return`${s(u.name)}:${d}`});return`${s(c)}(${l})`}).join("")}function F5(e,t,n=Re.LEGACY){return At(B5(e,t,n))}function Df(e,t,n,r={},a=Re.LEGACY){if(e[t])return[t,Sd(e,t,n,a)];if(Ln[a].presetTypes[t])return[t,Sd(Ln[a].presetTypes,t,n,a)];if(t.endsWith("*")){const o=n.map(i=>Df(e,t.slice(0,-1),i,void 0,a)[1]);return[t,Ln[a].hashMethod(o)]}switch(t){case"enum":{if(a===Re.ACTIVE){const[o,i]=Object.entries(n)[0],s=e[r.parent][0],c=e[s.contains],l=c.find(d=>d.name===o),u=c.indexOf(l),f=l.type.slice(1,-1).split(",").map((d,h)=>{if(!d)return d;const g=i[h];return Df(e,d,g,void 0,a)[1]});return[t,Ln[a].hashMethod([u,...f])]}return[t,Yr(n)]}case"merkletree":{const o=lre(e,r),i=n.map(c=>Df(e,o,c,void 0,a)[1]),{root:s}=new $S(i,Ln[a].hashMerkleMethod);return["felt",s]}case"selector":return["felt",R5(n)];case"string":{if(a===Re.ACTIVE){const o=zy(n),i=[o.data.length,...o.data,o.pending_word,o.pending_word_len];return[t,Ln[a].hashMethod(i)]}return[t,Yr(n)]}case"i128":{if(a===Re.ACTIVE){const o=BigInt(n);return kh(o,t,yL),[t,Yr(o<0n?cS+o:o)]}return[t,Yr(n)]}case"timestamp":case"u128":return a===Re.ACTIVE&&kh(n,t,vL),[t,Yr(n)];case"felt":case"shortstring":return a===Re.ACTIVE&&kh(Yr(n),t,U1),[t,Yr(n)];case"ClassHash":case"ContractAddress":return a===Re.ACTIVE&&kh(n,t,U1),[t,Yr(n)];case"bool":return a===Re.ACTIVE&&ve(typeof n=="boolean",`Type mismatch for ${t} ${n}`),[t,Yr(n)];default:{if(a===Re.ACTIVE)throw new Error(`Unsupported type: ${t}`);return[t,Yr(n)]}}}function U5(e,t,n,r=Re.LEGACY){const a=e[t]??Ln[r].presetTypes[t],[o,i]=a.reduce(([s,c],l)=>{if(n[l.name]===void 0||n[l.name]===null&&l.type!=="enum")throw new Error(`Cannot encode data: missing data for '${l.name}'`);const u=n[l.name],f={parent:t,key:l.name},[d,h]=Df(e,l.type,u,f,r);return[[...s,d],[...c,h]]},[["felt"],[F5(e,t,r)]]);return[o,i]}function Sd(e,t,n,r=Re.LEGACY){return Ln[r].hashMethod(U5(e,t,n,r)[1])}function LS(e,t){if(!cre(e))throw new Error("Typed data does not match JSON schema");const n=$5(e),{domain:r,hashMethod:a}=Ln[n],o=[Lt("StarkNet Message"),Sd(e.types,r,e.domain,n),t,Sd(e.types,e.primaryType,e.message,n)];return a(o)}var ure=class{constructor(e=j_.randomPrivateKey()){ae(this,"pk");this.pk=e instanceof Uint8Array?iS(e):K(e)}async getPubKey(){return S_(this.pk)}async signMessage(e,t){const n=LS(e,t);return this.signRaw(n)}async signTransaction(e,t){const n=Jm(e,t.cairoVersion);let r;if(Object.values(oe.ETransactionVersion2).includes(t.version)){const a=t;r=Y1({...a,senderAddress:a.walletAddress,compiledCalldata:n,version:a.version})}else if(Object.values(oe.ETransactionVersion3).includes(t.version)){const a=t;r=Y1({...a,senderAddress:a.walletAddress,compiledCalldata:n,version:a.version,nonceDataAvailabilityMode:Vi(a.nonceDataAvailabilityMode),feeDataAvailabilityMode:Vi(a.feeDataAvailabilityMode)})}else throw Error("unsupported signTransaction version");return this.signRaw(r)}async signDeployAccountTransaction(e){const t=Te.compile(e.constructorCalldata);let n;if(Object.values(oe.ETransactionVersion2).includes(e.version)){const r=e;n=Q1({...r,salt:r.addressSalt,constructorCalldata:t,version:r.version})}else if(Object.values(oe.ETransactionVersion3).includes(e.version)){const r=e;n=Q1({...r,salt:r.addressSalt,compiledConstructorCalldata:t,version:r.version,nonceDataAvailabilityMode:Vi(r.nonceDataAvailabilityMode),feeDataAvailabilityMode:Vi(r.feeDataAvailabilityMode)})}else throw Error("unsupported signDeployAccountTransaction version");return this.signRaw(n)}async signDeclareTransaction(e){let t;if(Object.values(oe.ETransactionVersion2).includes(e.version)){const n=e;t=Z1({...n,version:n.version})}else if(Object.values(oe.ETransactionVersion3).includes(e.version)){const n=e;t=Z1({...n,version:n.version,nonceDataAvailabilityMode:Vi(n.nonceDataAvailabilityMode),feeDataAvailabilityMode:Vi(n.feeDataAvailabilityMode)})}else throw Error("unsupported signDeclareTransaction version");return this.signRaw(t)}async signRaw(e){return J$(e,this.pk)}},fre={};We(fre,{UINT_128_MAX:()=>Cc,UINT_256_MAX:()=>BL,bnToUint256:()=>hre,isUint256:()=>pre,uint256ToBN:()=>dre});function dre(e){return new xt(e).toBigInt()}function pre(e){return xt.is(e)}function hre(e){return new xt(e).toUint256HexString()}var mre={};We(mre,{getAbiEvents:()=>H5,isAbiEvent:()=>nk,isObject:()=>um,parseEvents:()=>W5,parseUDCEvent:()=>q5});function nk(e){return e.type==="event"}function gre(e){return e.filter(t=>t.type==="event").reduce((t,n)=>{const r=n.name,a={...n};return a.name=r,{...t,[Be(yi(vi(r)).toString(16))]:a}},{})}function yre(e){const t=e.filter(a=>nk(a)&&a.kind==="struct"),n=e.filter(a=>nk(a)&&a.kind==="enum");return t.reduce((a,o)=>{let i=[],{name:s}=o,c=!1;const l=d=>d.type===s;for(;;){const d=n.find(g=>g.variants.some(l));if(typeof d>"u")break;const h=d.variants.find(l);i.unshift(h.name),h.kind==="flat"&&(c=!0),s=d.name}if(i.length===0)throw new Error("inconsistency in ABI events definition.");c&&(i=[i[i.length-1]]);const u=i.pop();let f={[Be(yi(vi(u)).toString(16))]:o};for(;i.length>0;)f={[Be(yi(vi(i.pop())).toString(16))]:f};return f={...f},V5(a,f)},{})}function H5(e){return AS(e)?yre(e):gre(e)}function um(e){return e&&typeof e=="object"&&!Array.isArray(e)}function V5(e,t){const n={...e};return um(e)&&um(t)&&Object.keys(t).forEach(r=>{um(t[r])?r in e?n[r]=V5(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}function W5(e,t,n,r){return e.flat().reduce((o,i)=>{var h,g;let s=t[i.keys.shift()??0];if(!s)return o;for(;!s.name;){const p=i.keys.shift();ve(!!p,'Not enough data in "key" property of this event.'),s=s[p]}const c={};c[s.name]={};const l=i.keys[Symbol.iterator](),u=i.data[Symbol.iterator](),f=((h=s.members)==null?void 0:h.filter(p=>p.kind==="key"))||s.keys,d=((g=s.members)==null?void 0:g.filter(p=>p.kind==="data"))||s.data;return f.forEach(p=>{c[s.name][p.name]=Qm(l,p,n,r,c[s.name])}),d.forEach(p=>{c[s.name][p.name]=Qm(u,p,n,r,c[s.name])}),o.push(c),o},[])}function q5(e){if(!e.events)throw new Error("UDC emitted event is empty");const t=e.events.find(n=>bd(n.from_address)===bd(xs.ADDRESS))||{data:[]};return{transaction_hash:e.transaction_hash,contract_address:t.data[0],address:t.data[0],deployer:t.data[1],unique:t.data[2],classHash:t.data[3],calldata_len:t.data[4],calldata:t.data.slice(5,5+parseInt(t.data[4],16)),salt:t.data[t.data.length-1]}}var vre=class extends D5{constructor(t,n,r,a,o=oe.ETransactionVersion.V2){super(t);ae(this,"signer");ae(this,"address");ae(this,"cairoVersion");ae(this,"transactionVersion");ae(this,"deploySelf",this.deployAccount);this.address=n.toLowerCase(),this.signer=_t(r)||r instanceof Uint8Array?new ure(r):r,a&&(this.cairoVersion=a.toString()),this.transactionVersion=o}getPreferredVersion(t,n){return this.transactionVersion===oe.ETransactionVersion.V3?n:this.transactionVersion===oe.ETransactionVersion.V2?t:oe.ETransactionVersion.V3}async getNonce(t){return super.getNonceForAddress(this.address,t)}async getNonceSafe(t){try{return De(t??await this.getNonce())}catch{return 0n}}async getCairoVersion(t){if(!this.cairoVersion){const{cairo:n}=t?await super.getContractVersion(void 0,t):await super.getContractVersion(this.address);this.cairoVersion=n}return this.cairoVersion}async estimateFee(t,n={}){return this.estimateInvokeFee(t,n)}async estimateInvokeFee(t,n={}){const{nonce:r,blockIdentifier:a,version:o,skipValidate:i=!0}=n,s=Array.isArray(t)?t:[t],c=De(r??await this.getNonce()),l=Zr(this.getPreferredVersion(oe.ETransactionVersion.F1,oe.ETransactionVersion.F3),rm(o)),u=await this.getChainId(),f={...St(n),walletAddress:this.address,nonce:c,maxFee:bt,version:l,chainId:u,cairoVersion:await this.getCairoVersion(),skipValidate:i},d=await this.buildInvocation(s,f);return super.getInvokeEstimateFee({...d},{...St(n),version:l,nonce:c},a,n.skipValidate)}async estimateDeclareFee(t,n={}){const{blockIdentifier:r,nonce:a,version:o,skipValidate:i=!0}=n,s=De(a??await this.getNonce()),c=Zr(En(t.contract)?this.getPreferredVersion(oe.ETransactionVersion.F2,oe.ETransactionVersion.F3):oe.ETransactionVersion.F1,rm(o)),l=await this.getChainId(),u=await this.buildDeclarePayload(t,{...St(n),nonce:s,chainId:l,version:c,walletAddress:this.address,maxFee:bt,cairoVersion:void 0,skipValidate:i});return super.getDeclareEstimateFee(u,{...St(n),version:c,nonce:s},r,n.skipValidate)}async estimateAccountDeployFee({classHash:t,addressSalt:n=0,constructorCalldata:r=[],contractAddress:a},o={}){const{blockIdentifier:i,version:s,skipValidate:c=!0}=o,l=Zr(this.getPreferredVersion(oe.ETransactionVersion.F1,oe.ETransactionVersion.F3),rm(s)),u=bt,f=await this.getChainId(),d=await this.buildAccountDeployPayload({classHash:t,addressSalt:n,constructorCalldata:r,contractAddress:a},{...St(o),nonce:u,chainId:f,version:l,walletAddress:this.address,maxFee:bt,cairoVersion:void 0,skipValidate:c});return super.getDeployAccountEstimateFee({...d},{...St(o),version:l,nonce:u},i,o.skipValidate)}async estimateDeployFee(t,n={}){const r=this.buildUDCContractPayload(t);return this.estimateInvokeFee(r,n)}async estimateFeeBulk(t,n={}){const{nonce:r,blockIdentifier:a,version:o,skipValidate:i}=n,s=await this.accountInvocationsFactory(t,{...St(n),versions:[oe.ETransactionVersion.F1,Zr(this.getPreferredVersion(oe.ETransactionVersion.F2,oe.ETransactionVersion.F3),o)],nonce:r,blockIdentifier:a,skipValidate:i});return super.getEstimateFeeBulk(s,{blockIdentifier:a,skipValidate:i})}async simulateTransaction(t,n={}){const{nonce:r,blockIdentifier:a,skipValidate:o=!0,skipExecute:i,version:s}=n,c=await this.accountInvocationsFactory(t,{...St(n),versions:[oe.ETransactionVersion.V1,Zr(this.getPreferredVersion(oe.ETransactionVersion.V2,oe.ETransactionVersion.V3),s)],nonce:r,blockIdentifier:a,skipValidate:o});return super.getSimulateTransaction(c,{blockIdentifier:a,skipValidate:o,skipExecute:i})}async execute(t,n,r={}){const a=n===void 0||Array.isArray(n)?r:n,o=Array.isArray(t)?t:[t],i=De(a.nonce??await this.getNonce()),s=Zr(this.getPreferredVersion(oe.ETransactionVersion.V1,oe.ETransactionVersion.V3),a.version),c=await this.getUniversalSuggestedFee(s,{type:"INVOKE_FUNCTION",payload:t},{...a,version:s}),l=await this.getChainId(),u={...St(a),resourceBounds:c.resourceBounds,walletAddress:this.address,nonce:i,maxFee:c.maxFee,version:s,chainId:l,cairoVersion:await this.getCairoVersion()},f=await this.signer.signTransaction(o,u),d=Jm(o,await this.getCairoVersion());return this.invokeFunction({contractAddress:this.address,calldata:d,signature:f},{...St(a),resourceBounds:c.resourceBounds,nonce:i,maxFee:c.maxFee,version:s})}async declareIfNot(t,n={}){const r=om(t);try{await this.getClassByHash(r.classHash)}catch{return this.declare(t,n)}return{transaction_hash:"",class_hash:r.classHash}}async declare(t,n={}){const r=om(t),{nonce:a,version:o}=n,i=Zr(En(t.contract)?this.getPreferredVersion(oe.ETransactionVersion.V2,oe.ETransactionVersion.V3):oe.ETransactionVersion.V1,o),s=await this.getUniversalSuggestedFee(i,{type:"DECLARE",payload:r},{...n,version:i}),c={...St(n),resourceBounds:s.resourceBounds,maxFee:s.maxFee,nonce:De(a??await this.getNonce()),version:i,chainId:await this.getChainId(),walletAddress:this.address,cairoVersion:void 0},l=await this.buildDeclarePayload(r,c);return this.declareContract(l,c)}async deploy(t,n={}){const{calls:r,addresses:a}=DS(t,this.address);return{...await this.execute(r,void 0,n),contract_address:a}}async deployContract(t,n={}){const r=await this.deploy(t,n),a=await this.waitForTransaction(r.transaction_hash);return q5(a)}async declareAndDeploy(t,n={}){const{constructorCalldata:r,salt:a,unique:o}=t;let i=await this.declareIfNot(t,n);if(i.transaction_hash!==""){const c=await this.waitForTransaction(i.transaction_hash);i={...i,...c}}const s=await this.deployContract({classHash:i.class_hash,salt:a,unique:o,constructorCalldata:r},n);return{declare:{...i},deploy:s}}async deployAccount({classHash:t,constructorCalldata:n=[],addressSalt:r=0,contractAddress:a},o={}){const i=Zr(this.getPreferredVersion(oe.ETransactionVersion.V1,oe.ETransactionVersion.V3),o.version),s=bt,c=await this.getChainId(),l=Te.compile(n),u=a??Xm(r,t,l,0),f=await this.getUniversalSuggestedFee(i,{type:"DEPLOY_ACCOUNT",payload:{classHash:t,constructorCalldata:l,addressSalt:r,contractAddress:u}},o),d=await this.signer.signDeployAccountTransaction({...St(o),classHash:t,constructorCalldata:l,contractAddress:u,addressSalt:r,chainId:c,resourceBounds:f.resourceBounds,maxFee:f.maxFee,version:i,nonce:s});return this.deployAccountContract({classHash:t,addressSalt:r,constructorCalldata:n,signature:d},{...St(o),nonce:s,resourceBounds:f.resourceBounds,maxFee:f.maxFee,version:i})}async signMessage(t){return this.signer.signMessage(t,this.address)}async hashMessage(t){return LS(t,this.address)}async verifyMessageHash(t,n,r,a){const o=r?[r]:["isValidSignature","is_valid_signature"],i=a||{okResponse:[],nokResponse:["0x0","0x00"],error:["argent/invalid-signature","is invalid, with respect to the public key","INVALID_SIG"]};let s;for(const c of o)try{const l=await this.callContract({contractAddress:this.address,entrypoint:c,calldata:Te.compile({hash:De(t).toString(),signature:Wy(n)})});if(i.nokResponse.includes(l[0].toString()))return!1;if(i.okResponse.length===0||i.okResponse.includes(l[0].toString()))return!0;throw Error("signatureVerificationResponse Error: response is not part of known responses")}catch(l){if(i.error.some(u=>l.message.includes(u)))return!1;s=l}throw Error(`Signature verification Error: ${s}`)}async verifyMessage(t,n,r,a){const o=await this.hashMessage(t);return this.verifyMessageHash(o,n,r,a)}async getUniversalSuggestedFee(t,{type:n,payload:r},a){let o=0,i=jd(bt);return t===oe.ETransactionVersion.V3?i=a.resourceBounds??(await this.getSuggestedFee({type:n,payload:r},a)).resourceBounds:o=a.maxFee??(await this.getSuggestedFee({type:n,payload:r},a)).suggestedMaxFee,{maxFee:o,resourceBounds:i}}async getSuggestedFee({type:t,payload:n},r){let a;switch(t){case"INVOKE_FUNCTION":a=await this.estimateInvokeFee(n,r);break;case"DECLARE":a=await this.estimateDeclareFee(n,r);break;case"DEPLOY_ACCOUNT":a=await this.estimateAccountDeployFee(n,r);break;case"DEPLOY":a=await this.estimateDeployFee(n,r);break;default:a={gas_consumed:0n,gas_price:0n,overall_fee:bt,unit:"FRI",suggestedMaxFee:bt,resourceBounds:jd(bt),data_gas_consumed:0n,data_gas_price:0n};break}return a}async buildInvocation(t,n){const r=Jm(t,await this.getCairoVersion()),a=n.skipValidate?[]:await this.signer.signTransaction(t,n);return{...St(n),contractAddress:this.address,calldata:r,signature:a}}async buildDeclarePayload(t,n){const{classHash:r,contract:a,compiledClassHash:o}=om(t),i=v5(a);if(typeof o>"u"&&(n.version===oe.ETransactionVersion3.F3||n.version===oe.ETransactionVersion3.V3))throw Error("V3 Transaction work with Cairo1 Contracts and require compiledClassHash");const s=n.skipValidate?[]:await this.signer.signDeclareTransaction({...n,...St(n),classHash:r,compiledClassHash:o,senderAddress:n.walletAddress});return{senderAddress:n.walletAddress,signature:s,contract:i,compiledClassHash:o}}async buildAccountDeployPayload({classHash:t,addressSalt:n=0,constructorCalldata:r=[],contractAddress:a},o){const i=Te.compile(r),s=a??Xm(n,t,i,0),c=o.skipValidate?[]:await this.signer.signDeployAccountTransaction({...o,...St(o),classHash:t,contractAddress:s,addressSalt:n,constructorCalldata:i});return{...St(o),classHash:t,addressSalt:n,constructorCalldata:i,signature:c}}buildUDCContractPayload(t){return[].concat(t).map(r=>{const{classHash:a,salt:o="0",unique:i=!0,constructorCalldata:s=[]}=r,c=Te.compile(s);return{contractAddress:xs.ADDRESS,entrypoint:xs.ENTRYPOINT,calldata:[a,o,yS(i),c.length,...c]}})}async accountInvocationsFactory(t,n){const{nonce:r,blockIdentifier:a,skipValidate:o=!0}=n,i=await this.getNonceSafe(r),s=await this.getChainId(),c=n.versions.map(f=>Zr(f)),l="payload"in t[0]?t[0].payload:t[0],u=t[0].type==="DEPLOY_ACCOUNT"?await this.getCairoVersion(l.classHash):await this.getCairoVersion();return Promise.all([].concat(t).map(async(f,d)=>{const h="payload"in f?f.payload:f,g={...St(n),walletAddress:this.address,nonce:De(Number(i)+d),maxFee:bt,chainId:s,cairoVersion:u,version:"",skipValidate:o},p={type:f.type,nonce:De(Number(i)+d),blockIdentifier:a,version:""};if(f.type==="INVOKE_FUNCTION"){const m=am(c[1]);g.version=m,p.version=m;const y=await this.buildInvocation([].concat(h),g);return{...p,...y}}if(f.type==="DEPLOY"){const m=am(c[1]);g.version=m,p.version=m;const y=this.buildUDCContractPayload(h),v=await this.buildInvocation(y,g);return{...p,...v,type:"INVOKE_FUNCTION"}}if(f.type==="DECLARE"){const m=En(h.contract)?c[1]:c[0];g.version=m,p.version=m;const y=await this.buildDeclarePayload(h,g);return{...p,...y}}if(f.type==="DEPLOY_ACCOUNT"){const m=am(c[1]);g.version=m,p.version=m;const y=await this.buildAccountDeployPayload(h,g);return{...p,...y}}throw Error(`accountInvocationsFactory: unsupported transaction type: ${f}`)}))}async getStarkName(t=this.address,n){return super.getStarkName(t,n)}},bre={};We(bre,{addDeclareTransaction:()=>J5,addInvokeTransaction:()=>X5,addStarknetChain:()=>Z5,deploymentData:()=>kre,getPermissions:()=>K5,onAccountChange:()=>tB,onNetworkChanged:()=>nB,requestAccounts:()=>G5,requestChainId:()=>wre,signMessage:()=>eB,supportedSpecs:()=>xre,switchStarknetChain:()=>Q5,watchAsset:()=>Y5});function G5(e,t=!1){return e.request({type:"wallet_requestAccounts",params:{silent_mode:t}})}function K5(e){return e.request({type:"wallet_getPermissions"})}function Y5(e,t){return e.request({type:"wallet_watchAsset",params:t})}function Z5(e,t){return e.request({type:"wallet_addStarknetChain",params:t})}function Q5(e,t){return e.request({type:"wallet_switchStarknetChain",params:{chainId:t}})}function wre(e){return e.request({type:"wallet_requestChainId"})}function kre(e){return e.request({type:"wallet_deploymentData"})}function X5(e,t){return e.request({type:"wallet_addInvokeTransaction",params:t})}function J5(e,t){return e.request({type:"wallet_addDeclareTransaction",params:t})}function eB(e,t){return e.request({type:"wallet_signTypedData",params:t})}function xre(e){return e.request({type:"wallet_supportedSpecs"})}function tB(e,t){e.on("accountsChanged",t)}function nB(e,t){e.on("networkChanged",t)}var jre=class extends vre{constructor(t,n,r){super(t,"","",r);ae(this,"address","");ae(this,"walletProvider");this.walletProvider=n,this.walletProvider.on("accountsChanged",a=>{a&&(this.address=a[0].toLowerCase())}),this.walletProvider.on("networkChanged",a=>{a&&this.channel.setChainId(a)}),n.request({type:"wallet_requestAccounts",params:{silent_mode:!1}}).then(a=>{this.address=a[0].toLowerCase()})}onAccountChange(t){tB(this.walletProvider,t)}onNetworkChanged(t){nB(this.walletProvider,t)}requestAccounts(t=!1){return G5(this.walletProvider,t)}getPermissions(){return K5(this.walletProvider)}switchStarknetChain(t){return Q5(this.walletProvider,t)}watchAsset(t){return Y5(this.walletProvider,t)}addStarknetChain(t){return Z5(this.walletProvider,t)}execute(t){const r={calls:[].concat(t).map(a=>{const{contractAddress:o,entrypoint:i,calldata:s}=a;return{contract_address:o,entry_point:i,calldata:s}})};return X5(this.walletProvider,r)}declare(t){const n=om(t),r=t.contract,a={...r,abi:Pn(r.abi)};if(!n.compiledClassHash)throw Error("compiledClassHash is required");const o={compiled_class_hash:n.compiledClassHash,contract_class:a};return J5(this.walletProvider,o)}async deploy(t){const{calls:n,addresses:r}=DS(t,this.address);return{...await this.execute(n),contract_address:r}}signMessage(t){return eB(this.walletProvider,t)}},rB=e=>{const t=["blockIdentifier","parseRequest","parseResponse","formatResponse","maxFee","nonce","signature","addressSalt"],n=e[e.length-1];return typeof n=="object"&&t.some(r=>r in n)?{args:e,options:e.pop()}:{args:e}};function aB(e,t){return async function(...n){const r=rB(n);return e.call(t.name,r.args,{parseRequest:!0,parseResponse:!0,...r.options})}}function _re(e,t){return async function(...n){const r=rB(n);return e.invoke(t.name,r.args,{parseRequest:!0,...r.options})}}function pC(e,t){return t.stateMutability==="view"||t.state_mutability==="view"?aB(e,t):_re(e,t)}function Sre(e,t){return function(...n){return e.populate(t.name,n)}}function Ere(e,t){return function(...n){return e.estimate(t.name,n)}}function xh(e,t){return Array.isArray(e)&&"__compiled__"in e?e:Array.isArray(e)&&Array.isArray(e[0])&&"__compiled__"in e[0]?e[0]:t()}var Are=class{constructor(e,t,n=are){ae(this,"abi");ae(this,"address");ae(this,"providerOrAccount");ae(this,"deployTransactionHash");ae(this,"structs");ae(this,"events");ae(this,"functions");ae(this,"callStatic");ae(this,"populateTransaction");ae(this,"estimateFee");ae(this,"callData");this.address=t&&t.toLowerCase(),this.providerOrAccount=n,this.callData=new Te(e),this.structs=Te.getAbiStruct(e),this.events=H5(e);const r=WL(e);this.abi=r.getLegacyFormat();const a={enumerable:!0,value:{},writable:!1};Object.defineProperties(this,{functions:{enumerable:!0,value:{},writable:!1},callStatic:{enumerable:!0,value:{},writable:!1},populateTransaction:{enumerable:!0,value:{},writable:!1},estimateFee:{enumerable:!0,value:{},writable:!1}}),this.abi.forEach(o=>{if(o.type!=="function")return;const i=o.name;this[i]||Object.defineProperty(this,i,{...a,value:pC(this,o)}),this.functions[i]||Object.defineProperty(this.functions,i,{...a,value:pC(this,o)}),this.callStatic[i]||Object.defineProperty(this.callStatic,i,{...a,value:aB(this,o)}),this.populateTransaction[i]||Object.defineProperty(this.populateTransaction,i,{...a,value:Sre(this,o)}),this.estimateFee[i]||Object.defineProperty(this.estimateFee,i,{...a,value:Ere(this,o)})})}attach(e){this.address=e}connect(e){this.providerOrAccount=e}async deployed(){return this.deployTransactionHash&&(await this.providerOrAccount.waitForTransaction(this.deployTransactionHash),this.deployTransactionHash=void 0),this}async call(e,t=[],{parseRequest:n=!0,parseResponse:r=!0,formatResponse:a=void 0,blockIdentifier:o=void 0}={}){ve(this.address!==null,"contract is not connected to an address");const i=xh(t,()=>n?(this.callData.validate("CALL",e,t),this.callData.compile(e,t)):(console.warn("Call skipped parsing but provided rawArgs, possible malfunction request"),t));return this.providerOrAccount.callContract({contractAddress:this.address,calldata:i,entrypoint:e},o).then(s=>r?a?this.callData.format(e,s,a):this.callData.parse(e,s):s)}invoke(e,t=[],{parseRequest:n=!0,maxFee:r,nonce:a,signature:o}={}){ve(this.address!==null,"contract is not connected to an address");const i=xh(t,()=>n?(this.callData.validate("INVOKE",e,t),this.callData.compile(e,t)):(console.warn("Invoke skipped parsing but provided rawArgs, possible malfunction request"),t)),s={contractAddress:this.address,calldata:i,entrypoint:e};if("execute"in this.providerOrAccount)return this.providerOrAccount.execute(s,void 0,{maxFee:r,nonce:a});if(!a)throw new Error("Nonce is required when invoking a function without an account");return console.warn(`Invoking ${e} without an account. This will not work on a public node.`),this.providerOrAccount.invokeFunction({...s,signature:o},{nonce:a})}async estimate(e,t=[]){ve(this.address!==null,"contract is not connected to an address"),xh(t,()=>!1)||this.callData.validate("INVOKE",e,t);const n=this.populate(e,t);if("estimateInvokeFee"in this.providerOrAccount)return this.providerOrAccount.estimateInvokeFee(n);throw Error("Contract must be connected to the account contract to estimate")}populate(e,t=[]){const n=xh(t,()=>this.callData.compile(e,t));return{contractAddress:this.address,entrypoint:e,calldata:n}}parseEvents(e){var t;return W5(((t=e.events)==null?void 0:t.filter(n=>bd(n.from_address)===bd(this.address),[]))||[],this.events,this.structs,Te.getAbiEnum(this.abi))}isCairo1(){return LL.isCairo1Abi(this.abi)}async getVersion(){return this.providerOrAccount.getContractVersion(this.address)}typedv2(e){return this}};function Ore(e){const t=K(Be(e.toString())),n=Sn(t).padStart(64,"0");return Be(n)}function Tre(e){const t=Ore(e);if(!t.match(/^(0x)?[0-9a-fA-F]{64}$/))throw new Error("Invalid Address Format");return mS(t,bt,lS-1n,"Starknet Address"),t}BigInt("0x534e5f5345504f4c4941");var rk={id:BigInt("0x534e5f4d41494e"),network:"mainnet",name:"Starknet",nativeCurrency:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://starknet-mainnet.g.alchemy.com/v2"]},blast:{http:["https://starknet-mainnet.blastapi.io"]},infura:{http:["https://starknet-mainnet.infura.io/v3"]},lava:{http:["https://g.w.lavanet.xyz:443/gateway/strk/rpc-http"]},nethermind:{http:["https://rpc.nethermind.io/mainnet-juno"]},reddio:{http:["https://starknet-mainnet.reddio.com"]},cartridge:{http:["https://api.cartridge.gg/x/starknet/mainnet"]},default:{http:[]},public:{http:["https://starknet-mainnet.public.blastapi.io/rpc/v0_7","https://rpc.starknet.lava.build","https://free-rpc.nethermind.io/mainnet-juno/v0_7"]}},explorers:{starkCompass:["https://www.starkcompass.com"],starkscan:["https://starkscan.co"],viewblock:["https://viewblock.io/starknet"],voyager:["https://voyager.online"]}},eg={id:BigInt("0x534e5f5345504f4c4941"),network:"sepolia",name:"Starknet Sepolia Testnet",nativeCurrency:{address:"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",name:"Ether",symbol:"ETH",decimals:18},testnet:!0,rpcUrls:{blast:{http:["https://starknet-sepolia.blastapi.io"]},infura:{http:["https://starknet-sepolia.infura.io/v3"]},nethermind:{http:["https://rpc.nethermind.io/sepolia-juno"]},reddio:{http:["https://starknet-sepolia.reddio.com"]},cartridge:{http:["https://api.cartridge.gg/x/starknet/sepolia"]},default:{http:[]},public:{http:["https://starknet-sepolia.public.blastapi.io","https://free-rpc.nethermind.io/sepolia-juno"]}},explorers:{starkscan:["https://sepolia.starkscan.co"],voyager:["https://sepolia.voyager.online"]}},vu=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(){}},Ws=typeof window>"u"||"Deno"in globalThis;function ar(){}function Cre(e,t){return typeof e=="function"?e(t):e}function ak(e){return typeof e=="number"&&e>=0&&e!==1/0}function oB(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Kc(e,t){return typeof e=="function"?e(t):e}function Cr(e,t){return typeof e=="function"?e(t):e}function hC(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:o,queryKey:i,stale:s}=e;if(i){if(r){if(t.queryHash!==BS(i,t.options))return!1}else if(!Ed(t.queryKey,i))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||a&&a!==t.state.fetchStatus||o&&!o(t))}function mC(e,t){const{exact:n,status:r,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qs(t.options.mutationKey)!==qs(o))return!1}else if(!Ed(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function BS(e,t){return((t==null?void 0:t.queryKeyHashFn)||qs)(e)}function qs(e){return JSON.stringify(e,(t,n)=>ok(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Ed(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ed(e[n],t[n])):!1}function iB(e,t){if(e===t)return e;const n=gC(e)&&gC(t);if(n||ok(e)&&ok(t)){const r=n?e:Object.keys(e),a=r.length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{};let c=0;for(let l=0;l{setTimeout(t,e)})}function ik(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?iB(e,t):t}function Pre(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nre(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var FS=Symbol();function sB(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===FS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ds,Lo,nl,EM,Mre=(EM=class extends vu{constructor(){super();fe(this,ds);fe(this,Lo);fe(this,nl);ie(this,nl,t=>{if(!Ws&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Lo)||this.setEventListener(R(this,nl))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Lo))==null||t.call(this),ie(this,Lo,void 0))}setEventListener(t){var n;ie(this,nl,t),(n=R(this,Lo))==null||n.call(this),ie(this,Lo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,ds)!==t&&(ie(this,ds,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,ds)=="boolean"?R(this,ds):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ds=new WeakMap,Lo=new WeakMap,nl=new WeakMap,EM),US=new Mre,rl,Bo,al,AM,Dre=(AM=class extends vu{constructor(){super();fe(this,rl,!0);fe(this,Bo);fe(this,al);ie(this,al,t=>{if(!Ws&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){R(this,Bo)||this.setEventListener(R(this,al))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Bo))==null||t.call(this),ie(this,Bo,void 0))}setEventListener(t){var n;ie(this,al,t),(n=R(this,Bo))==null||n.call(this),ie(this,Bo,t(this.setOnline.bind(this)))}setOnline(t){R(this,rl)!==t&&(ie(this,rl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,rl)}},rl=new WeakMap,Bo=new WeakMap,al=new WeakMap,AM),ng=new Dre;function sk(){let e,t;const n=new Promise((a,o)=>{e=a,t=o});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}function zre(e){return Math.min(1e3*2**e,3e4)}function cB(e){return(e??"online")==="online"?ng.isOnline():!0}var lB=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function R0(e){return e instanceof lB}function uB(e){let t=!1,n=0,r=!1,a;const o=sk(),i=p=>{var m;r||(d(new lB(p)),(m=e.abort)==null||m.call(e))},s=()=>{t=!0},c=()=>{t=!1},l=()=>US.isFocused()&&(e.networkMode==="always"||ng.isOnline())&&e.canRun(),u=()=>cB(e.networkMode)&&e.canRun(),f=p=>{var m;r||(r=!0,(m=e.onSuccess)==null||m.call(e,p),a==null||a(),o.resolve(p))},d=p=>{var m;r||(r=!0,(m=e.onError)==null||m.call(e,p),a==null||a(),o.reject(p))},h=()=>new Promise(p=>{var m;a=y=>{(r||l())&&p(y)},(m=e.onPause)==null||m.call(e)}).then(()=>{var p;a=void 0,r||(p=e.onContinue)==null||p.call(e)}),g=()=>{if(r)return;let p;const m=n===0?e.initialPromise:void 0;try{p=m??e.fn()}catch(y){p=Promise.reject(y)}Promise.resolve(p).then(f).catch(y=>{var x;if(r)return;const v=e.retry??(Ws?0:3),b=e.retryDelay??zre,k=typeof b=="function"?b(n,y):b,w=v===!0||typeof v=="number"&&nl()?void 0:h()).then(()=>{t?d(y):g()})})};return{promise:o,cancel:i,continue:()=>(a==null||a(),o),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?g():h().then(g),o)}}function $re(){let e=[],t=0,n=s=>{s()},r=s=>{s()},a=s=>setTimeout(s,0);const o=s=>{t?e.push(s):a(()=>{n(s)})},i=()=>{const s=e;e=[],s.length&&a(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||i()}return c},batchCalls:s=>(...c)=>{o(()=>{s(...c)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{a=s}}}var Ct=$re(),ps,OM,fB=(OM=class{constructor(){fe(this,ps)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ak(this.gcTime)&&ie(this,ps,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ws?1/0:5*60*1e3))}clearGcTimeout(){R(this,ps)&&(clearTimeout(R(this,ps)),ie(this,ps,void 0))}},ps=new WeakMap,OM),ol,il,tr,nn,lp,hs,Er,Ra,TM,Rre=(TM=class extends fB{constructor(t){super();fe(this,Er);fe(this,ol);fe(this,il);fe(this,tr);fe(this,nn);fe(this,lp);fe(this,hs);ie(this,hs,!1),ie(this,lp,t.defaultOptions),this.setOptions(t.options),this.observers=[],ie(this,tr,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ie(this,ol,Lre(this.options)),this.state=t.state??R(this,ol),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,nn))==null?void 0:t.promise}setOptions(t){this.options={...R(this,lp),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,tr).remove(this)}setData(t,n){const r=ik(this.state.data,t,this.options);return ge(this,Er,Ra).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ge(this,Er,Ra).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=R(this,nn))==null?void 0:r.promise;return(a=R(this,nn))==null||a.cancel(t),n?n.then(ar).catch(ar):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,ol))}isActive(){return this.observers.some(t=>Cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===FS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!oB(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,tr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,nn)&&(R(this,hs)?R(this,nn).cancel({revert:!0}):R(this,nn).cancelRetry()),this.scheduleGc()),R(this,tr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ge(this,Er,Ra).call(this,{type:"invalidate"})}fetch(t,n){var c,l,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,nn))return R(this,nn).continueRetry(),R(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(d=>d.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ie(this,hs,!0),r.signal)})},o=()=>{const f=sB(this.options,n),d={queryKey:this.queryKey,meta:this.meta};return a(d),ie(this,hs,!1),this.options.persister?this.options.persister(f,d,this):f(d)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};a(i),(c=this.options.behavior)==null||c.onFetch(i,this),ie(this,il,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=i.fetchOptions)==null?void 0:l.meta))&&ge(this,Er,Ra).call(this,{type:"fetch",meta:(u=i.fetchOptions)==null?void 0:u.meta});const s=f=>{var d,h,g,p;R0(f)&&f.silent||ge(this,Er,Ra).call(this,{type:"error",error:f}),R0(f)||((h=(d=R(this,tr).config).onError)==null||h.call(d,f,this),(p=(g=R(this,tr).config).onSettled)==null||p.call(g,this.state.data,f,this)),this.scheduleGc()};return ie(this,nn,uB({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var d,h,g,p;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){s(m);return}(h=(d=R(this,tr).config).onSuccess)==null||h.call(d,f,this),(p=(g=R(this,tr).config).onSettled)==null||p.call(g,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,d)=>{ge(this,Er,Ra).call(this,{type:"failed",failureCount:f,error:d})},onPause:()=>{ge(this,Er,Ra).call(this,{type:"pause"})},onContinue:()=>{ge(this,Er,Ra).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),R(this,nn).start()}},ol=new WeakMap,il=new WeakMap,tr=new WeakMap,nn=new WeakMap,lp=new WeakMap,hs=new WeakMap,Er=new WeakSet,Ra=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dB(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return R0(a)&&a.revert&&R(this,il)?{...R(this,il),fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ct.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,tr).notify({query:this,type:"updated",action:t})})},TM);function dB(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cB(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Lre(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var na,CM,Bre=(CM=class extends vu{constructor(t={}){super();fe(this,na);this.config=t,ie(this,na,new Map)}build(t,n,r){const a=n.queryKey,o=n.queryHash??BS(a,n);let i=this.get(o);return i||(i=new Rre({cache:this,queryKey:a,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(i)),i}add(t){R(this,na).has(t.queryHash)||(R(this,na).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,na).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,na).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,na).get(t)}getAll(){return[...R(this,na).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>hC(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>hC(t,r)):n}notify(t){Ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ct.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},na=new WeakMap,CM),ra,on,ms,aa,Io,IM,Fre=(IM=class extends fB{constructor(t){super();fe(this,aa);fe(this,ra);fe(this,on);fe(this,ms);this.mutationId=t.mutationId,ie(this,on,t.mutationCache),ie(this,ra,[]),this.state=t.state||pB(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,ra).includes(t)||(R(this,ra).push(t),this.clearGcTimeout(),R(this,on).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ie(this,ra,R(this,ra).filter(n=>n!==t)),this.scheduleGc(),R(this,on).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,ra).length||(this.state.status==="pending"?this.scheduleGc():R(this,on).remove(this))}continue(){var t;return((t=R(this,ms))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,i,s,c,l,u,f,d,h,g,p,m,y,v,b,k,w,x,j;ie(this,ms,uB({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,A)=>{ge(this,aa,Io).call(this,{type:"failed",failureCount:S,error:A})},onPause:()=>{ge(this,aa,Io).call(this,{type:"pause"})},onContinue:()=>{ge(this,aa,Io).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,on).canRun(this)}));const n=this.state.status==="pending",r=!R(this,ms).canStart();try{if(!n){ge(this,aa,Io).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(a=R(this,on).config).onMutate)==null?void 0:o.call(a,t,this));const A=await((s=(i=this.options).onMutate)==null?void 0:s.call(i,t));A!==this.state.context&&ge(this,aa,Io).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const S=await R(this,ms).start();return await((l=(c=R(this,on).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,S,t,this.state.context)),await((h=(d=R(this,on).config).onSettled)==null?void 0:h.call(d,S,null,this.state.variables,this.state.context,this)),await((p=(g=this.options).onSettled)==null?void 0:p.call(g,S,null,t,this.state.context)),ge(this,aa,Io).call(this,{type:"success",data:S}),S}catch(S){try{throw await((y=(m=R(this,on).config).onError)==null?void 0:y.call(m,S,t,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,S,t,this.state.context)),await((w=(k=R(this,on).config).onSettled)==null?void 0:w.call(k,void 0,S,this.state.variables,this.state.context,this)),await((j=(x=this.options).onSettled)==null?void 0:j.call(x,void 0,S,t,this.state.context)),S}finally{ge(this,aa,Io).call(this,{type:"error",error:S})}}finally{R(this,on).runNext(this)}}},ra=new WeakMap,on=new WeakMap,ms=new WeakMap,aa=new WeakSet,Io=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ct.batch(()=>{R(this,ra).forEach(r=>{r.onMutationUpdate(t)}),R(this,on).notify({mutation:this,type:"updated",action:t})})},IM);function pB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zn,up,PM,Ure=(PM=class extends vu{constructor(t={}){super();fe(this,zn);fe(this,up);this.config=t,ie(this,zn,new Map),ie(this,up,Date.now())}build(t,n,r){const a=new Fre({mutationCache:this,mutationId:++Fp(this,up)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){const n=jh(t),r=R(this,zn).get(n)??[];r.push(t),R(this,zn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=jh(t);if(R(this,zn).has(n)){const a=(r=R(this,zn).get(n))==null?void 0:r.filter(o=>o!==t);a&&(a.length===0?R(this,zn).delete(n):R(this,zn).set(n,a))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=R(this,zn).get(jh(t)))==null?void 0:r.find(a=>a.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=R(this,zn).get(jh(t)))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ct.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...R(this,zn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mC(n,r))}findAll(t={}){return this.getAll().filter(n=>mC(t,n))}notify(t){Ct.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ct.batch(()=>Promise.all(t.map(n=>n.continue().catch(ar))))}},zn=new WeakMap,up=new WeakMap,PM);function jh(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function vC(e){return{onFetch:(t,n)=>{var u,f,d,h,g;const r=t.options,a=(d=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],i=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const m=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},y=sB(t.options,t.fetchOptions),v=async(b,k,w)=>{if(p)return Promise.reject();if(k==null&&b.pages.length)return Promise.resolve(b);const x={queryKey:t.queryKey,pageParam:k,direction:w?"backward":"forward",meta:t.options.meta};m(x);const j=await y(x),{maxPages:S}=t.options,A=w?Nre:Pre;return{pages:A(b.pages,j,S),pageParams:A(b.pageParams,k,S)}};if(a&&o.length){const b=a==="backward",k=b?Hre:bC,w={pages:o,pageParams:i},x=k(r,w);s=await v(w,x,b)}else{const b=e??o.length;do{const k=c===0?i[0]??r.initialPageParam:bC(r,s);if(c>0&&k==null)break;s=await v(s,k),c++}while(c{var p,m;return(m=(p=t.options).persister)==null?void 0:m.call(p,l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function bC(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Hre(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ut,Fo,Uo,sl,cl,Ho,ll,ul,NM,Vre=(NM=class{constructor(e={}){fe(this,ut);fe(this,Fo);fe(this,Uo);fe(this,sl);fe(this,cl);fe(this,Ho);fe(this,ll);fe(this,ul);ie(this,ut,e.queryCache||new Bre),ie(this,Fo,e.mutationCache||new Ure),ie(this,Uo,e.defaultOptions||{}),ie(this,sl,new Map),ie(this,cl,new Map),ie(this,Ho,0)}mount(){Fp(this,Ho)._++,R(this,Ho)===1&&(ie(this,ll,US.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,ut).onFocus())})),ie(this,ul,ng.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,ut).onOnline())})))}unmount(){var e,t;Fp(this,Ho)._--,R(this,Ho)===0&&((e=R(this,ll))==null||e.call(this),ie(this,ll,void 0),(t=R(this,ul))==null||t.call(this),ie(this,ul,void 0))}isFetching(e){return R(this,ut).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Fo).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,ut).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=R(this,ut).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Kc(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return R(this,ut).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=R(this,ut).get(r.queryHash),o=a==null?void 0:a.state.data,i=Cre(t,o);if(i!==void 0)return R(this,ut).build(this,r).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ct.batch(()=>R(this,ut).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=R(this,ut).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=R(this,ut);Ct.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=R(this,ut),r={type:"active",...e};return Ct.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ct.batch(()=>R(this,ut).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(ar).catch(ar)}invalidateQueries(e={},t={}){return Ct.batch(()=>{if(R(this,ut).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ct.batch(()=>R(this,ut).findAll(e).filter(a=>!a.isDisabled()).map(a=>{let o=a.fetch(void 0,n);return n.throwOnError||(o=o.catch(ar)),a.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ar)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=R(this,ut).build(this,t);return n.isStaleByTime(Kc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ar).catch(ar)}fetchInfiniteQuery(e){return e.behavior=vC(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ar).catch(ar)}ensureInfiniteQueryData(e){return e.behavior=vC(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ng.isOnline()?R(this,Fo).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,ut)}getMutationCache(){return R(this,Fo)}getDefaultOptions(){return R(this,Uo)}setDefaultOptions(e){ie(this,Uo,e)}setQueryDefaults(e,t){R(this,sl).set(qs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,sl).values()];let n={};return t.forEach(r=>{Ed(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){R(this,cl).set(qs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,cl).values()];let n={};return t.forEach(r=>{Ed(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,Uo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=BS(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===FS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,Uo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,ut).clear(),R(this,Fo).clear()}},ut=new WeakMap,Fo=new WeakMap,Uo=new WeakMap,sl=new WeakMap,cl=new WeakMap,Ho=new WeakMap,ll=new WeakMap,ul=new WeakMap,NM),bn,_e,fp,sn,gs,fl,Vo,oa,dp,dl,pl,ys,vs,Wo,hl,Le,hf,ck,lk,uk,fk,dk,pk,hk,hB,MM,Wre=(MM=class extends vu{constructor(t,n){super();fe(this,Le);fe(this,bn);fe(this,_e);fe(this,fp);fe(this,sn);fe(this,gs);fe(this,fl);fe(this,Vo);fe(this,oa);fe(this,dp);fe(this,dl);fe(this,pl);fe(this,ys);fe(this,vs);fe(this,Wo);fe(this,hl,new Set);this.options=n,ie(this,bn,t),ie(this,oa,null),ie(this,Vo,sk()),this.options.experimental_prefetchInRender||R(this,Vo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,_e).addObserver(this),wC(R(this,_e),this.options)?ge(this,Le,hf).call(this):this.updateResult(),ge(this,Le,fk).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mk(R(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mk(R(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ge(this,Le,dk).call(this),ge(this,Le,pk).call(this),R(this,_e).removeObserver(this)}setOptions(t,n){const r=this.options,a=R(this,_e);if(this.options=R(this,bn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Cr(this.options.enabled,R(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ge(this,Le,hk).call(this),R(this,_e).setOptions(this.options),r._defaulted&&!tg(this.options,r)&&R(this,bn).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,_e),observer:this});const o=this.hasListeners();o&&kC(R(this,_e),a,this.options,r)&&ge(this,Le,hf).call(this),this.updateResult(n),o&&(R(this,_e)!==a||Cr(this.options.enabled,R(this,_e))!==Cr(r.enabled,R(this,_e))||Kc(this.options.staleTime,R(this,_e))!==Kc(r.staleTime,R(this,_e)))&&ge(this,Le,ck).call(this);const i=ge(this,Le,lk).call(this);o&&(R(this,_e)!==a||Cr(this.options.enabled,R(this,_e))!==Cr(r.enabled,R(this,_e))||i!==R(this,Wo))&&ge(this,Le,uk).call(this,i)}getOptimisticResult(t){const n=R(this,bn).getQueryCache().build(R(this,bn),t),r=this.createResult(n,t);return Gre(this,r)&&(ie(this,sn,r),ie(this,fl,this.options),ie(this,gs,R(this,_e).state)),r}getCurrentResult(){return R(this,sn)}trackResult(t,n){const r={};return Object.keys(t).forEach(a=>{Object.defineProperty(r,a,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(a),n==null||n(a),t[a])})}),r}trackProp(t){R(this,hl).add(t)}getCurrentQuery(){return R(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,bn).defaultQueryOptions(t),r=R(this,bn).getQueryCache().build(R(this,bn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ge(this,Le,hf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,sn)))}createResult(t,n){var S;const r=R(this,_e),a=this.options,o=R(this,sn),i=R(this,gs),s=R(this,fl),l=t!==r?t.state:R(this,fp),{state:u}=t;let f={...u},d=!1,h;if(n._optimisticResults){const A=this.hasListeners(),C=!A&&wC(t,n),O=A&&kC(t,r,n,a);(C||O)&&(f={...f,...dB(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:p,status:m}=f;if(n.select&&f.data!==void 0)if(o&&f.data===(i==null?void 0:i.data)&&n.select===R(this,dp))h=R(this,dl);else try{ie(this,dp,n.select),h=n.select(f.data),h=ik(o==null?void 0:o.data,h,n),ie(this,dl,h),ie(this,oa,null)}catch(A){ie(this,oa,A)}else h=f.data;if(n.placeholderData!==void 0&&h===void 0&&m==="pending"){let A;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=o.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((S=R(this,pl))==null?void 0:S.state.data,R(this,pl)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),ie(this,oa,null)}catch(C){ie(this,oa,C)}A!==void 0&&(m="success",h=ik(o==null?void 0:o.data,A,n),d=!0)}R(this,oa)&&(g=R(this,oa),h=R(this,dl),p=Date.now(),m="error");const y=f.fetchStatus==="fetching",v=m==="pending",b=m==="error",k=v&&y,w=h!==void 0,j={status:m,fetchStatus:f.fetchStatus,isPending:v,isSuccess:m==="success",isError:b,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:p,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:y,isRefetching:y&&!v,isLoadingError:b&&!w,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:b&&w,isStale:HS(t,n),refetch:this.refetch,promise:R(this,Vo)};if(this.options.experimental_prefetchInRender){const A=N=>{j.status==="error"?N.reject(j.error):j.data!==void 0&&N.resolve(j.data)},C=()=>{const N=ie(this,Vo,j.promise=sk());A(N)},O=R(this,Vo);switch(O.status){case"pending":t.queryHash===r.queryHash&&A(O);break;case"fulfilled":(j.status==="error"||j.data!==O.value)&&C();break;case"rejected":(j.status!=="error"||j.error!==O.reason)&&C();break}}return j}updateResult(t){const n=R(this,sn),r=this.createResult(R(this,_e),this.options);if(ie(this,gs,R(this,_e).state),ie(this,fl,this.options),R(this,gs).data!==void 0&&ie(this,pl,R(this,_e)),tg(r,n))return;ie(this,sn,r);const a={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!R(this,hl).size)return!0;const c=new Set(s??R(this,hl));return this.options.throwOnError&&c.add("error"),Object.keys(R(this,sn)).some(l=>{const u=l;return R(this,sn)[u]!==n[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&o()&&(a.listeners=!0),ge(this,Le,hB).call(this,{...a,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ge(this,Le,fk).call(this)}},bn=new WeakMap,_e=new WeakMap,fp=new WeakMap,sn=new WeakMap,gs=new WeakMap,fl=new WeakMap,Vo=new WeakMap,oa=new WeakMap,dp=new WeakMap,dl=new WeakMap,pl=new WeakMap,ys=new WeakMap,vs=new WeakMap,Wo=new WeakMap,hl=new WeakMap,Le=new WeakSet,hf=function(t){ge(this,Le,hk).call(this);let n=R(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ar)),n},ck=function(){ge(this,Le,dk).call(this);const t=Kc(this.options.staleTime,R(this,_e));if(Ws||R(this,sn).isStale||!ak(t))return;const r=oB(R(this,sn).dataUpdatedAt,t)+1;ie(this,ys,setTimeout(()=>{R(this,sn).isStale||this.updateResult()},r))},lk=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,_e)):this.options.refetchInterval)??!1},uk=function(t){ge(this,Le,pk).call(this),ie(this,Wo,t),!(Ws||Cr(this.options.enabled,R(this,_e))===!1||!ak(R(this,Wo))||R(this,Wo)===0)&&ie(this,vs,setInterval(()=>{(this.options.refetchIntervalInBackground||US.isFocused())&&ge(this,Le,hf).call(this)},R(this,Wo)))},fk=function(){ge(this,Le,ck).call(this),ge(this,Le,uk).call(this,ge(this,Le,lk).call(this))},dk=function(){R(this,ys)&&(clearTimeout(R(this,ys)),ie(this,ys,void 0))},pk=function(){R(this,vs)&&(clearInterval(R(this,vs)),ie(this,vs,void 0))},hk=function(){const t=R(this,bn).getQueryCache().build(R(this,bn),this.options);if(t===R(this,_e))return;const n=R(this,_e);ie(this,_e,t),ie(this,fp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},hB=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,sn))}),R(this,bn).getQueryCache().notify({query:R(this,_e),type:"observerResultsUpdated"})})},MM);function qre(e,t){return Cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function wC(e,t){return qre(e,t)||e.state.data!==void 0&&mk(e,t,t.refetchOnMount)}function mk(e,t,n){if(Cr(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&HS(e,t)}return!1}function kC(e,t,n,r){return(e!==t||Cr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&HS(e,n)}function HS(e,t){return Cr(t.enabled,e)!==!1&&e.isStaleByTime(Kc(t.staleTime,e))}function Gre(e,t){return!tg(e.getCurrentResult(),t)}var qo,Go,wn,qa,ro,fm,gk,DM,Kre=(DM=class extends vu{constructor(n,r){super();fe(this,ro);fe(this,qo);fe(this,Go);fe(this,wn);fe(this,qa);ie(this,qo,n),this.setOptions(r),this.bindMethods(),ge(this,ro,fm).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=R(this,qo).defaultMutationOptions(n),tg(this.options,r)||R(this,qo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,wn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&qs(r.mutationKey)!==qs(this.options.mutationKey)?this.reset():((a=R(this,wn))==null?void 0:a.state.status)==="pending"&&R(this,wn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=R(this,wn))==null||n.removeObserver(this)}onMutationUpdate(n){ge(this,ro,fm).call(this),ge(this,ro,gk).call(this,n)}getCurrentResult(){return R(this,Go)}reset(){var n;(n=R(this,wn))==null||n.removeObserver(this),ie(this,wn,void 0),ge(this,ro,fm).call(this),ge(this,ro,gk).call(this)}mutate(n,r){var a;return ie(this,qa,r),(a=R(this,wn))==null||a.removeObserver(this),ie(this,wn,R(this,qo).getMutationCache().build(R(this,qo),this.options)),R(this,wn).addObserver(this),R(this,wn).execute(n)}},qo=new WeakMap,Go=new WeakMap,wn=new WeakMap,qa=new WeakMap,ro=new WeakSet,fm=function(){var r;const n=((r=R(this,wn))==null?void 0:r.state)??pB();ie(this,Go,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},gk=function(n){Ct.batch(()=>{var r,a,o,i,s,c,l,u;if(R(this,qa)&&this.hasListeners()){const f=R(this,Go).variables,d=R(this,Go).context;(n==null?void 0:n.type)==="success"?((a=(r=R(this,qa)).onSuccess)==null||a.call(r,n.data,f,d),(i=(o=R(this,qa)).onSettled)==null||i.call(o,n.data,null,f,d)):(n==null?void 0:n.type)==="error"&&((c=(s=R(this,qa)).onError)==null||c.call(s,n.error,f,d),(u=(l=R(this,qa)).onSettled)==null||u.call(l,void 0,n.error,f,d))}this.listeners.forEach(f=>{f(R(this,Go))})})},DM),mB=_.createContext(void 0),VS=e=>{const t=_.useContext(mB);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yre=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(mB.Provider,{value:e,children:t})),gB=_.createContext(!1),Zre=()=>_.useContext(gB);gB.Provider;function Qre(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xre=_.createContext(Qre()),Jre=()=>_.useContext(Xre);function yB(e,t){return typeof e=="function"?e(...t):!!e}function yk(){}var eae=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tae=e=>{_.useEffect(()=>{e.clearReset()},[e])},nae=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&yB(n,[e.error,r]),rae=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},aae=(e,t)=>e.isLoading&&e.isFetching&&!t,oae=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xC=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function iae(e,t,n){var u,f,d,h,g;const r=VS(),a=Zre(),o=Jre(),i=r.defaultQueryOptions(e);(f=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,i),i._optimisticResults=a?"isRestoring":"optimistic",rae(i),eae(i,o),tae(o);const s=!r.getQueryCache().get(i.queryHash),[c]=_.useState(()=>new t(r,i)),l=c.getOptimisticResult(i);if(_.useSyncExternalStore(_.useCallback(p=>{const m=a?yk:c.subscribe(Ct.batchCalls(p));return c.updateResult(),m},[c,a]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),_.useEffect(()=>{c.setOptions(i,{listeners:!1})},[i,c]),oae(i,l))throw xC(i,c,o);if(nae({result:l,errorResetBoundary:o,throwOnError:i.throwOnError,query:r.getQueryCache().get(i.queryHash)}))throw l.error;if((h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||h.call(d,i,l),i.experimental_prefetchInRender&&!Ws&&aae(l,a)){const p=s?xC(i,c,o):(g=r.getQueryCache().get(i.queryHash))==null?void 0:g.promise;p==null||p.catch(yk).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?l:c.trackResult(l)}function sae(e,t){return iae(e,Wre)}function cae(e,t){const n=VS(),[r]=_.useState(()=>new Kre(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);const a=_.useSyncExternalStore(_.useCallback(i=>r.subscribe(Ct.batchCalls(i)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=_.useCallback((i,s)=>{r.mutate(i,s).catch(yk)},[r]);if(a.error&&yB(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}var vB=class extends $q{},Yc=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotConnectedError",this.message="Connector not connected"}},Zc=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}},Qc=class extends Error{constructor(){super(...arguments),this.name="UserRejectedRequestError",this.message="User rejected request"}},lae=class extends Error{constructor(){super(...arguments),this.name="UserNotConnectedError",this.message="User not connected"}},uae="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iYmxhY2siPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTkuODc5IDcuNTE5YzEuMTcxLTEuMDI1IDMuMDcxLTEuMDI1IDQuMjQyIDAgMS4xNzIgMS4wMjUgMS4xNzIgMi42ODcgMCAzLjcxMi0uMjAzLjE3OS0uNDMuMzI2LS42Ny40NDItLjc0NS4zNjEtMS40NS45OTktMS40NSAxLjgyN3YuNzVNMjEgMTJhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6bS05IDUuMjVoLjAwOHYuMDA4SDEydi0uMDA4eiIgLz4KPC9zdmc+",fae="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0id2hpdGUiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTkuODc5IDcuNTE5YzEuMTcxLTEuMDI1IDMuMDcxLTEuMDI1IDQuMjQyIDAgMS4xNzIgMS4wMjUgMS4xNzIgMi42ODcgMCAzLjcxMi0uMjAzLjE3OS0uNDMuMzI2LS42Ny40NDItLjc0NS4zNjEtMS40NS45OTktMS40NSAxLjgyN3YuNzVNMjEgMTJhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6bS05IDUuMjVoLjAwOHYuMDA4SDEydi0uMDA4eiIgLz4KPC9zdmc+Cg==",jC={argentX:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA2NS4xOTUwOCA1Ny43MzU2MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjUuMTk1MDggNTcuNzM1NjI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkY4NzVCO30KPC9zdHlsZT4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQwLjk4NTkyLDBIMjQuMjA4ODhjLTAuNTYsMC0xLjAxMDAxLDAuNDUxMDItMS4wMjE5NywxLjAxMjAyCgljLTAuMzM4OTksMTUuNzU1LTguNTgyMDMsMzAuNzA4OTgtMjIuNzcwMDIsNDEuMzAwOTljLTAuNDUwMDEsMC4zMzcwMS0wLjU1Mjk4LDAuOTY3OTktMC4yMjQsMS40MjNsOS44MTU5OCwxMy41NzMKCWMwLjMzNDA1LDAuNDYyMDEsMC45ODUwNSwwLjU2NTk4LDEuNDQyOTksMC4yMjY5OWM4Ljg3MTAzLTYuNTc5MDEsMTYuMDA3MDItMTQuNTE3LDIxLjE0NjA2LTIzLjMxNQoJYzUuMTM4LDguNzk4LDEyLjI3Mzk5LDE2LjczNTk5LDIxLjE0NiwyMy4zMTVjMC40NTY5NywwLjMzODk5LDEuMTA3OTcsMC4yMzUwMiwxLjQ0MTk2LTAuMjI2OTlsOS44MTYwNC0xMy41NzMKCWMwLjMyODk4LTAuNDU1MDIsMC4yMjY5OS0xLjA4Ni0wLjIyNC0xLjQyM0M1MC41ODk4NiwzMS43MjEwMSw0Mi4zNDY4OCwxNi43NjcwMyw0Mi4wMDc4OSwxLjAxMjAyCglDNDEuOTk1ODcsMC40NTEwMiw0MS41NDY4OSwwLDQwLjk4NTkyLDAiLz4KPC9zdmc+Cg==",braavos:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjUwMCIgdmlld0JveD0iMCAwIDUwMCA1MDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0zMjMuNDQgNDEuMzg4NkMzMjQuMTk4IDQyLjY3MjggMzIzLjE5NSA0NC4yNjAzIDMyMS43MDQgNDQuMjYwM0MyOTEuNTEgNDQuMjYwMyAyNjYuOTY1IDY4LjE2NTYgMjY2LjM4OSA5Ny44NzFDMjU2LjA1IDk1Ljk0MDcgMjQ1LjMzNyA5NS43OTU2IDIzNC43NTQgOTcuNTc4N0MyMzQuMDIzIDY4LjAwOSAyMDkuNTQgNDQuMjYwMyAxNzkuNDQ1IDQ0LjI2MDNDMTc3Ljk1MyA0NC4yNjAzIDE3Ni45NDkgNDIuNjcxNiAxNzcuNzA3IDQxLjM4NjVDMTkyLjMyMyAxNi42MzMgMjE5LjQ4MyAwIDI1MC41NzMgMEMyODEuNjY0IDAgMzA4LjgyNCAxNi42MzM5IDMyMy40NCA0MS4zODg2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzIzMjRfNjE4NjkpIi8+CjxwYXRoIGQ9Ik00MTguNzU2IDIyNi44OTRDNDI2LjM3IDIyOS4yIDQzMy41ODEgMjIyLjUxNyA0MzEuMDM2IDIxNC45NzlDNDA0LjUwNyAxMzYuNDAxIDMxNi41MzUgMTA0LjM1OCAyNTAuMTU5IDEwNC4zNThDMTgzLjY3NCAxMDQuMzU4IDkzLjczOTEgMTM3LjQxOCA2OS4zMDUxIDIxNS4zMzFDNjYuOTU3NCAyMjIuODE4IDc0LjE0NjUgMjI5LjI3NSA4MS42NDc5IDIyNi45NzdMMjQ0LjI1IDE3Ny4xNTFDMjQ3LjU2OSAxNzYuMTM0IDI1MS4xMTYgMTc2LjEyOCAyNTQuNDM5IDE3Ny4xMzVMNDE4Ljc1NiAyMjYuODk0WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzIzMjRfNjE4NjkpIi8+CjxwYXRoIGQ9Ik02OS43MTY1IDIzOS40MjZMMjQ0LjM3IDE4Ni40NTZDMjQ3LjY2OSAxODUuNDU2IDI1MS4xOTEgMTg1LjQ1MyAyNTQuNDkyIDE4Ni40NDhMNDMwLjIzMiAyMzkuNDUyQzQ0NC43NiAyNDMuODMzIDQ1NC43MDEgMjU3LjIxNiA0NTQuNzAxIDI3Mi4zOVY0MzAuNDgxQzQ1NC4wMjggNDY5LjA3IDQxOS4zNjIgNTAwIDM4MC43ODYgNTAwSDMxNi43MTJDMzEwLjM3OSA1MDAgMzA1LjI1IDQ5NC44NzcgMzA1LjI1IDQ4OC41NDNWNDMzLjExNUMzMDUuMjUgNDExLjI4OSAzMTguMTY3IDM5MS41MzUgMzM4LjE1NSAzODIuNzkyQzM2NC45NDkgMzcxLjA3MSAzOTYuNjQ2IDM1NS4yMTggNDAyLjYwOCAzMjMuNDA2QzQwNC41MzIgMzEzLjEzOCAzOTcuODM3IDMwMy4yMzQgMzg3LjU5NSAzMDEuMTk4QzM2MS42OTkgMjk2LjA1MSAzMzIuOTg5IDI5OC4wMzkgMzA4LjcxMSAzMDguODk4QzI4MS4xNSAzMjEuMjI1IDI3My45NCAzNDEuNzMxIDI3MS4yNzEgMzY5LjI3TDI2OC4wMzYgMzk4LjkzOEMyNjcuMDQ3IDQwOC4wMDUgMjU4LjU0NiA0MTQuOTUyIDI0OS40MjkgNDE0Ljk1MkMyMzkuOTk4IDQxNC45NTIgMjMyLjkyNiA0MDcuNzY5IDIzMS45MDMgMzk4LjM4OEwyMjguNzI4IDM2OS4yN0MyMjYuNDQyIDM0NS42ODEgMjIyLjI5OCAzMjIuNzY3IDE5Ny45MTIgMzExLjg2QzE3MC4wOTUgMjk5LjQxOSAxNDIuMTQxIDI5NS4yODcgMTEyLjQwNCAzMDEuMTk4QzEwMi4xNjIgMzAzLjIzNCA5NS40NjcgMzEzLjEzOCA5Ny4zOTEzIDMyMy40MDZDMTAzLjQwNSAzNTUuNDk1IDEzNC44NTQgMzcwLjk4NSAxNjEuODQ0IDM4Mi43OTJDMTgxLjgzMyAzOTEuNTM1IDE5NC43NSA0MTEuMjg5IDE5NC43NSA0MzMuMTE1VjQ4OC41MzNDMTk0Ljc1IDQ5NC44NjcgMTg5LjYyMiA1MDAgMTgzLjI4OSA1MDBIMTE5LjIxNEM4MC42Mzc0IDUwMCA0NS45NzE2IDQ2OS4wNyA0NS4yOTc5IDQzMC40ODFWMjcyLjM0OUM0NS4yOTc5IDI1Ny4xOTQgNTUuMjE0MiAyNDMuODI0IDY5LjcxNjUgMjM5LjQyNloiIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl8yMzI0XzYxODY5KSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzIzMjRfNjE4NjkiIHgxPSIyNDUuOTg2IiB5MT0iLTI3IiB4Mj0iNDI1LjQ5NiIgeTI9IjUwMi4zNzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y1RDQ1RSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzIzMjRfNjE4NjkiIHgxPSIyNDUuOTg2IiB5MT0iLTI3IiB4Mj0iNDI1LjQ5NiIgeTI9IjUwMi4zNzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y1RDQ1RSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzIzMjRfNjE4NjkiIHgxPSIyNDUuOTg2IiB5MT0iLTI3IiB4Mj0iNDI1LjQ5NiIgeTI9IjUwMi4zNzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y1RDQ1RSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4="},WS=class extends vB{constructor({options:e}){super(),this._options=e}get id(){return this._options.id}get name(){var e;return this.ensureWallet(),this._options.name??((e=this._wallet)==null?void 0:e.name)??this._options.id}get icon(){var t;this.ensureWallet();const e={dark:jC[this.id]||fae,light:jC[this.id]||uae};return this._options.icon||((t=this._wallet)==null?void 0:t.icon)||e}available(){return this.ensureWallet(),this._wallet!==void 0}async chainId(){this.ensureWallet();const e=await this.isLocked();if(!this._wallet||e)throw new Yc;try{return this.requestChainId()}catch{throw new Zc}}async ready(){if(this.ensureWallet(),!this._wallet)return!1;const e=await this.request({type:"wallet_getPermissions"});return e==null?void 0:e.includes(yy.ACCOUNTS)}async account(e){if(this.ensureWallet(),await this.isLocked()||!this._wallet)throw new Yc;return new jre(e,this._wallet)}async connect(e={}){if(this.ensureWallet(),!this._wallet)throw new Zc;let t;try{t=await this.request({type:"wallet_requestAccounts"})}catch{throw new Qc}if(!t)throw new Qc;this._wallet.on("accountsChanged",async a=>{await this.onAccountsChanged(a)}),this._wallet.on("networkChanged",(a,o)=>{this.onNetworkChanged(a,o)}),await this.onAccountsChanged(t);const[n]=t,r=await this.requestChainId();return this.emit("connect",{account:n,chainId:r}),{account:n,chainId:r}}async disconnect(){if(this.ensureWallet(),!this._wallet)throw new Zc;this.emit("disconnect")}async request(e){if(this.ensureWallet(),!this._wallet)throw new Yc;try{return await this._wallet.request(e)}catch{throw new Qc}}async isLocked(){return(await this.request({type:"wallet_requestAccounts",params:{silent_mode:!0}})).length===0}async requestChainId(){const e=await this.request({type:"wallet_requestChainId"});return BigInt(e)}ensureWallet(){const e=globalThis,t=e==null?void 0:e[`starknet_${this._options.id}`];t&&(this._wallet=t)}async onAccountsChanged(e){if(!e)this.emit("disconnect");else{const[t]=e;if(t){const n=await this.requestChainId();this.emit("change",{account:t,chainId:n})}else this.emit("disconnect")}}onNetworkChanged(e,t){if(e){const n=BigInt(e),[r]=t||[];this.emit("change",{chainId:n,account:r})}else this.emit("change",{})}},dae="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iYmxhY2siPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTkuODc5IDcuNTE5YzEuMTcxLTEuMDI1IDMuMDcxLTEuMDI1IDQuMjQyIDAgMS4xNzIgMS4wMjUgMS4xNzIgMi42ODcgMCAzLjcxMi0uMjAzLjE3OS0uNDMuMzI2LS42Ny40NDItLjc0NS4zNjEtMS40NS45OTktMS40NSAxLjgyN3YuNzVNMjEgMTJhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6bS05IDUuMjVoLjAwOHYuMDA4SDEydi0uMDA4eiIgLz4KPC9zdmc+",pae="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0id2hpdGUiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTkuODc5IDcuNTE5YzEuMTcxLTEuMDI1IDMuMDcxLTEuMDI1IDQuMjQyIDAgMS4xNzIgMS4wMjUgMS4xNzIgMi42ODcgMCAzLjcxMi0uMjAzLjE3OS0uNDMuMzI2LS42Ny40NDItLjc0NS4zNjEtMS40NS45OTktMS40NSAxLjgyN3YuNzVNMjEgMTJhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6bS05IDUuMjVoLjAwOHYuMDA4SDEydi0uMDA4eiIgLz4KPC9zdmc+Cg==",_C={argentX:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA2NS4xOTUwOCA1Ny43MzU2MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjUuMTk1MDggNTcuNzM1NjI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojRkY4NzVCO30KPC9zdHlsZT4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQwLjk4NTkyLDBIMjQuMjA4ODhjLTAuNTYsMC0xLjAxMDAxLDAuNDUxMDItMS4wMjE5NywxLjAxMjAyCgljLTAuMzM4OTksMTUuNzU1LTguNTgyMDMsMzAuNzA4OTgtMjIuNzcwMDIsNDEuMzAwOTljLTAuNDUwMDEsMC4zMzcwMS0wLjU1Mjk4LDAuOTY3OTktMC4yMjQsMS40MjNsOS44MTU5OCwxMy41NzMKCWMwLjMzNDA1LDAuNDYyMDEsMC45ODUwNSwwLjU2NTk4LDEuNDQyOTksMC4yMjY5OWM4Ljg3MTAzLTYuNTc5MDEsMTYuMDA3MDItMTQuNTE3LDIxLjE0NjA2LTIzLjMxNQoJYzUuMTM4LDguNzk4LDEyLjI3Mzk5LDE2LjczNTk5LDIxLjE0NiwyMy4zMTVjMC40NTY5NywwLjMzODk5LDEuMTA3OTcsMC4yMzUwMiwxLjQ0MTk2LTAuMjI2OTlsOS44MTYwNC0xMy41NzMKCWMwLjMyODk4LTAuNDU1MDIsMC4yMjY5OS0xLjA4Ni0wLjIyNC0xLjQyM0M1MC41ODk4NiwzMS43MjEwMSw0Mi4zNDY4OCwxNi43NjcwMyw0Mi4wMDc4OSwxLjAxMjAyCglDNDEuOTk1ODcsMC40NTEwMiw0MS41NDY4OSwwLDQwLjk4NTkyLDAiLz4KPC9zdmc+Cg==",braavos:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjUwMCIgdmlld0JveD0iMCAwIDUwMCA1MDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0zMjMuNDQgNDEuMzg4NkMzMjQuMTk4IDQyLjY3MjggMzIzLjE5NSA0NC4yNjAzIDMyMS43MDQgNDQuMjYwM0MyOTEuNTEgNDQuMjYwMyAyNjYuOTY1IDY4LjE2NTYgMjY2LjM4OSA5Ny44NzFDMjU2LjA1IDk1Ljk0MDcgMjQ1LjMzNyA5NS43OTU2IDIzNC43NTQgOTcuNTc4N0MyMzQuMDIzIDY4LjAwOSAyMDkuNTQgNDQuMjYwMyAxNzkuNDQ1IDQ0LjI2MDNDMTc3Ljk1MyA0NC4yNjAzIDE3Ni45NDkgNDIuNjcxNiAxNzcuNzA3IDQxLjM4NjVDMTkyLjMyMyAxNi42MzMgMjE5LjQ4MyAwIDI1MC41NzMgMEMyODEuNjY0IDAgMzA4LjgyNCAxNi42MzM5IDMyMy40NCA0MS4zODg2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzIzMjRfNjE4NjkpIi8+CjxwYXRoIGQ9Ik00MTguNzU2IDIyNi44OTRDNDI2LjM3IDIyOS4yIDQzMy41ODEgMjIyLjUxNyA0MzEuMDM2IDIxNC45NzlDNDA0LjUwNyAxMzYuNDAxIDMxNi41MzUgMTA0LjM1OCAyNTAuMTU5IDEwNC4zNThDMTgzLjY3NCAxMDQuMzU4IDkzLjczOTEgMTM3LjQxOCA2OS4zMDUxIDIxNS4zMzFDNjYuOTU3NCAyMjIuODE4IDc0LjE0NjUgMjI5LjI3NSA4MS42NDc5IDIyNi45NzdMMjQ0LjI1IDE3Ny4xNTFDMjQ3LjU2OSAxNzYuMTM0IDI1MS4xMTYgMTc2LjEyOCAyNTQuNDM5IDE3Ny4xMzVMNDE4Ljc1NiAyMjYuODk0WiIgZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzIzMjRfNjE4NjkpIi8+CjxwYXRoIGQ9Ik02OS43MTY1IDIzOS40MjZMMjQ0LjM3IDE4Ni40NTZDMjQ3LjY2OSAxODUuNDU2IDI1MS4xOTEgMTg1LjQ1MyAyNTQuNDkyIDE4Ni40NDhMNDMwLjIzMiAyMzkuNDUyQzQ0NC43NiAyNDMuODMzIDQ1NC43MDEgMjU3LjIxNiA0NTQuNzAxIDI3Mi4zOVY0MzAuNDgxQzQ1NC4wMjggNDY5LjA3IDQxOS4zNjIgNTAwIDM4MC43ODYgNTAwSDMxNi43MTJDMzEwLjM3OSA1MDAgMzA1LjI1IDQ5NC44NzcgMzA1LjI1IDQ4OC41NDNWNDMzLjExNUMzMDUuMjUgNDExLjI4OSAzMTguMTY3IDM5MS41MzUgMzM4LjE1NSAzODIuNzkyQzM2NC45NDkgMzcxLjA3MSAzOTYuNjQ2IDM1NS4yMTggNDAyLjYwOCAzMjMuNDA2QzQwNC41MzIgMzEzLjEzOCAzOTcuODM3IDMwMy4yMzQgMzg3LjU5NSAzMDEuMTk4QzM2MS42OTkgMjk2LjA1MSAzMzIuOTg5IDI5OC4wMzkgMzA4LjcxMSAzMDguODk4QzI4MS4xNSAzMjEuMjI1IDI3My45NCAzNDEuNzMxIDI3MS4yNzEgMzY5LjI3TDI2OC4wMzYgMzk4LjkzOEMyNjcuMDQ3IDQwOC4wMDUgMjU4LjU0NiA0MTQuOTUyIDI0OS40MjkgNDE0Ljk1MkMyMzkuOTk4IDQxNC45NTIgMjMyLjkyNiA0MDcuNzY5IDIzMS45MDMgMzk4LjM4OEwyMjguNzI4IDM2OS4yN0MyMjYuNDQyIDM0NS42ODEgMjIyLjI5OCAzMjIuNzY3IDE5Ny45MTIgMzExLjg2QzE3MC4wOTUgMjk5LjQxOSAxNDIuMTQxIDI5NS4yODcgMTEyLjQwNCAzMDEuMTk4QzEwMi4xNjIgMzAzLjIzNCA5NS40NjcgMzEzLjEzOCA5Ny4zOTEzIDMyMy40MDZDMTAzLjQwNSAzNTUuNDk1IDEzNC44NTQgMzcwLjk4NSAxNjEuODQ0IDM4Mi43OTJDMTgxLjgzMyAzOTEuNTM1IDE5NC43NSA0MTEuMjg5IDE5NC43NSA0MzMuMTE1VjQ4OC41MzNDMTk0Ljc1IDQ5NC44NjcgMTg5LjYyMiA1MDAgMTgzLjI4OSA1MDBIMTE5LjIxNEM4MC42Mzc0IDUwMCA0NS45NzE2IDQ2OS4wNyA0NS4yOTc5IDQzMC40ODFWMjcyLjM0OUM0NS4yOTc5IDI1Ny4xOTQgNTUuMjE0MiAyNDMuODI0IDY5LjcxNjUgMjM5LjQyNloiIGZpbGw9InVybCgjcGFpbnQyX2xpbmVhcl8yMzI0XzYxODY5KSIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzIzMjRfNjE4NjkiIHgxPSIyNDUuOTg2IiB5MT0iLTI3IiB4Mj0iNDI1LjQ5NiIgeTI9IjUwMi4zNzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y1RDQ1RSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDFfbGluZWFyXzIzMjRfNjE4NjkiIHgxPSIyNDUuOTg2IiB5MT0iLTI3IiB4Mj0iNDI1LjQ5NiIgeTI9IjUwMi4zNzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y1RDQ1RSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzIzMjRfNjE4NjkiIHgxPSIyNDUuOTg2IiB5MT0iLTI3IiB4Mj0iNDI1LjQ5NiIgeTI9IjUwMi4zNzYiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0Y1RDQ1RSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRjk2MDAiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4="},hae=class extends vB{constructor({options:e}){super(),this._options=e}get id(){return this._options.id}get name(){var e;return this._options.name??((e=this._wallet)==null?void 0:e.name)??this._options.id}get icon(){var t;const e={dark:_C[this.id]||pae,light:_C[this.id]||dae};return this._options.icon||((t=this._wallet)==null?void 0:t.icon)||e}available(){return this.ensureWallet(),this._wallet!==void 0}async chainId(){if(this.ensureWallet(),!this._wallet||!this._wallet.provider)throw new Yc;const e=await this._wallet.provider.getChainId();return BigInt(e)}async ready(){return this.ensureWallet(),this._wallet?await this._wallet.isPreauthorized():!1}async connect(e={}){if(this.ensureWallet(),!this._wallet)throw new Zc;let t;try{t=await this._wallet.enable({starknetVersion:"v5"})}catch{throw new Qc}if(!this._wallet.isConnected||!this._wallet.account||!t)throw new Qc;this._wallet.on("accountsChanged",async a=>{a&&await this.onAccountsChanged(a)}),this._wallet.on("networkChanged",a=>{this.onNetworkChanged(a)}),await this.onAccountsChanged(t);const n=this._wallet.account.address,r=await this.chainId();return this.emit("connect",{account:n,chainId:r}),{account:n,chainId:r}}async disconnect(){var e;if(this.ensureWallet(),!this.available())throw new Zc;if(!((e=this._wallet)!=null&&e.isConnected))throw new lae;this.emit("disconnect")}async account(){if(this.ensureWallet(),!this._wallet||!this._wallet.account)throw new Yc;return this._wallet.account}async request(e){var t;if(this.ensureWallet(),!this._wallet)throw new Yc;try{switch(e.type){case"wallet_getPermissions":return this._wallet?[yy.ACCOUNTS]:[];case"wallet_requestAccounts":return this._wallet.account?[this._wallet.account.address]:[];case"wallet_requestChainId":return this._wallet.chainId?this._wallet.chainId:null;case"wallet_addInvokeTransaction":{if(!this._wallet)throw new Error("Send transaction failed");const n=(e.params.calls??[]).map(({calldata:r,contract_address:a,entry_point:o})=>({calldata:r,contractAddress:a,entrypoint:o}));return await((t=this._wallet.account)==null?void 0:t.execute(n))}default:throw new Error(`Wallet API method ${e.type} is not supported.`)}}catch{throw new Qc}}ensureWallet(){const t=mae(globalThis).filter(n=>n.id===this._options.id)[0];t&&(this._wallet=t)}async onAccountsChanged(e){let t;if(typeof e=="string"?t=e:t=e[0],t){const n=await this.chainId();this.emit("change",{account:t,chainId:n})}else this.emit("disconnect")}onNetworkChanged(e){switch(e){case"SN_MAIN":this.emit("change",{chainId:rk.id});break;case"SN_SEPOLIA":this.emit("change",{chainId:eg.id});break;case"mainnet-alpha":this.emit("change",{chainId:rk.id});break;case"sepolia-alpha":this.emit("change",{chainId:eg.id});break;default:this.emit("change",{});break}}};function mae(e){return Object.values(Object.getOwnPropertyNames(e).reduce((t,n)=>{if(n.startsWith("starknet")){const r=e[n];gae(r)&&!t[r.id]&&(t[r.id]=r)}return t},{}))}function gae(e){try{return e&&["request","isConnected","provider","enable","isPreauthorized","on","off","version","id","name","icon"].every(t=>t in e)}catch{}return!1}function yae(){return new WS({options:{id:"argentX",name:"Argent X"}})}function vae(){return new WS({options:{id:"braavos",name:"Braavos"}})}function bae({id:e}){return new WS({options:{id:e}})}function wae({id:e}){return new hae({options:{id:e}})}function kae({recommended:e,includeRecommended:t="always",order:n="alphabetical",shimLegacyConnectors:r=[]}){const[a,o]=_.useState([]),i=_.useCallback(()=>{const l=_ae(window).map(u=>r.includes(u.id)?wae({id:u.id}):bae({id:u.id}));o(l)},[r.includes]);return _.useEffect(()=>{i()},[i]),{connectors:_.useMemo(()=>xae(a,e??[],{includeRecommended:t,order:n}),[a,e,t,n])}}function xae(e,t,{includeRecommended:n,order:r}){const a=new Set(e.map(s=>s.id)),o=[...e];return(n==="always"||n==="onlyIfNoConnectors"&&e.length===0)&&o.push(...t.filter(s=>!a.has(s.id))),r==="random"?jae(o):o.sort((s,c)=>s.id.localeCompare(c.id))}function jae(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}function _ae(e){return Object.values(Object.getOwnPropertyNames(e).reduce((t,n)=>{if(n.startsWith("starknet")){const r=e[n];Sae(r)&&!t[r.id]&&(t[r.id]=r)}return t},{}))}function Sae(e){try{return e&&["request","isConnected","provider","enable","isPreauthorized","on","off","version","id","name","icon"].every(t=>t in e)}catch{}return!1}var bB=B.createContext({account:void 0,address:void 0});function Eae(){const{account:e,address:t}=_.useContext(bB);return{account:e,address:t}}function Aae({address:e,account:t,children:n}){return E.jsx(bB.Provider,{value:{account:t,address:e},children:n})}var Oae=new Vre,wB=_.createContext(void 0);function Ci(){const e=_.useContext(wB);if(!e)throw new Error("useStarknet must be used within a StarknetProvider or StarknetConfig");return e}function Tae({chains:e,provider:t,explorer:n,connectors:r=[],autoConnect:a=!1,defaultChainId:o}){const i=o?e.find(m=>m.id===o)??e[0]:e[0];if(i===void 0)throw new Error("Must provide at least one chain.");const{chain:s,provider:c}=L0(i,t),l=_.useRef(),[u,f]=_.useState({currentChain:i,currentProvider:c,connectors:r}),d=_.useCallback(({chainId:m})=>{if(m){for(const y of e)if(y.id===m){const{chain:v,provider:b}=L0(y,t);f(k=>({...k,currentChain:v,currentProvider:b}));return}}},[e,t]),h=_.useCallback(async({chainId:m,account:y})=>{m&&d({chainId:m}),y&&l.current&&f(v=>({...v,currentAddress:y}))},[d]);_.useEffect(()=>{l.current||f(m=>({...m,currentChain:i,currentProvider:L0(i,t).provider}))},[i,t]);const g=_.useCallback(async({connector:m})=>{var v,b,k;if(!m)throw new Error("Must provide a connector.");const y=((v=l.current)==null?void 0:v.id)!==m.id;y&&((b=l.current)==null||b.off("change",h),(k=l.current)==null||k.off("disconnect",p));try{const{chainId:w,account:x}=await m.connect({chainIdHint:i.id});x!==u.currentAddress&&(l.current=m,f(j=>({...j,currentAddress:x}))),a&&localStorage.setItem("lastUsedConnector",m.id),y&&(m.on("change",h),m.on("disconnect",p)),d({chainId:w})}catch(w){throw f(x=>({...x,error:new Zc})),w}},[a,u.currentAddress,i.id,h,d]),p=_.useCallback(async()=>{if(f(m=>({...m,currentAddress:void 0,currentProvider:c,currentChain:i})),a&&localStorage.removeItem("lastUsedConnector"),!!l.current){l.current.off("change",h),l.current.off("disconnect",p);try{await l.current.disconnect()}catch{}l.current=void 0}},[a,h,c,i]);return _.useEffect(()=>{async function m(y){const v=localStorage.getItem("lastUsedConnector");if(v===null)return;const b=y.find(k=>k.id===v);if(b!==void 0)try{if(!await b.ready())return;g({connector:b})}catch{}}a&&!l.current&&m(r)},[]),{address:u.currentAddress,provider:u.currentProvider,chain:u.currentChain,connector:l.current,explorer:n,connect:g,disconnect:p,connectors:r,chains:e}}function Cae({chains:e,provider:t,connectors:n,explorer:r,autoConnect:a,queryClient:o,defaultChainId:i,children:s}){const{account:c,address:l,...u}=Tae({chains:e,provider:t,explorer:r,connectors:n,autoConnect:a,defaultChainId:i});return E.jsx(Yre,{client:o??Oae,children:E.jsx(wB.Provider,{value:u,children:E.jsx(Aae,{address:l,account:c,children:s})})})}function L0(e,t){const n=t(e);if(n)return{chain:e,provider:n};throw new Error(`No provider found for chain ${e.name}`)}function Iae(e){switch(e){case rk.id:return F1.StarknetChainId.SN_MAIN;case eg.id:return F1.StarknetChainId.SN_SEPOLIA;default:return}}function Pae({children:e,...t}){return E.jsx(Cae,{...t,children:e})}var Nae=class{constructor(e){var t,n;this.name="Voyager",this.link=((n=(t=e.explorers)==null?void 0:t.voyager)==null?void 0:n.toString())??""}block(e){if(e.number!==void 0&&e.hash===void 0)throw new Error("The voyager explorer doesn't support numbers for blocks. Please provide a hash.");return`${this.link}/block/${e.hash}`}transaction(e){return`${this.link}/tx/${e}`}contract(e){return`${this.link}/contract/${e}`}class(e){return`${this.link}/class/${e}`}},Mae=e=>new Nae(e);function Dae(e){return Tre(e)}function zae(){const{provider:e}=Ci();return{provider:e}}function kB(){const{connector:e,chain:t}=Ci(),{provider:n}=zae(),{address:r}=Eae(),[a,o]=_.useState({status:"disconnected"}),i=_.useCallback(async()=>{if(e&&n&&r)o({status:"connected",connector:e,chainId:t.id,account:void 0,address:Dae(r),isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1}),e.account(n).then(s=>o(c=>({...c,account:s})));else return o({status:"disconnected",connector:void 0,chainId:void 0,account:void 0,address:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1})},[n,e,t.id,r]);return _.useEffect(()=>{i()},[i]),a}function xB(e){const t=sae({...e,structuralSharing:!1});return{data:t.data,error:t.error,status:t.status,isSuccess:t.isSuccess,isError:t.isError,isPending:t.isPending,fetchStatus:t.fetchStatus,isFetching:t.isFetching,isLoading:t.isLoading,refetch:t.refetch}}function qS(e){const t=cae(e);return{data:t.data,error:t.error,reset:t.reset,isError:t.isError,isIdle:t.isIdle,isPending:t.isPending,isSuccess:t.isSuccess,isPaused:t.isPaused,mutate:t.mutate,mutateAsync:t.mutateAsync,status:t.status,variables:t.variables}}function $ae(e){const{connector:t}=Ci(),{type:n,params:r,...a}=e,{mutate:o,mutateAsync:i,...s}=qS({mutationKey:Rae({type:n,params:r}),mutationFn:Lae({connector:t}),...a}),c=_.useCallback(u=>o(u??{type:n,params:r}),[o,n,r]),l=_.useCallback(u=>i(u??{type:n,params:r}),[i,n,r]);return{request:c,requestAsync:l,...s}}function Rae({type:e,params:t}){return[{entity:"walletRequest",type:e,params:t}]}function Lae({connector:e}){return async({type:t,params:n})=>{if(!e)throw new Error("No connector connected");if(!t)throw new Error("Type is required");return await e.request({type:t,params:n})}}function GS({abi:e,address:t,provider:n}){const{provider:r}=Ci();return{contract:_.useMemo(()=>{const o=n||r;if(e&&t&&o)return new Are(e,t,o).typedv2(e)},[e,t,n,r])}}function Bae({blockIdentifier:e=Cl.LATEST,...t}={}){const{provider:n}=Ci();return xB({queryKey:Fae({blockIdentifier:e}),queryFn:Uae({provider:n,blockIdentifier:e}),...t})}function Fae({blockIdentifier:e}){return[{entity:"blockNumber",blockIdentifier:e}]}function Uae({provider:e,blockIdentifier:t}){return async()=>{const n=await e.getBlock(t);if(n.status!=="PENDING")return n.block_number}}function Hae({enabled:e=!0,queryKey:t}){const n=VS(),[r,a]=_.useState(),{data:o}=Bae({enabled:e});_.useEffect(()=>{if(!r)return a(o);if(o!==r)return n.invalidateQueries({queryKey:t},{cancelRefetch:!1}),a(o)},[o,r,t,n])}function Vae(){const{chain:e,chains:t}=Ci();return{chain:e,chains:t}}var Wae=5e3;function qae({abi:e,address:t,functionName:n,args:r,blockIdentifier:a=Cl.LATEST,refetchInterval:o,watch:i=!1,enabled:s=!0,parseArgs:c,parseResult:l,...u}){const{chain:f}=Vae(),{contract:d}=GS({abi:e,address:t}),h=_.useMemo(()=>Gae({chain:f,contract:d,functionName:n,args:r,blockIdentifier:a}),[f,d,n,r,a]),g=_.useMemo(()=>!!(s&&d&&n&&r),[s,d,n,r]),p=o??(a===Cl.PENDING&&i?Wae:void 0);return Hae({enabled:!!(g&&i),queryKey:h}),xB({queryKey:h,queryFn:Kae({contract:d,functionName:n,args:r,blockIdentifier:a,parseArgs:c,parseResult:l}),refetchInterval:p,enabled:g,...u})}function Gae({chain:e,contract:t,functionName:n,args:r,blockIdentifier:a}){return[{entity:"readContract",chainId:e==null?void 0:e.name,contract:t==null?void 0:t.address,functionName:n,args:r,blockIdentifier:a}]}function Kae({contract:e,functionName:t,args:n,blockIdentifier:r,parseArgs:a=!0,parseResult:o=!0}){return async()=>{if(!e)throw new Error("contract is required");if(e.functions[t]===void 0)throw new Error(`function ${t} not found in contract`);return e.call(t,n,{parseRequest:a,parseResponse:o,blockIdentifier:r})}}function Yae(e={}){const{connector:t,connectors:n,connect:r,chain:a}=Ci(),{mutate:o,mutateAsync:i,variables:s,...c}=qS({mutationKey:[{entity:"connect",chainId:a.name}],mutationFn:r,...e}),l=_.useCallback(f=>o(f??{connector:t}),[o,t]),u=_.useCallback(f=>i(f??{connector:t}),[i,t]);return{connector:t,connectors:n,pendingConnector:s==null?void 0:s.connector,connect:l,connectAsync:u,variables:s,...c}}function Zae(e={}){const{disconnect:t,chain:n}=Ci(),{mutate:r,mutateAsync:a,...o}=qS({mutationKey:[{entity:"disconnect",chainId:n.name}],mutationFn:t,...e});return{disconnect:r,disconnectAsync:a,...o}}function Gu(e){return qae(e)}function Qae(e){const{calls:t,...n}=e,r=t?{calls:B0(t)}:void 0,{request:a,requestAsync:o,...i}=$ae({type:"wallet_addInvokeTransaction",params:r,...n});return{send:l=>a(l?{params:{calls:B0(l)},type:"wallet_addInvokeTransaction"}:void 0),sendAsync:l=>o(l?{params:{calls:B0(l)},type:"wallet_addInvokeTransaction"}:void 0),...i}}function B0(e){return e.map(t=>({contract_address:t.contractAddress,entry_point:t.entrypoint,calldata:t.calldata}))}function Xae({rpc:e}){return t=>{const n=e(t);if(!n)return null;const r=Iae(t.id);return new D5({...n,chainId:r})}}function Jae(){return Xae({rpc:e=>{const t=e.rpcUrls.public.http,n=t[Math.floor(Math.random()*t.length)];return n?{nodeUrl:n}:null}})}const eoe=["from-purple-500 to-indigo-600","from-blue-500 to-cyan-500","from-green-500 to-teal-500","from-red-500 to-pink-500","from-yellow-500 to-orange-500","from-gray-700 to-gray-900","from-indigo-500 to-purple-500","from-teal-500 to-green-500","from-orange-500 to-red-500","from-blue-400 to-blue-600"],jB=({onConnect:e})=>{const[t,n]=_.useState(!1),r=()=>{n(!t)},a=()=>{n(!0),e==null||e()};return E.jsxs(E.Fragment,{children:[E.jsxs(si,{onClick:a,children:[E.jsx(f7,{className:"mr-2 h-4 w-4"}),"Connect Wallet"]}),E.jsx(toe,{open:t,onToggleVisibility:r})]})},toe=({open:e,onToggleVisibility:t})=>{const{connectors:n,connectAsync:r}=Yae(),[a,o]=_.useState(null);return E.jsx(o$,{open:e,onOpenChange:t,children:E.jsxs(n_,{className:"sm:max-w-[425px]",children:[E.jsxs(r_,{children:[E.jsx(o_,{className:"text-2xl font-bold",children:"Connect Wallet"}),E.jsx(i_,{children:"Choose a wallet to connect with StarKitchen."})]}),E.jsx("div",{className:"max-h-[400px] overflow-y-auto py-4 pr-4 -mr-4",children:E.jsx("div",{className:"grid gap-4",children:n.map((i,s)=>E.jsxs("button",{disabled:a!==null,onClick:async()=>{o(s),await r({connector:i}),o(null)},className:`flex items-center justify-between px-4 py-3 bg-gradient-to-r ${eoe[s%n.length]} text-white rounded-lg hover:opacity-90 transition-all duration-200 shadow-md hover:shadow-lg ${a!==null?"opacity-50 cursor-not-allowed":""}`,children:[E.jsxs("div",{className:"flex items-center",children:[E.jsx("div",{className:"w-8 h-8 mr-3 bg-white rounded-full flex items-center justify-center",children:E.jsx("img",{src:typeof i.icon=="string"?i.icon:i.icon.light,width:20,height:20})}),E.jsx("span",{className:"text-lg font-semibold",children:i.name})]}),a===s?E.jsx(Xz,{className:"w-5 h-5 animate-spin"}):E.jsx(t7,{className:"w-5 h-5"})]},i.id))})}),E.jsx(a_,{children:E.jsx(s_,{className:"w-full sm:w-auto",children:"Cancel"})})]})})},noe=({onConnectWallet:e,wallet:t})=>{const[n,r]=_.useState(!1),{disconnect:a}=Zae(),o=_.useCallback(()=>{r(!1)},[]),i=_.useCallback(()=>{a(),o()},[]),s=()=>{r(!0)};return E.jsxs("header",{className:"bg-white shadow",children:[E.jsx("div",{className:"max-w-7xl mx-auto px-4 md:px-6 lg:px-8 py-4",children:E.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center",children:[E.jsxs("div",{className:"flex items-center space-x-4 mb-4 md:mb-0",children:[E.jsx("img",{src:`${c$}/starkitchen-logo-transparent.png`,alt:"StarKitchen Logo",className:"h-12"}),E.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"StarKitchen"})]}),E.jsx("div",{className:"flex items-center space-x-4",children:t!=null&&t.isConnected?E.jsxs("div",{className:"flex flex-col md:flex-row items-center space-y-2 md:space-y-0 md:space-x-4",children:[E.jsx("span",{className:"text-sm font-medium text-gray-500",children:l$((t==null?void 0:t.address)??"")}),E.jsxs(si,{variant:"ghost",size:"sm",onClick:s,children:[E.jsx(o7,{className:"h-4 w-4"}),E.jsx("span",{children:"Disconnect wallet"})]})]}):E.jsx(jB,{onConnect:e})})]})}),E.jsx(Dq,{onDisconnect:i,open:n,onClose:o})]})};function KS(e,t=[]){let n=[];function r(o,i){const s=_.createContext(i),c=n.length;n=[...n,i];function l(f){const{scope:d,children:h,...g}=f,p=(d==null?void 0:d[e][c])||s,m=_.useMemo(()=>g,Object.values(g));return E.jsx(p.Provider,{value:m,children:h})}function u(f,d){const h=(d==null?void 0:d[e][c])||s,g=_.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,u]}const a=()=>{const o=n.map(i=>_.createContext(i));return function(s){const c=(s==null?void 0:s[e])||o;return _.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return a.scopeName=e,[r,roe(a,...t)]}function roe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(o){const i=r.reduce((s,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...s,...f}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function _B(e){const t=e+"CollectionProvider",[n,r]=KS(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:p}=h,m=B.useRef(null),y=B.useRef(new Map).current;return E.jsx(a,{scope:g,itemMap:y,collectionRef:m,children:p})};i.displayName=t;const s=e+"CollectionSlot",c=B.forwardRef((h,g)=>{const{scope:p,children:m}=h,y=o(s,p),v=it(g,y.collectionRef);return E.jsx(Ns,{ref:v,children:m})});c.displayName=s;const l=e+"CollectionItemSlot",u="data-radix-collection-item",f=B.forwardRef((h,g)=>{const{scope:p,children:m,...y}=h,v=B.useRef(null),b=it(g,v),k=o(l,p);return B.useEffect(()=>(k.itemMap.set(v,{ref:v,...y}),()=>void k.itemMap.delete(v))),E.jsx(Ns,{[u]:"",ref:b,children:m})});f.displayName=l;function d(h){const g=o(e+"CollectionConsumer",h);return B.useCallback(()=>{const m=g.collectionRef.current;if(!m)return[];const y=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(g.itemMap.values()).sort((k,w)=>y.indexOf(k.ref.current)-y.indexOf(w.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:c,ItemSlot:f},d,r]}var aoe=_.createContext(void 0);function YS(e){const t=_.useContext(aoe);return e||t||"ltr"}var F0="rovingFocusGroup.onEntryFocus",ooe={bubbles:!1,cancelable:!0},qy="RovingFocusGroup",[vk,SB,ioe]=_B(qy),[soe,EB]=KS(qy,[ioe]),[coe,loe]=soe(qy),AB=_.forwardRef((e,t)=>E.jsx(vk.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(vk.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(uoe,{...e,ref:t})})}));AB.displayName=qy;var uoe=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...f}=e,d=_.useRef(null),h=it(t,d),g=YS(o),[p=null,m]=ad({prop:i,defaultProp:s,onChange:c}),[y,v]=_.useState(!1),b=_a(l),k=SB(n),w=_.useRef(!1),[x,j]=_.useState(0);return _.useEffect(()=>{const S=d.current;if(S)return S.addEventListener(F0,b),()=>S.removeEventListener(F0,b)},[b]),E.jsx(coe,{scope:n,orientation:r,dir:g,loop:a,currentTabStopId:p,onItemFocus:_.useCallback(S=>m(S),[m]),onItemShiftTab:_.useCallback(()=>v(!0),[]),onFocusableItemAdd:_.useCallback(()=>j(S=>S+1),[]),onFocusableItemRemove:_.useCallback(()=>j(S=>S-1),[]),children:E.jsx($e.div,{tabIndex:y||x===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:Ee(e.onMouseDown,()=>{w.current=!0}),onFocus:Ee(e.onFocus,S=>{const A=!w.current;if(S.target===S.currentTarget&&A&&!y){const C=new CustomEvent(F0,ooe);if(S.currentTarget.dispatchEvent(C),!C.defaultPrevented){const O=k().filter(I=>I.focusable),N=O.find(I=>I.active),L=O.find(I=>I.id===p),T=[N,L,...O].filter(Boolean).map(I=>I.ref.current);CB(T,u)}}w.current=!1}),onBlur:Ee(e.onBlur,()=>v(!1))})})}),OB="RovingFocusGroupItem",TB=_.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,...i}=e,s=ci(),c=o||s,l=loe(OB,n),u=l.currentTabStopId===c,f=SB(n),{onFocusableItemAdd:d,onFocusableItemRemove:h}=l;return _.useEffect(()=>{if(r)return d(),()=>h()},[r,d,h]),E.jsx(vk.ItemSlot,{scope:n,id:c,focusable:r,active:a,children:E.jsx($e.span,{tabIndex:u?0:-1,"data-orientation":l.orientation,...i,ref:t,onMouseDown:Ee(e.onMouseDown,g=>{r?l.onItemFocus(c):g.preventDefault()}),onFocus:Ee(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:Ee(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const p=poe(g,l.orientation,l.dir);if(p!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let y=f().filter(v=>v.focusable).map(v=>v.ref.current);if(p==="last")y.reverse();else if(p==="prev"||p==="next"){p==="prev"&&y.reverse();const v=y.indexOf(g.currentTarget);y=l.loop?hoe(y,v+1):y.slice(v+1)}setTimeout(()=>CB(y))}})})})});TB.displayName=OB;var foe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function doe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function poe(e,t,n){const r=doe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return foe[r]}function CB(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function hoe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var moe=AB,goe=TB,ZS="Tabs",[yoe,MIe]=my(ZS,[EB]),IB=EB(),[voe,QS]=yoe(ZS),PB=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:i="horizontal",dir:s,activationMode:c="automatic",...l}=e,u=YS(s),[f,d]=ad({prop:r,onChange:a,defaultProp:o});return E.jsx(voe,{scope:n,baseId:ci(),value:f,onValueChange:d,orientation:i,dir:u,activationMode:c,children:E.jsx($e.div,{dir:u,"data-orientation":i,...l,ref:t})})});PB.displayName=ZS;var NB="TabsList",MB=_.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=QS(NB,n),i=IB(n);return E.jsx(moe,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:E.jsx($e.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});MB.displayName=NB;var DB="TabsTrigger",zB=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,i=QS(DB,n),s=IB(n),c=LB(i.baseId,r),l=BB(i.baseId,r),u=r===i.value;return E.jsx(goe,{asChild:!0,...s,focusable:!a,active:u,children:E.jsx($e.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...o,ref:t,onMouseDown:Ee(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:Ee(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:Ee(e.onFocus,()=>{const f=i.activationMode!=="manual";!u&&!a&&f&&i.onValueChange(r)})})})});zB.displayName=DB;var $B="TabsContent",RB=_.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...i}=e,s=QS($B,n),c=LB(s.baseId,r),l=BB(s.baseId,r),u=r===s.value,f=_.useRef(u);return _.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),E.jsx(vp,{present:a||u,children:({present:d})=>E.jsx($e.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:l,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&o})})});RB.displayName=$B;function LB(e,t){return`${e}-trigger-${t}`}function BB(e,t){return`${e}-content-${t}`}var boe=PB,FB=MB,UB=zB,HB=RB;const woe=boe,VB=_.forwardRef(({className:e,...t},n)=>E.jsx(FB,{ref:n,className:be("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));VB.displayName=FB.displayName;const dm=_.forwardRef(({className:e,...t},n)=>E.jsx(UB,{ref:n,className:be("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));dm.displayName=UB.displayName;const pm=_.forwardRef(({className:e,...t},n)=>E.jsx(HB,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));pm.displayName=HB.displayName;var Fa=(e=>(e.MEAL_REGISTRATION="MEAL_REGISTRATION",e.STATS_AND_PREV_MEALS="STATS_AND_PREV_MEALS",e.MANAGEMENT="MANAGEMENT",e))(Fa||{});const Gs=_.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:be("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Gs.displayName="Card";const Dl=_.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));Dl.displayName="CardHeader";const Ad=_.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:be("font-semibold leading-none tracking-tight",e),...t}));Ad.displayName="CardTitle";const koe=_.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));koe.displayName="CardDescription";const Ks=_.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:be("p-6 pt-0",e),...t}));Ks.displayName="CardContent";const Gy=_.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:be("flex items-center p-6 pt-0",e),...t}));Gy.displayName="CardFooter";const xoe=r3("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function WB({className:e,variant:t,...n}){return E.jsx("div",{className:be(xoe({variant:t}),e),...n})}const joe=e=>{const t=document.createElement("div");document.body.appendChild(t);const n=Wj(t);return n==null||n.render(E.jsx(_oe,{text:e})),()=>{n==null||n.unmount(),document.body.removeChild(t)}},_oe=({text:e})=>E.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm flex items-center justify-center z-50",children:E.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-xl text-center",children:[E.jsx(Xz,{className:"h-12 w-12 animate-spin text-primary mx-auto mb-4"}),E.jsx("p",{className:"text-lg font-semibold",children:e})]})}),hm=({meal:e,onConnectWallet:t,updateMeal:n,isSuccessFetchingUserEvents:r=!1,isPastMeal:a=!1,isWalletConnected:o=!1,isAllowedUser:i=!1,isNextMeal:s=!1})=>{var h,g;const{contract:c}=GS({abi:Yi,address:Ki}),l=_.useMemo(()=>{if(c){if(e.info.registered)return[c.populate("unregister",[e.id])];if(i)return[c.populate("register",[e.id])]}},[e.info.registered,c,i]),{sendAsync:u}=Qae({calls:l}),f=p=>p.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric"}),d=async()=>{var m;let p;try{p=joe("Registering you to the selected meal...");const{transaction_hash:y}=await u();await((m=c==null?void 0:c.providerOrAccount)==null?void 0:m.waitForTransaction(y,{retryInterval:2e3})),n==null||n(e.id)}catch(y){console.error("Error: meal status update failed",y)}finally{p==null||p()}};return E.jsxs(Gs,{children:[E.jsx(Dl,{children:E.jsxs(Ad,{className:"flex justify-between items-center min-h-[30px]",children:[s?"Next Meal":a?"Meal Ended":"Future Meal",e.info.registered?E.jsx(WB,{variant:"secondary",className:"ml-2",children:"Registered"}):null]})}),E.jsxs(Ks,{children:[E.jsx("p",{className:"text-2xl font-semibold",children:f(new Date(Number(e.info.time.seconds)*1e3))}),((h=e==null?void 0:e.info)==null?void 0:h.number_of_participants)!==void 0?E.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:[E.jsx(Jz,{className:"inline-block mr-1 h-4 w-4"}),Number(e.info.number_of_participants)," registered"]}):null,E.jsxs("p",{className:"text-sm text-gray-700 mt-2",children:[E.jsx(l7,{className:"inline-block mr-1 h-4 w-4"}),"Catering:"," ",$L.decodeShortString(((g=e.info)==null?void 0:g.description)??"")??"Not Set Yet"]}),o&&!i&&r&&!e.info.registered?E.jsxs("div",{className:"flex items-center mt-2 text-red-500",children:[E.jsx(r7,{className:"w-4 h-4 mr-2"}),E.jsx("span",{className:"text-sm",children:"You're not allowed to register to meals, yet!"})]}):null]}),E.jsx(Gy,{children:o?E.jsx(si,{className:`w-full ${e.info.registered?"text-red-500 border-red-500 bg-red-50 hover:text-red-500 hover:border-red-500 hover:bg-red-100":""}`,onClick:d,disabled:o&&!i&&!e.info.registered,children:e.info.registered?E.jsxs(E.Fragment,{children:[E.jsx(d7,{className:"mr-2 h-4 w-4"}),"Unregister"]}):E.jsxs(E.Fragment,{children:[E.jsx(Zz,{className:"mr-2 h-4 w-4"}),"Register"]})}):E.jsx(jB,{onConnect:t})})]})};function Ku({className:e,...t}){return E.jsx("div",{className:be("animate-pulse rounded-md bg-primary/10",e),...t})}const U0=()=>E.jsxs(Gs,{children:[E.jsx(Dl,{children:E.jsx(Ku,{className:"h-6 w-3/4"})}),E.jsxs(Ks,{children:[E.jsx(Ku,{className:"h-8 w-full mb-2"}),E.jsx(Ku,{className:"h-6 w-1/2 mb-2"}),E.jsx(Ku,{className:"h-4 w-1/3"})]}),E.jsx(Gy,{children:E.jsx(Ku,{className:"h-10 w-full"})})]}),Soe=({isAllowedUser:e,onConnectWallet:t,updateMeal:n,futureMeals:r,pastMeals:a,loadingAllEvents:o,isSuccessFetchingUserEvents:i,isWalletConnected:s})=>!o&&!r[0]?E.jsx("div",{children:"No upcoming futureMeals to display"}):E.jsxs(E.Fragment,{children:[o?E.jsx(U0,{}):E.jsx(hm,{isSuccessFetchingUserEvents:i,updateMeal:n,onConnectWallet:t,isAllowedUser:e,meal:r[0],isWalletConnected:s,isNextMeal:!0}),E.jsxs("div",{children:[E.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Future Meals"}),E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:o?Array(6).fill(null).map((c,l)=>E.jsx(U0,{},l)):r.slice(1,7).map((c,l)=>E.jsx(hm,{isSuccessFetchingUserEvents:i,updateMeal:n,onConnectWallet:t,isAllowedUser:e,meal:c,isWalletConnected:s},c.id??l))}),E.jsx("h2",{className:"text-2xl font-bold mb-6 mt-12",children:"Past Meals"}),E.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:o?Array(6).fill(null).map((c,l)=>E.jsx(U0,{},l)):a.reverse().slice(0,6).map((c,l)=>E.jsx(hm,{isSuccessFetchingUserEvents:i,isPastMeal:!0,updateMeal:n,onConnectWallet:t,isAllowedUser:e,meal:c,isWalletConnected:s},c.id??l))})]})]});function SC(e,[t,n]){return Math.min(n,Math.max(t,e))}const Eoe=["top","right","bottom","left"],ki=Math.min,Bn=Math.max,rg=Math.round,_h=Math.floor,wa=e=>({x:e,y:e}),Aoe={left:"right",right:"left",bottom:"top",top:"bottom"},Ooe={start:"end",end:"start"};function bk(e,t,n){return Bn(e,ki(t,n))}function co(e,t){return typeof e=="function"?e(t):e}function lo(e){return e.split("-")[0]}function bu(e){return e.split("-")[1]}function XS(e){return e==="x"?"y":"x"}function JS(e){return e==="y"?"height":"width"}function xi(e){return["top","bottom"].includes(lo(e))?"y":"x"}function eE(e){return XS(xi(e))}function Toe(e,t,n){n===void 0&&(n=!1);const r=bu(e),a=eE(e),o=JS(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ag(i)),[i,ag(i)]}function Coe(e){const t=ag(e);return[wk(e),t,wk(t)]}function wk(e){return e.replace(/start|end/g,t=>Ooe[t])}function Ioe(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:i;default:return[]}}function Poe(e,t,n,r){const a=bu(e);let o=Ioe(lo(e),n==="start",r);return a&&(o=o.map(i=>i+"-"+a),t&&(o=o.concat(o.map(wk)))),o}function ag(e){return e.replace(/left|right|bottom|top/g,t=>Aoe[t])}function Noe(e){return{top:0,right:0,bottom:0,left:0,...e}}function qB(e){return typeof e!="number"?Noe(e):{top:e,right:e,bottom:e,left:e}}function og(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function EC(e,t,n){let{reference:r,floating:a}=e;const o=xi(t),i=eE(t),s=JS(i),c=lo(t),l=o==="y",u=r.x+r.width/2-a.width/2,f=r.y+r.height/2-a.height/2,d=r[s]/2-a[s]/2;let h;switch(c){case"top":h={x:u,y:r.y-a.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-a.width,y:f};break;default:h={x:r.x,y:r.y}}switch(bu(t)){case"start":h[i]-=d*(n&&l?-1:1);break;case"end":h[i]+=d*(n&&l?-1:1);break}return h}const Moe=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:f}=EC(l,r,c),d=r,h={},g=0;for(let p=0;p({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=co(e,t)||{};if(l==null)return{};const f=qB(u),d={x:n,y:r},h=eE(a),g=JS(h),p=await i.getDimensions(l),m=h==="y",y=m?"top":"left",v=m?"bottom":"right",b=m?"clientHeight":"clientWidth",k=o.reference[g]+o.reference[h]-d[h]-o.floating[g],w=d[h]-o.reference[h],x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let j=x?x[b]:0;(!j||!await(i.isElement==null?void 0:i.isElement(x)))&&(j=s.floating[b]||o.floating[g]);const S=k/2-w/2,A=j/2-p[g]/2-1,C=ki(f[y],A),O=ki(f[v],A),N=C,L=j-p[g]-O,z=j/2-p[g]/2+S,T=bk(N,z,L),I=!c.arrow&&bu(a)!=null&&z!==T&&o.reference[g]/2-(zz<=0)){var O,N;const z=(((O=o.flip)==null?void 0:O.index)||0)+1,T=j[z];if(T)return{data:{index:z,overflows:C},reset:{placement:T}};let I=(N=C.filter(M=>M.overflows[0]<=0).sort((M,P)=>M.overflows[1]-P.overflows[1])[0])==null?void 0:N.placement;if(!I)switch(h){case"bestFit":{var L;const M=(L=C.filter(P=>{if(x){const D=xi(P.placement);return D===v||D==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,U)=>D+U,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:L[0];M&&(I=M);break}case"initialPlacement":I=s;break}if(a!==I)return{reset:{placement:I}}}return{}}}};function AC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function OC(e){return Eoe.some(t=>e[t]>=0)}const $oe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=co(e,t);switch(r){case"referenceHidden":{const o=await Od(t,{...a,elementContext:"reference"}),i=AC(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:OC(i)}}}case"escaped":{const o=await Od(t,{...a,altBoundary:!0}),i=AC(o,n.floating);return{data:{escapedOffsets:i,escaped:OC(i)}}}default:return{}}}}};async function Roe(e,t){const{placement:n,platform:r,elements:a}=e,o=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=lo(n),s=bu(n),c=xi(n)==="y",l=["left","top"].includes(i)?-1:1,u=o&&c?-1:1,f=co(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(h=s==="end"?g*-1:g),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const Loe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,c=await Roe(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},Boe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:m=>{let{x:y,y:v}=m;return{x:y,y:v}}},...c}=co(e,t),l={x:n,y:r},u=await Od(t,c),f=xi(lo(a)),d=XS(f);let h=l[d],g=l[f];if(o){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=h+u[m],b=h-u[y];h=bk(v,h,b)}if(i){const m=f==="y"?"top":"left",y=f==="y"?"bottom":"right",v=g+u[m],b=g-u[y];g=bk(v,g,b)}const p=s.fn({...t,[d]:h,[f]:g});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[d]:o,[f]:i}}}}}},Foe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=co(e,t),u={x:n,y:r},f=xi(a),d=XS(f);let h=u[d],g=u[f];const p=co(s,t),m=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const b=d==="y"?"height":"width",k=o.reference[d]-o.floating[b]+m.mainAxis,w=o.reference[d]+o.reference[b]-m.mainAxis;hw&&(h=w)}if(l){var y,v;const b=d==="y"?"width":"height",k=["top","left"].includes(lo(a)),w=o.reference[f]-o.floating[b]+(k&&((y=i.offset)==null?void 0:y[f])||0)+(k?0:m.crossAxis),x=o.reference[f]+o.reference[b]+(k?0:((v=i.offset)==null?void 0:v[f])||0)-(k?m.crossAxis:0);gx&&(g=x)}return{[d]:h,[f]:g}}}},Uoe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:c=()=>{},...l}=co(e,t),u=await Od(t,l),f=lo(a),d=bu(a),h=xi(a)==="y",{width:g,height:p}=o.floating;let m,y;f==="top"||f==="bottom"?(m=f,y=d===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=f,m=d==="end"?"top":"bottom");const v=p-u.top-u.bottom,b=g-u.left-u.right,k=ki(p-u[m],v),w=ki(g-u[y],b),x=!t.middlewareData.shift;let j=k,S=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=v),x&&!d){const C=Bn(u.left,0),O=Bn(u.right,0),N=Bn(u.top,0),L=Bn(u.bottom,0);h?S=g-2*(C!==0||O!==0?C+O:Bn(u.left,u.right)):j=p-2*(N!==0||L!==0?N+L:Bn(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:j});const A=await i.getDimensions(s.floating);return g!==A.width||p!==A.height?{reset:{rects:!0}}:{}}}};function Ky(){return typeof window<"u"}function wu(e){return GB(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ia(e){var t;return(t=(GB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GB(e){return Ky()?e instanceof Node||e instanceof qn(e).Node:!1}function Br(e){return Ky()?e instanceof Element||e instanceof qn(e).Element:!1}function Oa(e){return Ky()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function TC(e){return!Ky()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}function Pp(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function Hoe(e){return["table","td","th"].includes(wu(e))}function Yy(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function tE(e){const t=nE(),n=Br(e)?Fr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Voe(e){let t=ji(e);for(;Oa(t)&&!zl(t);){if(tE(t))return t;if(Yy(t))return null;t=ji(t)}return null}function nE(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zl(e){return["html","body","#document"].includes(wu(e))}function Fr(e){return qn(e).getComputedStyle(e)}function Zy(e){return Br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ji(e){if(wu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||TC(e)&&e.host||Ia(e);return TC(t)?t.host:t}function KB(e){const t=ji(e);return zl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oa(t)&&Pp(t)?t:KB(t)}function Td(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=KB(e),o=a===((r=e.ownerDocument)==null?void 0:r.body),i=qn(a);if(o){const s=kk(i);return t.concat(i,i.visualViewport||[],Pp(a)?a:[],s&&n?Td(s):[])}return t.concat(a,Td(a,[],n))}function kk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function YB(e){const t=Fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Oa(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=rg(n)!==o||rg(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function rE(e){return Br(e)?e:e.contextElement}function Xc(e){const t=rE(e);if(!Oa(t))return wa(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=YB(t);let i=(o?rg(n.width):n.width)/r,s=(o?rg(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Woe=wa(0);function ZB(e){const t=qn(e);return!nE()||!t.visualViewport?Woe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qoe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function Ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=rE(e);let i=wa(1);t&&(r?Br(r)&&(i=Xc(r)):i=Xc(e));const s=qoe(o,n,r)?ZB(o):wa(0);let c=(a.left+s.x)/i.x,l=(a.top+s.y)/i.y,u=a.width/i.x,f=a.height/i.y;if(o){const d=qn(o),h=r&&Br(r)?qn(r):r;let g=d,p=kk(g);for(;p&&r&&h!==g;){const m=Xc(p),y=p.getBoundingClientRect(),v=Fr(p),b=y.left+(p.clientLeft+parseFloat(v.paddingLeft))*m.x,k=y.top+(p.clientTop+parseFloat(v.paddingTop))*m.y;c*=m.x,l*=m.y,u*=m.x,f*=m.y,c+=b,l+=k,g=qn(p),p=kk(g)}}return og({width:u,height:f,x:c,y:l})}function aE(e,t){const n=Zy(e).scrollLeft;return t?t.left+n:Ys(Ia(e)).left+n}function QB(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-(n?0:aE(e,r)),o=r.top+t.scrollTop;return{x:a,y:o}}function Goe(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=a==="fixed",i=Ia(r),s=t?Yy(t.floating):!1;if(r===i||s&&o)return n;let c={scrollLeft:0,scrollTop:0},l=wa(1);const u=wa(0),f=Oa(r);if((f||!f&&!o)&&((wu(r)!=="body"||Pp(i))&&(c=Zy(r)),Oa(r))){const h=Ys(r);l=Xc(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const d=i&&!f&&!o?QB(i,c,!0):wa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+d.x,y:n.y*l.y-c.scrollTop*l.y+u.y+d.y}}function Koe(e){return Array.from(e.getClientRects())}function Yoe(e){const t=Ia(e),n=Zy(e),r=e.ownerDocument.body,a=Bn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Bn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+aE(e);const s=-n.scrollTop;return Fr(r).direction==="rtl"&&(i+=Bn(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}function Zoe(e,t){const n=qn(e),r=Ia(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,c=0;if(a){o=a.width,i=a.height;const l=nE();(!l||l&&t==="fixed")&&(s=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:s,y:c}}function Qoe(e,t){const n=Ys(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=Oa(e)?Xc(e):wa(1),i=e.clientWidth*o.x,s=e.clientHeight*o.y,c=a*o.x,l=r*o.y;return{width:i,height:s,x:c,y:l}}function CC(e,t,n){let r;if(t==="viewport")r=Zoe(e,n);else if(t==="document")r=Yoe(Ia(e));else if(Br(t))r=Qoe(t,n);else{const a=ZB(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return og(r)}function XB(e,t){const n=ji(e);return n===t||!Br(n)||zl(n)?!1:Fr(n).position==="fixed"||XB(n,t)}function Xoe(e,t){const n=t.get(e);if(n)return n;let r=Td(e,[],!1).filter(s=>Br(s)&&wu(s)!=="body"),a=null;const o=Fr(e).position==="fixed";let i=o?ji(e):e;for(;Br(i)&&!zl(i);){const s=Fr(i),c=tE(i);!c&&s.position==="fixed"&&(a=null),(o?!c&&!a:!c&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||Pp(i)&&!c&&XB(e,i))?r=r.filter(u=>u!==i):a=s,i=ji(i)}return t.set(e,r),r}function Joe(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?Yy(t)?[]:Xoe(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((l,u)=>{const f=CC(t,u,a);return l.top=Bn(f.top,l.top),l.right=ki(f.right,l.right),l.bottom=ki(f.bottom,l.bottom),l.left=Bn(f.left,l.left),l},CC(t,s,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function eie(e){const{width:t,height:n}=YB(e);return{width:t,height:n}}function tie(e,t,n){const r=Oa(t),a=Ia(t),o=n==="fixed",i=Ys(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const c=wa(0);if(r||!r&&!o)if((wu(t)!=="body"||Pp(a))&&(s=Zy(t)),r){const d=Ys(t,!0,o,t);c.x=d.x+t.clientLeft,c.y=d.y+t.clientTop}else a&&(c.x=aE(a));const l=a&&!r&&!o?QB(a,s):wa(0),u=i.left+s.scrollLeft-c.x-l.x,f=i.top+s.scrollTop-c.y-l.y;return{x:u,y:f,width:i.width,height:i.height}}function H0(e){return Fr(e).position==="static"}function IC(e,t){if(!Oa(e)||Fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ia(e)===n&&(n=n.ownerDocument.body),n}function JB(e,t){const n=qn(e);if(Yy(e))return n;if(!Oa(e)){let a=ji(e);for(;a&&!zl(a);){if(Br(a)&&!H0(a))return a;a=ji(a)}return n}let r=IC(e,t);for(;r&&Hoe(r)&&H0(r);)r=IC(r,t);return r&&zl(r)&&H0(r)&&!tE(r)?n:r||Voe(e)||n}const nie=async function(e){const t=this.getOffsetParent||JB,n=this.getDimensions,r=await n(e.floating);return{reference:tie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rie(e){return Fr(e).direction==="rtl"}const aie={convertOffsetParentRelativeRectToViewportRelativeRect:Goe,getDocumentElement:Ia,getClippingRect:Joe,getOffsetParent:JB,getElementRects:nie,getClientRects:Koe,getDimensions:eie,getScale:Xc,isElement:Br,isRTL:rie};function oie(e,t){let n=null,r;const a=Ia(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),o();const{left:l,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const h=_h(u),g=_h(a.clientWidth-(l+f)),p=_h(a.clientHeight-(u+d)),m=_h(l),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-m+"px",threshold:Bn(0,ki(1,c))||1};let b=!0;function k(w){const x=w[0].intersectionRatio;if(x!==c){if(!b)return i();x?i(!1,x):r=setTimeout(()=>{i(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...v,root:a.ownerDocument})}catch{n=new IntersectionObserver(k,v)}n.observe(e)}return i(!0),o}function iie(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=rE(e),u=a||o?[...l?Td(l):[],...Td(t)]:[];u.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const f=l&&s?oie(l,n):null;let d=-1,h=null;i&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),l&&!c&&h.observe(l),h.observe(t));let g,p=c?Ys(e):null;c&&m();function m(){const y=Ys(e);p&&(y.x!==p.x||y.y!==p.y||y.width!==p.width||y.height!==p.height)&&n(),p=y,g=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(v=>{a&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const sie=Loe,cie=Boe,lie=zoe,uie=Uoe,fie=$oe,PC=Doe,die=Foe,pie=(e,t,n)=>{const r=new Map,a={platform:aie,...n},o={...a.platform,_c:r};return Moe(e,t,{...a,platform:o})};var mm=typeof document<"u"?_.useLayoutEffect:_.useEffect;function ig(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ig(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const o=a[r];if(!(o==="_owner"&&e.$$typeof)&&!ig(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function e6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function NC(e,t){const n=e6(e);return Math.round(t*n)/n}function V0(e){const t=_.useRef(e);return mm(()=>{t.current=e}),t}function hie(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=_.useState(r);ig(d,r)||h(r);const[g,p]=_.useState(null),[m,y]=_.useState(null),v=_.useCallback(P=>{P!==x.current&&(x.current=P,p(P))},[]),b=_.useCallback(P=>{P!==j.current&&(j.current=P,y(P))},[]),k=o||g,w=i||m,x=_.useRef(null),j=_.useRef(null),S=_.useRef(u),A=c!=null,C=V0(c),O=V0(a),N=V0(l),L=_.useCallback(()=>{if(!x.current||!j.current)return;const P={placement:t,strategy:n,middleware:d};O.current&&(P.platform=O.current),pie(x.current,j.current,P).then(D=>{const U={...D,isPositioned:N.current!==!1};z.current&&!ig(S.current,U)&&(S.current=U,cu.flushSync(()=>{f(U)}))})},[d,t,n,O,N]);mm(()=>{l===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[l]);const z=_.useRef(!1);mm(()=>(z.current=!0,()=>{z.current=!1}),[]),mm(()=>{if(k&&(x.current=k),w&&(j.current=w),k&&w){if(C.current)return C.current(k,w,L);L()}},[k,w,L,C,A]);const T=_.useMemo(()=>({reference:x,floating:j,setReference:v,setFloating:b}),[v,b]),I=_.useMemo(()=>({reference:k,floating:w}),[k,w]),M=_.useMemo(()=>{const P={position:n,left:0,top:0};if(!I.floating)return P;const D=NC(I.floating,u.x),U=NC(I.floating,u.y);return s?{...P,transform:"translate("+D+"px, "+U+"px)",...e6(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:U}},[n,s,I.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:L,refs:T,elements:I,floatingStyles:M}),[u,L,T,I,M])}const mie=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?PC({element:r.current,padding:a}).fn(n):{}:r?PC({element:r,padding:a}).fn(n):{}}}},gie=(e,t)=>({...sie(e),options:[e,t]}),yie=(e,t)=>({...cie(e),options:[e,t]}),vie=(e,t)=>({...die(e),options:[e,t]}),bie=(e,t)=>({...lie(e),options:[e,t]}),wie=(e,t)=>({...uie(e),options:[e,t]}),kie=(e,t)=>({...fie(e),options:[e,t]}),xie=(e,t)=>({...mie(e),options:[e,t]});var jie="Arrow",t6=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return E.jsx($e.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});t6.displayName=jie;var _ie=t6;function Sie(e){const[t,n]=_.useState(void 0);return gn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let i,s;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,s=l.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var oE="Popper",[n6,r6]=KS(oE),[Eie,a6]=n6(oE),o6=e=>{const{__scopePopper:t,children:n}=e,[r,a]=_.useState(null);return E.jsx(Eie,{scope:t,anchor:r,onAnchorChange:a,children:n})};o6.displayName=oE;var i6="PopperAnchor",s6=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=a6(i6,n),i=_.useRef(null),s=it(t,i);return _.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:E.jsx($e.div,{...a,ref:s})});s6.displayName=i6;var iE="PopperContent",[Aie,Oie]=n6(iE),c6=_.forwardRef((e,t)=>{var Q,te,V,Z,J,F;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:o="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:g,...p}=e,m=a6(iE,n),[y,v]=_.useState(null),b=it(t,re=>v(re)),[k,w]=_.useState(null),x=Sie(k),j=(x==null?void 0:x.width)??0,S=(x==null?void 0:x.height)??0,A=r+(o!=="center"?"-"+o:""),C=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],N=O.length>0,L={padding:C,boundary:O.filter(Cie),altBoundary:N},{refs:z,floatingStyles:T,placement:I,isPositioned:M,middlewareData:P}=hie({strategy:"fixed",placement:A,whileElementsMounted:(...re)=>iie(...re,{animationFrame:h==="always"}),elements:{reference:m.anchor},middleware:[gie({mainAxis:a+S,alignmentAxis:i}),c&&yie({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?vie():void 0,...L}),c&&bie({...L}),wie({...L,apply:({elements:re,rects:ce,availableWidth:je,availableHeight:we})=>{const{width:tt,height:Zn}=ce.reference,X=re.floating.style;X.setProperty("--radix-popper-available-width",`${je}px`),X.setProperty("--radix-popper-available-height",`${we}px`),X.setProperty("--radix-popper-anchor-width",`${tt}px`),X.setProperty("--radix-popper-anchor-height",`${Zn}px`)}}),k&&xie({element:k,padding:s}),Iie({arrowWidth:j,arrowHeight:S}),d&&kie({strategy:"referenceHidden",...L})]}),[D,U]=f6(I),W=_a(g);gn(()=>{M&&(W==null||W())},[M,W]);const q=(Q=P.arrow)==null?void 0:Q.x,ne=(te=P.arrow)==null?void 0:te.y,$=((V=P.arrow)==null?void 0:V.centerOffset)!==0,[H,G]=_.useState();return gn(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),E.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:M?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(Z=P.transformOrigin)==null?void 0:Z.x,(J=P.transformOrigin)==null?void 0:J.y].join(" "),...((F=P.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(Aie,{scope:n,placedSide:D,onArrowChange:w,arrowX:q,arrowY:ne,shouldHideArrow:$,children:E.jsx($e.div,{"data-side":D,"data-align":U,...p,ref:b,style:{...p.style,animation:M?void 0:"none"}})})})});c6.displayName=iE;var l6="PopperArrow",Tie={top:"bottom",right:"left",bottom:"top",left:"right"},u6=_.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,o=Oie(l6,r),i=Tie[o.placedSide];return E.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:E.jsx(_ie,{...a,ref:n,style:{...a.style,display:"block"}})})});u6.displayName=l6;function Cie(e){return e!==null}var Iie=e=>({name:"transformOrigin",options:e,fn(t){var m,y,v;const{placement:n,rects:r,middlewareData:a}=t,i=((m=a.arrow)==null?void 0:m.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=f6(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(((y=a.arrow)==null?void 0:y.x)??0)+s/2,h=(((v=a.arrow)==null?void 0:v.y)??0)+c/2;let g="",p="";return l==="bottom"?(g=i?f:`${d}px`,p=`${-c}px`):l==="top"?(g=i?f:`${d}px`,p=`${r.floating.height+c}px`):l==="right"?(g=`${-c}px`,p=i?f:`${h}px`):l==="left"&&(g=`${r.floating.width+c}px`,p=i?f:`${h}px`),{data:{x:g,y:p}}}});function f6(e){const[t,n="center"]=e.split("-");return[t,n]}var Pie=o6,Nie=s6,Mie=c6,Die=u6;function zie(e){const t=_.useRef({value:e,previous:e});return _.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $ie="VisuallyHidden",d6=_.forwardRef((e,t)=>E.jsx($e.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));d6.displayName=$ie;var Rie=[" ","Enter","ArrowUp","ArrowDown"],Lie=[" ","Enter"],Np="Select",[Qy,Xy,Bie]=_B(Np),[ku,DIe]=my(Np,[Bie,r6]),Jy=r6(),[Fie,Ii]=ku(Np),[Uie,Hie]=ku(Np),p6=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:h,form:g}=e,p=Jy(t),[m,y]=_.useState(null),[v,b]=_.useState(null),[k,w]=_.useState(!1),x=YS(l),[j=!1,S]=ad({prop:r,defaultProp:a,onChange:o}),[A,C]=ad({prop:i,defaultProp:s,onChange:c}),O=_.useRef(null),N=m?g||!!m.closest("form"):!0,[L,z]=_.useState(new Set),T=Array.from(L).map(I=>I.props.value).join(";");return E.jsx(Pie,{...p,children:E.jsxs(Fie,{required:h,scope:t,trigger:m,onTriggerChange:y,valueNode:v,onValueNodeChange:b,valueNodeHasChildren:k,onValueNodeHasChildrenChange:w,contentId:ci(),value:A,onValueChange:C,open:j,onOpenChange:S,dir:x,triggerPointerDownPosRef:O,disabled:d,children:[E.jsx(Qy.Provider,{scope:t,children:E.jsx(Uie,{scope:e.__scopeSelect,onNativeOptionAdd:_.useCallback(I=>{z(M=>new Set(M).add(I))},[]),onNativeOptionRemove:_.useCallback(I=>{z(M=>{const P=new Set(M);return P.delete(I),P})},[]),children:n})}),N?E.jsxs(R6,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:A,onChange:I=>C(I.target.value),disabled:d,form:g,children:[A===void 0?E.jsx("option",{value:""}):null,Array.from(L)]},T):null]})})};p6.displayName=Np;var h6="SelectTrigger",m6=_.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=Jy(n),i=Ii(h6,n),s=i.disabled||r,c=it(t,i.onTriggerChange),l=Xy(n),u=_.useRef("touch"),[f,d,h]=L6(p=>{const m=l().filter(b=>!b.disabled),y=m.find(b=>b.value===i.value),v=B6(m,p,y);v!==void 0&&i.onValueChange(v.value)}),g=p=>{s||(i.onOpenChange(!0),h()),p&&(i.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return E.jsx(Nie,{asChild:!0,...o,children:E.jsx($e.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":$6(i.value)?"":void 0,...a,ref:c,onClick:Ee(a.onClick,p=>{p.currentTarget.focus(),u.current!=="mouse"&&g(p)}),onPointerDown:Ee(a.onPointerDown,p=>{u.current=p.pointerType;const m=p.target;m.hasPointerCapture(p.pointerId)&&m.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(g(p),p.preventDefault())}),onKeyDown:Ee(a.onKeyDown,p=>{const m=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&d(p.key),!(m&&p.key===" ")&&Rie.includes(p.key)&&(g(),p.preventDefault())})})})});m6.displayName=h6;var g6="SelectValue",y6=_.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,c=Ii(g6,n),{onValueNodeHasChildrenChange:l}=c,u=o!==void 0,f=it(t,c.onValueNodeChange);return gn(()=>{l(u)},[l,u]),E.jsx($e.span,{...s,ref:f,style:{pointerEvents:"none"},children:$6(c.value)?E.jsx(E.Fragment,{children:i}):o})});y6.displayName=g6;var Vie="SelectIcon",v6=_.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return E.jsx($e.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});v6.displayName=Vie;var Wie="SelectPortal",b6=e=>E.jsx(Zj,{asChild:!0,...e});b6.displayName=Wie;var Zs="SelectContent",w6=_.forwardRef((e,t)=>{const n=Ii(Zs,e.__scopeSelect),[r,a]=_.useState();if(gn(()=>{a(new DocumentFragment)},[]),!n.open){const o=r;return o?cu.createPortal(E.jsx(k6,{scope:e.__scopeSelect,children:E.jsx(Qy.Slot,{scope:e.__scopeSelect,children:E.jsx("div",{children:e.children})})}),o):null}return E.jsx(x6,{...e,ref:t})});w6.displayName=Zs;var jr=10,[k6,Pi]=ku(Zs),qie="SelectContentImpl",x6=_.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:g,hideWhenDetached:p,avoidCollisions:m,...y}=e,v=Ii(Zs,n),[b,k]=_.useState(null),[w,x]=_.useState(null),j=it(t,Q=>k(Q)),[S,A]=_.useState(null),[C,O]=_.useState(null),N=Xy(n),[L,z]=_.useState(!1),T=_.useRef(!1);_.useEffect(()=>{if(b)return x3(b)},[b]),p3();const I=_.useCallback(Q=>{const[te,...V]=N().map(F=>F.ref.current),[Z]=V.slice(-1),J=document.activeElement;for(const F of Q)if(F===J||(F==null||F.scrollIntoView({block:"nearest"}),F===te&&w&&(w.scrollTop=0),F===Z&&w&&(w.scrollTop=w.scrollHeight),F==null||F.focus(),document.activeElement!==J))return},[N,w]),M=_.useCallback(()=>I([S,b]),[I,S,b]);_.useEffect(()=>{L&&M()},[L,M]);const{onOpenChange:P,triggerPointerDownPosRef:D}=v;_.useEffect(()=>{if(b){let Q={x:0,y:0};const te=Z=>{var J,F;Q={x:Math.abs(Math.round(Z.pageX)-(((J=D.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((F=D.current)==null?void 0:F.y)??0))}},V=Z=>{Q.x<=10&&Q.y<=10?Z.preventDefault():b.contains(Z.target)||P(!1),document.removeEventListener("pointermove",te),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",V,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",V,{capture:!0})}}},[b,P,D]),_.useEffect(()=>{const Q=()=>P(!1);return window.addEventListener("blur",Q),window.addEventListener("resize",Q),()=>{window.removeEventListener("blur",Q),window.removeEventListener("resize",Q)}},[P]);const[U,W]=L6(Q=>{const te=N().filter(J=>!J.disabled),V=te.find(J=>J.ref.current===document.activeElement),Z=B6(te,Q,V);Z&&setTimeout(()=>Z.ref.current.focus())}),q=_.useCallback((Q,te,V)=>{const Z=!T.current&&!V;(v.value!==void 0&&v.value===te||Z)&&(A(Q),Z&&(T.current=!0))},[v.value]),ne=_.useCallback(()=>b==null?void 0:b.focus(),[b]),$=_.useCallback((Q,te,V)=>{const Z=!T.current&&!V;(v.value!==void 0&&v.value===te||Z)&&O(Q)},[v.value]),H=r==="popper"?xk:j6,G=H===xk?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:g,hideWhenDetached:p,avoidCollisions:m}:{};return E.jsx(k6,{scope:n,content:b,viewport:w,onViewportChange:x,itemRefCallback:q,selectedItem:S,onItemLeave:ne,itemTextRefCallback:$,focusSelectedItem:M,selectedItemText:C,position:r,isPositioned:L,searchRef:U,children:E.jsx(Qj,{as:Ns,allowPinchZoom:!0,children:E.jsx(Yj,{asChild:!0,trapped:v.open,onMountAutoFocus:Q=>{Q.preventDefault()},onUnmountAutoFocus:Ee(a,Q=>{var te;(te=v.trigger)==null||te.focus({preventScroll:!0}),Q.preventDefault()}),children:E.jsx(Kj,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:Q=>Q.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:E.jsx(H,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:Q=>Q.preventDefault(),...y,...G,onPlaced:()=>z(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ee(y.onKeyDown,Q=>{const te=Q.ctrlKey||Q.altKey||Q.metaKey;if(Q.key==="Tab"&&Q.preventDefault(),!te&&Q.key.length===1&&W(Q.key),["ArrowUp","ArrowDown","Home","End"].includes(Q.key)){let Z=N().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(Q.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(Q.key)){const J=Q.target,F=Z.indexOf(J);Z=Z.slice(F+1)}setTimeout(()=>I(Z)),Q.preventDefault()}})})})})})})});x6.displayName=qie;var Gie="SelectItemAlignedPosition",j6=_.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Ii(Zs,n),i=Pi(Zs,n),[s,c]=_.useState(null),[l,u]=_.useState(null),f=it(t,j=>u(j)),d=Xy(n),h=_.useRef(!1),g=_.useRef(!0),{viewport:p,selectedItem:m,selectedItemText:y,focusSelectedItem:v}=i,b=_.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&p&&m&&y){const j=o.trigger.getBoundingClientRect(),S=l.getBoundingClientRect(),A=o.valueNode.getBoundingClientRect(),C=y.getBoundingClientRect();if(o.dir!=="rtl"){const J=C.left-S.left,F=A.left-J,re=j.left-F,ce=j.width+re,je=Math.max(ce,S.width),we=window.innerWidth-jr,tt=SC(F,[jr,Math.max(jr,we-je)]);s.style.minWidth=ce+"px",s.style.left=tt+"px"}else{const J=S.right-C.right,F=window.innerWidth-A.right-J,re=window.innerWidth-j.right-F,ce=j.width+re,je=Math.max(ce,S.width),we=window.innerWidth-jr,tt=SC(F,[jr,Math.max(jr,we-je)]);s.style.minWidth=ce+"px",s.style.right=tt+"px"}const O=d(),N=window.innerHeight-jr*2,L=p.scrollHeight,z=window.getComputedStyle(l),T=parseInt(z.borderTopWidth,10),I=parseInt(z.paddingTop,10),M=parseInt(z.borderBottomWidth,10),P=parseInt(z.paddingBottom,10),D=T+I+L+P+M,U=Math.min(m.offsetHeight*5,D),W=window.getComputedStyle(p),q=parseInt(W.paddingTop,10),ne=parseInt(W.paddingBottom,10),$=j.top+j.height/2-jr,H=N-$,G=m.offsetHeight/2,Q=m.offsetTop+G,te=T+I+Q,V=D-te;if(te<=$){const J=O.length>0&&m===O[O.length-1].ref.current;s.style.bottom="0px";const F=l.clientHeight-p.offsetTop-p.offsetHeight,re=Math.max(H,G+(J?ne:0)+F+M),ce=te+re;s.style.height=ce+"px"}else{const J=O.length>0&&m===O[0].ref.current;s.style.top="0px";const re=Math.max($,T+p.offsetTop+(J?q:0)+G)+V;s.style.height=re+"px",p.scrollTop=te-$+p.offsetTop}s.style.margin=`${jr}px 0`,s.style.minHeight=U+"px",s.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,o.trigger,o.valueNode,s,l,p,m,y,o.dir,r]);gn(()=>b(),[b]);const[k,w]=_.useState();gn(()=>{l&&w(window.getComputedStyle(l).zIndex)},[l]);const x=_.useCallback(j=>{j&&g.current===!0&&(b(),v==null||v(),g.current=!1)},[b,v]);return E.jsx(Yie,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:x,children:E.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:E.jsx($e.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});j6.displayName=Gie;var Kie="SelectPopperPosition",xk=_.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=jr,...o}=e,i=Jy(n);return E.jsx(Mie,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xk.displayName=Kie;var[Yie,sE]=ku(Zs,{}),jk="SelectViewport",_6=_.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=Pi(jk,n),i=sE(jk,n),s=it(t,o.onViewportChange),c=_.useRef(0);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),E.jsx(Qy.Slot,{scope:n,children:E.jsx($e.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ee(a.onScroll,l=>{const u=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&f){const h=Math.abs(c.current-u.scrollTop);if(h>0){const g=window.innerHeight-jr*2,p=parseFloat(f.style.minHeight),m=parseFloat(f.style.height),y=Math.max(p,m);if(y0?k:0,f.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});_6.displayName=jk;var S6="SelectGroup",[Zie,Qie]=ku(S6),Xie=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=ci();return E.jsx(Zie,{scope:n,id:a,children:E.jsx($e.div,{role:"group","aria-labelledby":a,...r,ref:t})})});Xie.displayName=S6;var E6="SelectLabel",A6=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Qie(E6,n);return E.jsx($e.div,{id:a.id,...r,ref:t})});A6.displayName=E6;var sg="SelectItem",[Jie,O6]=ku(sg),T6=_.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=Ii(sg,n),c=Pi(sg,n),l=s.value===r,[u,f]=_.useState(o??""),[d,h]=_.useState(!1),g=it(t,v=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,v,r,a)}),p=ci(),m=_.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return E.jsx(Jie,{scope:n,value:r,disabled:a,textId:p,isSelected:l,onItemTextChange:_.useCallback(v=>{f(b=>b||((v==null?void 0:v.textContent)??"").trim())},[]),children:E.jsx(Qy.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:E.jsx($e.div,{role:"option","aria-labelledby":p,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:g,onFocus:Ee(i.onFocus,()=>h(!0)),onBlur:Ee(i.onBlur,()=>h(!1)),onClick:Ee(i.onClick,()=>{m.current!=="mouse"&&y()}),onPointerUp:Ee(i.onPointerUp,()=>{m.current==="mouse"&&y()}),onPointerDown:Ee(i.onPointerDown,v=>{m.current=v.pointerType}),onPointerMove:Ee(i.onPointerMove,v=>{var b;m.current=v.pointerType,a?(b=c.onItemLeave)==null||b.call(c):m.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ee(i.onPointerLeave,v=>{var b;v.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:Ee(i.onKeyDown,v=>{var k;((k=c.searchRef)==null?void 0:k.current)!==""&&v.key===" "||(Lie.includes(v.key)&&y(),v.key===" "&&v.preventDefault())})})})})});T6.displayName=sg;var mf="SelectItemText",C6=_.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=Ii(mf,n),s=Pi(mf,n),c=O6(mf,n),l=Hie(mf,n),[u,f]=_.useState(null),d=it(t,y=>f(y),c.onItemTextChange,y=>{var v;return(v=s.itemTextRefCallback)==null?void 0:v.call(s,y,c.value,c.disabled)}),h=u==null?void 0:u.textContent,g=_.useMemo(()=>E.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:p,onNativeOptionRemove:m}=l;return gn(()=>(p(g),()=>m(g)),[p,m,g]),E.jsxs(E.Fragment,{children:[E.jsx($e.span,{id:c.textId,...o,ref:d}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?cu.createPortal(o.children,i.valueNode):null]})});C6.displayName=mf;var I6="SelectItemIndicator",P6=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return O6(I6,n).isSelected?E.jsx($e.span,{"aria-hidden":!0,...r,ref:t}):null});P6.displayName=I6;var _k="SelectScrollUpButton",N6=_.forwardRef((e,t)=>{const n=Pi(_k,e.__scopeSelect),r=sE(_k,e.__scopeSelect),[a,o]=_.useState(!1),i=it(t,r.onScrollButtonChange);return gn(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=c.scrollTop>0;o(l)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),a?E.jsx(D6,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});N6.displayName=_k;var Sk="SelectScrollDownButton",M6=_.forwardRef((e,t)=>{const n=Pi(Sk,e.__scopeSelect),r=sE(Sk,e.__scopeSelect),[a,o]=_.useState(!1),i=it(t,r.onScrollButtonChange);return gn(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),a?E.jsx(D6,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});M6.displayName=Sk;var D6=_.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=Pi("SelectScrollButton",n),i=_.useRef(null),s=Xy(n),c=_.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return _.useEffect(()=>()=>c(),[c]),gn(()=>{var u;const l=s().find(f=>f.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[s]),E.jsx($e.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ee(a.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Ee(a.onPointerMove,()=>{var l;(l=o.onItemLeave)==null||l.call(o),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Ee(a.onPointerLeave,()=>{c()})})}),ese="SelectSeparator",z6=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return E.jsx($e.div,{"aria-hidden":!0,...r,ref:t})});z6.displayName=ese;var Ek="SelectArrow",tse=_.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Jy(n),o=Ii(Ek,n),i=Pi(Ek,n);return o.open&&i.position==="popper"?E.jsx(Die,{...a,...r,ref:t}):null});tse.displayName=Ek;function $6(e){return e===""||e===void 0}var R6=_.forwardRef((e,t)=>{const{value:n,...r}=e,a=_.useRef(null),o=it(t,a),i=zie(n);return _.useEffect(()=>{const s=a.current,c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==n&&u){const f=new Event("change",{bubbles:!0});u.call(s,n),s.dispatchEvent(f)}},[i,n]),E.jsx(d6,{asChild:!0,children:E.jsx("select",{...r,ref:o,defaultValue:n})})});R6.displayName="BubbleSelect";function L6(e){const t=_a(e),n=_.useRef(""),r=_.useRef(0),a=_.useCallback(i=>{const s=n.current+i;t(s),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),o=_.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}function B6(e,t,n){const a=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=nse(e,Math.max(o,0));a.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function nse(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rse=p6,F6=m6,ase=y6,ose=v6,ise=b6,U6=w6,sse=_6,H6=A6,V6=T6,cse=C6,lse=P6,W6=N6,q6=M6,G6=z6;const K6=rse,Y6=ase,cE=_.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(F6,{ref:r,className:be("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,E.jsx(ose,{asChild:!0,children:E.jsx(Qz,{className:"h-4 w-4 opacity-50"})})]}));cE.displayName=F6.displayName;const Z6=_.forwardRef(({className:e,...t},n)=>E.jsx(W6,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:E.jsx(n7,{className:"h-4 w-4"})}));Z6.displayName=W6.displayName;const Q6=_.forwardRef(({className:e,...t},n)=>E.jsx(q6,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:E.jsx(Qz,{className:"h-4 w-4"})}));Q6.displayName=q6.displayName;const lE=_.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>E.jsx(ise,{children:E.jsxs(U6,{ref:a,className:be("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[E.jsx(Z6,{}),E.jsx(sse,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),E.jsx(Q6,{})]})}));lE.displayName=U6.displayName;const use=_.forwardRef(({className:e,...t},n)=>E.jsx(H6,{ref:n,className:be("px-2 py-1.5 text-sm font-semibold",e),...t}));use.displayName=H6.displayName;const uE=_.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(V6,{ref:r,className:be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(lse,{children:E.jsx(Zz,{className:"h-4 w-4"})})}),E.jsx(cse,{children:t})]}));uE.displayName=V6.displayName;const fse=_.forwardRef(({className:e,...t},n)=>E.jsx(G6,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));fse.displayName=G6.displayName;var dse=Array.isArray,Nn=dse,pse=typeof Ka=="object"&&Ka&&Ka.Object===Object&&Ka,X6=pse,hse=X6,mse=typeof self=="object"&&self&&self.Object===Object&&self,gse=hse||mse||Function("return this")(),Pa=gse,yse=Pa,vse=yse.Symbol,Mp=vse,MC=Mp,J6=Object.prototype,bse=J6.hasOwnProperty,wse=J6.toString,Yu=MC?MC.toStringTag:void 0;function kse(e){var t=bse.call(e,Yu),n=e[Yu];try{e[Yu]=void 0;var r=!0}catch{}var a=wse.call(e);return r&&(t?e[Yu]=n:delete e[Yu]),a}var xse=kse,jse=Object.prototype,_se=jse.toString;function Sse(e){return _se.call(e)}var Ese=Sse,DC=Mp,Ase=xse,Ose=Ese,Tse="[object Null]",Cse="[object Undefined]",zC=DC?DC.toStringTag:void 0;function Ise(e){return e==null?e===void 0?Cse:Tse:zC&&zC in Object(e)?Ase(e):Ose(e)}var go=Ise;function Pse(e){return e!=null&&typeof e=="object"}var yo=Pse,Nse=go,Mse=yo,Dse="[object Symbol]";function zse(e){return typeof e=="symbol"||Mse(e)&&Nse(e)==Dse}var xu=zse,$se=Nn,Rse=xu,Lse=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bse=/^\w*$/;function Fse(e,t){if($se(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Rse(e)?!0:Bse.test(e)||!Lse.test(e)||t!=null&&e in Object(t)}var fE=Fse;function Use(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ni=Use;const ju=ze(Ni);var Hse=go,Vse=Ni,Wse="[object AsyncFunction]",qse="[object Function]",Gse="[object GeneratorFunction]",Kse="[object Proxy]";function Yse(e){if(!Vse(e))return!1;var t=Hse(e);return t==qse||t==Gse||t==Wse||t==Kse}var dE=Yse;const ke=ze(dE);var Zse=Pa,Qse=Zse["__core-js_shared__"],Xse=Qse,W0=Xse,$C=function(){var e=/[^.]+$/.exec(W0&&W0.keys&&W0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Jse(e){return!!$C&&$C in e}var ece=Jse,tce=Function.prototype,nce=tce.toString;function rce(e){if(e!=null){try{return nce.call(e)}catch{}try{return e+""}catch{}}return""}var e8=rce,ace=dE,oce=ece,ice=Ni,sce=e8,cce=/[\\^$.*+?()[\]{}|]/g,lce=/^\[object .+?Constructor\]$/,uce=Function.prototype,fce=Object.prototype,dce=uce.toString,pce=fce.hasOwnProperty,hce=RegExp("^"+dce.call(pce).replace(cce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mce(e){if(!ice(e)||oce(e))return!1;var t=ace(e)?hce:lce;return t.test(sce(e))}var gce=mce;function yce(e,t){return e==null?void 0:e[t]}var vce=yce,bce=gce,wce=vce;function kce(e,t){var n=wce(e,t);return bce(n)?n:void 0}var ac=kce,xce=ac,jce=xce(Object,"create"),ev=jce,RC=ev;function _ce(){this.__data__=RC?RC(null):{},this.size=0}var Sce=_ce;function Ece(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ace=Ece,Oce=ev,Tce="__lodash_hash_undefined__",Cce=Object.prototype,Ice=Cce.hasOwnProperty;function Pce(e){var t=this.__data__;if(Oce){var n=t[e];return n===Tce?void 0:n}return Ice.call(t,e)?t[e]:void 0}var Nce=Pce,Mce=ev,Dce=Object.prototype,zce=Dce.hasOwnProperty;function $ce(e){var t=this.__data__;return Mce?t[e]!==void 0:zce.call(t,e)}var Rce=$ce,Lce=ev,Bce="__lodash_hash_undefined__";function Fce(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lce&&t===void 0?Bce:t,this}var Uce=Fce,Hce=Sce,Vce=Ace,Wce=Nce,qce=Rce,Gce=Uce;function _u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var ule=lle,fle=tv;function dle(e,t){var n=this.__data__,r=fle(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var ple=dle,hle=Zce,mle=ale,gle=sle,yle=ule,vle=ple;function Su(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},ls=function(t){return Dp(t)&&t.indexOf("%")===t.length-1},se=function(t){return Bue(t)&&!zp(t)},Pt=function(t){return se(t)||Dp(t)},Vue=0,mv=function(t){var n=++Vue;return"".concat(t||"").concat(n)},An=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!se(t)&&!Dp(t))return r;var o;if(ls(t)){var i=t.indexOf("%");o=n*parseFloat(t.slice(0,i))/100}else o=+t;return zp(o)&&(o=r),a&&o>n&&(o=n),o},yc=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Wue=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Que(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var qC={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},eo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},GC=null,G0=null,xE=function e(t){if(t===GC&&Array.isArray(G0))return G0;var n=[];return _.Children.forEach(t,function(r){Ae(r)||(Due.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),G0=n,GC=t,n};function ka(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return eo(a)}):r=[eo(t)],xE(e).forEach(function(a){var o=Rr(a,"type.displayName")||Rr(a,"type.name");r.indexOf(o)!==-1&&n.push(a)}),n}function or(e,t){var n=ka(e,t);return n&&n[0]}var KC=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!se(r)||r<=0||!se(a)||a<=0)},Xue=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Jue=function(t){return t&&t.type&&Dp(t.type)&&Xue.indexOf(t.type)>=0},efe=function(t,n,r,a){var o,i=(o=q0==null?void 0:q0[a])!==null&&o!==void 0?o:[];return!ke(t)&&(a&&i.includes(n)||Gue.includes(n))||r&&kE.includes(n)},ye=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(_.isValidElement(t)&&(a=t.props),!ju(a))return null;var o={};return Object.keys(a).forEach(function(i){var s;efe((s=a)===null||s===void 0?void 0:s[i],i,n,r)&&(o[i]=a[i])}),o},Ck=function e(t,n){if(t===n)return!0;var r=_.Children.count(t);if(r!==_.Children.count(n))return!1;if(r===0)return!0;if(r===1)return YC(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ofe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Pk(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,o=e.className,i=e.style,s=e.title,c=e.desc,l=afe(e,rfe),u=a||{width:n,height:r,x:0,y:0},f=Ie("recharts-surface",o);return B.createElement("svg",Ik({},ye(l,!0,"svg"),{className:f,width:n,height:r,style:i,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),B.createElement("title",null,s),B.createElement("desc",null,c),t)}var ife=["children","className"];function Nk(){return Nk=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ht=B.forwardRef(function(e,t){var n=e.children,r=e.className,a=sfe(e,ife),o=Ie("recharts-layer",r);return B.createElement("g",Nk({className:o},ye(a,!0),{ref:t}),n)}),to=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;oa?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r=r?e:ffe(e,t,n)}var pfe=dfe,hfe="\\ud800-\\udfff",mfe="\\u0300-\\u036f",gfe="\\ufe20-\\ufe2f",yfe="\\u20d0-\\u20ff",vfe=mfe+gfe+yfe,bfe="\\ufe0e\\ufe0f",wfe="\\u200d",kfe=RegExp("["+wfe+hfe+vfe+bfe+"]");function xfe(e){return kfe.test(e)}var u8=xfe;function jfe(e){return e.split("")}var _fe=jfe,f8="\\ud800-\\udfff",Sfe="\\u0300-\\u036f",Efe="\\ufe20-\\ufe2f",Afe="\\u20d0-\\u20ff",Ofe=Sfe+Efe+Afe,Tfe="\\ufe0e\\ufe0f",Cfe="["+f8+"]",Mk="["+Ofe+"]",Dk="\\ud83c[\\udffb-\\udfff]",Ife="(?:"+Mk+"|"+Dk+")",d8="[^"+f8+"]",p8="(?:\\ud83c[\\udde6-\\uddff]){2}",h8="[\\ud800-\\udbff][\\udc00-\\udfff]",Pfe="\\u200d",m8=Ife+"?",g8="["+Tfe+"]?",Nfe="(?:"+Pfe+"(?:"+[d8,p8,h8].join("|")+")"+g8+m8+")*",Mfe=g8+m8+Nfe,Dfe="(?:"+[d8+Mk+"?",Mk,p8,h8,Cfe].join("|")+")",zfe=RegExp(Dk+"(?="+Dk+")|"+Dfe+Mfe,"g");function $fe(e){return e.match(zfe)||[]}var Rfe=$fe,Lfe=_fe,Bfe=u8,Ffe=Rfe;function Ufe(e){return Bfe(e)?Ffe(e):Lfe(e)}var Hfe=Ufe,Vfe=pfe,Wfe=u8,qfe=Hfe,Gfe=a8;function Kfe(e){return function(t){t=Gfe(t);var n=Wfe(t)?qfe(t):void 0,r=n?n[0]:t.charAt(0),a=n?Vfe(n,1).join(""):t.slice(1);return r[e]()+a}}var Yfe=Kfe,Zfe=Yfe,Qfe=Zfe("toUpperCase"),Xfe=Qfe;const yv=ze(Xfe);function Ge(e){return function(){return e}}const y8=Math.cos,lg=Math.sin,Vr=Math.sqrt,ug=Math.PI,vv=2*ug,zk=Math.PI,$k=2*zk,Wi=1e-6,Jfe=$k-Wi;function v8(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return v8;const n=10**t;return function(r){this._+=r[0];for(let a=1,o=r.length;aWi)if(!(Math.abs(f*c-l*u)>Wi)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-i,g=a-s,p=c*c+l*l,m=h*h+g*g,y=Math.sqrt(p),v=Math.sqrt(d),b=o*Math.tan((zk-Math.acos((p+d-m)/(2*y*v)))/2),k=b/v,w=b/y;Math.abs(k-1)>Wi&&this._append`L${t+k*u},${n+k*f}`,this._append`A${o},${o},0,0,${+(f*h>u*g)},${this._x1=t+w*c},${this._y1=n+w*l}`}}arc(t,n,r,a,o,i){if(t=+t,n=+n,r=+r,i=!!i,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(a),c=r*Math.sin(a),l=t+s,u=n+c,f=1^i,d=i?a-o:o-a;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Wi||Math.abs(this._y1-u)>Wi)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%$k+$k),d>Jfe?this._append`A${r},${r},0,1,${f},${t-s},${n-c}A${r},${r},0,1,${f},${this._x1=l},${this._y1=u}`:d>Wi&&this._append`A${r},${r},0,${+(d>=zk)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function jE(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new tde(t)}function _E(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b8(e){this._context=e}b8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function bv(e){return new b8(e)}function w8(e){return e[0]}function k8(e){return e[1]}function x8(e,t){var n=Ge(!0),r=null,a=bv,o=null,i=jE(s);e=typeof e=="function"?e:e===void 0?w8:Ge(e),t=typeof t=="function"?t:t===void 0?k8:Ge(t);function s(c){var l,u=(c=_E(c)).length,f,d=!1,h;for(r==null&&(o=a(h=i())),l=0;l<=u;++l)!(l=h;--g)s.point(b[g],k[g]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+e(m,d,f),k[d]=+t(m,d,f),s.point(r?+r(m,d,f):b[d],n?+n(m,d,f):k[d]))}if(v)return s=null,v+""||null}function u(){return x8().defined(a).curve(i).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ge(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ge(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ge(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ge(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ge(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ge(+f),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Ge(!!f),l):a},l.curve=function(f){return arguments.length?(i=f,o!=null&&(s=i(o)),l):i},l.context=function(f){return arguments.length?(f==null?o=s=null:s=i(o=f),l):o},l}class j8{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function nde(e){return new j8(e,!0)}function rde(e){return new j8(e,!1)}const SE={draw(e,t){const n=Vr(t/ug);e.moveTo(n,0),e.arc(0,0,n,0,vv)}},ade={draw(e,t){const n=Vr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},_8=Vr(1/3),ode=_8*2,ide={draw(e,t){const n=Vr(t/ode),r=n*_8;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},sde={draw(e,t){const n=Vr(t),r=-n/2;e.rect(r,r,n,n)}},cde=.8908130915292852,S8=lg(ug/10)/lg(7*ug/10),lde=lg(vv/10)*S8,ude=-y8(vv/10)*S8,fde={draw(e,t){const n=Vr(t*cde),r=lde*n,a=ude*n;e.moveTo(0,-n),e.lineTo(r,a);for(let o=1;o<5;++o){const i=vv*o/5,s=y8(i),c=lg(i);e.lineTo(c*n,-s*n),e.lineTo(s*r-c*a,c*r+s*a)}e.closePath()}},K0=Vr(3),dde={draw(e,t){const n=-Vr(t/(K0*3));e.moveTo(0,n*2),e.lineTo(-K0*n,-n),e.lineTo(K0*n,-n),e.closePath()}},Xn=-.5,Jn=Vr(3)/2,Rk=1/Vr(12),pde=(Rk/2+1)*3,hde={draw(e,t){const n=Vr(t/pde),r=n/2,a=n*Rk,o=r,i=n*Rk+n,s=-o,c=i;e.moveTo(r,a),e.lineTo(o,i),e.lineTo(s,c),e.lineTo(Xn*r-Jn*a,Jn*r+Xn*a),e.lineTo(Xn*o-Jn*i,Jn*o+Xn*i),e.lineTo(Xn*s-Jn*c,Jn*s+Xn*c),e.lineTo(Xn*r+Jn*a,Xn*a-Jn*r),e.lineTo(Xn*o+Jn*i,Xn*i-Jn*o),e.lineTo(Xn*s+Jn*c,Xn*c-Jn*s),e.closePath()}};function mde(e,t){let n=null,r=jE(a);e=typeof e=="function"?e:Ge(e||SE),t=typeof t=="function"?t:Ge(t===void 0?64:+t);function a(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return a.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ge(o),a):e},a.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ge(+o),a):t},a.context=function(o){return arguments.length?(n=o??null,a):n},a}function fg(){}function dg(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function E8(e){this._context=e}E8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:dg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:dg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gde(e){return new E8(e)}function A8(e){this._context=e}A8.prototype={areaStart:fg,areaEnd:fg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:dg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yde(e){return new A8(e)}function O8(e){this._context=e}O8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:dg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vde(e){return new O8(e)}function T8(e){this._context=e}T8.prototype={areaStart:fg,areaEnd:fg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bde(e){return new T8(e)}function QC(e){return e<0?-1:1}function XC(e,t,n){var r=e._x1-e._x0,a=t-e._x1,o=(e._y1-e._y0)/(r||a<0&&-0),i=(n-e._y1)/(a||r<0&&-0),s=(o*a+i*r)/(r+a);return(QC(o)+QC(i))*Math.min(Math.abs(o),Math.abs(i),.5*Math.abs(s))||0}function JC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Y0(e,t,n){var r=e._x0,a=e._y0,o=e._x1,i=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,a+s*t,o-s,i-s*n,o,i)}function pg(e){this._context=e}pg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Y0(this,this._t0,JC(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Y0(this,JC(this,n=XC(this,e,t)),n);break;default:Y0(this,this._t0,n=XC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function C8(e){this._context=new I8(e)}(C8.prototype=Object.create(pg.prototype)).point=function(e,t){pg.prototype.point.call(this,t,e)};function I8(e){this._context=e}I8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,o){this._context.bezierCurveTo(t,e,r,n,o,a)}};function wde(e){return new pg(e)}function kde(e){return new C8(e)}function P8(e){this._context=e}P8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=eI(e),a=eI(t),o=0,i=1;i=0;--t)a[t]=(i[t]-a[t+1])/o[t];for(o[n-1]=(e[n]+a[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function jde(e){return new wv(e,.5)}function _de(e){return new wv(e,0)}function Sde(e){return new wv(e,1)}function $l(e,t){if((i=e.length)>1)for(var n=1,r,a,o=e[t[0]],i,s=o.length;n=0;)n[t]=t;return n}function Ede(e,t){return e[t]}function Ade(e){const t=[];return t.key=e,t}function Ode(){var e=Ge([]),t=Lk,n=$l,r=Ede;function a(o){var i=Array.from(e.apply(this,arguments),Ade),s,c=i.length,l=-1,u;for(const f of o)for(s=0,++l;s0){for(var n,r,a=0,o=e[0].length,i;a0){for(var n=0,r=e[t[0]],a,o=r.length;n0)||!((o=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,o,i;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $de(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var N8={symbolCircle:SE,symbolCross:ade,symbolDiamond:ide,symbolSquare:sde,symbolStar:fde,symbolTriangle:dde,symbolWye:hde},Rde=Math.PI/180,Lde=function(t){var n="symbol".concat(yv(t));return N8[n]||SE},Bde=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Rde;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Fde=function(t,n){N8["symbol".concat(yv(t))]=n},EE=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,o=a===void 0?64:a,i=t.sizeType,s=i===void 0?"area":i,c=zde(t,Pde),l=nI(nI({},c),{},{type:r,size:o,sizeType:s}),u=function(){var m=Lde(r),y=mde().type(m).size(Bde(o,s,r));return y()},f=l.className,d=l.cx,h=l.cy,g=ye(l,!0);return d===+d&&h===+h&&o===+o?B.createElement("path",Bk({},g,{className:Ie("recharts-symbols",f),transform:"translate(".concat(d,", ").concat(h,")"),d:u()})):null};EE.registerSymbol=Fde;function Rl(e){"@babel/helpers - typeof";return Rl=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},Rl(e)}function Fk(){return Fk=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var v=h.inactive?l:h.color;return B.createElement("li",Fk({className:m,style:f,key:"legend-item-".concat(g)},gv(r.props,h,g)),B.createElement(Pk,{width:i,height:i,viewBox:u,style:d},r.renderIcon(h)),B.createElement("span",{className:"recharts-legend-item-text",style:{color:v}},p?p(y,h,g):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,o=r.layout,i=r.align;if(!a||!a.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?i:"left"};return B.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(_.PureComponent);Id(AE,"displayName","Legend");Id(AE,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Qde=nv;function Xde(){this.__data__=new Qde,this.size=0}var Jde=Xde;function epe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var tpe=epe;function npe(e){return this.__data__.get(e)}var rpe=npe;function ape(e){return this.__data__.has(e)}var ope=ape,ipe=nv,spe=hE,cpe=mE,lpe=200;function upe(e,t){var n=this.__data__;if(n instanceof ipe){var r=n.__data__;if(!spe||r.lengths))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var f=-1,d=!0,h=n&Ppe?new Ope:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=zhe}var IE=$he,Rhe=go,Lhe=IE,Bhe=yo,Fhe="[object Arguments]",Uhe="[object Array]",Hhe="[object Boolean]",Vhe="[object Date]",Whe="[object Error]",qhe="[object Function]",Ghe="[object Map]",Khe="[object Number]",Yhe="[object Object]",Zhe="[object RegExp]",Qhe="[object Set]",Xhe="[object String]",Jhe="[object WeakMap]",eme="[object ArrayBuffer]",tme="[object DataView]",nme="[object Float32Array]",rme="[object Float64Array]",ame="[object Int8Array]",ome="[object Int16Array]",ime="[object Int32Array]",sme="[object Uint8Array]",cme="[object Uint8ClampedArray]",lme="[object Uint16Array]",ume="[object Uint32Array]",Xe={};Xe[nme]=Xe[rme]=Xe[ame]=Xe[ome]=Xe[ime]=Xe[sme]=Xe[cme]=Xe[lme]=Xe[ume]=!0;Xe[Fhe]=Xe[Uhe]=Xe[eme]=Xe[Hhe]=Xe[tme]=Xe[Vhe]=Xe[Whe]=Xe[qhe]=Xe[Ghe]=Xe[Khe]=Xe[Yhe]=Xe[Zhe]=Xe[Qhe]=Xe[Xhe]=Xe[Jhe]=!1;function fme(e){return Bhe(e)&&Lhe(e.length)&&!!Xe[Rhe(e)]}var dme=fme;function pme(e){return function(t){return e(t)}}var V8=pme,yg={exports:{}};yg.exports;(function(e,t){var n=X6,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===r,i=o&&n.process,s=function(){try{var c=a&&a.require&&a.require("util").types;return c||i&&i.binding&&i.binding("util")}catch{}}();e.exports=s})(yg,yg.exports);var hme=yg.exports,mme=dme,gme=V8,lI=hme,uI=lI&&lI.isTypedArray,yme=uI?gme(uI):mme,W8=yme,vme=khe,bme=TE,wme=Nn,kme=H8,xme=CE,jme=W8,_me=Object.prototype,Sme=_me.hasOwnProperty;function Eme(e,t){var n=wme(e),r=!n&&bme(e),a=!n&&!r&&kme(e),o=!n&&!r&&!a&&jme(e),i=n||r||a||o,s=i?vme(e.length,String):[],c=s.length;for(var l in e)(t||Sme.call(e,l))&&!(i&&(l=="length"||a&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||xme(l,c)))&&s.push(l);return s}var Ame=Eme,Ome=Object.prototype;function Tme(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ome;return e===n}var Cme=Tme;function Ime(e,t){return function(n){return e(t(n))}}var q8=Ime,Pme=q8,Nme=Pme(Object.keys,Object),Mme=Nme,Dme=Cme,zme=Mme,$me=Object.prototype,Rme=$me.hasOwnProperty;function Lme(e){if(!Dme(e))return zme(e);var t=[];for(var n in Object(e))Rme.call(e,n)&&n!="constructor"&&t.push(n);return t}var Bme=Lme,Fme=dE,Ume=IE;function Hme(e){return e!=null&&Ume(e.length)&&!Fme(e)}var kv=Hme,Vme=Ame,Wme=Bme,qme=kv;function Gme(e){return qme(e)?Vme(e):Wme(e)}var PE=Gme,Kme=lhe,Yme=bhe,Zme=PE;function Qme(e){return Kme(e,Zme,Yme)}var Xme=Qme,fI=Xme,Jme=1,ege=Object.prototype,tge=ege.hasOwnProperty;function nge(e,t,n,r,a,o){var i=n&Jme,s=fI(e),c=s.length,l=fI(t),u=l.length;if(c!=u&&!i)return!1;for(var f=c;f--;){var d=s[f];if(!(i?d in t:tge.call(t,d)))return!1}var h=o.get(e),g=o.get(t);if(h&&g)return h==t&&g==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++f-1}var tve=eve;function nve(e,t,n){for(var r=-1,a=e==null?0:e.length;++r=yve){var l=t?null:mve(e);if(l)return gve(l);i=!1,a=hve,c=new fve}else c=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nve(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Mve(e){return e.value}function Dve(e,t){if(B.isValidElement(e))return B.cloneElement(e,t);if(typeof e=="function")return B.createElement(e,t);t.ref;var n=Pve(t,_ve);return B.createElement(AE,n)}var AI=1,Jc=function(e){function t(){var n;Sve(this,t);for(var r=arguments.length,a=new Array(r),o=0;oAI||Math.abs(a.height-this.lastBoundingBox.height)>AI)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?$a({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,o=a.layout,i=a.align,s=a.verticalAlign,c=a.margin,l=a.chartWidth,u=a.chartHeight,f,d;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(i==="center"&&o==="vertical"){var h=this.getBBoxSnapshot();f={left:((l||0)-h.width)/2}}else f=i==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();d={top:((u||0)-g.height)/2}}else d=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return $a($a({},f),d)}},{key:"render",value:function(){var r=this,a=this.props,o=a.content,i=a.width,s=a.height,c=a.wrapperStyle,l=a.payloadUniqBy,u=a.payload,f=$a($a({position:"absolute",width:i||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return B.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(h){r.wrapperNode=h}},Dve(o,$a($a({},this.props),{},{payload:X8(u,l,Mve)})))}}],[{key:"getWithHeight",value:function(r,a){var o=$a($a({},this.defaultProps),r.props),i=o.layout;return i==="vertical"&&se(r.props.height)?{height:r.props.height}:i==="horizontal"?{width:r.props.width||a}:null}}])}(_.PureComponent);xv(Jc,"displayName","Legend");xv(Jc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var OI=Mp,zve=TE,$ve=Nn,TI=OI?OI.isConcatSpreadable:void 0;function Rve(e){return $ve(e)||zve(e)||!!(TI&&e&&e[TI])}var Lve=Rve,Bve=F8,Fve=Lve;function tF(e,t,n,r,a){var o=-1,i=e.length;for(n||(n=Fve),a||(a=[]);++o0&&n(s)?t>1?tF(s,t-1,n,r,a):Bve(a,s):r||(a[a.length]=s)}return a}var nF=tF;function Uve(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var c=i[e?s:++a];if(n(o[c],c,o)===!1)break}return t}}var Hve=Uve,Vve=Hve,Wve=Vve(),qve=Wve,Gve=qve,Kve=PE;function Yve(e,t){return e&&Gve(e,t,Kve)}var rF=Yve,Zve=kv;function Qve(e,t){return function(n,r){if(n==null)return n;if(!Zve(n))return e(n,r);for(var a=n.length,o=t?a:-1,i=Object(n);(t?o--:++ot||o&&i&&c&&!s&&!l||r&&i&&c||!n&&c||!a)return 1;if(!r&&!o&&!l&&e=s)return c;var l=n[r];return c*(l=="desc"?-1:1)}}return e.index-t.index}var fbe=ube,J0=yE,dbe=vE,pbe=Mi,hbe=aF,mbe=ibe,gbe=V8,ybe=fbe,vbe=Tu,bbe=Nn;function wbe(e,t,n){t.length?t=J0(t,function(o){return bbe(o)?function(i){return dbe(i,o.length===1?o[0]:o)}:o}):t=[vbe];var r=-1;t=J0(t,gbe(pbe));var a=hbe(e,function(o,i,s){var c=J0(t,function(l){return l(o)});return{criteria:c,index:++r,value:o}});return mbe(a,function(o,i){return ybe(o,i,n)})}var kbe=wbe;function xbe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var jbe=xbe,_be=jbe,II=Math.max;function Sbe(e,t,n){return t=II(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=II(r.length-t,0),i=Array(o);++a0){if(++t>=Dbe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Lbe=Rbe,Bbe=Mbe,Fbe=Lbe,Ube=Fbe(Bbe),Hbe=Ube,Vbe=Tu,Wbe=Ebe,qbe=Hbe;function Gbe(e,t){return qbe(Wbe(e,t,Vbe),e+"")}var Kbe=Gbe,Ybe=pE,Zbe=kv,Qbe=CE,Xbe=Ni;function Jbe(e,t,n){if(!Xbe(n))return!1;var r=typeof t;return(r=="number"?Zbe(n)&&Qbe(t,n.length):r=="string"&&t in n)?Ybe(n[t],e):!1}var jv=Jbe,e0e=nF,t0e=kbe,n0e=Kbe,NI=jv,r0e=n0e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&NI(e,t[0],t[1])?t=[]:n>2&&NI(t[0],t[1],t[2])&&(t=[t[0]]),t0e(e,e0e(t,1),[])}),a0e=r0e;const DE=ze(a0e);function Pd(e){"@babel/helpers - typeof";return Pd=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},Pd(e)}function Yk(){return Yk=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Zu,"-left"),se(n)&&t&&se(t.x)&&n=t.y),"".concat(Zu,"-top"),se(r)&&t&&se(t.y)&&rp?Math.max(u,c[r]):Math.max(f,c[r])}function b0e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function w0e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,o=e.reverseDirection,i=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,l,u,f;return i.height>0&&i.width>0&&n?(u=zI({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:i.width,viewBox:c,viewBoxDimension:c.width}),f=zI({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:o,tooltipDimension:i.height,viewBox:c,viewBoxDimension:c.height}),l=b0e({translateX:u,translateY:f,useTranslate3d:s})):l=y0e,{cssProperties:l,cssClasses:v0e({translateX:u,translateY:f,coordinate:n})}}function Bl(e){"@babel/helpers - typeof";return Bl=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},Bl(e)}function $I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function RI(e){for(var t=1;tLI||Math.abs(r.height-this.state.lastBoundingBox.height)>LI)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,o=a.active,i=a.allowEscapeViewBox,s=a.animationDuration,c=a.animationEasing,l=a.children,u=a.coordinate,f=a.hasPayload,d=a.isAnimationActive,h=a.offset,g=a.position,p=a.reverseDirection,m=a.useTranslate3d,y=a.viewBox,v=a.wrapperStyle,b=w0e({allowEscapeViewBox:i,coordinate:u,offsetTopLeft:h,position:g,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:m,viewBox:y}),k=b.cssClasses,w=b.cssProperties,x=RI(RI({transition:d&&o?"transform ".concat(s,"ms ").concat(c):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},v);return B.createElement("div",{tabIndex:-1,className:k,style:x,ref:function(S){r.wrapperNode=S}},l)}}])}(_.PureComponent),C0e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},_s={isSsr:C0e(),get:function(t){return _s[t]},set:function(t,n){if(typeof t=="string")_s[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(a){_s[a]=t[a]})}}};function Fl(e){"@babel/helpers - typeof";return Fl=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},Fl(e)}function BI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function FI(e){for(var t=1;t0;return B.createElement(T0e,{allowEscapeViewBox:i,animationDuration:s,animationEasing:c,isAnimationActive:d,active:o,coordinate:u,hasPayload:x,offset:h,position:m,reverseDirection:y,useTranslate3d:v,viewBox:b,wrapperStyle:k},B0e(l,FI(FI({},this.props),{},{payload:w})))}}])}(_.PureComponent);zE(ta,"displayName","Tooltip");zE(ta,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!_s.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var F0e=Pa,U0e=function(){return F0e.Date.now()},H0e=U0e,V0e=/\s/;function W0e(e){for(var t=e.length;t--&&V0e.test(e.charAt(t)););return t}var q0e=W0e,G0e=q0e,K0e=/^\s+/;function Y0e(e){return e&&e.slice(0,G0e(e)+1).replace(K0e,"")}var Z0e=Y0e,Q0e=Z0e,UI=Ni,X0e=xu,HI=NaN,J0e=/^[-+]0x[0-9a-f]+$/i,ewe=/^0b[01]+$/i,twe=/^0o[0-7]+$/i,nwe=parseInt;function rwe(e){if(typeof e=="number")return e;if(X0e(e))return HI;if(UI(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=UI(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Q0e(e);var n=ewe.test(e);return n||twe.test(e)?nwe(e.slice(2),n?2:8):J0e.test(e)?HI:+e}var uF=rwe,awe=Ni,tw=H0e,VI=uF,owe="Expected a function",iwe=Math.max,swe=Math.min;function cwe(e,t,n){var r,a,o,i,s,c,l=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(owe);t=VI(t)||0,awe(n)&&(u=!!n.leading,f="maxWait"in n,o=f?iwe(VI(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function h(x){var j=r,S=a;return r=a=void 0,l=x,i=e.apply(S,j),i}function g(x){return l=x,s=setTimeout(y,t),u?h(x):i}function p(x){var j=x-c,S=x-l,A=t-j;return f?swe(A,o-S):A}function m(x){var j=x-c,S=x-l;return c===void 0||j>=t||j<0||f&&S>=o}function y(){var x=tw();if(m(x))return v(x);s=setTimeout(y,p(x))}function v(x){return s=void 0,d&&r?h(x):(r=a=void 0,i)}function b(){s!==void 0&&clearTimeout(s),l=0,r=c=a=s=void 0}function k(){return s===void 0?i:v(tw())}function w(){var x=tw(),j=m(x);if(r=arguments,a=this,c=x,j){if(s===void 0)return g(c);if(f)return clearTimeout(s),s=setTimeout(y,t),h(c)}return s===void 0&&(s=setTimeout(y,t)),i}return w.cancel=b,w.flush=k,w}var lwe=cwe,uwe=lwe,fwe=Ni,dwe="Expected a function";function pwe(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(dwe);return fwe(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),uwe(e,t,{leading:r,maxWait:t,trailing:a})}var hwe=pwe;const fF=ze(hwe);function Md(e){"@babel/helpers - typeof";return Md=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},Md(e)}function WI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Oh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=fF(L,p,{trailing:!0,leading:!1}));var z=new ResizeObserver(L),T=w.current.getBoundingClientRect(),I=T.width,M=T.height;return O(I,M),z.observe(w.current),function(){z.disconnect()}},[O,p]);var N=_.useMemo(function(){var L=A.containerWidth,z=A.containerHeight;if(L<0||z<0)return null;to(ls(i)||ls(c),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,i,c),to(!n||n>0,"The aspect(%s) must be greater than zero.",n);var T=ls(i)?L:i,I=ls(c)?z:c;n&&n>0&&(T?I=T/n:I&&(T=I*n),d&&I>d&&(I=d)),to(T>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,T,I,i,c,u,f,n);var M=!Array.isArray(h)&&eo(h.type).endsWith("Chart");return B.Children.map(h,function(P){return B.isValidElement(P)?_.cloneElement(P,Oh({width:T,height:I},M?{style:Oh({height:"100%",width:"100%",maxHeight:I,maxWidth:T},P.props.style)}:{})):P})},[n,h,c,d,f,u,A,i]);return B.createElement("div",{id:m?"".concat(m):void 0,className:Ie("recharts-responsive-container",y),style:Oh(Oh({},k),{},{width:i,height:c,minWidth:u,minHeight:f,maxHeight:d}),ref:w},N)}),$E=function(t){return null};$E.displayName="Cell";function Dd(e){"@babel/helpers - typeof";return Dd=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},Dd(e)}function GI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Jk(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||_s.isSsr)return{width:0,height:0};var r=Owe(n),a=JSON.stringify({text:t,copyStyle:r});if(hc.widthCache[a])return hc.widthCache[a];try{var o=document.getElementById(KI);o||(o=document.createElement("span"),o.setAttribute("id",KI),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=Jk(Jk({},Awe),r);Object.assign(o.style,i),o.textContent="".concat(t);var s=o.getBoundingClientRect(),c={width:s.width,height:s.height};return hc.widthCache[a]=c,++hc.cacheCount>Ewe&&(hc.cacheCount=0,hc.widthCache={}),c}catch{return{width:0,height:0}}},Twe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function zd(e){"@babel/helpers - typeof";return zd=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},zd(e)}function kg(e,t){return Nwe(e)||Pwe(e,t)||Iwe(e,t)||Cwe()}function Cwe(){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 Iwe(e,t){if(e){if(typeof e=="string")return ZI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZI(e,t)}}function ZI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gwe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function nP(e,t){return Qwe(e)||Zwe(e,t)||Ywe(e,t)||Kwe()}function Kwe(){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 Ywe(e,t){if(e){if(typeof e=="string")return rP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rP(e,t)}}function rP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return T.reduce(function(I,M){var P=M.word,D=M.width,U=I[I.length-1];if(U&&(a==null||o||U.width+D+rM.width?I:M})};if(!u)return h;for(var p="…",m=function(T){var I=f.slice(0,T),M=gF({breakAll:l,style:c,children:I+p}).wordsWithComputedWidth,P=d(M),D=P.length>i||g(P).width>Number(a);return[D,P]},y=0,v=f.length-1,b=0,k;y<=v&&b<=f.length-1;){var w=Math.floor((y+v)/2),x=w-1,j=m(x),S=nP(j,2),A=S[0],C=S[1],O=m(w),N=nP(O,1),L=N[0];if(!A&&!L&&(y=w+1),A&&L&&(v=w-1),!A&&L){k=C;break}b++}return k||h},aP=function(t){var n=Ae(t)?[]:t.toString().split(mF);return[{words:n}]},Jwe=function(t){var n=t.width,r=t.scaleToFit,a=t.children,o=t.style,i=t.breakAll,s=t.maxLines;if((n||r)&&!_s.isSsr){var c,l,u=gF({breakAll:i,children:a,style:o});if(u){var f=u.wordsWithComputedWidth,d=u.spaceWidth;c=f,l=d}else return aP(a);return Xwe({breakAll:i,children:a,maxLines:s,style:o},c,l,n,r)}return aP(a)},oP="#808080",Ul=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,i=t.lineHeight,s=i===void 0?"1em":i,c=t.capHeight,l=c===void 0?"0.71em":c,u=t.scaleToFit,f=u===void 0?!1:u,d=t.textAnchor,h=d===void 0?"start":d,g=t.verticalAnchor,p=g===void 0?"end":g,m=t.fill,y=m===void 0?oP:m,v=tP(t,Wwe),b=_.useMemo(function(){return Jwe({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:f,style:v.style,width:v.width})},[v.breakAll,v.children,v.maxLines,f,v.style,v.width]),k=v.dx,w=v.dy,x=v.angle,j=v.className,S=v.breakAll,A=tP(v,qwe);if(!Pt(r)||!Pt(o))return null;var C=r+(se(k)?k:0),O=o+(se(w)?w:0),N;switch(p){case"start":N=nw("calc(".concat(l,")"));break;case"middle":N=nw("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:N=nw("calc(".concat(b.length-1," * -").concat(s,")"));break}var L=[];if(f){var z=b[0].width,T=v.width;L.push("scale(".concat((se(T)?T/z:1)/z,")"))}return x&&L.push("rotate(".concat(x,", ").concat(C,", ").concat(O,")")),L.length&&(A.transform=L.join(" ")),B.createElement("text",ex({},ye(A,!0),{x:C,y:O,className:Ie("recharts-text",j),textAnchor:h,fill:y.includes("url")?oP:y}),b.map(function(I,M){var P=I.words.join(S?"":" ");return B.createElement("tspan",{x:C,dy:M===0?N:s,key:"".concat(P,"-").concat(M)},P)}))};function pi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function e1e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function RE(e){let t,n,r;e.length!==2?(t=pi,n=(s,c)=>pi(e(s),c),r=(s,c)=>e(s)-c):(t=e===pi||e===e1e?e:t1e,n=e,r=e);function a(s,c,l=0,u=s.length){if(l>>1;n(s[f],c)<0?l=f+1:u=f}while(l>>1;n(s[f],c)<=0?l=f+1:u=f}while(ll&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:a,center:i,right:o}}function t1e(){return 0}function yF(e){return e===null?NaN:+e}function*n1e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const r1e=RE(pi),$p=r1e.right;RE(yF).center;class iP extends Map{constructor(t,n=i1e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(sP(this,t))}has(t){return super.has(sP(this,t))}set(t,n){return super.set(a1e(this,t),n)}delete(t){return super.delete(o1e(this,t))}}function sP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function a1e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function o1e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function i1e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function s1e(e=pi){if(e===pi)return vF;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function vF(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const c1e=Math.sqrt(50),l1e=Math.sqrt(10),u1e=Math.sqrt(2);function xg(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),i=o>=c1e?10:o>=l1e?5:o>=u1e?2:1;let s,c,l;return a<0?(l=Math.pow(10,-a)/i,s=Math.round(e*l),c=Math.round(t*l),s/lt&&--c,l=-l):(l=Math.pow(10,a)*i,s=Math.round(e/l),c=Math.round(t/l),s*lt&&--c),c0))return[];if(e===t)return[e];const r=t=a))return[];const s=o-a+1,c=new Array(s);if(r)if(i<0)for(let l=0;l=r)&&(n=r);return n}function lP(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function bF(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?vF:s1e(a);r>n;){if(r-n>600){const c=r-n+1,l=t-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(n,Math.floor(t-l*f/c+d)),g=Math.min(r,Math.floor(t+(c-l)*f/c+d));bF(e,t,h,g,a)}const o=e[t];let i=n,s=r;for(Qu(e,n,t),a(e[r],o)>0&&Qu(e,n,r);i0;)--s}a(e[n],o)===0?Qu(e,n,s):(++s,Qu(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Qu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function f1e(e,t,n){if(e=Float64Array.from(n1e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return lP(e);if(t>=1)return cP(e);var r,a=(r-1)*t,o=Math.floor(a),i=cP(bF(e,o).subarray(0,o+1)),s=lP(e.subarray(o+1));return i+(s-i)*(a-o)}}function d1e(e,t,n=yF){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,o=Math.floor(a),i=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return i+(s-i)*(a-o)}}function p1e(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(a);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ch(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ch(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=m1e.exec(e))?new On(t[1],t[2],t[3],1):(t=g1e.exec(e))?new On(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=y1e.exec(e))?Ch(t[1],t[2],t[3],t[4]):(t=v1e.exec(e))?Ch(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=b1e.exec(e))?gP(t[1],t[2]/100,t[3]/100,1):(t=w1e.exec(e))?gP(t[1],t[2]/100,t[3]/100,t[4]):uP.hasOwnProperty(e)?pP(uP[e]):e==="transparent"?new On(NaN,NaN,NaN,0):null}function pP(e){return new On(e>>16&255,e>>8&255,e&255,1)}function Ch(e,t,n,r){return r<=0&&(e=t=n=NaN),new On(e,t,n,r)}function j1e(e){return e instanceof Rp||(e=Bd(e)),e?(e=e.rgb(),new On(e.r,e.g,e.b,e.opacity)):new On}function ox(e,t,n,r){return arguments.length===1?j1e(e):new On(e,t,n,r??1)}function On(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}BE(On,ox,kF(Rp,{brighter(e){return e=e==null?jg:Math.pow(jg,e),new On(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new On(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new On(Ss(this.r),Ss(this.g),Ss(this.b),_g(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:hP,formatHex:hP,formatHex8:_1e,formatRgb:mP,toString:mP}));function hP(){return`#${us(this.r)}${us(this.g)}${us(this.b)}`}function _1e(){return`#${us(this.r)}${us(this.g)}${us(this.b)}${us((isNaN(this.opacity)?1:this.opacity)*255)}`}function mP(){const e=_g(this.opacity);return`${e===1?"rgb(":"rgba("}${Ss(this.r)}, ${Ss(this.g)}, ${Ss(this.b)}${e===1?")":`, ${e})`}`}function _g(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ss(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function us(e){return e=Ss(e),(e<16?"0":"")+e.toString(16)}function gP(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pr(e,t,n,r)}function xF(e){if(e instanceof Pr)return new Pr(e.h,e.s,e.l,e.opacity);if(e instanceof Rp||(e=Bd(e)),!e)return new Pr;if(e instanceof Pr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,s=o-a,c=(o+a)/2;return s?(t===o?i=(n-r)/s+(n0&&c<1?0:i,new Pr(i,s,c,e.opacity)}function S1e(e,t,n,r){return arguments.length===1?xF(e):new Pr(e,t,n,r??1)}function Pr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}BE(Pr,S1e,kF(Rp,{brighter(e){return e=e==null?jg:Math.pow(jg,e),new Pr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new Pr(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,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new On(rw(e>=240?e-240:e+120,a,r),rw(e,a,r),rw(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Pr(yP(this.h),Ih(this.s),Ih(this.l),_g(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=_g(this.opacity);return`${e===1?"hsl(":"hsla("}${yP(this.h)}, ${Ih(this.s)*100}%, ${Ih(this.l)*100}%${e===1?")":`, ${e})`}`}}));function yP(e){return e=(e||0)%360,e<0?e+360:e}function Ih(e){return Math.max(0,Math.min(1,e||0))}function rw(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const FE=e=>()=>e;function E1e(e,t){return function(n){return e+n*t}}function A1e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function O1e(e){return(e=+e)==1?jF:function(t,n){return n-t?A1e(t,n,e):FE(isNaN(t)?n:t)}}function jF(e,t){var n=t-e;return n?E1e(e,n):FE(isNaN(e)?t:e)}const vP=function e(t){var n=O1e(t);function r(a,o){var i=n((a=ox(a)).r,(o=ox(o)).r),s=n(a.g,o.g),c=n(a.b,o.b),l=jF(a.opacity,o.opacity);return function(u){return a.r=i(u),a.g=s(u),a.b=c(u),a.opacity=l(u),a+""}}return r.gamma=e,r}(1);function T1e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(o){for(a=0;an&&(o=t.slice(n,o),s[i]?s[i]+=o:s[++i]=o),(r=r[0])===(a=a[0])?s[i]?s[i]+=a:s[++i]=a:(s[++i]=null,c.push({i,x:Sg(r,a)})),n=aw.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function B1e(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return a2?F1e:B1e,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?o:(c||(c=s(e.map(r),t,n)))(r(i(d)))}return f.invert=function(d){return i(a((l||(l=s(t,e.map(r),Sg)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Eg),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),n=UE,u()},f.clamp=function(d){return arguments.length?(i=d?!0:pn,u()):i!==pn},f.interpolate=function(d){return arguments.length?(n=d,u()):n},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,h){return r=d,a=h,u()}}function HE(){return _v()(pn,pn)}function U1e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ag(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Hl(e){return e=Ag(Math.abs(e)),e?e[1]:NaN}function H1e(e,t){return function(n,r){for(var a=n.length,o=[],i=0,s=e[0],c=0;a>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(a-=s,a+s)),!((c+=s+1)>r));)s=e[i=(i+1)%e.length];return o.reverse().join(t)}}function V1e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var W1e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fd(e){if(!(t=W1e.exec(e)))throw new Error("invalid format: "+e);var t;return new VE({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]})}Fd.prototype=VE.prototype;function VE(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+""}VE.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 q1e(e){e:for(var t=e.length,n=1,r=-1,a;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var _F;function G1e(e,t){var n=Ag(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(_F=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ag(e,Math.max(0,t+o-1))[0]}function wP(e,t){var n=Ag(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const kP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:U1e,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)=>wP(e*100,t),r:wP,s:G1e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xP(e){return e}var jP=Array.prototype.map,_P=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function K1e(e){var t=e.grouping===void 0||e.thousands===void 0?xP:H1e(jP.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?xP:V1e(jP.call(e.numerals,String)),i=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=Fd(f);var d=f.fill,h=f.align,g=f.sign,p=f.symbol,m=f.zero,y=f.width,v=f.comma,b=f.precision,k=f.trim,w=f.type;w==="n"?(v=!0,w="g"):kP[w]||(b===void 0&&(b=12),k=!0,w="g"),(m||d==="0"&&h==="=")&&(m=!0,d="0",h="=");var x=p==="$"?n:p==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",j=p==="$"?r:/[%p]/.test(w)?i:"",S=kP[w],A=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function C(O){var N=x,L=j,z,T,I;if(w==="c")L=S(O)+L,O="";else{O=+O;var M=O<0||1/O<0;if(O=isNaN(O)?c:S(Math.abs(O),b),k&&(O=q1e(O)),M&&+O==0&&g!=="+"&&(M=!1),N=(M?g==="("?g:s:g==="-"||g==="("?"":g)+N,L=(w==="s"?_P[8+_F/3]:"")+L+(M&&g==="("?")":""),A){for(z=-1,T=O.length;++zI||I>57){L=(I===46?a+O.slice(z+1):O.slice(z))+L,O=O.slice(0,z);break}}}v&&!m&&(O=t(O,1/0));var P=N.length+O.length+L.length,D=P>1)+N+O+L+D.slice(P);break;default:O=D+N+O+L;break}return o(O)}return C.toString=function(){return f+""},C}function u(f,d){var h=l((f=Fd(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Hl(d)/3)))*3,p=Math.pow(10,-g),m=_P[8+g/3];return function(y){return h(p*y)+m}}return{format:l,formatPrefix:u}}var Ph,WE,SF;Y1e({thousands:",",grouping:[3],currency:["$",""]});function Y1e(e){return Ph=K1e(e),WE=Ph.format,SF=Ph.formatPrefix,Ph}function Z1e(e){return Math.max(0,-Hl(Math.abs(e)))}function Q1e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hl(t)/3)))*3-Hl(Math.abs(e)))}function X1e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hl(t)-Hl(e))+1}function EF(e,t,n,r){var a=rx(e,t,n),o;switch(r=Fd(r??",f"),r.type){case"s":{var i=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Q1e(a,i))&&(r.precision=o),SF(r,i)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=X1e(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Z1e(a))&&(r.precision=o-(r.type==="%")*2);break}}return WE(r)}function Di(e){var t=e.domain;return e.ticks=function(n){var r=t();return tx(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return EF(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,o=r.length-1,i=r[a],s=r[o],c,l,u=10;for(s0;){if(l=nx(i,s,n),l===c)return r[a]=i,r[o]=s,t(r);if(l>0)i=Math.floor(i/l)*l,s=Math.ceil(s/l)*l;else if(l<0)i=Math.ceil(i*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Og(){var e=HE();return e.copy=function(){return Lp(e,Og())},wr.apply(e,arguments),Di(e)}function AF(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Eg),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return AF(e).unknown(t)},e=arguments.length?Array.from(e,Eg):[0,1],Di(n)}function OF(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],o=e[r],i;return oMath.pow(e,t)}function rke(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 AP(e){return(t,n)=>-e(-t,n)}function qE(e){const t=e(SP,EP),n=t.domain;let r=10,a,o;function i(){return a=rke(r),o=nke(r),n()[0]<0?(a=AP(a),o=AP(o),e(J1e,eke)):e(SP,EP),t}return t.base=function(s){return arguments.length?(r=+s,i()):r},t.domain=function(s){return arguments.length?(n(s),i()):n()},t.ticks=s=>{const c=n();let l=c[0],u=c[c.length-1];const f=u0){for(;d<=h;++d)for(g=1;gu)break;y.push(p)}}else for(;d<=h;++d)for(g=r-1;g>=1;--g)if(p=d>0?g/o(-d):g*o(d),!(pu)break;y.push(p)}y.length*2{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Fd(c)).precision==null&&(c.trim=!0),c=WE(c)),s===1/0)return c;const l=Math.max(1,r*s/t.ticks().length);return u=>{let f=u/o(Math.round(a(u)));return f*rn(OF(n(),{floor:s=>o(Math.floor(a(s))),ceil:s=>o(Math.ceil(a(s)))})),t}function TF(){const e=qE(_v()).domain([1,10]);return e.copy=()=>Lp(e,TF()).base(e.base()),wr.apply(e,arguments),e}function OP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function TP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function GE(e){var t=1,n=e(OP(t),TP(t));return n.constant=function(r){return arguments.length?e(OP(t=+r),TP(t)):t},Di(n)}function CF(){var e=GE(_v());return e.copy=function(){return Lp(e,CF()).constant(e.constant())},wr.apply(e,arguments)}function CP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ake(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function oke(e){return e<0?-e*e:e*e}function KE(e){var t=e(pn,pn),n=1;function r(){return n===1?e(pn,pn):n===.5?e(ake,oke):e(CP(n),CP(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Di(t)}function YE(){var e=KE(_v());return e.copy=function(){return Lp(e,YE()).exponent(e.exponent())},wr.apply(e,arguments),e}function ike(){return YE.apply(null,arguments).exponent(.5)}function IP(e){return Math.sign(e)*e*e}function ske(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function IF(){var e=HE(),t=[0,1],n=!1,r;function a(o){var i=ske(e(o));return isNaN(i)?r:n?Math.round(i):i}return a.invert=function(o){return e.invert(IP(o))},a.domain=function(o){return arguments.length?(e.domain(o),a):e.domain()},a.range=function(o){return arguments.length?(e.range((t=Array.from(o,Eg)).map(IP)),a):t.slice()},a.rangeRound=function(o){return a.range(o).round(!0)},a.round=function(o){return arguments.length?(n=!!o,a):n},a.clamp=function(o){return arguments.length?(e.clamp(o),a):e.clamp()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.copy=function(){return IF(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wr.apply(a,arguments),Di(a)}function PF(){var e=[],t=[],n=[],r;function a(){var i=0,s=Math.max(1,t.length);for(n=new Array(s-1);++i0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},i.unknown=function(c){return arguments.length&&(o=c),i},i.thresholds=function(){return r.slice()},i.copy=function(){return NF().domain([e,t]).range(a).unknown(o)},wr.apply(Di(i),arguments)}function MF(){var e=[.5],t=[0,1],n,r=1;function a(o){return o!=null&&o<=o?t[$p(e,o,0,r)]:n}return a.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(o){var i=t.indexOf(o);return[e[i-1],e[i]]},a.unknown=function(o){return arguments.length?(n=o,a):n},a.copy=function(){return MF().domain(e).range(t).unknown(n)},wr.apply(a,arguments)}const ow=new Date,iw=new Date;function Mt(e,t,n,r){function a(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return a.floor=o=>(e(o=new Date(+o)),o),a.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),a.round=o=>{const i=a(o),s=a.ceil(o);return o-i(t(o=new Date(+o),i==null?1:Math.floor(i)),o),a.range=(o,i,s)=>{const c=[];if(o=a.ceil(o),s=s==null?1:Math.floor(s),!(o0))return c;let l;do c.push(l=new Date(+o)),t(o,s),e(o);while(lMt(i=>{if(i>=i)for(;e(i),!o(i);)i.setTime(i-1)},(i,s)=>{if(i>=i)if(s<0)for(;++s<=0;)for(;t(i,-1),!o(i););else for(;--s>=0;)for(;t(i,1),!o(i););}),n&&(a.count=(o,i)=>(ow.setTime(+o),iw.setTime(+i),e(ow),e(iw),Math.floor(n(ow,iw))),a.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?a.filter(r?i=>r(i)%o===0:i=>a.count(0,i)%o===0):a)),a}const Tg=Mt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Tg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Mt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Tg);Tg.range;const Qa=1e3,pr=Qa*60,Xa=pr*60,uo=Xa*24,ZE=uo*7,PP=uo*30,sw=uo*365,fs=Mt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Qa)},(e,t)=>(t-e)/Qa,e=>e.getUTCSeconds());fs.range;const QE=Mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qa)},(e,t)=>{e.setTime(+e+t*pr)},(e,t)=>(t-e)/pr,e=>e.getMinutes());QE.range;const XE=Mt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*pr)},(e,t)=>(t-e)/pr,e=>e.getUTCMinutes());XE.range;const JE=Mt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Qa-e.getMinutes()*pr)},(e,t)=>{e.setTime(+e+t*Xa)},(e,t)=>(t-e)/Xa,e=>e.getHours());JE.range;const eA=Mt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xa)},(e,t)=>(t-e)/Xa,e=>e.getUTCHours());eA.range;const Bp=Mt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*pr)/uo,e=>e.getDate()-1);Bp.range;const Sv=Mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/uo,e=>e.getUTCDate()-1);Sv.range;const DF=Mt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/uo,e=>Math.floor(e/uo));DF.range;function oc(e){return Mt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*pr)/ZE)}const Ev=oc(0),Cg=oc(1),cke=oc(2),lke=oc(3),Vl=oc(4),uke=oc(5),fke=oc(6);Ev.range;Cg.range;cke.range;lke.range;Vl.range;uke.range;fke.range;function ic(e){return Mt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/ZE)}const Av=ic(0),Ig=ic(1),dke=ic(2),pke=ic(3),Wl=ic(4),hke=ic(5),mke=ic(6);Av.range;Ig.range;dke.range;pke.range;Wl.range;hke.range;mke.range;const tA=Mt(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());tA.range;const nA=Mt(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());nA.range;const fo=Mt(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());fo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});fo.range;const po=Mt(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());po.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});po.range;function zF(e,t,n,r,a,o){const i=[[fs,1,Qa],[fs,5,5*Qa],[fs,15,15*Qa],[fs,30,30*Qa],[o,1,pr],[o,5,5*pr],[o,15,15*pr],[o,30,30*pr],[a,1,Xa],[a,3,3*Xa],[a,6,6*Xa],[a,12,12*Xa],[r,1,uo],[r,2,2*uo],[n,1,ZE],[t,1,PP],[t,3,3*PP],[e,1,sw]];function s(l,u,f){const d=um).right(i,d);if(h===i.length)return e.every(rx(l/sw,u/sw,f));if(h===0)return Tg.every(Math.max(rx(l,u,f),1));const[g,p]=i[d/i[h-1][2]53)return null;"w"in F||(F.w=1),"Z"in F?(ce=lw(Xu(F.y,0,1)),je=ce.getUTCDay(),ce=je>4||je===0?Ig.ceil(ce):Ig(ce),ce=Sv.offset(ce,(F.V-1)*7),F.y=ce.getUTCFullYear(),F.m=ce.getUTCMonth(),F.d=ce.getUTCDate()+(F.w+6)%7):(ce=cw(Xu(F.y,0,1)),je=ce.getDay(),ce=je>4||je===0?Cg.ceil(ce):Cg(ce),ce=Bp.offset(ce,(F.V-1)*7),F.y=ce.getFullYear(),F.m=ce.getMonth(),F.d=ce.getDate()+(F.w+6)%7)}else("W"in F||"U"in F)&&("w"in F||(F.w="u"in F?F.u%7:"W"in F?1:0),je="Z"in F?lw(Xu(F.y,0,1)).getUTCDay():cw(Xu(F.y,0,1)).getDay(),F.m=0,F.d="W"in F?(F.w+6)%7+F.W*7-(je+5)%7:F.w+F.U*7-(je+6)%7);return"Z"in F?(F.H+=F.Z/100|0,F.M+=F.Z%100,lw(F)):cw(F)}}function S(V,Z,J,F){for(var re=0,ce=Z.length,je=J.length,we,tt;re=je)return-1;if(we=Z.charCodeAt(re++),we===37){if(we=Z.charAt(re++),tt=w[we in NP?Z.charAt(re++):we],!tt||(F=tt(V,J,F))<0)return-1}else if(we!=J.charCodeAt(F++))return-1}return F}function A(V,Z,J){var F=l.exec(Z.slice(J));return F?(V.p=u.get(F[0].toLowerCase()),J+F[0].length):-1}function C(V,Z,J){var F=h.exec(Z.slice(J));return F?(V.w=g.get(F[0].toLowerCase()),J+F[0].length):-1}function O(V,Z,J){var F=f.exec(Z.slice(J));return F?(V.w=d.get(F[0].toLowerCase()),J+F[0].length):-1}function N(V,Z,J){var F=y.exec(Z.slice(J));return F?(V.m=v.get(F[0].toLowerCase()),J+F[0].length):-1}function L(V,Z,J){var F=p.exec(Z.slice(J));return F?(V.m=m.get(F[0].toLowerCase()),J+F[0].length):-1}function z(V,Z,J){return S(V,t,Z,J)}function T(V,Z,J){return S(V,n,Z,J)}function I(V,Z,J){return S(V,r,Z,J)}function M(V){return i[V.getDay()]}function P(V){return o[V.getDay()]}function D(V){return c[V.getMonth()]}function U(V){return s[V.getMonth()]}function W(V){return a[+(V.getHours()>=12)]}function q(V){return 1+~~(V.getMonth()/3)}function ne(V){return i[V.getUTCDay()]}function $(V){return o[V.getUTCDay()]}function H(V){return c[V.getUTCMonth()]}function G(V){return s[V.getUTCMonth()]}function Q(V){return a[+(V.getUTCHours()>=12)]}function te(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Z=x(V+="",b);return Z.toString=function(){return V},Z},parse:function(V){var Z=j(V+="",!1);return Z.toString=function(){return V},Z},utcFormat:function(V){var Z=x(V+="",k);return Z.toString=function(){return V},Z},utcParse:function(V){var Z=j(V+="",!0);return Z.toString=function(){return V},Z}}}var NP={"-":"",_:" ",0:"0"},Vt=/^\s*\d+/,kke=/^%/,xke=/[\\^$*+?|[\]().{}]/g;function Ne(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",o=a.length;return r+(o[t.toLowerCase(),n]))}function _ke(e,t,n){var r=Vt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ske(e,t,n){var r=Vt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Eke(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ake(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Oke(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function MP(e,t,n){var r=Vt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function DP(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Tke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Cke(e,t,n){var r=Vt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ike(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function zP(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Pke(e,t,n){var r=Vt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function $P(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Nke(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Mke(e,t,n){var r=Vt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Dke(e,t,n){var r=Vt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zke(e,t,n){var r=Vt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $ke(e,t,n){var r=kke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Rke(e,t,n){var r=Vt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Lke(e,t,n){var r=Vt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function RP(e,t){return Ne(e.getDate(),t,2)}function Bke(e,t){return Ne(e.getHours(),t,2)}function Fke(e,t){return Ne(e.getHours()%12||12,t,2)}function Uke(e,t){return Ne(1+Bp.count(fo(e),e),t,3)}function $F(e,t){return Ne(e.getMilliseconds(),t,3)}function Hke(e,t){return $F(e,t)+"000"}function Vke(e,t){return Ne(e.getMonth()+1,t,2)}function Wke(e,t){return Ne(e.getMinutes(),t,2)}function qke(e,t){return Ne(e.getSeconds(),t,2)}function Gke(e){var t=e.getDay();return t===0?7:t}function Kke(e,t){return Ne(Ev.count(fo(e)-1,e),t,2)}function RF(e){var t=e.getDay();return t>=4||t===0?Vl(e):Vl.ceil(e)}function Yke(e,t){return e=RF(e),Ne(Vl.count(fo(e),e)+(fo(e).getDay()===4),t,2)}function Zke(e){return e.getDay()}function Qke(e,t){return Ne(Cg.count(fo(e)-1,e),t,2)}function Xke(e,t){return Ne(e.getFullYear()%100,t,2)}function Jke(e,t){return e=RF(e),Ne(e.getFullYear()%100,t,2)}function exe(e,t){return Ne(e.getFullYear()%1e4,t,4)}function txe(e,t){var n=e.getDay();return e=n>=4||n===0?Vl(e):Vl.ceil(e),Ne(e.getFullYear()%1e4,t,4)}function nxe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ne(t/60|0,"0",2)+Ne(t%60,"0",2)}function LP(e,t){return Ne(e.getUTCDate(),t,2)}function rxe(e,t){return Ne(e.getUTCHours(),t,2)}function axe(e,t){return Ne(e.getUTCHours()%12||12,t,2)}function oxe(e,t){return Ne(1+Sv.count(po(e),e),t,3)}function LF(e,t){return Ne(e.getUTCMilliseconds(),t,3)}function ixe(e,t){return LF(e,t)+"000"}function sxe(e,t){return Ne(e.getUTCMonth()+1,t,2)}function cxe(e,t){return Ne(e.getUTCMinutes(),t,2)}function lxe(e,t){return Ne(e.getUTCSeconds(),t,2)}function uxe(e){var t=e.getUTCDay();return t===0?7:t}function fxe(e,t){return Ne(Av.count(po(e)-1,e),t,2)}function BF(e){var t=e.getUTCDay();return t>=4||t===0?Wl(e):Wl.ceil(e)}function dxe(e,t){return e=BF(e),Ne(Wl.count(po(e),e)+(po(e).getUTCDay()===4),t,2)}function pxe(e){return e.getUTCDay()}function hxe(e,t){return Ne(Ig.count(po(e)-1,e),t,2)}function mxe(e,t){return Ne(e.getUTCFullYear()%100,t,2)}function gxe(e,t){return e=BF(e),Ne(e.getUTCFullYear()%100,t,2)}function yxe(e,t){return Ne(e.getUTCFullYear()%1e4,t,4)}function vxe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Wl(e):Wl.ceil(e),Ne(e.getUTCFullYear()%1e4,t,4)}function bxe(){return"+0000"}function BP(){return"%"}function FP(e){return+e}function UP(e){return Math.floor(+e/1e3)}var mc,FF,UF;wxe({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 wxe(e){return mc=wke(e),FF=mc.format,mc.parse,UF=mc.utcFormat,mc.utcParse,mc}function kxe(e){return new Date(e)}function xxe(e){return e instanceof Date?+e:+new Date(+e)}function rA(e,t,n,r,a,o,i,s,c,l){var u=HE(),f=u.invert,d=u.domain,h=l(".%L"),g=l(":%S"),p=l("%I:%M"),m=l("%I %p"),y=l("%a %d"),v=l("%b %d"),b=l("%B"),k=l("%Y");function w(x){return(c(x)t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,o)=>f1e(e,o/r))},n.copy=function(){return qF(t).domain(e)},vo.apply(n,arguments)}function Tv(){var e=0,t=.5,n=1,r=1,a,o,i,s,c,l=pn,u,f=!1,d;function h(p){return isNaN(p=+p)?d:(p=.5+((p=+u(p))-o)*(r*pt}var ZF=Txe,Cxe=Cv,Ixe=ZF,Pxe=Tu;function Nxe(e){return e&&e.length?Cxe(e,Pxe,Ixe):void 0}var Mxe=Nxe;const Iv=ze(Mxe);function Dxe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,a=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===a?0:r>a^o.s<0?1:-1};ue.decimalPlaces=ue.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Je;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ue.dividedBy=ue.div=function(e){return no(this,new this.constructor(e))};ue.dividedToIntegerBy=ue.idiv=function(e){var t=this,n=t.constructor;return Ve(no(t,new n(e),0,1),n.precision)};ue.equals=ue.eq=function(e){return!this.cmp(e)};ue.exponent=function(){return jt(this)};ue.greaterThan=ue.gt=function(e){return this.cmp(e)>0};ue.greaterThanOrEqualTo=ue.gte=function(e){return this.cmp(e)>=0};ue.isInteger=ue.isint=function(){return this.e>this.d.length-2};ue.isNegative=ue.isneg=function(){return this.s<0};ue.isPositive=ue.ispos=function(){return this.s>0};ue.isZero=function(){return this.s===0};ue.lessThan=ue.lt=function(e){return this.cmp(e)<0};ue.lessThanOrEqualTo=ue.lte=function(e){return this.cmp(e)<1};ue.logarithm=ue.log=function(e){var t,n=this,r=n.constructor,a=r.precision,o=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Fn))throw Error(vr+"NaN");if(n.s<1)throw Error(vr+(n.s?"NaN":"-Infinity"));return n.eq(Fn)?new r(0):(ot=!1,t=no(Ud(n,o),Ud(e,o),o),ot=!0,Ve(t,a))};ue.minus=ue.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?tU(t,e):JF(t,(e.s=-e.s,e))};ue.modulo=ue.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(vr+"NaN");return n.s?(ot=!1,t=no(n,e,0,1).times(e),ot=!0,n.minus(t)):Ve(new r(n),a)};ue.naturalExponential=ue.exp=function(){return eU(this)};ue.naturalLogarithm=ue.ln=function(){return Ud(this)};ue.negated=ue.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ue.plus=ue.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?JF(t,e):tU(t,(e.s=-e.s,e))};ue.precision=ue.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Es+e);if(t=jt(a)+1,r=a.d.length-1,n=r*Je+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ue.squareRoot=ue.sqrt=function(){var e,t,n,r,a,o,i,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(vr+"NaN")}for(e=jt(s),ot=!1,a=Math.sqrt(+s),a==0||a==1/0?(t=pa(s.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Pu((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=i=n+3;;)if(o=r,r=o.plus(no(s,o,i+2)).times(.5),pa(o.d).slice(0,i)===(t=pa(r.d)).slice(0,i)){if(t=t.slice(i-3,i+1),a==i&&t=="4999"){if(Ve(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;i+=4}return ot=!0,Ve(r,n)};ue.times=ue.mul=function(e){var t,n,r,a,o,i,s,c,l,u=this,f=u.constructor,d=u.d,h=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,n=u.e+e.e,c=d.length,l=h.length,c=0;){for(t=0,a=c+r;a>r;)s=o[a]+h[r]*d[a-r-1]+t,o[a--]=s%zt|0,t=s/zt|0;o[a]=(o[a]+t)%zt|0}for(;!o[--i];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ot?Ve(e,f.precision):e};ue.toDecimalPlaces=ue.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ta(e,0,Iu),t===void 0?t=r.rounding:Ta(t,0,8),Ve(n,e+jt(n)+1,t))};ue.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Qs(r,!0):(Ta(e,0,Iu),t===void 0?t=a.rounding:Ta(t,0,8),r=Ve(new a(r),e+1,t),n=Qs(r,!0,e+1)),n};ue.toFixed=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?Qs(a):(Ta(e,0,Iu),t===void 0?t=o.rounding:Ta(t,0,8),r=Ve(new o(a),e+jt(a)+1,t),n=Qs(r.abs(),!1,e+jt(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};ue.toInteger=ue.toint=function(){var e=this,t=e.constructor;return Ve(new t(e),jt(e)+1,t.rounding)};ue.toNumber=function(){return+this};ue.toPower=ue.pow=function(e){var t,n,r,a,o,i,s=this,c=s.constructor,l=12,u=+(e=new c(e));if(!e.s)return new c(Fn);if(s=new c(s),!s.s){if(e.s<1)throw Error(vr+"Infinity");return s}if(s.eq(Fn))return s;if(r=c.precision,e.eq(Fn))return Ve(s,r);if(t=e.e,n=e.d.length-1,i=t>=n,o=s.s,i){if((n=u<0?-u:u)<=XF){for(a=new c(Fn),t=Math.ceil(r/Je+4),ot=!1;n%2&&(a=a.times(s),WP(a.d,t)),n=Pu(n/2),n!==0;)s=s.times(s),WP(s.d,t);return ot=!0,e.s<0?new c(Fn).div(a):Ve(a,r)}}else if(o<0)throw Error(vr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ot=!1,a=e.times(Ud(s,r+l)),ot=!0,a=eU(a),a.s=o,a};ue.toPrecision=function(e,t){var n,r,a=this,o=a.constructor;return e===void 0?(n=jt(a),r=Qs(a,n<=o.toExpNeg||n>=o.toExpPos)):(Ta(e,1,Iu),t===void 0?t=o.rounding:Ta(t,0,8),a=Ve(new o(a),e,t),n=jt(a),r=Qs(a,e<=n||n<=o.toExpNeg,e)),r};ue.toSignificantDigits=ue.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ta(e,1,Iu),t===void 0?t=r.rounding:Ta(t,0,8)),Ve(new r(n),e,t)};ue.toString=ue.valueOf=ue.val=ue.toJSON=ue[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=jt(e),n=e.constructor;return Qs(e,t<=n.toExpNeg||t>=n.toExpPos)};function JF(e,t){var n,r,a,o,i,s,c,l,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),ot?Ve(t,f):t;if(c=e.d,l=t.d,i=e.e,a=t.e,c=c.slice(),o=i-a,o){for(o<0?(r=c,o=-o,s=l.length):(r=l,a=i,s=c.length),i=Math.ceil(f/Je),s=i>s?i+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=c.length,o=l.length,s-o<0&&(o=s,r=l,l=c,c=r),n=0;o;)n=(c[--o]=c[o]+l[o]+n)/zt|0,c[o]%=zt;for(n&&(c.unshift(n),++a),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=a,ot?Ve(t,f):t}function Ta(e,t,n){if(e!==~~e||en)throw Error(Es+e)}function pa(e){var t,n,r,a=e.length-1,o="",i=e[0];if(a>0){for(o+=i,t=1;ti?1:-1;else for(s=c=0;sa[s]?1:-1;break}return c}function n(r,a,o){for(var i=0;o--;)r[o]-=i,i=r[o]1;)r.shift()}return function(r,a,o,i){var s,c,l,u,f,d,h,g,p,m,y,v,b,k,w,x,j,S,A=r.constructor,C=r.s==a.s?1:-1,O=r.d,N=a.d;if(!r.s)return new A(r);if(!a.s)throw Error(vr+"Division by zero");for(c=r.e-a.e,j=N.length,w=O.length,h=new A(C),g=h.d=[],l=0;N[l]==(O[l]||0);)++l;if(N[l]>(O[l]||0)&&--c,o==null?v=o=A.precision:i?v=o+(jt(r)-jt(a))+1:v=o,v<0)return new A(0);if(v=v/Je+2|0,l=0,j==1)for(u=0,N=N[0],v++;(l1&&(N=e(N,u),O=e(O,u),j=N.length,w=O.length),k=j,p=O.slice(0,j),m=p.length;m=zt/2&&++x;do u=0,s=t(N,p,j,m),s<0?(y=p[0],j!=m&&(y=y*zt+(p[1]||0)),u=y/x|0,u>1?(u>=zt&&(u=zt-1),f=e(N,u),d=f.length,m=p.length,s=t(f,p,d,m),s==1&&(u--,n(f,j16)throw Error(sA+jt(e));if(!e.s)return new u(Fn);for(t==null?(ot=!1,s=f):s=t,i=new u(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(r=Math.log(Gi(2,l))/Math.LN10*2+5|0,s+=r,n=a=o=new u(Fn),u.precision=s;;){if(a=Ve(a.times(e),s),n=n.times(++c),i=o.plus(no(a,n,s)),pa(i.d).slice(0,s)===pa(o.d).slice(0,s)){for(;l--;)o=Ve(o.times(o),s);return u.precision=f,t==null?(ot=!0,Ve(o,f)):o}o=i}}function jt(e){for(var t=e.e*Je,n=e.d[0];n>=10;n/=10)t++;return t}function uw(e,t,n){if(t>e.LN10.sd())throw ot=!0,n&&(e.precision=n),Error(vr+"LN10 precision limit exceeded");return Ve(new e(e.LN10),t)}function Do(e){for(var t="";e--;)t+="0";return t}function Ud(e,t){var n,r,a,o,i,s,c,l,u,f=1,d=10,h=e,g=h.d,p=h.constructor,m=p.precision;if(h.s<1)throw Error(vr+(h.s?"NaN":"-Infinity"));if(h.eq(Fn))return new p(0);if(t==null?(ot=!1,l=m):l=t,h.eq(10))return t==null&&(ot=!0),uw(p,l);if(l+=d,p.precision=l,n=pa(g),r=n.charAt(0),o=jt(h),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=pa(h.d),r=n.charAt(0),f++;o=jt(h),r>1?(h=new p("0."+n),o++):h=new p(r+"."+n.slice(1))}else return c=uw(p,l+2,m).times(o+""),h=Ud(new p(r+"."+n.slice(1)),l-d).plus(c),p.precision=m,t==null?(ot=!0,Ve(h,m)):h;for(s=i=h=no(h.minus(Fn),h.plus(Fn),l),u=Ve(h.times(h),l),a=3;;){if(i=Ve(i.times(u),l),c=s.plus(no(i,new p(a),l)),pa(c.d).slice(0,l)===pa(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(uw(p,l+2,m).times(o+""))),s=no(s,new p(f),l),p.precision=m,t==null?(ot=!0,Ve(s,m)):s;s=c,a+=2}}function VP(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=Pu(n/Je),e.d=[],r=(n+1)%Je,n<0&&(r+=Je),rPg||e.e<-Pg))throw Error(sA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ve(e,t,n){var r,a,o,i,s,c,l,u,f=e.d;for(i=1,o=f[0];o>=10;o/=10)i++;if(r=t-i,r<0)r+=Je,a=t,l=f[u=0];else{if(u=Math.ceil((r+1)/Je),o=f.length,u>=o)return e;for(l=o=f[u],i=1;o>=10;o/=10)i++;r%=Je,a=r-Je+i}if(n!==void 0&&(o=Gi(10,i-a-1),s=l/o%10|0,c=t<0||f[u+1]!==void 0||l%o,c=n<4?(s||c)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||c||n==6&&(r>0?a>0?l/Gi(10,i-a):0:f[u-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(o=jt(e),f.length=1,t=t-o-1,f[0]=Gi(10,(Je-t%Je)%Je),e.e=Pu(-t/Je)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=u,o=1,u--):(f.length=u+1,o=Gi(10,Je-r),f[u]=a>0?(l/Gi(10,i-a)%Gi(10,a)|0)*o:0),c)for(;;)if(u==0){(f[0]+=o)==zt&&(f[0]=1,++e.e);break}else{if(f[u]+=o,f[u]!=zt)break;f[u--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ot&&(e.e>Pg||e.e<-Pg))throw Error(sA+jt(e));return e}function tU(e,t){var n,r,a,o,i,s,c,l,u,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),ot?Ve(t,h):t;if(c=e.d,f=t.d,r=t.e,l=e.e,c=c.slice(),i=l-r,i){for(u=i<0,u?(n=c,i=-i,s=f.length):(n=f,r=l,s=c.length),a=Math.max(Math.ceil(h/Je),s)+2,i>a&&(i=a,n.length=1),n.reverse(),a=i;a--;)n.push(0);n.reverse()}else{for(a=c.length,s=f.length,u=a0;--a)c[s++]=0;for(a=f.length;a>i;){if(c[--a]0?o=o.charAt(0)+"."+o.slice(1)+Do(r):i>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(a<0?"e":"e+")+a):a<0?(o="0."+Do(-a-1)+o,n&&(r=n-i)>0&&(o+=Do(r))):a>=i?(o+=Do(a+1-i),n&&(r=n-a-1)>0&&(o=o+"."+Do(r))):((r=a+1)0&&(a+1===i&&(o+="."),o+=Do(r))),e.s<0?"-"+o:o}function WP(e,t){if(e.length>t)return e.length=t,!0}function nU(e){var t,n,r;function a(o){var i=this;if(!(i instanceof a))return new a(o);if(i.constructor=a,o instanceof a){i.s=o.s,i.e=o.e,i.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Es+o);if(o>0)i.s=1;else if(o<0)o=-o,i.s=-1;else{i.s=0,i.e=0,i.d=[0];return}if(o===~~o&&o<1e7){i.e=0,i.d=[o];return}return VP(i,o.toString())}else if(typeof o!="string")throw Error(Es+o);if(o.charCodeAt(0)===45?(o=o.slice(1),i.s=-1):i.s=1,nje.test(o))VP(i,o);else throw Error(Es+o)}if(a.prototype=ue,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=nU,a.config=a.set=rje,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(Es+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Es+n+": "+r);return this}var cA=nU(tje);Fn=new cA(1);const He=cA;function aje(e){return cje(e)||sje(e)||ije(e)||oje()}function oje(){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 ije(e,t){if(e){if(typeof e=="string")return cx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cx(e,t)}}function sje(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function cje(e){if(Array.isArray(e))return cx(e)}function cx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,a):e(t-i,qP(function(){for(var s=arguments.length,c=new Array(s),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,o=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,o=c}finally{try{!r&&i.return!=null&&i.return()}finally{if(a)throw o}}return n}}function jje(e){if(Array.isArray(e))return e}function sU(e){var t=Hd(e,2),n=t[0],r=t[1],a=n,o=r;return n>r&&(a=r,o=n),[a,o]}function cU(e,t,n){if(e.lte(0))return new He(0);var r=Mv.getDigitCount(e.toNumber()),a=new He(10).pow(r),o=e.div(a),i=r!==1?.05:.1,s=new He(Math.ceil(o.div(i).toNumber())).add(n).mul(i),c=s.mul(a);return t?c:new He(Math.ceil(c))}function _je(e,t,n){var r=1,a=new He(e);if(!a.isint()&&n){var o=Math.abs(e);o<1?(r=new He(10).pow(Mv.getDigitCount(e)-1),a=new He(Math.floor(a.div(r).toNumber())).mul(r)):o>1&&(a=new He(Math.floor(e)))}else e===0?a=new He(Math.floor((t-1)/2)):n||(a=new He(Math.floor(e)));var i=Math.floor((t-1)/2),s=dje(fje(function(c){return a.add(new He(c-i).mul(r)).toNumber()}),lx);return s(0,t)}function lU(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new He(0),tickMin:new He(0),tickMax:new He(0)};var o=cU(new He(t).sub(e).div(n-1),r,a),i;e<=0&&t>=0?i=new He(0):(i=new He(e).add(t).div(2),i=i.sub(new He(i).mod(o)));var s=Math.ceil(i.sub(e).div(o).toNumber()),c=Math.ceil(new He(t).sub(i).div(o).toNumber()),l=s+c+1;return l>n?lU(e,t,n,r,a+1):(l0?c+(n-l):c,s=t>0?s:s+(n-l)),{step:o,tickMin:i.sub(new He(s).mul(o)),tickMax:i.add(new He(c).mul(o))})}function Sje(e){var t=Hd(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(a,2),s=sU([n,r]),c=Hd(s,2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var f=u===1/0?[l].concat(fx(lx(0,a-1).map(function(){return 1/0}))):[].concat(fx(lx(0,a-1).map(function(){return-1/0})),[u]);return n>r?ux(f):f}if(l===u)return _je(l,a,o);var d=lU(l,u,i,o),h=d.step,g=d.tickMin,p=d.tickMax,m=Mv.rangeStep(g,p.add(new He(.1).mul(h)),h);return n>r?ux(m):m}function Eje(e,t){var n=Hd(e,2),r=n[0],a=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=sU([r,a]),s=Hd(i,2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,a];if(c===l)return[c];var u=Math.max(t,2),f=cU(new He(l).sub(c).div(u-1),o,0),d=[].concat(fx(Mv.rangeStep(new He(c),new He(l).sub(new He(.99).mul(f)),f)),[l]);return r>a?ux(d):d}var Aje=oU(Sje),Oje=oU(Eje),Tje="Invariant failed";function ql(e,t){throw new Error(Tje)}var Cje=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Gl(e){"@babel/helpers - typeof";return Gl=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},Gl(e)}function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $je(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lje(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var c=o.range,l=0;l0?a[l-1].coordinate:a[s-1].coordinate,f=a[l].coordinate,d=l>=s-1?a[0].coordinate:a[l+1].coordinate,h=void 0;if(dr(f-u)!==dr(d-f)){var g=[];if(dr(d-f)===dr(c[1]-c[0])){h=d;var p=f+c[1]-c[0];g[0]=Math.min(p,(p+u)/2),g[1]=Math.max(p,(p+u)/2)}else{h=u;var m=d+c[1]-c[0];g[0]=Math.min(f,(m+f)/2),g[1]=Math.max(f,(m+f)/2)}var y=[Math.min(f,(h+f)/2),Math.max(f,(h+f)/2)];if(t>y[0]&&t<=y[1]||t>=g[0]&&t<=g[1]){i=a[l].index;break}}else{var v=Math.min(u,d),b=Math.max(u,d);if(t>(v+f)/2&&t<=(b+f)/2){i=a[l].index;break}}}else for(var k=0;k0&&k(r[k].coordinate+r[k-1].coordinate)/2&&t<=(r[k].coordinate+r[k+1].coordinate)/2||k===s-1&&t>(r[k].coordinate+r[k-1].coordinate)/2){i=r[k].index;break}return i},uA=function(t){var n,r=t,a=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?pt(pt({},t.type.defaultProps),t.props):t.props,i=o.stroke,s=o.fill,c;switch(a){case"Line":c=i;break;case"Area":case"Radar":c=i&&i!=="none"?i:s;break;default:c=s;break}return c},n_e=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,o=a===void 0?{}:a;if(!o)return{};for(var i={},s=Object.keys(o),c=0,l=s.length;c=0});if(y&&y.length){var v=y[0].type.defaultProps,b=v!==void 0?pt(pt({},v),y[0].props):y[0].props,k=b.barSize,w=b[m];i[w]||(i[w]=[]);var x=Ae(k)?n:k;i[w].push({item:y[0],stackList:y.slice(1),barSize:Ae(x)?void 0:An(x,r,0)})}}return i},r_e=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,o=t.sizeList,i=o===void 0?[]:o,s=t.maxBarSize,c=i.length;if(c<1)return null;var l=An(n,a,0,!0),u,f=[];if(i[0].barSize===+i[0].barSize){var d=!1,h=a/c,g=i.reduce(function(k,w){return k+w.barSize||0},0);g+=(c-1)*l,g>=a&&(g-=(c-1)*l,l=0),g>=a&&h>0&&(d=!0,h*=.9,g=c*h);var p=(a-g)/2>>0,m={offset:p-l,size:0};u=i.reduce(function(k,w){var x={item:w.item,position:{offset:m.offset+m.size+l,size:d?h:w.barSize}},j=[].concat(YP(k),[x]);return m=j[j.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(S){j.push({item:S,position:m})}),j},f)}else{var y=An(r,a,0,!0);a-2*y-(c-1)*l<=0&&(l=0);var v=(a-2*y-(c-1)*l)/c;v>1&&(v>>=0);var b=s===+s?Math.min(v,s):v;u=i.reduce(function(k,w,x){var j=[].concat(YP(k),[{item:w.item,position:{offset:y+(v+l)*x+(v-b)/2,size:b}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(S){j.push({item:S,position:j[j.length-1].position})}),j},f)}return u},a_e=function(t,n,r,a){var o=r.children,i=r.width,s=r.margin,c=i-(s.left||0)-(s.right||0),l=pU({children:o,legendWidth:c});if(l){var u=a||{},f=u.width,d=u.height,h=l.align,g=l.verticalAlign,p=l.layout;if((p==="vertical"||p==="horizontal"&&g==="middle")&&h!=="center"&&se(t[h]))return pt(pt({},t),{},tl({},h,t[h]+(f||0)));if((p==="horizontal"||p==="vertical"&&h==="center")&&g!=="middle"&&se(t[g]))return pt(pt({},t),{},tl({},g,t[g]+(d||0)))}return t},o_e=function(t,n,r){return Ae(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},hU=function(t,n,r,a,o){var i=n.props.children,s=ka(i,lA).filter(function(l){return o_e(a,o,l.props.direction)});if(s&&s.length){var c=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,u){var f=Un(u,r);if(Ae(f))return l;var d=Array.isArray(f)?[Pv(f),Iv(f)]:[f,f],h=c.reduce(function(g,p){var m=Un(u,p,0),y=d[0]-Math.abs(Array.isArray(m)?m[0]:m),v=d[1]+Math.abs(Array.isArray(m)?m[1]:m);return[Math.min(y,g[0]),Math.max(v,g[1])]},[1/0,-1/0]);return[Math.min(h[0],l[0]),Math.max(h[1],l[1])]},[1/0,-1/0])}return null},i_e=function(t,n,r,a,o){var i=n.map(function(s){return hU(t,s,r,o,a)}).filter(function(s){return!Ae(s)});return i&&i.length?i.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},mU=function(t,n,r,a,o){var i=n.map(function(c){var l=c.props.dataKey;return r==="number"&&l&&hU(t,c,l,a)||$f(t,l,r,o)});if(r==="number")return i.reduce(function(c,l){return[Math.min(c[0],l[0]),Math.max(c[1],l[1])]},[1/0,-1/0]);var s={};return i.reduce(function(c,l){for(var u=0,f=l.length;u=2?dr(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(f){var d=o?o.indexOf(f):f;return{coordinate:a(d)+l,value:f,offset:l}});return u.filter(function(f){return!zp(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,d){return{coordinate:a(f)+l,value:f,index:d,offset:l}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+l,value:f,offset:l}}):a.domain().map(function(f,d){return{coordinate:a(f)+l,value:o?o[f]:f,index:d,offset:l}})},fw=new WeakMap,Nh=function(t,n){if(typeof n!="function")return t;fw.has(t)||fw.set(t,new WeakMap);var r=fw.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},s_e=function(t,n,r){var a=t.scale,o=t.type,i=t.layout,s=t.axisType;if(a==="auto")return i==="radial"&&s==="radiusAxis"?{scale:$d(),realScaleType:"band"}:i==="radial"&&s==="angleAxis"?{scale:Og(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:zf(),realScaleType:"point"}:o==="category"?{scale:$d(),realScaleType:"band"}:{scale:Og(),realScaleType:"linear"};if(Dp(a)){var c="scale".concat(yv(a));return{scale:(HP[c]||zf)(),realScaleType:HP[c]?c:"point"}}return ke(a)?{scale:a}:{scale:zf(),realScaleType:"point"}},QP=1e-4,c_e=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),o=Math.min(a[0],a[1])-QP,i=Math.max(a[0],a[1])+QP,s=t(n[0]),c=t(n[r-1]);(si||ci)&&t.domain([n[0],n[r-1]])}},l_e=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r=0?(t[s][r][0]=o,t[s][r][1]=o+c,o=t[s][r][1]):(t[s][r][0]=i,t[s][r][1]=i+c,i=t[s][r][1])}},u_e=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r=0?(t[i][r][0]=o,t[i][r][1]=o+s,o=t[i][r][1]):(t[i][r][0]=0,t[i][r][1]=0)}},f_e={sign:l_e,expand:Tde,none:$l,silhouette:Cde,wiggle:Ide,positive:u_e},d_e=function(t,n,r){var a=n.map(function(s){return s.props.dataKey}),o=f_e[r],i=Ode().keys(a).value(function(s,c){return+Un(s,c,0)}).order(Lk).offset(o);return i(t)},p_e=function(t,n,r,a,o,i){if(!t)return null;var s=i?n.reverse():n,c={},l=s.reduce(function(f,d){var h,g=(h=d.type)!==null&&h!==void 0&&h.defaultProps?pt(pt({},d.type.defaultProps),d.props):d.props,p=g.stackId,m=g.hide;if(m)return f;var y=g[r],v=f[y]||{hasStack:!1,stackGroups:{}};if(Pt(p)){var b=v.stackGroups[p]||{numericAxisId:r,cateAxisId:a,items:[]};b.items.push(d),v.hasStack=!0,v.stackGroups[p]=b}else v.stackGroups[mv("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[d]};return pt(pt({},f),{},tl({},y,v))},c),u={};return Object.keys(l).reduce(function(f,d){var h=l[d];if(h.hasStack){var g={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(p,m){var y=h.stackGroups[m];return pt(pt({},p),{},tl({},m,{numericAxisId:r,cateAxisId:a,items:y.items,stackedData:d_e(t,y.items,o)}))},g)}return pt(pt({},f),{},tl({},d,h))},u)},h_e=function(t,n){var r=n.realScaleType,a=n.type,o=n.tickCount,i=n.originalDomain,s=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(o&&a==="number"&&i&&(i[0]==="auto"||i[1]==="auto")){var l=t.domain();if(!l.length)return null;var u=Aje(l,o,s);return t.domain([Pv(u),Iv(u)]),{niceTicks:u}}if(o&&a==="number"){var f=t.domain(),d=Oje(f,o,s);return{niceTicks:d}}return null},m_e=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?pt(pt({},t.type.defaultProps),t.props):t.props,o=a.stackId;if(Pt(o)){var i=n[o];if(i){var s=i.items.indexOf(t);return s>=0?i.stackedData[s]:null}}return null},g_e=function(t){return t.reduce(function(n,r){return[Pv(r.concat([n[0]]).filter(se)),Iv(r.concat([n[1]]).filter(se))]},[1/0,-1/0])},yU=function(t,n,r){return Object.keys(t).reduce(function(a,o){var i=t[o],s=i.stackedData,c=s.reduce(function(l,u){var f=g_e(u.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},XP=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JP=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mx=function(t,n,r){if(ke(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(se(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(XP.test(t[0])){var o=+XP.exec(t[0])[1];a[0]=n[0]-o}else ke(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(se(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(JP.test(t[1])){var i=+JP.exec(t[1])[1];a[1]=n[1]+i}else ke(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},gx=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var o=DE(n,function(f){return f.coordinate}),i=1/0,s=1,c=o.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},E_e=function(t,n,r,a,o){var i=t.width,s=t.height,c=t.startAngle,l=t.endAngle,u=An(t.cx,i,i/2),f=An(t.cy,s,s/2),d=bU(i,s,r),h=An(t.innerRadius,d,0),g=An(t.outerRadius,d,d*.8),p=Object.keys(n);return p.reduce(function(m,y){var v=n[y],b=v.domain,k=v.reversed,w;if(Ae(v.range))a==="angleAxis"?w=[c,l]:a==="radiusAxis"&&(w=[h,g]),k&&(w=[w[1],w[0]]);else{w=v.range;var x=w,j=w_e(x,2);c=j[0],l=j[1]}var S=s_e(v,o),A=S.realScaleType,C=S.scale;C.domain(b).range(w),c_e(C);var O=h_e(C,Ua(Ua({},v),{},{realScaleType:A})),N=Ua(Ua(Ua({},v),O),{},{range:w,radius:g,realScaleType:A,scale:C,cx:u,cy:f,innerRadius:h,outerRadius:g,startAngle:c,endAngle:l});return Ua(Ua({},m),{},vU({},y,N))},{})},A_e=function(t,n){var r=t.x,a=t.y,o=n.x,i=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(a-i,2))},O_e=function(t,n){var r=t.x,a=t.y,o=n.cx,i=n.cy,s=A_e({x:r,y:a},{x:o,y:i});if(s<=0)return{radius:s};var c=(r-o)/s,l=Math.acos(c);return a>i&&(l=2*Math.PI-l),{radius:s,angle:S_e(l),angleInRadian:l}},T_e=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),o=Math.floor(r/360),i=Math.min(a,o);return{startAngle:n-i*360,endAngle:r-i*360}},C_e=function(t,n){var r=n.startAngle,a=n.endAngle,o=Math.floor(r/360),i=Math.floor(a/360),s=Math.min(o,i);return t+s*360},rN=function(t,n){var r=t.x,a=t.y,o=O_e({x:r,y:a},n),i=o.radius,s=o.angle,c=n.innerRadius,l=n.outerRadius;if(il)return!1;if(i===0)return!0;var u=T_e(n),f=u.startAngle,d=u.endAngle,h=s,g;if(f<=d){for(;h>d;)h-=360;for(;h=f&&h<=d}else{for(;h>f;)h-=360;for(;h=d&&h<=f}return g?Ua(Ua({},n),{},{radius:i,angle:C_e(h,n)}):null},wU=function(t){return!_.isValidElement(t)&&!ke(t)&&typeof t!="boolean"?t.className:""};function Gd(e){"@babel/helpers - typeof";return Gd=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},Gd(e)}var I_e=["offset"];function P_e(e){return z_e(e)||D_e(e)||M_e(e)||N_e()}function N_e(){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 M_e(e,t){if(e){if(typeof e=="string")return yx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yx(e,t)}}function D_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function z_e(e){if(Array.isArray(e))return yx(e)}function yx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t=0?1:-1,b,k;a==="insideStart"?(b=h+v*i,k=p):a==="insideEnd"?(b=g-v*i,k=!p):a==="end"&&(b=g+v*i,k=p),k=y<=0?k:!k;var w=Ye(l,u,m,b),x=Ye(l,u,m,b+(k?1:-1)*359),j="M".concat(w.x,",").concat(w.y,` + A`).concat(m,",").concat(m,",0,1,").concat(k?0:1,`, + `).concat(x.x,",").concat(x.y),S=Ae(t.id)?mv("recharts-radial-line-"):t.id;return B.createElement("text",Kd({},r,{dominantBaseline:"central",className:Ie("recharts-radial-bar-label",s)}),B.createElement("defs",null,B.createElement("path",{id:S,d:j})),B.createElement("textPath",{xlinkHref:"#".concat(S)},n))},W_e=function(t){var n=t.viewBox,r=t.offset,a=t.position,o=n,i=o.cx,s=o.cy,c=o.innerRadius,l=o.outerRadius,u=o.startAngle,f=o.endAngle,d=(u+f)/2;if(a==="outside"){var h=Ye(i,s,l+r,d),g=h.x,p=h.y;return{x:g,y:p,textAnchor:g>=i?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:i,y:s,textAnchor:"middle",verticalAnchor:"end"};var m=(c+l)/2,y=Ye(i,s,m,d),v=y.x,b=y.y;return{x:v,y:b,textAnchor:"middle",verticalAnchor:"middle"}},q_e=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,o=t.position,i=n,s=i.x,c=i.y,l=i.width,u=i.height,f=u>=0?1:-1,d=f*a,h=f>0?"end":"start",g=f>0?"start":"end",p=l>=0?1:-1,m=p*a,y=p>0?"end":"start",v=p>0?"start":"end";if(o==="top"){var b={x:s+l/2,y:c-f*a,textAnchor:"middle",verticalAnchor:h};return Et(Et({},b),r?{height:Math.max(c-r.y,0),width:l}:{})}if(o==="bottom"){var k={x:s+l/2,y:c+u+d,textAnchor:"middle",verticalAnchor:g};return Et(Et({},k),r?{height:Math.max(r.y+r.height-(c+u),0),width:l}:{})}if(o==="left"){var w={x:s-m,y:c+u/2,textAnchor:y,verticalAnchor:"middle"};return Et(Et({},w),r?{width:Math.max(w.x-r.x,0),height:u}:{})}if(o==="right"){var x={x:s+l+m,y:c+u/2,textAnchor:v,verticalAnchor:"middle"};return Et(Et({},x),r?{width:Math.max(r.x+r.width-x.x,0),height:u}:{})}var j=r?{width:l,height:u}:{};return o==="insideLeft"?Et({x:s+m,y:c+u/2,textAnchor:v,verticalAnchor:"middle"},j):o==="insideRight"?Et({x:s+l-m,y:c+u/2,textAnchor:y,verticalAnchor:"middle"},j):o==="insideTop"?Et({x:s+l/2,y:c+d,textAnchor:"middle",verticalAnchor:g},j):o==="insideBottom"?Et({x:s+l/2,y:c+u-d,textAnchor:"middle",verticalAnchor:h},j):o==="insideTopLeft"?Et({x:s+m,y:c+d,textAnchor:v,verticalAnchor:g},j):o==="insideTopRight"?Et({x:s+l-m,y:c+d,textAnchor:y,verticalAnchor:g},j):o==="insideBottomLeft"?Et({x:s+m,y:c+u-d,textAnchor:v,verticalAnchor:h},j):o==="insideBottomRight"?Et({x:s+l-m,y:c+u-d,textAnchor:y,verticalAnchor:h},j):ju(o)&&(se(o.x)||ls(o.x))&&(se(o.y)||ls(o.y))?Et({x:s+An(o.x,l),y:c+An(o.y,u),textAnchor:"end",verticalAnchor:"end"},j):Et({x:s+l/2,y:c+u/2,textAnchor:"middle",verticalAnchor:"middle"},j)},G_e=function(t){return"cx"in t&&se(t.cx)};function Zt(e){var t=e.offset,n=t===void 0?5:t,r=$_e(e,I_e),a=Et({offset:n},r),o=a.viewBox,i=a.position,s=a.value,c=a.children,l=a.content,u=a.className,f=u===void 0?"":u,d=a.textBreakAll;if(!o||Ae(s)&&Ae(c)&&!_.isValidElement(l)&&!ke(l))return null;if(_.isValidElement(l))return _.cloneElement(l,a);var h;if(ke(l)){if(h=_.createElement(l,a),_.isValidElement(h))return h}else h=U_e(a);var g=G_e(o),p=ye(a,!0);if(g&&(i==="insideStart"||i==="insideEnd"||i==="end"))return V_e(a,h,p);var m=g?W_e(a):q_e(a);return B.createElement(Ul,Kd({className:Ie("recharts-label",f)},p,m,{breakAll:d}),h)}Zt.displayName="Label";var kU=function(t){var n=t.cx,r=t.cy,a=t.angle,o=t.startAngle,i=t.endAngle,s=t.r,c=t.radius,l=t.innerRadius,u=t.outerRadius,f=t.x,d=t.y,h=t.top,g=t.left,p=t.width,m=t.height,y=t.clockWise,v=t.labelViewBox;if(v)return v;if(se(p)&&se(m)){if(se(f)&&se(d))return{x:f,y:d,width:p,height:m};if(se(h)&&se(g))return{x:h,y:g,width:p,height:m}}return se(f)&&se(d)?{x:f,y:d,width:0,height:0}:se(n)&&se(r)?{cx:n,cy:r,startAngle:o||a||0,endAngle:i||a||0,innerRadius:l||0,outerRadius:u||c||s||0,clockWise:y}:t.viewBox?t.viewBox:{}},K_e=function(t,n){return t?t===!0?B.createElement(Zt,{key:"label-implicit",viewBox:n}):Pt(t)?B.createElement(Zt,{key:"label-implicit",viewBox:n,value:t}):_.isValidElement(t)?t.type===Zt?_.cloneElement(t,{key:"label-implicit",viewBox:n}):B.createElement(Zt,{key:"label-implicit",content:t,viewBox:n}):ke(t)?B.createElement(Zt,{key:"label-implicit",content:t,viewBox:n}):ju(t)?B.createElement(Zt,Kd({viewBox:n},t,{key:"label-implicit"})):null:null},Y_e=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,o=kU(t),i=ka(a,Zt).map(function(c,l){return _.cloneElement(c,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return i;var s=K_e(t.label,n||o);return[s].concat(P_e(i))};Zt.parseViewBox=kU;Zt.renderCallByParent=Y_e;function Z_e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Q_e=Z_e;const X_e=ze(Q_e);function Yd(e){"@babel/helpers - typeof";return Yd=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},Yd(e)}var J_e=["valueAccessor"],eSe=["data","dataKey","clockWise","id","textBreakAll"];function tSe(e){return oSe(e)||aSe(e)||rSe(e)||nSe()}function nSe(){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 rSe(e,t){if(e){if(typeof e=="string")return vx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vx(e,t)}}function aSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oSe(e){if(Array.isArray(e))return vx(e)}function vx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var uSe=function(t){return Array.isArray(t.value)?X_e(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?uSe:t,r=sN(e,J_e),a=r.data,o=r.dataKey,i=r.clockWise,s=r.id,c=r.textBreakAll,l=sN(r,eSe);return!a||!a.length?null:B.createElement(ht,{className:"recharts-label-list"},a.map(function(u,f){var d=Ae(o)?n(u,f):Un(u&&u.payload,o),h=Ae(s)?{}:{id:"".concat(s,"-").concat(f)};return B.createElement(Zt,zg({},ye(u,!0),l,h,{parentViewBox:u.parentViewBox,value:d,textBreakAll:c,viewBox:Zt.parseViewBox(Ae(i)?u:iN(iN({},u),{},{clockWise:i})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function fSe(e,t){return e?e===!0?B.createElement(As,{key:"labelList-implicit",data:t}):B.isValidElement(e)||ke(e)?B.createElement(As,{key:"labelList-implicit",data:t,content:e}):ju(e)?B.createElement(As,zg({data:t},e,{key:"labelList-implicit"})):null:null}function dSe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=ka(r,As).map(function(i,s){return _.cloneElement(i,{data:t,key:"labelList-".concat(s)})});if(!n)return a;var o=fSe(e.label,t);return[o].concat(tSe(a))}As.renderCallByParent=dSe;function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function bx(){return bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(i>l),`, + `).concat(f.x,",").concat(f.y,` + `);if(a>0){var h=Ye(n,r,a,i),g=Ye(n,r,a,l);d+="L ".concat(g.x,",").concat(g.y,` + A `).concat(a,",").concat(a,`,0, + `).concat(+(Math.abs(c)>180),",").concat(+(i<=l),`, + `).concat(h.x,",").concat(h.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},ySe=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,o=t.outerRadius,i=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,f=dr(u-l),d=Mh({cx:n,cy:r,radius:o,angle:l,sign:f,cornerRadius:i,cornerIsExternal:c}),h=d.circleTangency,g=d.lineTangency,p=d.theta,m=Mh({cx:n,cy:r,radius:o,angle:u,sign:-f,cornerRadius:i,cornerIsExternal:c}),y=m.circleTangency,v=m.lineTangency,b=m.theta,k=c?Math.abs(l-u):Math.abs(l-u)-p-b;if(k<0)return s?"M ".concat(g.x,",").concat(g.y,` + a`).concat(i,",").concat(i,",0,0,1,").concat(i*2,`,0 + a`).concat(i,",").concat(i,",0,0,1,").concat(-i*2,`,0 + `):xU({cx:n,cy:r,innerRadius:a,outerRadius:o,startAngle:l,endAngle:u});var w="M ".concat(g.x,",").concat(g.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(f<0),",").concat(h.x,",").concat(h.y,` + A`).concat(o,",").concat(o,",0,").concat(+(k>180),",").concat(+(f<0),",").concat(y.x,",").concat(y.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(f<0),",").concat(v.x,",").concat(v.y,` + `);if(a>0){var x=Mh({cx:n,cy:r,radius:a,angle:l,sign:f,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),j=x.circleTangency,S=x.lineTangency,A=x.theta,C=Mh({cx:n,cy:r,radius:a,angle:u,sign:-f,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),O=C.circleTangency,N=C.lineTangency,L=C.theta,z=c?Math.abs(l-u):Math.abs(l-u)-A-L;if(z<0&&i===0)return"".concat(w,"L").concat(n,",").concat(r,"Z");w+="L".concat(N.x,",").concat(N.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,` + A`).concat(a,",").concat(a,",0,").concat(+(z>180),",").concat(+(f>0),",").concat(j.x,",").concat(j.y,` + A`).concat(i,",").concat(i,",0,0,").concat(+(f<0),",").concat(S.x,",").concat(S.y,"Z")}else w+="L".concat(n,",").concat(r,"Z");return w},vSe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},jU=function(t){var n=lN(lN({},vSe),t),r=n.cx,a=n.cy,o=n.innerRadius,i=n.outerRadius,s=n.cornerRadius,c=n.forceCornerRadius,l=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,d=n.className;if(i0&&Math.abs(u-f)<360?m=ySe({cx:r,cy:a,innerRadius:o,outerRadius:i,cornerRadius:Math.min(p,g/2),forceCornerRadius:c,cornerIsExternal:l,startAngle:u,endAngle:f}):m=xU({cx:r,cy:a,innerRadius:o,outerRadius:i,startAngle:u,endAngle:f}),B.createElement("path",bx({},ye(n,!0),{className:h,d:m,role:"img"}))};function Qd(e){"@babel/helpers - typeof";return Qd=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},Qd(e)}function wx(){return wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function NSe(e,t){return Nu(e.getTime(),t.getTime())}function yN(e,t,n){if(e.size!==t.size)return!1;for(var r={},a=e.entries(),o=0,i,s;(i=a.next())&&!i.done;){for(var c=t.entries(),l=!1,u=0;(s=c.next())&&!s.done;){var f=i.value,d=f[0],h=f[1],g=s.value,p=g[0],m=g[1];!l&&!r[u]&&(l=n.equals(d,p,o,u,e,t,n)&&n.equals(h,m,d,p,e,t,n))&&(r[u]=!0),u++}if(!l)return!1;o++}return!0}function MSe(e,t,n){var r=gN(e),a=r.length;if(gN(t).length!==a)return!1;for(var o;a-- >0;)if(o=r[a],o===OU&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!AU(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function rf(e,t,n){var r=hN(e),a=r.length;if(hN(t).length!==a)return!1;for(var o,i,s;a-- >0;)if(o=r[a],o===OU&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!AU(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(i=mN(e,o),s=mN(t,o),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function DSe(e,t){return Nu(e.valueOf(),t.valueOf())}function zSe(e,t){return e.source===t.source&&e.flags===t.flags}function vN(e,t,n){if(e.size!==t.size)return!1;for(var r={},a=e.values(),o,i;(o=a.next())&&!o.done;){for(var s=t.values(),c=!1,l=0;(i=s.next())&&!i.done;)!c&&!r[l]&&(c=n.equals(o.value,i.value,o.value,i.value,e,t,n))&&(r[l]=!0),l++;if(!c)return!1}return!0}function $Se(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var RSe="[object Arguments]",LSe="[object Boolean]",BSe="[object Date]",FSe="[object Map]",USe="[object Number]",HSe="[object Object]",VSe="[object RegExp]",WSe="[object Set]",qSe="[object String]",GSe=Array.isArray,bN=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,wN=Object.assign,KSe=Object.prototype.toString.call.bind(Object.prototype.toString);function YSe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,a=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,i=e.areRegExpsEqual,s=e.areSetsEqual,c=e.areTypedArraysEqual;return function(u,f,d){if(u===f)return!0;if(u==null||f==null||typeof u!="object"||typeof f!="object")return u!==u&&f!==f;var h=u.constructor;if(h!==f.constructor)return!1;if(h===Object)return a(u,f,d);if(GSe(u))return t(u,f,d);if(bN!=null&&bN(u))return c(u,f,d);if(h===Date)return n(u,f,d);if(h===RegExp)return i(u,f,d);if(h===Map)return r(u,f,d);if(h===Set)return s(u,f,d);var g=KSe(u);return g===BSe?n(u,f,d):g===VSe?i(u,f,d):g===FSe?r(u,f,d):g===WSe?s(u,f,d):g===HSe?typeof u.then!="function"&&typeof f.then!="function"&&a(u,f,d):g===RSe?a(u,f,d):g===LSe||g===USe||g===qSe?o(u,f,d):!1}}function ZSe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,a={areArraysEqual:r?rf:PSe,areDatesEqual:NSe,areMapsEqual:r?pN(yN,rf):yN,areObjectsEqual:r?rf:MSe,arePrimitiveWrappersEqual:DSe,areRegExpsEqual:zSe,areSetsEqual:r?pN(vN,rf):vN,areTypedArraysEqual:r?rf:$Se};if(n&&(a=wN({},a,n(a))),t){var o=zh(a.areArraysEqual),i=zh(a.areMapsEqual),s=zh(a.areObjectsEqual),c=zh(a.areSetsEqual);a=wN({},a,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:c})}return a}function QSe(e){return function(t,n,r,a,o,i,s){return e(t,n,s)}}function XSe(e){var t=e.circular,n=e.comparator,r=e.createState,a=e.equals,o=e.strict;if(r)return function(c,l){var u=r(),f=u.cache,d=f===void 0?t?new WeakMap:void 0:f,h=u.meta;return n(c,l,{cache:d,equals:a,meta:h,strict:o})};if(t)return function(c,l){return n(c,l,{cache:new WeakMap,equals:a,meta:void 0,strict:o})};var i={cache:void 0,equals:a,meta:void 0,strict:o};return function(c,l){return n(c,l,i)}}var JSe=$i();$i({strict:!0});$i({circular:!0});$i({circular:!0,strict:!0});$i({createInternalComparator:function(){return Nu}});$i({strict:!0,createInternalComparator:function(){return Nu}});$i({circular:!0,createInternalComparator:function(){return Nu}});$i({circular:!0,createInternalComparator:function(){return Nu},strict:!0});function $i(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,a=e.createState,o=e.strict,i=o===void 0?!1:o,s=ZSe(e),c=YSe(s),l=r?r(c):QSe(c);return XSe({circular:n,comparator:c,createState:a,equals:l,strict:i})}function eEe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function kN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(o){n<0&&(n=o),o-n>t?(e(o),n=-1):eEe(a)};requestAnimationFrame(r)}function xx(e){"@babel/helpers - typeof";return xx=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},xx(e)}function tEe(e){return oEe(e)||aEe(e)||rEe(e)||nEe()}function nEe(){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 rEe(e,t){if(e){if(typeof e=="string")return xN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xN(e,t)}}function xN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:y<0?0:y},p=function(y){for(var v=y>1?1:y,b=v,k=0;k<8;++k){var w=f(b)-v,x=h(b);if(Math.abs(w-v)<$g||x<$g)return d(b);b=g(b-w/x)}return d(b)};return p.isStepper=!1,p},kEe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,o=a===void 0?8:a,i=t.dt,s=i===void 0?17:i,c=function(u,f,d){var h=-(u-f)*r,g=d*o,p=d+(h-g)*s/1e3,m=d*s/1e3+u;return Math.abs(m-f)<$g&&Math.abs(p)<$g?[f,0]:[m,p]};return c.isStepper=!0,c.dt=s,c},xEe=function(){for(var t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zEe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o=0)&&(n[a]=e[a]);return n}function dw(e){return BEe(e)||LEe(e)||REe(e)||$Ee()}function $Ee(){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 REe(e,t){if(e){if(typeof e=="string")return Ax(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ax(e,t)}}function LEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BEe(e){if(Array.isArray(e))return Ax(e)}function Ax(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Lg(e){return Lg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lg(e)}var _i=function(e){WEe(n,e);var t=qEe(n);function n(r,a){var o;FEe(this,n),o=t.call(this,r,a);var i=o.props,s=i.isActive,c=i.attributeName,l=i.from,u=i.to,f=i.steps,d=i.children,h=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Cx(o)),o.changeStyle=o.changeStyle.bind(Cx(o)),!s||h<=0)return o.state={style:{}},typeof d=="function"&&(o.state={style:u}),Tx(o);if(f&&f.length)o.state={style:f[0].style};else if(l){if(typeof d=="function")return o.state={style:l},Tx(o);o.state={style:c?yf({},c,l):l}}else o.state={style:{}};return o}return HEe(n,[{key:"componentDidMount",value:function(){var a=this.props,o=a.isActive,i=a.canBegin;this.mounted=!0,!(!o||!i)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var o=this.props,i=o.isActive,s=o.canBegin,c=o.attributeName,l=o.shouldReAnimate,u=o.to,f=o.from,d=this.state.style;if(s){if(!i){var h={style:c?yf({},c,u):u};this.state&&d&&(c&&d[c]!==u||!c&&d!==u)&&this.setState(h);return}if(!(JSe(a.to,u)&&a.canBegin&&a.isActive)){var g=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=g||l?f:a.to;if(this.state&&d){var m={style:c?yf({},c,p):p};(c&&d[c]!==p||!c&&d!==p)&&this.setState(m)}this.runAnimation(xr(xr({},this.props),{},{from:p,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var o=this,i=a.from,s=a.to,c=a.duration,l=a.easing,u=a.begin,f=a.onAnimationEnd,d=a.onAnimationStart,h=NEe(i,s,xEe(l),c,this.changeStyle),g=function(){o.stopJSAnimation=h()};this.manager.start([d,u,g,c,f])}},{key:"runStepAnimation",value:function(a){var o=this,i=a.steps,s=a.begin,c=a.onAnimationStart,l=i[0],u=l.style,f=l.duration,d=f===void 0?0:f,h=function(p,m,y){if(y===0)return p;var v=m.duration,b=m.easing,k=b===void 0?"ease":b,w=m.style,x=m.properties,j=m.onAnimationEnd,S=y>0?i[y-1]:m,A=x||Object.keys(w);if(typeof k=="function"||k==="spring")return[].concat(dw(p),[o.runJSAnimation.bind(o,{from:S.style,to:w,duration:v,easing:k}),v]);var C=SN(A,v,k),O=xr(xr(xr({},S.style),w),{},{transition:C});return[].concat(dw(p),[O,v,j]).filter(uEe)};return this.manager.start([c].concat(dw(i.reduce(h,[u,Math.max(d,s)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=iEe());var o=a.begin,i=a.duration,s=a.attributeName,c=a.to,l=a.easing,u=a.onAnimationStart,f=a.onAnimationEnd,d=a.steps,h=a.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof l=="function"||typeof h=="function"||l==="spring"){this.runJSAnimation(a);return}if(d.length>1){this.runStepAnimation(a);return}var p=s?yf({},s,c):c,m=SN(Object.keys(p),i,l);g.start([u,o,xr(xr({},p),{},{transition:m}),i,f])}},{key:"render",value:function(){var a=this.props,o=a.children;a.begin;var i=a.duration;a.attributeName,a.easing;var s=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=DEe(a,MEe),l=_.Children.count(o),u=this.state.style;if(typeof o=="function")return o(u);if(!s||l===0||i<=0)return o;var f=function(h){var g=h.props,p=g.style,m=p===void 0?{}:p,y=g.className,v=_.cloneElement(h,xr(xr({},c),{},{style:xr(xr({},m),u),className:y}));return v};return l===1?f(_.Children.only(o)):B.createElement("div",null,_.Children.map(o,function(d){return f(d)}))}}]),n}(_.PureComponent);_i.displayName="Animate";_i.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};_i.propTypes={from:me.oneOfType([me.object,me.string]),to:me.oneOfType([me.object,me.string]),attributeName:me.string,duration:me.number,begin:me.number,easing:me.oneOfType([me.string,me.func]),steps:me.arrayOf(me.shape({duration:me.number.isRequired,style:me.object.isRequired,easing:me.oneOfType([me.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),me.func]),properties:me.arrayOf("string"),onAnimationEnd:me.func})),children:me.oneOfType([me.node,me.func]),isActive:me.bool,canBegin:me.bool,onAnimationEnd:me.func,shouldReAnimate:me.bool,onAnimationStart:me.func,onAnimationReStart:me.func};me.object,me.object,me.object,me.element;me.object,me.object,me.object,me.oneOfType([me.array,me.element]),me.any;function ep(e){"@babel/helpers - typeof";return ep=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},ep(e)}function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,c=r>=0?1:-1,l=a>=0&&r>=0||a<0&&r<0?1:0,u;if(i>0&&o instanceof Array){for(var f=[0,0,0,0],d=0,h=4;di?i:o[d];u="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(t+c*f[0],",").concat(n)),u+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`, + `).concat(t+r,",").concat(n+s*f[1])),u+="L ".concat(t+r,",").concat(n+a-s*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(l,`, + `).concat(t+r-c*f[2],",").concat(n+a)),u+="L ".concat(t+c*f[3],",").concat(n+a),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(l,`, + `).concat(t,",").concat(n+a-s*f[3])),u+="Z"}else if(i>0&&o===+o&&o>0){var g=Math.min(i,o);u="M ".concat(t,",").concat(n+s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t+c*g,",").concat(n,` + L `).concat(t+r-c*g,",").concat(n,` + A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t+r,",").concat(n+s*g,` + L `).concat(t+r,",").concat(n+a-s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t+r-c*g,",").concat(n+a,` + L `).concat(t+c*g,",").concat(n+a,` + A `).concat(g,",").concat(g,",0,0,").concat(l,",").concat(t,",").concat(n+a-s*g," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return u},nAe=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,o=n.x,i=n.y,s=n.width,c=n.height;if(Math.abs(s)>0&&Math.abs(c)>0){var l=Math.min(o,o+s),u=Math.max(o,o+s),f=Math.min(i,i+c),d=Math.max(i,i+c);return r>=l&&r<=u&&a>=f&&a<=d}return!1},rAe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fA=function(t){var n=NN(NN({},rAe),t),r=_.useRef(),a=_.useState(-1),o=KEe(a,2),i=o[0],s=o[1];_.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var k=r.current.getTotalLength();k&&s(k)}catch{}},[]);var c=n.x,l=n.y,u=n.width,f=n.height,d=n.radius,h=n.className,g=n.animationEasing,p=n.animationDuration,m=n.animationBegin,y=n.isAnimationActive,v=n.isUpdateAnimationActive;if(c!==+c||l!==+l||u!==+u||f!==+f||u===0||f===0)return null;var b=Ie("recharts-rectangle",h);return v?B.createElement(_i,{canBegin:i>0,from:{width:u,height:f,x:c,y:l},to:{width:u,height:f,x:c,y:l},duration:p,animationEasing:g,isActive:v},function(k){var w=k.width,x=k.height,j=k.x,S=k.y;return B.createElement(_i,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,isActive:y,easing:g},B.createElement("path",Bg({},ye(n,!0),{className:b,d:MN(j,S,w,x,d),ref:r})))}):B.createElement("path",Bg({},ye(n,!0),{className:b,d:MN(c,l,u,f,d)}))},aAe=["points","className","baseLinePoints","connectNulls"];function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DN(e){return uAe(e)||lAe(e)||cAe(e)||sAe()}function sAe(){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 cAe(e,t){if(e){if(typeof e=="string")return Ix(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ix(e,t)}}function lAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uAe(e){if(Array.isArray(e))return Ix(e)}function Ix(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){zN(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),zN(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Lf=function(t,n){var r=fAe(t);n&&(r=[r.reduce(function(o,i){return[].concat(DN(o),DN(i))},[])]);var a=r.map(function(o){return o.reduce(function(i,s,c){return"".concat(i).concat(c===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},dAe=function(t,n,r){var a=Lf(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Lf(n.reverse(),r).slice(1))},pAe=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,o=t.connectNulls,i=oAe(t,aAe);if(!n||!n.length)return null;var s=Ie("recharts-polygon",r);if(a&&a.length){var c=i.stroke&&i.stroke!=="none",l=dAe(n,a,o);return B.createElement("g",{className:s},B.createElement("path",Nc({},ye(i,!0),{fill:l.slice(-1)==="Z"?i.fill:"none",stroke:"none",d:l})),c?B.createElement("path",Nc({},ye(i,!0),{fill:"none",d:Lf(n,o)})):null,c?B.createElement("path",Nc({},ye(i,!0),{fill:"none",d:Lf(a,o)})):null)}var u=Lf(n,o);return B.createElement("path",Nc({},ye(i,!0),{fill:u.slice(-1)==="Z"?i.fill:"none",className:s,d:u}))};function Px(){return Px=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var kAe=function(t,n,r,a,o,i){return"M".concat(t,",").concat(o,"v").concat(a,"M").concat(i,",").concat(n,"h").concat(r)},xAe=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,o=a===void 0?0:a,i=t.top,s=i===void 0?0:i,c=t.left,l=c===void 0?0:c,u=t.width,f=u===void 0?0:u,d=t.height,h=d===void 0?0:d,g=t.className,p=bAe(t,hAe),m=mAe({x:r,y:o,top:s,left:l,width:f,height:h},p);return!se(r)||!se(o)||!se(f)||!se(h)||!se(s)||!se(l)?null:B.createElement("path",Nx({},ye(m,!0),{className:Ie("recharts-cross",g),d:kAe(r,o,f,h,s,l)}))},jAe=Cv,_Ae=ZF,SAe=Mi;function EAe(e,t){return e&&e.length?jAe(e,SAe(t),_Ae):void 0}var AAe=EAe;const OAe=ze(AAe);var TAe=Cv,CAe=Mi,IAe=QF;function PAe(e,t){return e&&e.length?TAe(e,CAe(t),IAe):void 0}var NAe=PAe;const MAe=ze(NAe);var DAe=["cx","cy","angle","ticks","axisLine"],zAe=["ticks","tick","angle","tickFormatter","stroke"];function Yl(e){"@babel/helpers - typeof";return Yl=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},Yl(e)}function Bf(){return Bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Ae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function RAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BN(e,t){for(var n=0;nHN?i=a==="outer"?"start":"end":o<-HN?i=a==="outer"?"end":"start":i="middle",i}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,o=r.cy,i=r.radius,s=r.axisLine,c=r.axisLineType,l=Fi(Fi({},ye(this.props,!1)),{},{fill:"none"},ye(s,!1));if(c==="circle")return B.createElement(dA,Ji({className:"recharts-polar-angle-axis-line"},l,{cx:a,cy:o,r:i}));var u=this.props.ticks,f=u.map(function(d){return Ye(a,o,i,d.coordinate)});return B.createElement(pAe,Ji({className:"recharts-polar-angle-axis-line"},l,{points:f}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,o=a.ticks,i=a.tick,s=a.tickLine,c=a.tickFormatter,l=a.stroke,u=ye(this.props,!1),f=ye(i,!1),d=Fi(Fi({},u),{},{fill:"none"},ye(s,!1)),h=o.map(function(g,p){var m=r.getTickLineCoord(g),y=r.getTickTextAnchor(g),v=Fi(Fi(Fi({textAnchor:y},u),{},{stroke:"none",fill:l},f),{},{index:p,payload:g,x:m.x2,y:m.y2});return B.createElement(ht,Ji({className:Ie("recharts-polar-angle-axis-tick",wU(i)),key:"tick-".concat(g.coordinate)},gv(r.props,g,p)),s&&B.createElement("line",Ji({className:"recharts-polar-angle-axis-tick-line"},d,m)),i&&t.renderTickItem(i,v,c?c(g.value,p):g.value))});return B.createElement(ht,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var r=this.props,a=r.ticks,o=r.radius,i=r.axisLine;return o<=0||!a||!a.length?null:B.createElement(ht,{className:Ie("recharts-polar-angle-axis",this.props.className)},i&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,o){var i;return B.isValidElement(r)?i=B.cloneElement(r,a):ke(r)?i=r(a):i=B.createElement(Ul,Ji({},a,{className:"recharts-polar-angle-axis-tick-value"}),o),i}}])}(_.PureComponent);$v(Rv,"displayName","PolarAngleAxis");$v(Rv,"axisType","angleAxis");$v(Rv,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var JAe=q8,e2e=JAe(Object.getPrototypeOf,Object),t2e=e2e,n2e=go,r2e=t2e,a2e=yo,o2e="[object Object]",i2e=Function.prototype,s2e=Object.prototype,LU=i2e.toString,c2e=s2e.hasOwnProperty,l2e=LU.call(Object);function u2e(e){if(!a2e(e)||n2e(e)!=o2e)return!1;var t=r2e(e);if(t===null)return!0;var n=c2e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&LU.call(n)==l2e}var f2e=u2e;const d2e=ze(f2e);var p2e=go,h2e=yo,m2e="[object Boolean]";function g2e(e){return e===!0||e===!1||h2e(e)&&p2e(e)==m2e}var y2e=g2e;const v2e=ze(y2e);function np(e){"@babel/helpers - typeof";return np=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},np(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:d,x:c,y:l},to:{upperWidth:u,lowerWidth:f,height:d,x:c,y:l},duration:p,animationEasing:g,isActive:y},function(b){var k=b.upperWidth,w=b.lowerWidth,x=b.height,j=b.x,S=b.y;return B.createElement(_i,{canBegin:i>0,from:"0px ".concat(i===-1?1:i,"px"),to:"".concat(i,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,easing:g},B.createElement("path",Hg({},ye(n,!0),{className:v,d:GN(j,S,k,w,x),ref:r})))}):B.createElement("g",null,B.createElement("path",Hg({},ye(n,!0),{className:v,d:GN(c,l,u,f,d)})))},T2e=["option","shapeType","propTransformer","activeClassName","isActive"];function rp(e){"@babel/helpers - typeof";return rp=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},rp(e)}function C2e(e,t){if(e==null)return{};var n=I2e(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function KN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vg(e){for(var t=1;t0?Rr(b,"paddingAngle",0):0;if(w){var j=HC(w.endAngle-w.startAngle,b.endAngle-b.startAngle),S=qe(qe({},b),{},{startAngle:v+x,endAngle:v+j(p)+x});m.push(S),v=S.endAngle}else{var A=b.endAngle,C=b.startAngle,O=HC(0,A-C),N=O(p),L=qe(qe({},b),{},{startAngle:v+x,endAngle:v+N+x});m.push(L),v=L.endAngle}}),B.createElement(ht,null,r.renderSectorsStatically(m))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var i=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[i].focus(),a.setState({sectorToFocus:i});break}case"ArrowRight":{var s=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[s].focus(),a.setState({sectorToFocus:s});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,o=r.isAnimationActive,i=this.state.prevSectors;return o&&a&&a.length&&(!i||!iA(i,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,o=a.hide,i=a.sectors,s=a.className,c=a.label,l=a.cx,u=a.cy,f=a.innerRadius,d=a.outerRadius,h=a.isAnimationActive,g=this.state.isAnimationFinished;if(o||!i||!i.length||!se(l)||!se(u)||!se(f)||!se(d))return null;var p=Ie("recharts-pie",s);return B.createElement(ht,{tabIndex:this.props.rootTabIndex,className:p,ref:function(y){r.pieRef=y}},this.renderSectors(),c&&this.renderLabels(i),Zt.renderCallByParent(this.props,null,!1),(!h||g)&&As.renderCallByParent(this.props,i,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r=360?v:v-1)*c,k=m-v*h-b,w=a.reduce(function(S,A){var C=Un(A,y,0);return S+(se(C)?C:0)},0),x;if(w>0){var j;x=a.map(function(S,A){var C=Un(S,y,0),O=Un(S,u,A),N=(se(C)?C:0)/w,L;A?L=j.endAngle+dr(p)*c*(C!==0?1:0):L=i;var z=L+dr(p)*((C!==0?h:0)+N*k),T=(L+z)/2,I=(g.innerRadius+g.outerRadius)/2,M=[{name:O,value:C,payload:S,dataKey:y,type:d}],P=Ye(g.cx,g.cy,I,T);return j=qe(qe(qe({percent:N,cornerRadius:o,name:O,tooltipPayload:M,midAngle:T,middleRadius:I,tooltipPosition:P},S),g),{},{value:Un(S,y),startAngle:L,endAngle:z,payload:S,paddingAngle:dr(p)*c}),j})}return qe(qe({},g),{},{sectors:x,data:a})});var J2e=Math.ceil,eOe=Math.max;function tOe(e,t,n,r){for(var a=-1,o=eOe(J2e((t-e)/(n||1)),0),i=Array(o);o--;)i[r?o:++a]=e,e+=n;return i}var nOe=tOe,rOe=uF,XN=1/0,aOe=17976931348623157e292;function oOe(e){if(!e)return e===0?e:0;if(e=rOe(e),e===XN||e===-XN){var t=e<0?-1:1;return t*aOe}return e===e?e:0}var iOe=oOe,sOe=nOe,cOe=jv,pw=iOe;function lOe(e){return function(t,n,r){return r&&typeof r!="number"&&cOe(t,n,r)&&(n=r=void 0),t=pw(t),n===void 0?(n=t,t=0):n=pw(n),r=r===void 0?t0&&r.handleDrag(a.changedTouches[0])}),Dn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,o=a.endIndex,i=a.onDragEnd,s=a.startIndex;i==null||i({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Dn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Dn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Dn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Dn(r,"handleSlideDragStart",function(a){var o=rM(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return jOe(t,e),bOe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,o=r.endX,i=this.state.scaleValues,s=this.props,c=s.gap,l=s.data,u=l.length-1,f=Math.min(a,o),d=Math.max(a,o),h=t.getIndexInRange(i,f),g=t.getIndexInRange(i,d);return{startIndex:h-h%c,endIndex:g===u?u:g-g%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,o=a.data,i=a.tickFormatter,s=a.dataKey,c=Un(o[r],s,r);return ke(i)?i(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,o=a.slideMoveStartX,i=a.startX,s=a.endX,c=this.props,l=c.x,u=c.width,f=c.travellerWidth,d=c.startIndex,h=c.endIndex,g=c.onChange,p=r.pageX-o;p>0?p=Math.min(p,l+u-f-s,l+u-f-i):p<0&&(p=Math.max(p,l-i,l-s));var m=this.getIndex({startX:i+p,endX:s+p});(m.startIndex!==d||m.endIndex!==h)&&g&&g(m),this.setState({startX:i+p,endX:s+p,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var o=rM(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,o=a.brushMoveStartX,i=a.movingTravellerId,s=a.endX,c=a.startX,l=this.state[i],u=this.props,f=u.x,d=u.width,h=u.travellerWidth,g=u.onChange,p=u.gap,m=u.data,y={startX:this.state.startX,endX:this.state.endX},v=r.pageX-o;v>0?v=Math.min(v,f+d-h-l):v<0&&(v=Math.max(v,f-l)),y[i]=l+v;var b=this.getIndex(y),k=b.startIndex,w=b.endIndex,x=function(){var S=m.length-1;return i==="startX"&&(s>c?k%p===0:w%p===0)||sc?w%p===0:k%p===0)||s>c&&w===S};this.setState(Dn(Dn({},i,l+v),"brushMoveStartX",r.pageX),function(){g&&x()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var o=this,i=this.state,s=i.scaleValues,c=i.startX,l=i.endX,u=this.state[a],f=s.indexOf(u);if(f!==-1){var d=f+r;if(!(d===-1||d>=s.length)){var h=s[d];a==="startX"&&h>=l||a==="endX"&&h<=c||this.setState(Dn({},a,h),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,o=r.y,i=r.width,s=r.height,c=r.fill,l=r.stroke;return B.createElement("rect",{stroke:l,fill:c,x:a,y:o,width:i,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,o=r.y,i=r.width,s=r.height,c=r.data,l=r.children,u=r.padding,f=_.Children.only(l);return f?B.cloneElement(f,{x:a,y:o,width:i,height:s,margin:u,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var o,i,s=this,c=this.props,l=c.y,u=c.travellerWidth,f=c.height,d=c.traveller,h=c.ariaLabel,g=c.data,p=c.startIndex,m=c.endIndex,y=Math.max(r,this.props.x),v=hw(hw({},ye(this.props,!1)),{},{x:y,y:l,width:u,height:f}),b=h||"Min value: ".concat((o=g[p])===null||o===void 0?void 0:o.name,", Max value: ").concat((i=g[m])===null||i===void 0?void 0:i.name);return B.createElement(ht,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),s.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,a))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,v))}},{key:"renderSlide",value:function(r,a){var o=this.props,i=o.y,s=o.height,c=o.stroke,l=o.travellerWidth,u=Math.min(r,a)+l,f=Math.max(Math.abs(a-r)-l,0);return B.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:u,y:i,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,o=r.endIndex,i=r.y,s=r.height,c=r.travellerWidth,l=r.stroke,u=this.state,f=u.startX,d=u.endX,h=5,g={pointerEvents:"none",fill:l};return B.createElement(ht,{className:"recharts-brush-texts"},B.createElement(Ul,Gg({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,d)-h,y:i+s/2},g),this.getTextOfTick(a)),B.createElement(Ul,Gg({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,d)+c+h,y:i+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,a=r.data,o=r.className,i=r.children,s=r.x,c=r.y,l=r.width,u=r.height,f=r.alwaysShowText,d=this.state,h=d.startX,g=d.endX,p=d.isTextActive,m=d.isSlideMoving,y=d.isTravellerMoving,v=d.isTravellerFocused;if(!a||!a.length||!se(s)||!se(c)||!se(l)||!se(u)||l<=0||u<=0)return null;var b=Ie("recharts-brush",o),k=B.Children.count(i)===1,w=yOe("userSelect","none");return B.createElement(ht,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),k&&this.renderPanorama(),this.renderSlide(h,g),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(g,"endX"),(p||m||y||v||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,o=r.y,i=r.width,s=r.height,c=r.stroke,l=Math.floor(o+s/2)-1;return B.createElement(B.Fragment,null,B.createElement("rect",{x:a,y:o,width:i,height:s,fill:c,stroke:"none"}),B.createElement("line",{x1:a+1,y1:l,x2:a+i-1,y2:l,fill:"none",stroke:"#fff"}),B.createElement("line",{x1:a+1,y1:l+2,x2:a+i-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var o;return B.isValidElement(r)?o=B.cloneElement(r,a):ke(r)?o=r(a):o=t.renderDefaultTraveller(a),o}},{key:"getDerivedStateFromProps",value:function(r,a){var o=r.data,i=r.width,s=r.x,c=r.travellerWidth,l=r.updateId,u=r.startIndex,f=r.endIndex;if(o!==a.prevData||l!==a.prevUpdateId)return hw({prevData:o,prevTravellerWidth:c,prevUpdateId:l,prevX:s,prevWidth:i},o&&o.length?SOe({data:o,width:i,x:s,travellerWidth:c,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(i!==a.prevWidth||s!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([s,s+i-c]);var d=a.scale.domain().map(function(h){return a.scale(h)});return{prevData:o,prevTravellerWidth:c,prevUpdateId:l,prevX:s,prevWidth:i,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(r,a){for(var o=r.length,i=0,s=o-1;s-i>1;){var c=Math.floor((i+s)/2);r[c]>a?s=c:i=c}return a>=r[s]?s:i}}])}(_.PureComponent);Dn(Jl,"displayName","Brush");Dn(Jl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var EOe=ME;function AOe(e,t){var n;return EOe(e,function(r,a,o){return n=t(r,a,o),!n}),!!n}var OOe=AOe,TOe=R8,COe=Mi,IOe=OOe,POe=Nn,NOe=jv;function MOe(e,t,n){var r=POe(e)?TOe:IOe;return n&&NOe(e,t,n)&&(t=void 0),r(e,COe(t))}var DOe=MOe;const zOe=ze(DOe);var ja=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},aM=oF;function $Oe(e,t,n){t=="__proto__"&&aM?aM(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var ROe=$Oe,LOe=ROe,BOe=rF,FOe=Mi;function UOe(e,t){var n={};return t=FOe(t),BOe(e,function(r,a,o){LOe(n,a,t(r,a,o))}),n}var HOe=UOe;const VOe=ze(HOe);function WOe(e,t){for(var n=-1,r=e==null?0:e.length;++n1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+i}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],o=r[r.length-1];return a<=o?n>=a&&n<=o:n>=o&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();pA(GU,"EPS",1e-4);var hA=function(t){var n=Object.keys(t).reduce(function(r,a){return $h($h({},r),{},pA({},a,GU.create(t[a])))},{});return $h($h({},n),{},{apply:function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=o.bandAware,s=o.position;return VOe(a,function(c,l){return n[l].apply(c,{bandAware:i,position:s})})},isInRange:function(a){return rTe(a,function(o,i){return n[i].isInRange(o)})}})},cTe=Kle(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),KU=_.createContext(void 0),YU=_.createContext(void 0),ZU=_.createContext(void 0),lTe=_.createContext({}),QU=_.createContext(void 0),uTe=_.createContext(0),fTe=_.createContext(0),sM=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,o=n.offset,i=t.clipPathId,s=t.children,c=t.width,l=t.height,u=cTe(o);return B.createElement(KU.Provider,{value:r},B.createElement(YU.Provider,{value:a},B.createElement(lTe.Provider,{value:o},B.createElement(ZU.Provider,{value:u},B.createElement(QU.Provider,{value:i},B.createElement(uTe.Provider,{value:l},B.createElement(fTe.Provider,{value:c},s)))))))},dTe=function(){return _.useContext(QU)},pTe=function(t){var n=_.useContext(KU);n==null&&ql();var r=n[t];return r==null&&ql(),r},hTe=function(t){var n=_.useContext(YU);n==null&&ql();var r=n[t];return r==null&&ql(),r},mTe=function(){var t=_.useContext(ZU);return t};function eu(e){"@babel/helpers - typeof";return eu=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},eu(e)}function gTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yTe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kCe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?i:t&&t.length&&se(a)&&se(o)?t.slice(a,o+1):[]};function f9(e){return e==="number"?[0,"auto"]:void 0}var Kx=function(t,n,r,a){var o=t.graphicalItems,i=t.tooltipAxis,s=Wv(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(c,l){var u,f=(u=l.props.data)!==null&&u!==void 0?u:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var d;if(i.dataKey&&!i.allowDuplicatedCategory){var h=f===void 0?s:f;d=Ak(h,i.dataKey,a)}else d=f&&f[r]||s[r];return d?[].concat(au(c),[y_e(l,d)]):c},[])},wM=function(t,n,r,a){var o=a||{x:t.chartX,y:t.chartY},i=NCe(o,r),s=t.orderedTooltipTicks,c=t.tooltipAxis,l=t.tooltipTicks,u=t_e(i,s,l,c);if(u>=0&&l){var f=l[u]&&l[u].value,d=Kx(t,n,u,f),h=MCe(r,s,u,o);return{activeTooltipIndex:u,activeLabel:f,activePayload:d,activeCoordinate:h}}return null},DCe=function(t,n){var r=n.axes,a=n.graphicalItems,o=n.axisType,i=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,l=n.dataEndIndex,u=t.layout,f=t.children,d=t.stackOffset,h=gU(u,o);return r.reduce(function(g,p){var m,y=p.type.defaultProps!==void 0?Y(Y({},p.type.defaultProps),p.props):p.props,v=y.type,b=y.dataKey,k=y.allowDataOverflow,w=y.allowDuplicatedCategory,x=y.scale,j=y.ticks,S=y.includeHidden,A=y[i];if(g[A])return g;var C=Wv(t.data,{graphicalItems:a.filter(function(q){var ne,$=i in q.props?q.props[i]:(ne=q.type.defaultProps)===null||ne===void 0?void 0:ne[i];return $===A}),dataStartIndex:c,dataEndIndex:l}),O=C.length,N,L,z;sCe(y.domain,k,v)&&(N=mx(y.domain,null,k),h&&(v==="number"||x!=="auto")&&(z=$f(C,b,"category")));var T=f9(v);if(!N||N.length===0){var I,M=(I=y.domain)!==null&&I!==void 0?I:T;if(b){if(N=$f(C,b,v),v==="category"&&h){var P=Wue(N);w&&P?(L=N,N=qg(0,O)):w||(N=eN(M,N,p).reduce(function(q,ne){return q.indexOf(ne)>=0?q:[].concat(au(q),[ne])},[]))}else if(v==="category")w?N=N.filter(function(q){return q!==""&&!Ae(q)}):N=eN(M,N,p).reduce(function(q,ne){return q.indexOf(ne)>=0||ne===""||Ae(ne)?q:[].concat(au(q),[ne])},[]);else if(v==="number"){var D=i_e(C,a.filter(function(q){var ne,$,H=i in q.props?q.props[i]:(ne=q.type.defaultProps)===null||ne===void 0?void 0:ne[i],G="hide"in q.props?q.props.hide:($=q.type.defaultProps)===null||$===void 0?void 0:$.hide;return H===A&&(S||!G)}),b,o,u);D&&(N=D)}h&&(v==="number"||x!=="auto")&&(z=$f(C,b,"category"))}else h?N=qg(0,O):s&&s[A]&&s[A].hasStack&&v==="number"?N=d==="expand"?[0,1]:yU(s[A].stackGroups,c,l):N=mU(C,a.filter(function(q){var ne=i in q.props?q.props[i]:q.type.defaultProps[i],$="hide"in q.props?q.props.hide:q.type.defaultProps.hide;return ne===A&&(S||!$)}),v,u,!0);if(v==="number")N=Wx(f,N,A,o,j),M&&(N=mx(M,N,k));else if(v==="category"&&M){var U=M,W=N.every(function(q){return U.indexOf(q)>=0});W&&(N=U)}}return Y(Y({},g),{},pe({},A,Y(Y({},y),{},{axisType:o,domain:N,categoricalDomain:z,duplicateDomain:L,originalDomain:(m=y.domain)!==null&&m!==void 0?m:T,isCategorical:h,layout:u})))},{})},zCe=function(t,n){var r=n.graphicalItems,a=n.Axis,o=n.axisType,i=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,l=n.dataEndIndex,u=t.layout,f=t.children,d=Wv(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:l}),h=d.length,g=gU(u,o),p=-1;return r.reduce(function(m,y){var v=y.type.defaultProps!==void 0?Y(Y({},y.type.defaultProps),y.props):y.props,b=v[i],k=f9("number");if(!m[b]){p++;var w;return g?w=qg(0,h):s&&s[b]&&s[b].hasStack?(w=yU(s[b].stackGroups,c,l),w=Wx(f,w,b,o)):(w=mx(k,mU(d,r.filter(function(x){var j,S,A=i in x.props?x.props[i]:(j=x.type.defaultProps)===null||j===void 0?void 0:j[i],C="hide"in x.props?x.props.hide:(S=x.type.defaultProps)===null||S===void 0?void 0:S.hide;return A===b&&!C}),"number",u),a.defaultProps.allowDataOverflow),w=Wx(f,w,b,o)),Y(Y({},m),{},pe({},b,Y(Y({axisType:o},a.defaultProps),{},{hide:!0,orientation:Rr(ICe,"".concat(o,".").concat(p%2),null),domain:w,originalDomain:k,isCategorical:g,layout:u})))}return m},{})},$Ce=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,o=n.AxisComp,i=n.graphicalItems,s=n.stackGroups,c=n.dataStartIndex,l=n.dataEndIndex,u=t.children,f="".concat(a,"Id"),d=ka(u,o),h={};return d&&d.length?h=DCe(t,{axes:d,graphicalItems:i,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:c,dataEndIndex:l}):i&&i.length&&(h=zCe(t,{Axis:o,graphicalItems:i,axisType:a,axisIdKey:f,stackGroups:s,dataStartIndex:c,dataEndIndex:l})),h},RCe=function(t){var n=yc(t),r=gf(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:DE(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:gx(n,r)}},kM=function(t){var n=t.children,r=t.defaultShowTooltip,a=or(n,Jl),o=0,i=0;return t.data&&t.data.length!==0&&(i=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(o=a.props.startIndex),a.props.endIndex>=0&&(i=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!r}},LCe=function(t){return!t||!t.length?!1:t.some(function(n){var r=eo(n&&n.type);return r&&r.indexOf("Bar")>=0})},xM=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},BCe=function(t,n){var r=t.props,a=t.graphicalItems,o=t.xAxisMap,i=o===void 0?{}:o,s=t.yAxisMap,c=s===void 0?{}:s,l=r.width,u=r.height,f=r.children,d=r.margin||{},h=or(f,Jl),g=or(f,Jc),p=Object.keys(c).reduce(function(w,x){var j=c[x],S=j.orientation;return!j.mirror&&!j.hide?Y(Y({},w),{},pe({},S,w[S]+j.width)):w},{left:d.left||0,right:d.right||0}),m=Object.keys(i).reduce(function(w,x){var j=i[x],S=j.orientation;return!j.mirror&&!j.hide?Y(Y({},w),{},pe({},S,Rr(w,"".concat(S))+j.height)):w},{top:d.top||0,bottom:d.bottom||0}),y=Y(Y({},m),p),v=y.bottom;h&&(y.bottom+=h.props.height||Jl.defaultProps.height),g&&n&&(y=a_e(y,a,r,n));var b=l-y.left-y.right,k=u-y.top-y.bottom;return Y(Y({brushBottom:v},y),{},{width:Math.max(b,0),height:Math.max(k,0)})},FCe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},UCe=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,o=a===void 0?"axis":a,i=t.validateTooltipEventTypes,s=i===void 0?["axis"]:i,c=t.axisComponents,l=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,d=function(y,v){var b=v.graphicalItems,k=v.stackGroups,w=v.offset,x=v.updateId,j=v.dataStartIndex,S=v.dataEndIndex,A=y.barSize,C=y.layout,O=y.barGap,N=y.barCategoryGap,L=y.maxBarSize,z=xM(C),T=z.numericAxisName,I=z.cateAxisName,M=LCe(b),P=[];return b.forEach(function(D,U){var W=Wv(y.data,{graphicalItems:[D],dataStartIndex:j,dataEndIndex:S}),q=D.type.defaultProps!==void 0?Y(Y({},D.type.defaultProps),D.props):D.props,ne=q.dataKey,$=q.maxBarSize,H=q["".concat(T,"Id")],G=q["".concat(I,"Id")],Q={},te=c.reduce(function(wo,Ri){var qv=v["".concat(Ri.axisType,"Map")],yA=q["".concat(Ri.axisType,"Id")];qv&&qv[yA]||Ri.axisType==="zAxis"||ql();var vA=qv[yA];return Y(Y({},wo),{},pe(pe({},Ri.axisType,vA),"".concat(Ri.axisType,"Ticks"),gf(vA)))},Q),V=te[I],Z=te["".concat(I,"Ticks")],J=k&&k[H]&&k[H].hasStack&&m_e(D,k[H].stackGroups),F=eo(D.type).indexOf("Bar")>=0,re=gx(V,Z),ce=[],je=M&&n_e({barSize:A,stackGroups:k,totalSize:FCe(te,I)});if(F){var we,tt,Zn=Ae($)?L:$,X=(we=(tt=gx(V,Z,!0))!==null&&tt!==void 0?tt:Zn)!==null&&we!==void 0?we:0;ce=r_e({barGap:O,barCategoryGap:N,bandSize:X!==re?X:re,sizeList:je[G],maxBarSize:Zn}),X!==re&&(ce=ce.map(function(wo){return Y(Y({},wo),{},{position:Y(Y({},wo.position),{},{offset:wo.position.offset-X/2})})}))}var sc=D&&D.type&&D.type.getComposedData;sc&&P.push({props:Y(Y({},sc(Y(Y({},te),{},{displayedData:W,props:y,dataKey:ne,item:D,bandSize:re,barPosition:ce,offset:w,stackedData:J,layout:C,dataStartIndex:j,dataEndIndex:S}))),{},pe(pe(pe({key:D.key||"item-".concat(U)},T,te[T]),I,te[I]),"animationId",x)),childIndex:nfe(D,y.children),item:D})}),P},h=function(y,v){var b=y.props,k=y.dataStartIndex,w=y.dataEndIndex,x=y.updateId;if(!KC({props:b}))return null;var j=b.children,S=b.layout,A=b.stackOffset,C=b.data,O=b.reverseStackOrder,N=xM(S),L=N.numericAxisName,z=N.cateAxisName,T=ka(j,r),I=p_e(C,T,"".concat(L,"Id"),"".concat(z,"Id"),A,O),M=c.reduce(function(q,ne){var $="".concat(ne.axisType,"Map");return Y(Y({},q),{},pe({},$,$Ce(b,Y(Y({},ne),{},{graphicalItems:T,stackGroups:ne.axisType===L&&I,dataStartIndex:k,dataEndIndex:w}))))},{}),P=BCe(Y(Y({},M),{},{props:b,graphicalItems:T}),v==null?void 0:v.legendBBox);Object.keys(M).forEach(function(q){M[q]=u(b,M[q],P,q.replace("Map",""),n)});var D=M["".concat(z,"Map")],U=RCe(D),W=d(b,Y(Y({},M),{},{dataStartIndex:k,dataEndIndex:w,updateId:x,graphicalItems:T,stackGroups:I,offset:P}));return Y(Y({formattedGraphicalItems:W,graphicalItems:T,offset:P,stackGroups:I},U),M)},g=function(m){function y(v){var b,k,w;return wCe(this,y),w=jCe(this,y,[v]),pe(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),pe(w,"accessibilityManager",new iCe),pe(w,"handleLegendBBoxUpdate",function(x){if(x){var j=w.state,S=j.dataStartIndex,A=j.dataEndIndex,C=j.updateId;w.setState(Y({legendBBox:x},h({props:w.props,dataStartIndex:S,dataEndIndex:A,updateId:C},Y(Y({},w.state),{},{legendBBox:x}))))}}),pe(w,"handleReceiveSyncEvent",function(x,j,S){if(w.props.syncId===x){if(S===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(j)}}),pe(w,"handleBrushChange",function(x){var j=x.startIndex,S=x.endIndex;if(j!==w.state.dataStartIndex||S!==w.state.dataEndIndex){var A=w.state.updateId;w.setState(function(){return Y({dataStartIndex:j,dataEndIndex:S},h({props:w.props,dataStartIndex:j,dataEndIndex:S,updateId:A},w.state))}),w.triggerSyncEvent({dataStartIndex:j,dataEndIndex:S})}}),pe(w,"handleMouseEnter",function(x){var j=w.getMouseInfo(x);if(j){var S=Y(Y({},j),{},{isTooltipActive:!0});w.setState(S),w.triggerSyncEvent(S);var A=w.props.onMouseEnter;ke(A)&&A(S,x)}}),pe(w,"triggeredAfterMouseMove",function(x){var j=w.getMouseInfo(x),S=j?Y(Y({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(S),w.triggerSyncEvent(S);var A=w.props.onMouseMove;ke(A)&&A(S,x)}),pe(w,"handleItemMouseEnter",function(x){w.setState(function(){return{isTooltipActive:!0,activeItem:x,activePayload:x.tooltipPayload,activeCoordinate:x.tooltipPosition||{x:x.cx,y:x.cy}}})}),pe(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),pe(w,"handleMouseMove",function(x){x.persist(),w.throttleTriggeredAfterMouseMove(x)}),pe(w,"handleMouseLeave",function(x){w.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};w.setState(j),w.triggerSyncEvent(j);var S=w.props.onMouseLeave;ke(S)&&S(j,x)}),pe(w,"handleOuterEvent",function(x){var j=tfe(x),S=Rr(w.props,"".concat(j));if(j&&ke(S)){var A,C;/.*touch.*/i.test(j)?C=w.getMouseInfo(x.changedTouches[0]):C=w.getMouseInfo(x),S((A=C)!==null&&A!==void 0?A:{},x)}}),pe(w,"handleClick",function(x){var j=w.getMouseInfo(x);if(j){var S=Y(Y({},j),{},{isTooltipActive:!0});w.setState(S),w.triggerSyncEvent(S);var A=w.props.onClick;ke(A)&&A(S,x)}}),pe(w,"handleMouseDown",function(x){var j=w.props.onMouseDown;if(ke(j)){var S=w.getMouseInfo(x);j(S,x)}}),pe(w,"handleMouseUp",function(x){var j=w.props.onMouseUp;if(ke(j)){var S=w.getMouseInfo(x);j(S,x)}}),pe(w,"handleTouchMove",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(x.changedTouches[0])}),pe(w,"handleTouchStart",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&w.handleMouseDown(x.changedTouches[0])}),pe(w,"handleTouchEnd",function(x){x.changedTouches!=null&&x.changedTouches.length>0&&w.handleMouseUp(x.changedTouches[0])}),pe(w,"triggerSyncEvent",function(x){w.props.syncId!==void 0&&mw.emit(gw,w.props.syncId,x,w.eventEmitterSymbol)}),pe(w,"applySyncEvent",function(x){var j=w.props,S=j.layout,A=j.syncMethod,C=w.state.updateId,O=x.dataStartIndex,N=x.dataEndIndex;if(x.dataStartIndex!==void 0||x.dataEndIndex!==void 0)w.setState(Y({dataStartIndex:O,dataEndIndex:N},h({props:w.props,dataStartIndex:O,dataEndIndex:N,updateId:C},w.state)));else if(x.activeTooltipIndex!==void 0){var L=x.chartX,z=x.chartY,T=x.activeTooltipIndex,I=w.state,M=I.offset,P=I.tooltipTicks;if(!M)return;if(typeof A=="function")T=A(P,x);else if(A==="value"){T=-1;for(var D=0;D=0){var J,F;if(L.dataKey&&!L.allowDuplicatedCategory){var re=typeof L.dataKey=="function"?Z:"payload.".concat(L.dataKey.toString());J=Ak(D,re,T),F=U&&W&&Ak(W,re,T)}else J=D==null?void 0:D[z],F=U&&W&&W[z];if(G||H){var ce=x.props.activeIndex!==void 0?x.props.activeIndex:z;return[_.cloneElement(x,Y(Y(Y({},A.props),te),{},{activeIndex:ce})),null,null]}if(!Ae(J))return[V].concat(au(w.renderActivePoints({item:A,activePoint:J,basePoint:F,childIndex:z,isRange:U})))}else{var je,we=(je=w.getItemByXY(w.state.activeCoordinate))!==null&&je!==void 0?je:{graphicalItem:V},tt=we.graphicalItem,Zn=tt.item,X=Zn===void 0?x:Zn,sc=tt.childIndex,wo=Y(Y(Y({},A.props),te),{},{activeIndex:sc});return[_.cloneElement(X,wo),null,null]}return U?[V,null,null]:[V,null]}),pe(w,"renderCustomized",function(x,j,S){return _.cloneElement(x,Y(Y({key:"recharts-customized-".concat(S)},w.props),w.state))}),pe(w,"renderMap",{CartesianGrid:{handler:Lh,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:Lh},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:Lh},YAxis:{handler:Lh},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((b=v.id)!==null&&b!==void 0?b:mv("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=fF(w.triggeredAfterMouseMove,(k=v.throttleDelay)!==null&&k!==void 0?k:1e3/60),w.state={},w}return ECe(y,m),xCe(y,[{key:"componentDidMount",value:function(){var b,k;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,k=b.children,w=b.data,x=b.height,j=b.layout,S=or(k,ta);if(S){var A=S.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var C=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,O=Kx(this.state,w,A,C),N=this.state.tooltipTicks[A].coordinate,L=(this.state.offset.top+x)/2,z=j==="horizontal",T=z?{x:N,y:L}:{y:N,x:L},I=this.state.formattedGraphicalItems.find(function(P){var D=P.item;return D.type.name==="Scatter"});I&&(T=Y(Y({},T),I.props.points[A].tooltipPosition),O=I.props.points[A].tooltipPayload);var M={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:C,activePayload:O,activeCoordinate:T};this.setState(M),this.renderCursor(S),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,k){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==k.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var w,x;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0}})}return null}},{key:"componentDidUpdate",value:function(b){Ck([or(b.children,ta)],[or(this.props.children,ta)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=or(this.props.children,ta);if(b&&typeof b.props.shared=="boolean"){var k=b.props.shared?"axis":"item";return s.indexOf(k)>=0?k:o}return o}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var k=this.container,w=k.getBoundingClientRect(),x=Twe(w),j={chartX:Math.round(b.pageX-x.left),chartY:Math.round(b.pageY-x.top)},S=w.width/k.offsetWidth||1,A=this.inRange(j.chartX,j.chartY,S);if(!A)return null;var C=this.state,O=C.xAxisMap,N=C.yAxisMap,L=this.getTooltipEventType();if(L!=="axis"&&O&&N){var z=yc(O).scale,T=yc(N).scale,I=z&&z.invert?z.invert(j.chartX):null,M=T&&T.invert?T.invert(j.chartY):null;return Y(Y({},j),{},{xValue:I,yValue:M})}var P=wM(this.state,this.props.data,this.props.layout,A);return P?Y(Y({},j),P):null}},{key:"inRange",value:function(b,k){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,x=this.props.layout,j=b/w,S=k/w;if(x==="horizontal"||x==="vertical"){var A=this.state.offset,C=j>=A.left&&j<=A.left+A.width&&S>=A.top&&S<=A.top+A.height;return C?{x:j,y:S}:null}var O=this.state,N=O.angleAxisMap,L=O.radiusAxisMap;if(N&&L){var z=yc(N);return rN({x:j,y:S},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,k=this.getTooltipEventType(),w=or(b,ta),x={};w&&k==="axis"&&(w.props.trigger==="click"?x={onClick:this.handleClick}:x={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var j=cg(this.props,this.handleOuterEvent);return Y(Y({},j),x)}},{key:"addListener",value:function(){mw.on(gw,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){mw.removeListener(gw,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,k,w){for(var x=this.state.formattedGraphicalItems,j=0,S=x.length;j");return e}const h9=_.forwardRef(({id:e,className:t,children:n,config:r,...a},o)=>{const i=_.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return E.jsx(d9.Provider,{value:{config:r},children:E.jsxs("div",{"data-chart":s,ref:o,className:be("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...a,children:[E.jsx(WCe,{id:s,config:r}),E.jsx(dF,{children:n})]})})});h9.displayName="Chart";const WCe=({id:e,config:t})=>{const n=Object.entries(t).filter(([r,a])=>a.theme||a.color);return n.length?E.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(VCe).map(([r,a])=>` +${a} [data-chart=${e}] { +${n.map(([o,i])=>{var c;const s=((c=i.theme)==null?void 0:c[r])||i.color;return s?` --color-${o}: ${s};`:null}).join(` +`)} +} +`).join(` +`)}}):null},qCe=ta,m9=_.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:i,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:f,labelKey:d},h)=>{const{config:g}=p9(),p=_.useMemo(()=>{var w;if(a||!(t!=null&&t.length))return null;const[y]=t,v=`${d||y.dataKey||y.name||"value"}`,b=Yx(g,y,v),k=!d&&typeof i=="string"?((w=g[i])==null?void 0:w.label)||i:b==null?void 0:b.label;return s?E.jsx("div",{className:be("font-medium",c),children:s(k,t)}):k?E.jsx("div",{className:be("font-medium",c),children:k}):null},[i,s,t,a,c,g,d]);if(!e||!(t!=null&&t.length))return null;const m=t.length===1&&r!=="dot";return E.jsxs("div",{ref:h,className:be("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[m?null:p,E.jsx("div",{className:"grid gap-1.5",children:t.map((y,v)=>{const b=`${f||y.name||y.dataKey||"value"}`,k=Yx(g,y,b),w=u||y.payload.fill||y.color;return E.jsx("div",{className:be("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:l&&(y==null?void 0:y.value)!==void 0&&y.name?l(y.value,y.name,y,v,y.payload):E.jsxs(E.Fragment,{children:[k!=null&&k.icon?E.jsx(k.icon,{}):!o&&E.jsx("div",{className:be("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":m&&r==="dashed"}),style:{"--color-bg":w,"--color-border":w}}),E.jsxs("div",{className:be("flex flex-1 justify-between leading-none",m?"items-end":"items-center"),children:[E.jsxs("div",{className:"grid gap-1.5",children:[m?p:null,E.jsx("span",{className:"text-muted-foreground",children:(k==null?void 0:k.label)||y.name})]}),y.value&&E.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:y.value.toLocaleString()})]})]})},y.dataKey)})})]})});m9.displayName="ChartTooltip";const GCe=_.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:a},o)=>{const{config:i}=p9();return n!=null&&n.length?E.jsx("div",{ref:o,className:be("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>{const c=`${a||s.dataKey||"value"}`,l=Yx(i,s,c);return E.jsxs("div",{className:be("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[l!=null&&l.icon&&!t?E.jsx(l.icon,{}):E.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),l==null?void 0:l.label]},s.value)})}):null});GCe.displayName="ChartLegend";function Yx(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let a=n;return n in t&&typeof t[n]=="string"?a=t[n]:r&&n in r&&typeof r[n]=="string"&&(a=r[n]),a in e?e[a]:e[n]}const jM=["#FF6384","#36A2EB","#FFCE56","#4BC0C0","#9966FF","#FF9F40","#FF6384"],KCe=({stats:e,foodieRank:t,allTimeMealCount:n})=>{if(!e)return null;const r=Object.entries(e==null?void 0:e.mealsByDay).map(([a,o])=>({name:a,value:o}));return E.jsxs(Gs,{className:"w-full",children:[E.jsx(Dl,{children:E.jsx(Ad,{children:"Your Stats"})}),E.jsxs(Ks,{className:"space-y-6",children:[E.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Meal Count"}),E.jsxs("div",{className:"flex items-center space-x-2",children:[E.jsx(u7,{className:"h-6 w-6 text-primary"}),E.jsx("p",{className:"text-2xl font-bold",children:n})]})]}),E.jsxs("div",{className:"space-y-2",children:[E.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Foodie Rank"}),E.jsxs("div",{className:"flex items-center space-x-2",children:[E.jsx(s7,{className:"h-6 w-6 text-yellow-500"}),E.jsx("p",{className:"text-2xl font-bold",children:t})]})]})]}),E.jsxs("div",{children:[E.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Meals by Day of Week"}),E.jsx("div",{className:"h-64",children:n?E.jsx(h9,{config:{mealsByDay:{label:"Meals by Day",color:"hsl(var(--chart-1))"}},children:E.jsx(dF,{width:"100%",height:"100%",children:E.jsxs(HCe,{children:[E.jsx(bo,{data:r,cx:"50%",cy:"50%",labelLine:!1,outerRadius:80,fill:"#8884d8",dataKey:"value",label:({name:a,percent:o})=>`${a} ${(o*100).toFixed(0)}%`,children:r.map((a,o)=>E.jsx($E,{fill:jM[o%jM.length]},`cell-${o}`))}),E.jsx(qCe,{content:E.jsx(m9,{})})]})})}):E.jsx("div",{className:"text-sm font-medium",children:"No Meals Found"})})]})]})]})},YCe=()=>{const e=new Date,t=e.getFullYear()-1,n=e.getMonth()+2,r=n>12?t+1:t,a=n>12?n-12:n,o=String(a).padStart(2,"0");return`${r}-${o}`},ZCe=e=>{const[t,n]=e.split("-").map(Number);if(!n||!t||n<1||n>12)throw new Error('Invalid date string. Use format "YYYY-MM".');const r=new Date(t,n,1);return new Date(r.getTime()-1).getTime()},g9=e=>{const[t,n]=e.split("-").map(Number),r=new Date(t,n-1,1);return Math.floor(r.getTime()/1e3)},QCe=e=>{const t={Sunday:0,Monday:0,Tuesday:0,Wednesday:0,Thursday:0,Friday:0,Saturday:0};return e.forEach(({info:{time:r}})=>{const o=new Date(Number(r.seconds)*1e3).toLocaleString("en-US",{weekday:"long"});t.hasOwnProperty(o)&&t[o]++}),Object.entries(t).filter(([,r])=>r>0).reduce((r,[a,o])=>(r[a]=o,r),{})},y9=()=>{const e=new Date,t=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getFullYear();return{month:t,year:n}},v9=()=>{const e=new Date,t=e.getFullYear(),n=t-1,r=e.getMonth(),a=[];for(let o=0;o<12;o++){const i=(r-o+12)%12,s=r-o<0?n:t,c=(i+1).toString().padStart(2,"0");a.push(`${s}-${c}`)}return a},XCe=e=>{const t=new Date,n=t.getFullYear(),r=t.getMonth(),a=v9(),o=Object.fromEntries(a.map(c=>[c,[]])),i=new Date(n,r,1).getTime()-365*24*60*60*1e3;return e.filter(c=>Number(c.info.time.seconds)*1e3>=i&&Number(c.info.time.seconds)*1e3{const l=new Date(Number(c.info.time.seconds)*1e3),u=`${l.getFullYear()}-${(l.getMonth()+1).toString().padStart(2,"0")}`;o[u]&&o[u].push(c)}),o},JCe=({mealsGroupedByMonth:e})=>_.useMemo(()=>Object.entries(e).map(([t,n])=>({month:t,mealsByDay:QCe(n)})),[e]),eIe=({setActiveTab:e})=>{const t=()=>{e(Fa.MEAL_REGISTRATION)};return E.jsx(Gs,{className:"p-6 text-center",children:E.jsxs(Ks,{className:"flex flex-col items-center",children:[E.jsx("img",{src:`${c$}/empty-meals-illustration.webp`,alt:"no-meals-illustration",className:"h-56 w-56 rounded-xl"}),E.jsx("h3",{className:"text-xl font-semibold mt-4 mb-2",children:"No meals found"}),E.jsx("p",{className:"text-gray-600 max-w-md",children:"You haven't participated in any meals in the selected month. Start your culinary journey by registering for an upcoming meal!"}),E.jsx(si,{className:"mt-4",onClick:t,children:"Explore Upcoming Meals"})]})})},{month:tIe,year:nIe}=y9(),rIe=({setActiveTab:e,updateMeal:t,meals:n,foodieRank:r,allTimeMealCount:a})=>{const[o,i]=_.useState(`${nIe}-${tIe}`),s=_.useMemo(()=>XCe(n.filter(({info:{registered:f}})=>f)),[n]),c=JCe({mealsGroupedByMonth:s}),l=c.find(f=>f.month===o),u=Object.values((l==null?void 0:l.mealsByDay)??{}).reduce((f,d)=>f+d,0);return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex justify-between items-center",children:[E.jsx("h2",{className:"text-2xl font-bold",children:"History & Stats"}),E.jsxs(K6,{value:o,onValueChange:i,children:[E.jsx(cE,{className:"w-[180px]",children:E.jsx(Y6,{placeholder:"Select month"})}),E.jsx(lE,{children:c.map(f=>E.jsx(uE,{value:f.month,children:new Date(f.month).toLocaleString("default",{month:"long",year:"numeric"})},f.month))})]})]}),E.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[u===0?E.jsx(eIe,{setActiveTab:e}):E.jsxs("div",{children:[E.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Past Meals"}),E.jsx("div",{className:"space-y-4",children:(s[o]??[]).map(f=>E.jsx(hm,{updateMeal:t,isWalletConnected:!0,meal:f,isPastMeal:!0},f.id))})]}),E.jsx(KCe,{allTimeMealCount:a,foodieRank:r,stats:l})]})]})},_M=g9(YCe()),SM=Math.floor(Date.now()/1e3)+30*24*60*60,aIe=()=>{const[e,t]=_.useState(!0),[n,r]=_.useState(!1),{address:a,isConnecting:o}=kB(),{data:i,refetch:s}=Gu({functionName:"is_admin",enabled:!1,abi:Yi,address:Ki,args:[a]}),{data:c,refetch:l}=Gu({functionName:"is_allowed_user",enabled:!1,abi:Yi,address:Ki,args:[a]}),{data:u,refetch:f}=Gu({enabled:!1,functionName:"get_participation_report_by_time",abi:Yi,address:Ki,args:[{seconds:0},{seconds:2734816767}]}),{data:d,refetch:h}=Gu({functionName:"get_events_infos_by_time",enabled:!1,abi:Yi,address:Ki,args:[{seconds:_M},{seconds:SM}]}),{data:g,refetch:p}=Gu({functionName:"get_user_events_by_time",enabled:!1,abi:Yi,address:Ki,args:[a,{seconds:_M},{seconds:SM}]}),[m,y]=_.useState([]),[v,b]=_.useState([]);_.useEffect(()=>b(d),[d]),_.useEffect(()=>y(g),[g]);const{foodieRank:k,allTimeMealCount:w}=a?iIe(u??[],a):{foodieRank:0,allTimeMealCount:0},x=_.useMemo(()=>oIe(v,m),[v,m]),j=_.useCallback(async C=>{const O=x.map(I=>I.id).indexOf(C),N=x[O],L=Number(N.info.number_of_participants),z=N.info.registered,T={...N,info:{...N.info,registered:!N.info.registered,number_of_participants:z?L-1:L+1}};f(),y([...x.slice(0,O),{...T},...x.slice(O+1)]),b([...x.slice(0,O),{...T},...x.slice(O+1)])},[x]);_.useEffect(()=>{o||(async()=>{try{await Promise.all([f(),a?s():Promise.resolve(!1),a?l():Promise.resolve(!1),h(),a?p():Promise.resolve([])]),t(!1),a&&r(!0)}catch(O){console.log("Caught an error while fetching meal events:",O)}})()},[a,o]);const S=(x==null?void 0:x.filter(C=>Number(C.info.time.seconds)*1e3>Date.now()).slice(0,7))??[],A=(x==null?void 0:x.filter(C=>Number(C.info.time.seconds)*1e3<=Date.now()))??[];return{isAdmin:i,pastMeals:A,foodieRank:k,futureMeals:S,isAllowedUser:c,allTimeMealCount:w,loadingAllEvents:e,isSuccessFetchingUserEvents:n,updateMeal:j,setSuccessFetchingUserEvents:r}},oIe=(e,t)=>t!=null&&t.length?e==null?void 0:e.map(n=>({...n,info:{...n.info,registered:!!(t!=null&&t.find(({id:r,info:{registered:a}})=>n.id===r&&a))}})):e??[],iIe=(e,t)=>{var a;const n=e.sort(({n_participations:o},{n_participations:i})=>ot.includes(o.toString(16)))+1,r=Number(((a=e.find(({user:o})=>t.includes(o.toString(16))))==null?void 0:a.n_participations)??0);return{foodieRank:n,allTimeMealCount:r}},b9=_.forwardRef(({className:e,...t},n)=>E.jsx("textarea",{className:be("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));b9.displayName="Textarea";const Zx=_.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:be("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Zx.displayName="Input";const sIe=(e,t="data.csv")=>{const n=Array.isArray(e)?e:[e],r=Object.keys(n[0]),o=[r.join(","),...n.map(l=>r.map(u=>JSON.stringify(l[u]||"")).join(","))].join(` +`),i=new Blob([o],{type:"text/csv;charset=utf-8;"}),s=document.createElement("a"),c=URL.createObjectURL(i);s.href=c,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(c)},{month:cIe,year:lIe}=y9(),uIe=()=>{const[e,t]=_.useState(),[n,r]=_.useState([]),[a,o]=_.useState(""),[i,s]=_.useState(`${lIe}-${cIe}`),[c,l]=_.useState(""),u=v9(),{contract:f}=GS({abi:Yi,address:Ki}),d=()=>{const m=[...n];JSON.parse(a).forEach(({name:v,email:b,address:k})=>{const w=m.find(({user:x})=>k.includes(x.split("").slice(2).join("")));w.email=b,w.name=v}),o(""),r(m)},h=async()=>{await f.populate("add_allowed_user",[e]),t("")},g=()=>{sIe(n)};_.useEffect(()=>{(async()=>{const y=g9(i),v=ZCe(i),b=await f.get_participation_report_by_time({seconds:Math.floor(y/1e3)},{seconds:Math.floor(v/1e3)});r(b.map(({user:k,n_participations:w})=>({user:"0x"+k.toString(16),n_participations:Number(w)})))})()},[i]);const p=_.useMemo(()=>n.filter(({user:m,name:y})=>m.includes(c)||(y==null?void 0:y.includes(c))),[c,n]);return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center space-y-4 sm:space-y-0",children:[E.jsx("h2",{className:"text-2xl font-bold",children:"Eligible Wallets"}),E.jsxs("div",{className:"flex items-center space-x-4",children:[E.jsxs(K6,{value:i,onValueChange:s,children:[E.jsx(cE,{className:"w-[180px]",children:E.jsx(Y6,{placeholder:"Select month"})}),E.jsx(lE,{children:u.map(m=>E.jsx(uE,{value:m,children:new Date(m).toLocaleString("default",{month:"long",year:"numeric"})},m))})]}),E.jsxs(si,{disabled:!(n!=null&&n.length),onClick:g,children:[E.jsx(a7,{className:"mr-2 h-4 w-4"}),"Export Stats"]})]})]}),E.jsxs("div",{className:"space-y-4",children:[E.jsxs("div",{className:"relative",children:[E.jsx(i7,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"}),E.jsx(Zx,{type:"text",placeholder:"Search user by address",value:c,onChange:m=>l(m.target.value),className:"pl-10"})]}),E.jsx("div",{className:"h-[300px] overflow-y-auto space-y-4",children:p.map(({user:m,n_participations:y,name:v})=>E.jsxs("div",{className:"flex items-center justify-between p-4 bg-white rounded-lg shadow",children:[E.jsx("span",{className:"font-semibold",children:`${l$(m)} (${v??"Unknown"})`}),E.jsxs(WB,{variant:"secondary",children:["Meals: ",y]})]},m))})]}),E.jsxs(Gs,{children:[E.jsx(Dl,{children:E.jsx(Ad,{children:"Allow User Access"})}),E.jsx(Ks,{children:E.jsxs("div",{className:"flex space-x-2",children:[E.jsx(Zx,{type:"text",placeholder:"Enter user wallet address",value:e,onChange:m=>t(m.target.value)}),E.jsxs(si,{onClick:h,children:[E.jsx(c7,{className:"mr-2 h-4 w-4"}),"Grant Access"]})]})})]}),E.jsxs(Gs,{children:[E.jsx(Dl,{children:E.jsx(Ad,{children:"Enhance Report Details"})}),E.jsx(Ks,{children:E.jsx(b9,{placeholder:'[{"name": "Satoshi", "address": "0x1234...5678", "email": "satoshi@nakamoto"} ... ]',value:a,onChange:m=>o(m.target.value),className:"min-h-[100px]"})}),E.jsx(Gy,{children:E.jsx(si,{onClick:d,children:"Enhance"})})]})]})},fIe=()=>{const e=kB(),[t,n]=_.useState(Fa.MEAL_REGISTRATION),{pastMeals:r,futureMeals:a,isAllowedUser:o,foodieRank:i,allTimeMealCount:s,isAdmin:c,loadingAllEvents:l,isSuccessFetchingUserEvents:u,updateMeal:f,setSuccessFetchingUserEvents:d}=aIe(),h=async()=>{d(!1)};return E.jsxs("div",{className:"min-h-screen w-screen bg-gray-100",children:[E.jsx(noe,{wallet:e,onConnectWallet:h}),E.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:E.jsxs(woe,{value:t,onValueChange:n,className:"space-y-4",children:[E.jsxs(VB,{children:[E.jsxs(dm,{value:Fa.MEAL_REGISTRATION,children:[E.jsx(JV,{className:"mr-2 h-4 w-4"}),"Meal Registration"]}),E.jsxs(dm,{disabled:!e.isConnected,value:Fa.STATS_AND_PREV_MEALS,children:[E.jsx(e7,{className:"mr-2 h-4 w-4"}),"History & Stats"]}),c?E.jsxs(dm,{value:Fa.MANAGEMENT,children:[E.jsx(Jz,{className:"mr-2 h-4 w-4"}),"Management"]}):null]}),E.jsx(pm,{value:Fa.MEAL_REGISTRATION,className:"space-y-12",children:E.jsx(Soe,{updateMeal:f,loadingAllEvents:l,isSuccessFetchingUserEvents:u,isAllowedUser:o,futureMeals:a,pastMeals:r,address:e==null?void 0:e.address,onConnectWallet:h,isWalletConnected:e.isConnected??!1})}),E.jsx(pm,{value:Fa.STATS_AND_PREV_MEALS,className:"space-y-12",children:E.jsx(rIe,{foodieRank:i,allTimeMealCount:s,setActiveTab:n,updateMeal:f,meals:r})}),c?E.jsx(pm,{value:Fa.MANAGEMENT,className:"space-y-12",children:E.jsx(uIe,{})}):null]})})]})};class dIe extends B.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){console.error("Error Boundary caught:",t,n)}render(){return this.state.hasError?this.props.fallback||E.jsx("h1",{children:"Something went wrong."}):this.props.children}}const pIe=({children:e})=>{const{connectors:t}=kae({recommended:[yae(),vae()],includeRecommended:"onlyIfNoConnectors",order:"random"});return E.jsx(Pae,{chains:[eg],provider:Jae(),connectors:t,explorer:Mae,autoConnect:!0,children:e})},hIe=()=>E.jsx(dIe,{children:E.jsx(pIe,{children:E.jsx(fIe,{})})});Wj(document.getElementById("root")).render(E.jsx(hIe,{})); diff --git a/assets/index-Cb6gW8x3.css b/assets/index-Cb6gW8x3.css new file mode 100644 index 0000000..dae2508 --- /dev/null +++ b/assets/index-Cb6gW8x3.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 240 10% 3.9%;--card: 0 0% 100%;--card-foreground: 240 10% 3.9%;--popover: 0 0% 100%;--popover-foreground: 240 10% 3.9%;--primary: 240 5.9% 10%;--primary-foreground: 0 0% 98%;--secondary: 240 4.8% 95.9%;--secondary-foreground: 240 5.9% 10%;--muted: 240 4.8% 95.9%;--muted-foreground: 240 3.8% 46.1%;--accent: 240 4.8% 95.9%;--accent-foreground: 240 5.9% 10%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 0 0% 98%;--border: 240 5.9% 90%;--input: 240 5.9% 90%;--ring: 240 10% 3.9%;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%;--radius: .5rem;--sidebar-background: 0 0% 98%;--sidebar-foreground: 240 5.3% 26.1%;--sidebar-primary: 240 5.9% 10%;--sidebar-primary-foreground: 0 0% 98%;--sidebar-accent: 240 4.8% 95.9%;--sidebar-accent-foreground: 240 5.9% 10%;--sidebar-border: 220 13% 91%;--sidebar-ring: 217.2 91.2% 59.8%}.dark{--background: 240 10% 3.9%;--foreground: 0 0% 98%;--card: 240 10% 3.9%;--card-foreground: 0 0% 98%;--popover: 240 10% 3.9%;--popover-foreground: 0 0% 98%;--primary: 0 0% 98%;--primary-foreground: 240 5.9% 10%;--secondary: 240 3.7% 15.9%;--secondary-foreground: 0 0% 98%;--muted: 240 3.7% 15.9%;--muted-foreground: 240 5% 64.9%;--accent: 240 3.7% 15.9%;--accent-foreground: 0 0% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 0 0% 98%;--border: 240 3.7% 15.9%;--input: 240 3.7% 15.9%;--ring: 240 4.9% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%;--sidebar-background: 240 5.9% 10%;--sidebar-foreground: 240 4.8% 95.9%;--sidebar-primary: 224.3 76.3% 48%;--sidebar-primary-foreground: 0 0% 100%;--sidebar-accent: 240 3.7% 15.9%;--sidebar-accent-foreground: 240 4.8% 95.9%;--sidebar-border: 240 3.7% 15.9%;--sidebar-ring: 217.2 91.2% 59.8%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-1\/2{top:50%}.top-3\.5{top:.875rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3\.5{margin-left:.875rem;margin-right:.875rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-ml-4{margin-left:-1rem}.-mr-4{margin-right:-1rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-auto{margin-top:auto}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.size-4{width:1rem;height:1rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[300px\]{height:300px}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[100px\]{min-height:100px}.min-h-\[30px\]{min-height:30px}.min-h-\[60px\]{min-height:60px}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.w-0{width:0px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-12{width:3rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[--sidebar-width\]{width:var(--sidebar-width)}.w-\[100px\]{width:100px}.w-\[180px\]{width:180px}.w-\[1px\]{width:1px}.w-auto{width:auto}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-10{min-width:2.5rem}.min-w-5{min-width:1.25rem}.min-w-8{min-width:2rem}.min-w-9{min-width:2.25rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-7xl{max-width:80rem}.max-w-\[--skeleton-width\]{max-width:var(--skeleton-width)}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-px{--tw-translate-x: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-px{--tw-translate-x: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-\[1\.5px\]{border-width:1.5px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:var(--color-border)}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-sidebar-border{border-color:hsl(var(--sidebar-border))}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/80{background-color:#000c}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sidebar{background-color:hsl(var(--sidebar-background))}.bg-sidebar-border{background-color:hsl(var(--sidebar-border))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-400{--tw-gradient-from: #60a5fa var(--tw-gradient-from-position);--tw-gradient-to: rgb(96 165 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-700{--tw-gradient-from: #374151 var(--tw-gradient-from-position);--tw-gradient-to: rgb(55 65 81 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-green-500{--tw-gradient-from: #22c55e var(--tw-gradient-from-position);--tw-gradient-to: rgb(34 197 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-orange-500{--tw-gradient-from: #f97316 var(--tw-gradient-from-position);--tw-gradient-to: rgb(249 115 22 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-500{--tw-gradient-from: #ef4444 var(--tw-gradient-from-position);--tw-gradient-to: rgb(239 68 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-teal-500{--tw-gradient-from: #14b8a6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(20 184 166 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-500{--tw-gradient-from: #eab308 var(--tw-gradient-from-position);--tw-gradient-to: rgb(234 179 8 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-blue-600{--tw-gradient-to: #2563eb var(--tw-gradient-to-position)}.to-cyan-500{--tw-gradient-to: #06b6d4 var(--tw-gradient-to-position)}.to-gray-900{--tw-gradient-to: #111827 var(--tw-gradient-to-position)}.to-green-500{--tw-gradient-to: #22c55e var(--tw-gradient-to-position)}.to-indigo-600{--tw-gradient-to: #4f46e5 var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-pink-500{--tw-gradient-to: #ec4899 var(--tw-gradient-to-position)}.to-purple-500{--tw-gradient-to: #a855f7 var(--tw-gradient-to-position)}.to-red-500{--tw-gradient-to: #ef4444 var(--tw-gradient-to-position)}.to-teal-500{--tw-gradient-to: #14b8a6 var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.fill-primary{fill:hsl(var(--primary))}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[0\.8rem\]{font-size:.8rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sidebar-foreground{color:hsl(var(--sidebar-foreground))}.text-sidebar-foreground\/70{color:hsl(var(--sidebar-foreground) / .7)}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-border));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-ring{--tw-ring-color: hsl(var(--ring))}.ring-sidebar-ring{--tw-ring-color: hsl(var(--sidebar-ring))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\,opa\]{transition-property:margin,opa;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#213547;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#f9f9f9;cursor:pointer;transition:border-color .25s}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);top:-.5rem;right:-.5rem;bottom:-.5rem;left:-.5rem}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.first\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\:border-l:first-child{border-left-width:1px}.last\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:border-red-500:hover{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-sidebar-accent:hover{background-color:hsl(var(--sidebar-accent))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\:text-sidebar-accent-foreground:hover{color:hsl(var(--sidebar-accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-accent));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:hsl(var(--sidebar-border))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-sidebar-ring:focus-visible{--tw-ring-color: hsl(var(--sidebar-ring))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.active\:bg-sidebar-accent:active{background-color:hsl(var(--sidebar-accent))}.active\:text-sidebar-accent-foreground:active{color:hsl(var(--sidebar-accent-foreground))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/menu-item:focus-within .group-focus-within\/menu-item\:opacity-100{opacity:1}.group\/menu-item:hover .group-hover\/menu-item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer\/menu-button:hover~.peer-hover\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\[data-variant\=inset\]\]\:bg-sidebar:has([data-variant=inset]){background-color:hsl(var(--sidebar-background))}.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5}.group\/menu-item:has([data-sidebar=menu-action]) .group-has-\[\[data-sidebar\=menu-action\]\]\/menu-item\:pr-8{padding-right:2rem}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:hsl(var(--sidebar-accent))}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent) / .5)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=on\]\:bg-accent[data-state=on],.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[active\=true\]\:font-medium[data-active=true]{font-weight:500}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:hsl(var(--sidebar-accent-foreground))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=on\]\:text-accent-foreground[data-state=on],.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:0}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:.25rem}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=open\]\:hover\:bg-sidebar-accent:hover[data-state=open]{background-color:hsl(var(--sidebar-accent))}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground:hover[data-state=open]{color:hsl(var(--sidebar-accent-foreground))}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]{left:calc(var(--sidebar-width) * -1)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]{right:calc(var(--sidebar-width) * -1)}.group[data-side=left] .group-data-\[side\=left\]\:-right-4{right:-1rem}.group[data-side=right] .group-data-\[side\=right\]\:left-0{left:0}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:hidden{display:none}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!size-8{width:2rem!important;height:2rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[--sidebar-width-icon\]{width:var(--sidebar-width-icon)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)\)\]{width:calc(var(--sidebar-width-icon) + 1rem)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)_\+2px\)\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:w-0{width:0px}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-side=right] .group-data-\[side\=right\]\:rotate-180,.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\[variant\=floating\]\:rounded-lg{border-radius:var(--radius)}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border{border-width:1px}.group[data-side=left] .group-data-\[side\=left\]\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\[side\=right\]\:border-l{border-left-width:1px}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border-sidebar-border{border-color:hsl(var(--sidebar-border))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-0{padding:0!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-2{padding:.5rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\[variant\=floating\]\:shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full:after{content:var(--tw-content);left:100%}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:hover\:bg-sidebar:hover{background-color:hsl(var(--sidebar-background))}.peer\/menu-button[data-size=default]~.peer-data-\[size\=default\]\/menu-button\:top-1\.5{top:.375rem}.peer\/menu-button[data-size=lg]~.peer-data-\[size\=lg\]\/menu-button\:top-2\.5{top:.625rem}.peer\/menu-button[data-size=sm]~.peer-data-\[size\=sm\]\/menu-button\:top-1{top:.25rem}.peer[data-variant=inset]~.peer-data-\[variant\=inset\]\:min-h-\[calc\(100svh-theme\(spacing\.4\)\)\]{min-height:calc(100svh - 1rem)}.peer\/menu-button[data-active=true]~.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:w-auto{width:auto}.sm\:max-w-\[400px\]{max-width:400px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex{display:flex}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.md\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:opacity-0{opacity:0}.after\:md\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:m-2{margin:.5rem}.peer[data-state=collapsed][data-variant=inset]~.md\:peer-data-\[state\=collapsed\]\:peer-data-\[variant\=inset\]\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:ml-0{margin-left:0}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:h-3\.5>svg{height:.875rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:w-3\.5>svg{width:.875rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:hsl(var(--sidebar-accent-foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border) / .5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=left] .\[\[data-side\=left\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right] .\[\[data-side\=right\]_\&\]\:cursor-e-resize{cursor:e-resize}#root{max-width:1280px;margin:0;padding:0} diff --git a/empty-meals-illustration.webp b/empty-meals-illustration.webp new file mode 100644 index 0000000..9eaba2d Binary files /dev/null and b/empty-meals-illustration.webp differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..d72b49e --- /dev/null +++ b/index.html @@ -0,0 +1,18 @@ + + + + + + + StarKitchen | Best kitchen in Natanya + + + + +
+ + diff --git a/starkitchen-logo-transparent.png b/starkitchen-logo-transparent.png new file mode 100644 index 0000000..4196d1a Binary files /dev/null and b/starkitchen-logo-transparent.png differ diff --git a/starkitchen-logo.png b/starkitchen-logo.png new file mode 100644 index 0000000..d51a6b3 Binary files /dev/null and b/starkitchen-logo.png differ diff --git a/vite.svg b/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file